mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
更改
This commit is contained in:
parent
4ff39ff36a
commit
afee12993f
@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<div class="usermain">
|
||||
<div class="rc-main" v-for="(item, index) in list" :key="index">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<div class="online bold"></div>
|
||||
<div class="usercontshow rc-max-width--xl">
|
||||
<div class="usercontend" v-for="(item, index) in list" :key="index">
|
||||
<div class="usercontshow usermain" >
|
||||
<div class="rc-cat" >
|
||||
<div class="rc-center">
|
||||
<div class=" rc-title">
|
||||
<em>
|
||||
@ -19,7 +23,7 @@
|
||||
</div>
|
||||
<div class="rc-footer">
|
||||
<div class="rc-foot">
|
||||
<img :src="item.isDefault?require('../../assets/image/userred.png'):require('../../assets/image/userselect.png')" @click="changeadddress(item,index)"/>
|
||||
<img :src="item.isDefault?require('../../assets/image/userred.png'):require('../../assets/image/userselect.png')" @click="changeadddress(item,index)"/>
|
||||
<span>设置为默认收货地址</span>
|
||||
|
||||
</div>
|
||||
@ -32,17 +36,33 @@
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="online bold rc-md-down"></div>
|
||||
<!-- <div class="usercontend useradd">
|
||||
<img src="../../assets/image/userselect.png" alt="">
|
||||
<span>添加收货地址</span>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="usercontshow useredit">
|
||||
|
||||
<img src="../../assets/image/userselect.png" alt="">
|
||||
<span>添加收货地址</span>
|
||||
</div>
|
||||
<div class="rc-button">
|
||||
<div class="rc-footbutton" @click="onAdd()">
|
||||
<span>新增收货地址</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<MyFooter></MyFooter>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Myheader from '~/components/header.vue'
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
export default {
|
||||
@ -59,29 +79,23 @@ export default {
|
||||
tel: "13000000000",
|
||||
address: "浙江省杭州市西湖区文三路 138 号",
|
||||
isDefault: true,
|
||||
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "李四",
|
||||
tel: "1310000000",
|
||||
isDefault: false,
|
||||
address: "浙江省杭州市拱墅区莫干山路 50 号",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "李四",
|
||||
tel: "1310000000",
|
||||
isDefault: false,
|
||||
address: "浙江省杭州市拱墅区莫干山路 50 号",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeadddress(item,index){
|
||||
console.log(item)
|
||||
},
|
||||
onEdit(item, index) {
|
||||
// let userid = item.id;
|
||||
console.log(item);
|
||||
@ -114,23 +128,24 @@ export default {
|
||||
// },
|
||||
|
||||
//查询人的所有地址
|
||||
async editaddress(user) {
|
||||
user.data.id=844350
|
||||
let data = await selectaddress(user.data.id);
|
||||
this.list=data.data;
|
||||
console.log(this.list);
|
||||
console.log(data);
|
||||
},
|
||||
// async editaddress(user) {
|
||||
// user.data.id=844350
|
||||
// let data = await selectaddress(user.data.id);
|
||||
// this.list=data.data;
|
||||
// console.log(this.list);
|
||||
// console.log(data);
|
||||
// },
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
Myheader,
|
||||
MyFooter
|
||||
},
|
||||
|
||||
mounted() {
|
||||
//地址的查询
|
||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||
this.editaddress(this.usermessage);
|
||||
this.userid = this.usermessage.data.id;
|
||||
// this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||
// this.editaddress(this.usermessage);
|
||||
// this.userid = this.usermessage.data.id;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user