Fix:3256 【商城小程序】收货地址页面,给当前选择的地址增加一个标识,放在地址右下角

This commit is contained in:
modendeveloper
2025-04-09 00:31:05 +08:00
parent 3829e896da
commit fd4adbf383
2 changed files with 19 additions and 2 deletions
@@ -23,6 +23,9 @@
item.district
}}{{ item.detail }}
</view>
<view v-if="currentId === item.id && choosMode" class="tip-icon">
<u-icon name="checkbox-mark" color="#C52733" size="20"></u-icon>
</view>
</view>
<view v-if="!choosMode" class="operation acea-row row-between-wrapper">
<view class="select-btn">
@@ -93,6 +96,13 @@ export default {
pageKeyId: Object.freeze('userAddressIndex')
}
},
computed: {
// 当前地址id
currentId() {
const current = uni.getStorageSync('cartChooseAddress') || {}
return current.id || null
}
},
mounted() {
this.AddressList()
},
@@ -116,6 +126,8 @@ export default {
},
methods: {
tapAddress(item) {
console.log(item);
// 来源订单创建页面
if (this.choosMode === 1) {
uni.setStorageSync('chooseAddress', item)
@@ -229,4 +241,9 @@ export default {
margin-left: 32rpx;
margin-right: 32rpx;
}
.tip-icon{
position: absolute;
right: 10rpx;
bottom: 10rpx;
}
</style>