This commit is contained in:
2020-07-16 17:39:06 +08:00
parent 91241682de
commit b250d05adf
14 changed files with 497 additions and 72 deletions

View File

@@ -3,7 +3,7 @@
<u-radio-group v-model="current" @change="changeDefault" size="29" active-color="#FF780F">
<u-empty text="暂无收货地址" mode="address" color="#000000" img-width="120" margin-top="300" v-if="!addressList.length"></u-empty>
<view v-for="(item, index) in addressList" :key="index" class="address-item">
<AddressItem :item="item" :current='current' @getAddressList="getAddressList"></AddressItem>
<AddressItem :item="item" :current='current' @getAddressList="getAddressList" :state="state"></AddressItem>
</view>
</u-radio-group>
<view class="address-btn" @click="addAddress">添加地址</view>
@@ -16,12 +16,16 @@ export default {
data() {
return {
current: -1, // radio 标记
addressList: []
addressList: [],
state: '', // 页面状态 是否进页面选择地址
}
},
components: {
AddressItem
},
onLoad(option) {
if(option.type) this.state = option.type;
},
onShow() {
this.getAddressList();
},