合并地址页面

main
jinna 3 years ago
parent b8b787f5d8
commit 2b6e83bbba
  1. 46
      pages/pages_zhentou/myPage/address.vue

@ -56,7 +56,8 @@
收货人 收货人
</view> </view>
<view class="right_item"> <view class="right_item">
<uni-easyinput v-model="buyUser" :inputBorder="false" placeholder="请输入收货人姓名"></uni-easyinput> <uni-easyinput v-model="buyUser" :inputBorder="false"
placeholder="请输入收货人姓名"></uni-easyinput>
</view> </view>
</view> </view>
<view class="content_item"> <view class="content_item">
@ -64,7 +65,8 @@
联系电话 联系电话
</view> </view>
<view class="right_item"> <view class="right_item">
<uni-easyinput v-model="buyPhone" :inputBorder="false" placeholder="请输入联系方式"></uni-easyinput> <uni-easyinput v-model="buyPhone" :inputBorder="false"
placeholder="请输入联系方式"></uni-easyinput>
</view> </view>
</view> </view>
<view class="content_item"> <view class="content_item">
@ -77,8 +79,8 @@
<!-- <view class="right_icon" @click="changeAddress"> <!-- <view class="right_icon" @click="changeAddress">
<image src="../../../static/image/icon-arrow-right.png"></image> <image src="../../../static/image/icon-arrow-right.png"></image>
</view> --> </view> -->
<picker class="picker_box" :range="locationArr" @change="cityChange" mode="multiSelector" <picker class="picker_box" :range="locationArr" @change="cityChange"
@columnchange="columnchange" :value="multiIndex"> mode="multiSelector" @columnchange="columnchange" :value="multiIndex">
<view class="city_box" v-if="province !== '' && city !== ''"> <view class="city_box" v-if="province !== '' && city !== ''">
{{province}} / {{city}} {{district ? '/' : ''}} {{district}} {{province}} / {{city}} {{district ? '/' : ''}} {{district}}
</view> </view>
@ -93,7 +95,8 @@
详细地址 详细地址
</view> </view>
<view class="right_item"> <view class="right_item">
<uni-easyinput type="textarea" :inputBorder="false" autoHeight v-model="address" placeholder="请输入详细地址"></uni-easyinput> <uni-easyinput type="textarea" :inputBorder="false" autoHeight v-model="address"
placeholder="请输入详细地址"></uni-easyinput>
</view> </view>
<!-- <view class="right_icon" @click="handlePosition"> <!-- <view class="right_icon" @click="handlePosition">
<image src="../../../static/image/position.png"></image> <image src="../../../static/image/position.png"></image>
@ -318,7 +321,8 @@
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
uni.request({ uni.request({
url:getApp().globalData.baseUrl + '/address/delete?ids=' + this.addressId, url: getApp().globalData.baseUrl + '/address/delete?ids=' + this
.addressId,
method: "POST", method: "POST",
header: { header: {
'Blade-Auth': 'bearer ' + uni.getStorageSync('token') 'Blade-Auth': 'bearer ' + uni.getStorageSync('token')
@ -402,9 +406,9 @@
var prevPage = pages[pages.length - 2]; // var prevPage = pages[pages.length - 2]; //
console.log(pages) console.log(pages)
console.log(prevPage) console.log(prevPage)
if(prevPage.__route__ == 'pages/pages_zhentou/order/confirmOrder'){ if (prevPage.route == 'pages/pages_zhentou/order/confirmOrder') {
prevPage.__data__.changeAddress(item); uni.setStorageSync('address', JSON.stringify(item))
uni.navigateBack() uni.navigateBack();
} }
} }
}, },
@ -414,7 +418,11 @@
}, },
// //
getData() { getData() {
this.locationArr = [[],[],[]] this.locationArr = [
[],
[],
[]
]
this.allCityData.map(item => { this.allCityData.map(item => {
this.locationArr[0].push(item.province); this.locationArr[0].push(item.province);
}) })
@ -510,7 +518,8 @@
this.locationArr[1].push(item2.city) this.locationArr[1].push(item2.city)
if (item2.city == this.city) { if (item2.city == this.city) {
item2.areas.map(item3 => { item2.areas.map(item3 => {
this.locationArr[2].push(item3.area) this.locationArr[2]
.push(item3.area)
}) })
} }
}) })
@ -544,7 +553,8 @@
this.current = this.current + 1; this.current = this.current + 1;
this.staus = 'loading'; this.staus = 'loading';
uni.request({ uni.request({
url: getApp().globalData.baseUrl + '/address/list?id=' + this.userInfo.id + '&current=' + this url: getApp().globalData.baseUrl + '/address/list?id=' + this.userInfo.id + '&current=' +
this
.current + '&size=' + this.size, .current + '&size=' + this.size,
method: 'GET', method: 'GET',
header: { header: {
@ -599,9 +609,11 @@
height: 25%; height: 25%;
display: flex; display: flex;
align-items: center; align-items: center;
.no_checked_box { .no_checked_box {
width: 100%; width: 100%;
display: flex; display: flex;
.no_checked { .no_checked {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
@ -616,6 +628,7 @@
.check_box { .check_box {
width: 100%; width: 100%;
display: flex; display: flex;
.checked { .checked {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
@ -642,6 +655,7 @@
font-size: 22rpx; font-size: 22rpx;
color: #D73232; color: #D73232;
} }
.no_default { .no_default {
color: #B8B8B8; color: #B8B8B8;
font-size: 22rpx; font-size: 22rpx;
@ -652,9 +666,11 @@
width: 100%; width: 100%;
height: 75%; height: 75%;
display: flex; display: flex;
.top_item { .top_item {
width: 85%; width: 85%;
margin-left: 30rpx; margin-left: 30rpx;
.top { .top {
margin-top: 30rpx; margin-top: 30rpx;
display: flex; display: flex;
@ -684,6 +700,7 @@
} }
} }
} }
.edit_box { .edit_box {
height: 100%; height: 100%;
display: flex; display: flex;
@ -702,6 +719,7 @@
} }
} }
.btn_box { .btn_box {
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
@ -724,11 +742,14 @@
margin-top: 30rpx; margin-top: 30rpx;
} }
} }
.pop_box { .pop_box {
width: 100%; width: 100%;
/deep/ .uni-popup { /deep/ .uni-popup {
width: 100%; width: 100%;
} }
.popup-content { .popup-content {
width: 100%; width: 100%;
background: #fff; background: #fff;
@ -765,6 +786,7 @@
.content_box { .content_box {
width: 100%; width: 100%;
margin-top: 20rpx; margin-top: 20rpx;
.content_item { .content_item {
width: 100%; width: 100%;
padding: 30rpx 0; padding: 30rpx 0;

Loading…
Cancel
Save