dengjie commit : 代码完善

This commit is contained in:
clay
2023-01-09 18:03:51 +08:00
parent 9c0477da5c
commit c906a7d33a
16 changed files with 198 additions and 173 deletions

View File

@@ -10,7 +10,7 @@
</u--image>
</view>
<view style="display: flex;align-items: center;">
<text style="margin-right: 8rpx;">{{nickname}}</text>
<text>{{nickname}}</text>
<u--image v-if="showEdit==true" src="/static/my/wd_icon_bj.png" width="22rpx" height="22rpx"
@click="changeAvatar()">
</u--image>
@@ -32,7 +32,7 @@
member: false,
showEdit: true,
avatar: '',
nickname: '',
nickname: '用户',
normal: '/static/my/wo_icon_pthy.png',
VIP: '/static/my/wo_icon_vip.png',
};
@@ -43,6 +43,9 @@
}
this.getUser()
},
options: {
styleIsolation: 'shared', // 解除样式隔离
},
methods: {
//修改头像
changeAvatar() {
@@ -63,3 +66,8 @@
}
}
</script>
<style>
/deep/.u-image {
margin-left: 8rpx;
}
</style>

View File

@@ -21,11 +21,14 @@
return {
model: {
userInfo: {
name: '姓名',
phone: '2342233',
name: '',
phone: '',
},
},
};
},
created() {
}
}
</script>

View File

@@ -30,11 +30,11 @@
</view>
</view>
<u-button v-if="type==1" type="success" text="移除" color="#0EBB5B" @click="showModal()"></u-button>
<u-button v-if="type==2" type="success" text="取消收藏" color="#0EBB5B"></u-button>
<u-button v-if="type==2" type="success" text="取消收藏" color="#0EBB5B" @click="showModal()"></u-button>
</u-grid-item>
</u-grid>
<u-modal :show="showM" :content="content" showCancelButton closeOnClickOverlay @confirm="confirm"
@cancel="cancel" @close="close">
<u-modal :show="showM" :content="content" showCancelButton closeOnClickOverlay="false" @confirm="confirm"
@cancel="cancel">
</u-modal>
<view style="font-size: 24rpx;color: #A3A3A3;text-align: center;padding: 26rpx 0;"
v-if="type==1&&productList.length==0">
@@ -96,17 +96,13 @@
},
confirm() {
this.showM = false
console.log('删除成功');
// this.$apiServe.deleteHistoryOrCollection(this.productId).then(res => {
// console.log('删除历史记录或收藏', res);
// this.getHistoryOrCollection()
// }).finally(_ => {})
this.$apiServe.deleteHistoryOrCollection(this.productId).then(res => {
// console.log('删除历史记录或收藏', res.data);
this.productList.splice(this.productId, 1)
}).finally(_ => {})
},
cancel() {
this.showM = false
},
close() {
this.showM = false
}
}
}