Browse Source

修改默认地址checked格式错误的问题;修改编辑地址不回显的问题

master
Gao xiaosong 4 years ago
parent
commit
87d0717f78
  1. 8
      components/CitySelect.vue
  2. 6
      manifest.json
  3. 2
      pages/user/address/AddAddress/index.vue
  4. 2
      pages/user/address/AddressManagement/index.vue

8
components/CitySelect.vue

@ -107,14 +107,16 @@ export default {
}, },
watch: { watch: {
items(nextItem) { items(nextItem) {
console.log(nextItem);
this.province = nextItem; this.province = nextItem;
},
defaultValue(next){
this.value=next
} }
}, },
mounted() { mounted() {
console.log(this); console.log(this);
if (this.defaultValue) { if (this.value) {
this.value = this.defaultValue; this.value = this.value;
} }
this.province = this.items; this.province = this.items;
}, },

6
manifest.json

@ -20,7 +20,8 @@
"modules" : { "modules" : {
"OAuth" : {}, "OAuth" : {},
"Payment" : {}, "Payment" : {},
"Share" : {} "Share" : {},
"Geolocation" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -74,7 +75,8 @@
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks" : "https://yixiang.co/app/"
} }
}, },
"ad" : {} "ad" : {},
"geolocation" : {}
}, },
"splashscreen" : { "splashscreen" : {
"ios" : { "ios" : {

2
pages/user/address/AddAddress/index.vue

@ -28,7 +28,7 @@
<view class="checkbox-wrapper"> <view class="checkbox-wrapper">
<checkbox-group @change="ChangeIsDefault"> <checkbox-group @change="ChangeIsDefault">
<label class="well-check"> <label class="well-check">
<checkbox value :checked="userAddress.isDefault ? true : false"></checkbox> <checkbox :value="userAddress.isDefault==1?'checked':''" :checked="userAddress.isDefault ? true : false"></checkbox>
<text class="def">设置为默认地址</text> <text class="def">设置为默认地址</text>
</label> </label>
</checkbox-group> </checkbox-group>

2
pages/user/address/AddressManagement/index.vue

@ -23,7 +23,7 @@
<view class="checkbox-wrapper"> <view class="checkbox-wrapper">
<checkbox-group @change="radioChange(item.id)"> <checkbox-group @change="radioChange(item.id)">
<label class="well-check"> <label class="well-check">
<checkbox value :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox> <checkbox :value="item.isDefault==1?'checked':''" :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox>
<text class="default">设为默认</text> <text class="default">设为默认</text>
</label> </label>
</checkbox-group> </checkbox-group>

Loading…
Cancel
Save