修改收货地址设置
This commit is contained in:
parent
d9eac85942
commit
98354a5f00
@ -70,23 +70,28 @@
|
||||
<form @submit="formSubmit" report-submit='true'>
|
||||
<view class='addAddress'>
|
||||
<view class='list'>
|
||||
<view class="sel_addr_wrap">
|
||||
|
||||
<view v-if="userAddress.detail != ''" class="sel_addr_update-wrap">
|
||||
<view class="sel_addr_update">
|
||||
<view class="sel_addr_wrap-l">
|
||||
<view class="sel_addr_wrap-l-addr line1">{{userAddress.detail}}</view>
|
||||
<view class="sel_addr_wrap-l-detail line1">{{userAddress.address_detail}}</view>
|
||||
</view>
|
||||
<view class="sel_addr_wrap-r" @click="handleToChoose">修改地址</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="sel_addr_wrap">
|
||||
<view class="sel_addr" @click="handleToChoose">
|
||||
<text>选择收货地址</text>
|
||||
<u-icon name="arrow-right" size="16" color="#40ae36"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="sel_addr_update-wrap">
|
||||
<view class="sel_addr_update">
|
||||
<view class="sel_addr_wrap-l">
|
||||
<view class="sel_addr_wrap-l-addr line1">柏林湾</view>
|
||||
<view class="sel_addr_wrap-l-detail line1">四川省泸州市龙马潭区陶然路三段1号</view>
|
||||
</view>
|
||||
<view class="sel_addr_wrap-r">修改地址</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'>门牌号</view>
|
||||
<input type='text' class="location-input" placeholder='详细地址,例:1栋101号' name='house_number'
|
||||
placeholder-class='placeholder' v-model="userAddress.house_number"></input>
|
||||
</view>
|
||||
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'>姓名</view>
|
||||
<input type='text' placeholder='请输入姓名' name='real_name' :value="userAddress.real_name"
|
||||
@ -109,11 +114,6 @@
|
||||
|
||||
</view> -->
|
||||
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'>详细地址</view>
|
||||
<input type='text' class="location-input" placeholder='请填写具体地址' name='detail'
|
||||
placeholder-class='placeholder' v-model="userAddress.detail"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class='default acea-row row-middle'>
|
||||
<checkbox-group @change='ChangeIsDefault'>
|
||||
@ -184,7 +184,7 @@
|
||||
address_id: 0, //地址id
|
||||
userAddress: {
|
||||
is_default: false,
|
||||
detail: '',
|
||||
detail: ''
|
||||
}, //地址详情
|
||||
region: ['省', '市', '区'],
|
||||
valueRegion: [0, 0, 0],
|
||||
@ -254,7 +254,8 @@
|
||||
// #ifndef H5
|
||||
uni.chooseLocation({
|
||||
success: function(res) {
|
||||
that.userAddress.detail = res.address;
|
||||
that.userAddress.detail = res.name
|
||||
that.userAddress.address_detail = res.address;
|
||||
that.location = `${res.latitude},${res.longitude}`;;
|
||||
}
|
||||
});
|
||||
@ -308,9 +309,6 @@
|
||||
let region = [res.data.province, res.data.city, res.data.district, res.data.street, res
|
||||
.data.village
|
||||
];
|
||||
console.log({
|
||||
...res.data
|
||||
});
|
||||
that.$set(that, 'userAddress', res.data);
|
||||
that.$set(that, 'region', region);
|
||||
that.city_id = res.data.city_id
|
||||
@ -446,7 +444,9 @@
|
||||
formSubmit: function(e) {
|
||||
let that = this,
|
||||
value = e.detail.value;
|
||||
value.location = this.location
|
||||
value.location = that.location
|
||||
value.detail = that.userAddress.detail
|
||||
value.address_detail = that.userAddress.address_detail
|
||||
|
||||
if (!value.real_name) return that.$util.Tips({
|
||||
title: '请填写收货人姓名'
|
||||
|
Loading…
x
Reference in New Issue
Block a user