This commit is contained in:
xvv 2024-09-25 11:17:30 +08:00
parent c7c24f8413
commit da6d79a75c

View File

@ -17,11 +17,12 @@
</view>
</view>
<view class="box-xia">
<view class="box-left">
<u-checkbox-group>
<u-checkbox v-model="item.checked" shape="circle" label="默认信息"
@change="chooseDefault(item,$event)"></u-checkbox>
</u-checkbox-group>
<view class="box-left" @click="chooseDefault(item)">
<view class="acvf" v-if="item.checked == false"></view>
<view class="acv" v-else><u-icon name="checkbox-mark" color="#fff" size="14"></u-icon></view>
<view style="font-size: 14px; color: #999; ">默认信息</view>
</view>
<view class="box-right">
<view style="display: flex;" @click="goedit(item)">
@ -55,7 +56,8 @@
return {
title: '',
dataList: '',
checked: false,
checkboxValue1: [],
checked: true,
}
},
onShow() {
@ -65,20 +67,21 @@
},
methods: {
chooseDefault(data,checked) {
if (checked) {
chooseDefault(data) {
console.log(data);
if (data.checked == false) {
data.ifDefault = 1
}else{
} else {
data.ifDefault = 2
}
request({
url: '/business/userManager/mtUserExpressAddress',
method: 'put',
data:data
data: data
}).then((res) => {
if (res.code == 200) {
this.getList()
console.log(res,81);
console.log(res, 81);
}
})
},
@ -96,7 +99,7 @@
}
this.$set(item, 'checked', item.checked); //
})
console.log(res,this.dataList,98);
console.log(res, this.dataList, 98);
this.$forceUpdate()
}
})
@ -115,11 +118,13 @@
})
},
//
delInfo(data){
delInfo(data) {
request({
url: '/business/userManager/mtUserExpressAddress',
method: 'delete',
params:{id:data.id}
params: {
id: data.id
}
}).then((res) => {
if (res.code == 200) {
this.getList()
@ -198,7 +203,10 @@
box-sizing: border-box;
}
.box-left {}
.box-left {
display: flex;
align-items: center;
}
.box-right {
width: 30%;
@ -226,4 +234,28 @@
justify-content: space-between;
margin-top: 20px;
}
.acvf {
border-radius: 50%;
border: 1px solid #eee;
height: 16px;
width: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}
.acv {
border-radius: 50%;
border: 1px solid #1678ff;
height: 16px;
width: 16px;
background: #1678ff;
color: #fff;
margin-right: 10px;
display: flex;
align-items: center;
justify-content: center;
}
</style>