Commit 6b97c5aa authored by Damon's avatar Damon
parents e816bbaf 01b5d11d
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
} }
} else if (process.env.NODE_ENV === "production") { } else if (process.env.NODE_ENV === "production") {
ENV_VAR = require('./.env.prod.js'); // ENV_VAR = require('./.env.prod.js');
//ENV_VAR = require('./.env.test.js'); ENV_VAR = require('./.env.test.js');
} }
if (ENV_VAR) { if (ENV_VAR) {
process.uniEnv = {}; process.uniEnv = {};
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class="address-view"> <view class="address-view">
<view class="address-left-view"> <view class="address-left-view">
<image class="address-image" :src="dizhiImage" mode="widthFix"></image> <image class="address-image" :src="dizhiImage" mode="widthFix"></image>
<text>{{orderData.contactAddress }}</text> <text>{{ formatAddress(orderData) }}</text>
</view> </view>
<view v-if="showDistance"> <view v-if="showDistance">
{{orderDistance}}km {{orderDistance}}km
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
*/ */
orderType: 0 orderType: 0
}; };
}, },
computed: { computed: {
orderText() { // 按钮文字 orderText() { // 按钮文字
return this.typeTexts[this.orderType] return this.typeTexts[this.orderType]
...@@ -269,6 +269,17 @@ ...@@ -269,6 +269,17 @@
}, 1000) }, 1000)
} }
}, },
formatAddress(order) {
let address = ""
if(order) {
address = order.contactProvinceText || ""
address += order.contactCityText || ""
address += order.contactCommunityText || ""
address += order.contactStreetText || ""
address += order.contactAddress || ""
}
return address
},
/** /**
* echo distance(116.3896,39.91917,116.3940,39.91726); * echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离 * 计算两点之间直线距离
......
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
if(index) { if(index) {
let prevPage = pages[index]; //上一个页面 let prevPage = pages[index]; //上一个页面
if(prevPage.route == "pages/login/index") { if(prevPage.route == "pages/login/index") {
uni.navigateTo({ uni.redirectTo({
url:'pages/index/index' url:'pages/index/index'
}) })
} else { } else {
...@@ -174,12 +174,12 @@ export default { ...@@ -174,12 +174,12 @@ export default {
}) })
} }
} else { } else {
uni.navigateTo({ uni.redirectTo({
url:'pages/index/index' url:'pages/index/index'
}) })
} }
} else { } else {
uni.navigateTo({ uni.reLaunch({
url: "pages/index/mine" url: "pages/index/mine"
}) })
} }
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text> v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text>
</view> </view>
<view class="services-view"> <view class="services-view">
<view v-if="[1, 2, 3, 4].indexOf(status) != -1"> <view v-if="[1, 2, 3, 4, 7].indexOf(status) != -1">
<image class="service-info-image" :src="erweimaImage"></image> <image class="service-info-image" :src="erweimaImage" @longtap="saveQrcode"></image>
<view class="content-info-tip">长按二维码添加官方客服微信</view> <view class="content-info-tip">长按二维码保存图片,添加官方客服微信</view>
<view class="content-info-tip">及时了解审核进度</view> <view class="content-info-tip">及时了解审核进度</view>
</view> </view>
</view> </view>
...@@ -183,6 +183,25 @@ ...@@ -183,6 +183,25 @@
} }
this.info = info this.info = info
}, },
saveQrcode() {
let that = this;
uni.downloadFile({ //获得二维码的临时地址
url: that.erweimaImage,
success:(res)=>{
if(res.statusCode == 200){
uni.saveImageToPhotosAlbum({
filePath:res.tempFilePath,//传入临时地址
success() {
that.$u.toast('保存成功!');
},
fail() {
that.$u.toast('保存失败!');
}
})
}
}
})
},
goPage() { goPage() {
const url = this.info.url const url = this.info.url
if (this.status == 1 || this.status == 3 || this.status == 7) { if (this.status == 1 || this.status == 3 || this.status == 7) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment