Commit 2260f492 authored by Damon's avatar Damon

fix: 工单地址兼容

parent b597ac3d
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<view class="between-cell address-cell"> <view class="between-cell address-cell">
<view class="left-address"> <view class="left-address">
<u-icon name="map" size="28"></u-icon> <u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ order.customerAddress || '' }}</text> <text class="address-txt">{{ formatAddress || '' }}</text>
</view> </view>
<image <image
v-if="showOperate" v-if="showOperate"
...@@ -109,18 +109,18 @@ export default { ...@@ -109,18 +109,18 @@ export default {
return {} return {}
}, },
computed: { computed: {
// formatAddress() { formatAddress() {
// let self = this let order = this.order
// let address = '' let address = order.customerAddress || ''
// if (self.order) { if (address === '') {
// address = self.order.contactProvinceText || '' address = order.contactProvinceText || ''
// address += self.order.contactCityText || '' address += order.contactCityText || ''
// address += self.order.contactCommunityText || '' address += order.contactCommunityText || ''
// address += self.order.contactStreetText || '' address += order.contactStreetText || ''
// address += self.order.contactAddress || '' address += order.contactAddress || ''
// } }
// return address return address
// }, },
phoneIcon() { phoneIcon() {
//self-support/icon/dianhua-0@2x.png //self-support/icon/dianhua-0@2x.png
if (this.operate) { if (this.operate) {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
:src="dizhiImage" :src="dizhiImage"
mode="widthFix" mode="widthFix"
></image> ></image>
<text>{{ orderData.customerAddress || '' }}</text> <text>{{ formatAddress || '' }}</text>
</view> </view>
<view v-if="showDistance" class="address-right-view"> <view v-if="showDistance" class="address-right-view">
{{ orderDistance }}km {{ orderDistance }}km
...@@ -163,6 +163,18 @@ export default { ...@@ -163,6 +163,18 @@ export default {
} }
}, },
computed: { computed: {
formatAddress() {
let order = this.orderData
let address = order.customerAddress || ''
if (address === '') {
address = order.contactProvinceText || ''
address += order.contactCityText || ''
address += order.contactCommunityText || ''
address += order.contactStreetText || ''
address += order.contactAddress || ''
}
return address
},
orderText() { orderText() {
// 按钮文字 // 按钮文字
return this.typeTexts[this.orderType] return this.typeTexts[this.orderType]
......
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