From cb623fcefa72d5b54b1e536aa84c3f3851743975 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 20 十一月 2024 11:01:43 +0800
Subject: [PATCH] update 打印可能的空白(不能确定是不是纸张大小超出还是空数据的问题,已经提交了
---
pages/user/address/address.vue | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/pages/user/address/address.vue b/pages/user/address/address.vue
index 82a5fdd..964b65a 100644
--- a/pages/user/address/address.vue
+++ b/pages/user/address/address.vue
@@ -28,7 +28,7 @@
</view>
</view>
<view class="m-t-12 ">
- <view class="desc-gray">我的收获地址</view>
+ <view class="desc-gray">我的收货地址</view>
</view>
<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
@@ -76,6 +76,9 @@
</view>
<view class="desc del t-green m-l-10" v-if="source==='select'" @click="selectAddress(item)">
选择此地址
+ </view>
+ <view class="desc del t-green m-l-10" v-if="source==='home'" @click="selectAddress(item)">
+ 按此地址定位
</view>
</view>
@@ -278,6 +281,7 @@
// that.search_flow = (location.name || '')
that.$store.commit('setAddressDesc', (location.name || location.address || ''))
that.$forceUpdate()
+ that.backpage()
}
// if (!that.submitForm.province && location.provinceName) {
@@ -370,7 +374,7 @@
// };
const {
code,data
- } = that.$http.request('get', '/api/pub/customer/home/address/parse', {
+ } = await that.$http.request('get', '/api/pub/customer/home/address/parse', {
data: {},
params: {
// https://apis.map.qq.com/ws/geocoder/v1/?location=39.984154,116.307490&key=[你的key]&get_poi=1
@@ -379,9 +383,13 @@
})
console.log('定位成功:', data);
if(data){
- var address = data.address || ''
+ var address = data.result&&data.result.address || ''
that.$store.commit('setAddressDesc', (address || ''))
+ that.$forceUpdate()
+
+ that.backpage()
+
}
@@ -524,6 +532,7 @@
this.$store.commit('setDefaultAddress', {
...item
})
+
}
}, err => {
@@ -538,11 +547,20 @@
})
},
async selectAddress(item) {
- await this.$message.confirm('确定选择此地址作为收货地址吗')
//携带,然后返回
- this.$store.commit('setDefaultAddress', {
- ...item
- })
+
+ if(this.source==='home'){
+ this.$store.commit('setAddressDesc', '')
+ this.$store.commit('setDefaultAddress', {
+ ...item
+ })
+ }else{
+ await this.$message.confirm('确定选择此地址作为收货地址吗')
+ this.$store.commit('setDefaultAddress', {
+ ...item
+ })
+
+ }
this.backpage()
},
async deleteAddress(item) {
--
Gitblit v1.9.3