mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
更改
This commit is contained in:
parent
ebc95312fb
commit
00ce4d7f07
@ -44,7 +44,11 @@ color: #FFFFFF;
|
||||
|
||||
}
|
||||
.rc-max-width--xl{
|
||||
padding: 24px 20px 24px 20px;
|
||||
padding: 0px 20px 24px 20px;
|
||||
min-height: 60vh;
|
||||
.rc-cat{
|
||||
margin-top: 20px;
|
||||
}
|
||||
.rc-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="rc-max-width--xl rc-address">
|
||||
<span>所在地区:</span>
|
||||
<addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1"></addressInput>
|
||||
<addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1" :defaultValues="defaultValues"></addressInput>
|
||||
</div>
|
||||
<div class="rc-max-width--xl rc-useaddress">
|
||||
<span>详细地址:</span>
|
||||
@ -52,10 +52,12 @@ export default {
|
||||
userid: null,
|
||||
dialogInfo1:false,
|
||||
usermessage:null,
|
||||
useradrname:[],
|
||||
detailAddress:'',
|
||||
recipientPhone:'',
|
||||
recipient:'',
|
||||
addressid:'',
|
||||
defaultValues:[],
|
||||
list: [
|
||||
{
|
||||
id: 1,
|
||||
@ -162,21 +164,36 @@ export default {
|
||||
MyFooter,
|
||||
addressInput
|
||||
},
|
||||
created(){
|
||||
let provinceName=this.$route.query.provinceName;
|
||||
let districtName=this.$route.query.districtName;
|
||||
let cityName=this.$route.query.cityName
|
||||
let provinceId=this.$route.query.provinceId;
|
||||
let districtNameid=this.$route.query.districtId;
|
||||
let cityId=this.$route.query.cityId;
|
||||
debugger;
|
||||
this.defaultValues=[
|
||||
{
|
||||
id:provinceId,
|
||||
name:provinceName
|
||||
},
|
||||
{
|
||||
id:cityId,
|
||||
name:cityName
|
||||
},
|
||||
{
|
||||
id:districtNameid,
|
||||
name:districtName
|
||||
}
|
||||
];
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// if(this.$route.query.id){
|
||||
this.userid = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
||||
this.recipient=this.$route.query.recipient
|
||||
this.recipientPhone=this.$route.query.recipientPhone
|
||||
this.detailAddress=this.$route.query.detailAddress
|
||||
this.id=this.$route.query.id;
|
||||
console.log(this.recipient,this.recipientPhone,this.detailAddress, this.id)
|
||||
|
||||
// }
|
||||
//地址的查询
|
||||
// this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||
// this.editaddress(this.usermessage);
|
||||
// this.userid = this.usermessage.data.id;
|
||||
this.userid = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
||||
this.recipient=this.$route.query.recipient
|
||||
this.recipientPhone=this.$route.query.recipientPhone
|
||||
this.detailAddress=this.$route.query.detailAddress
|
||||
this.id=this.$route.query.id;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -52,13 +52,14 @@
|
||||
<span>添加收货地址</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-button">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="rc-button">
|
||||
<div class="rc-footbutton" @click="onAdd()">
|
||||
<span>新增收货地址</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<MyFooter></MyFooter>
|
||||
</div>
|
||||
</template>
|
||||
@ -73,27 +74,10 @@ export default {
|
||||
chosenAddressId: "1",
|
||||
checked: true,
|
||||
userid: null,
|
||||
userlist:[],
|
||||
usermessage:null,
|
||||
list: [
|
||||
{
|
||||
id: 1,
|
||||
name: "张三",
|
||||
tel: "13000000000",
|
||||
address: "浙江省杭州市西湖区文三路 138 号",
|
||||
isDefault: true,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "李四",
|
||||
tel: "1310000000",
|
||||
address: "浙江省杭州市拱墅区莫干山路 50 号",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "李四",
|
||||
tel: "1310000000",
|
||||
address: "浙江省杭州市拱墅区莫干山路 50 号",
|
||||
},
|
||||
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -106,22 +90,32 @@ export default {
|
||||
}else{
|
||||
item.isDefault=false;
|
||||
}
|
||||
|
||||
this.editupdate(this.userid,item.id,item.isDefault)
|
||||
this.editaddress();
|
||||
setTimeout(() => {
|
||||
this.editaddress();
|
||||
}, 200);
|
||||
//
|
||||
|
||||
},
|
||||
onEdit(item, index) {
|
||||
// let userid = item.id;
|
||||
console.log(item);
|
||||
// debugger
|
||||
|
||||
this.$router.push({
|
||||
path: "/useraddress/editaddress",
|
||||
query: {
|
||||
recipient: item.recipient,
|
||||
recipientPhone:item.recipientPhone,
|
||||
detailAddress:item.detailAddress,
|
||||
id:item.id
|
||||
id:item.id,
|
||||
provinceName:item.provinceName,
|
||||
districtName:item.cityName,
|
||||
cityName:item.districtName,
|
||||
provinceId:item.provinceId,
|
||||
districtId:item.districtId,
|
||||
cityId:item.cityId,
|
||||
|
||||
},
|
||||
});
|
||||
},
|
||||
@ -145,6 +139,12 @@ export default {
|
||||
}
|
||||
|
||||
let data = await editupdate(useradd);
|
||||
if(data){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '更改成功'
|
||||
});
|
||||
}
|
||||
// if(data){
|
||||
// this.editaddress();
|
||||
// }
|
||||
|
Loading…
Reference in New Issue
Block a user