增加打开地图

This commit is contained in:
TOP糯米 2023-04-01 17:29:54 +08:00
parent 65a6755112
commit ee91e684b6
4 changed files with 59 additions and 15 deletions

View File

@ -74,6 +74,8 @@ export default {
detail: response.data.address.doorplate,
name: response.data.address.name,
mobile: response.data.address.mobil,
lng: response.data.address.lng,
lat: response.data.address.lat,
},
};
if (options.listType == "t1") {
@ -89,8 +91,22 @@ export default {
cate: "配送订单",
createTime: response.data.times,
serviceTime: response.data.starttime,
pickupAddress: response.data.address,
unloadAddress: response.data.addressb,
pickupAddress: {
address: response.data.address_a.address,
detail: response.data.address_a.doorplate,
name: response.data.address_a.name,
mobile: response.data.address_a.mobil,
lng: response.data.address_a.lng,
lat: response.data.address_a.lat,
},
unloadAddress: {
address: response.data.address_b.address,
detail: response.data.address_b.doorplate,
name: response.data.address_b.name,
mobile: response.data.address_b.mobil,
lng: response.data.address_b.lng,
lat: response.data.address_b.lat,
},
state: response.data.status,
price: response.data.money,
};

View File

@ -117,6 +117,8 @@ export default {
detail: response.data.address.doorplate,
name: response.data.address.name,
mobile: response.data.address.mobil,
lng: response.data.address.lng,
lat: response.data.address.lat,
},
};
if (options.listType == "t1") {
@ -132,8 +134,22 @@ export default {
cate: "货运订单",
createTime: response.data.times,
serviceTime: response.data.starttime,
pickupAddress: response.data.address,
unloadAddress: response.data.addressb,
pickupAddress: {
address: response.data.address_a.address,
detail: response.data.address_a.doorplate,
name: response.data.address_a.name,
mobile: response.data.address_a.mobil,
lng: response.data.address_a.lng,
lat: response.data.address_a.lat,
},
unloadAddress: {
address: response.data.address_b.address,
detail: response.data.address_b.doorplate,
name: response.data.address_b.name,
mobile: response.data.address_b.mobil,
lng: response.data.address_b.lng,
lat: response.data.address_b.lat,
},
state: response.data.status,
price: response.data.money,
};

View File

@ -54,7 +54,7 @@
</view>
<view class="detail-section">
<view class="section-title">上门地址</view>
<view class="address-box">
<view class="address-box" @click="openLocation(order.address.lng, order.address.lat)">
<text class="iconfont icon-dingwei"></text>
<view>
<view class="contact limit-line clamp-1">
@ -86,22 +86,22 @@
</view>
<view class="detail-section">
<view class="section-title">取货地址</view>
<view class="address-box">
<view class="address-box" @click="openLocation(order.pickupAddress.lng, order.pickupAddress.lat)">
<text class="iconfont icon-dingwei"></text>
<view>
<view class="detail">
<text>{{ order.pickupAddress }}</text>
<text>{{ order.pickupAddress.address }}{{ order.pickupAddress.detail }}</text>
</view>
</view>
</view>
</view>
<view class="detail-section">
<view class="section-title">卸货地址</view>
<view class="address-box">
<view class="address-box" @click="openLocation(order.unloadAddress.lng, order.unloadAddress.lat)">
<text class="iconfont icon-dingwei"></text>
<view>
<view class="detail">
<text>{{ order.unloadAddress }}</text>
<text>{{ order.unloadAddress.address }}{{ order.unloadAddress.detail }}</text>
</view>
</view>
</view>
@ -177,6 +177,12 @@ export default {
onReachBottom() {},
onPullDownRefresh() {},
methods: {
openLocation(lng, lat) {
uni.openLocation({
longitude: parseFloat(lng),
latitude: parseFloat(lat),
});
},
copyOrderId(orderId) {
const that = this;
uni.setClipboardData({

View File

@ -53,7 +53,7 @@
</view>
<view class="detail-section">
<view class="section-title">上门地址</view>
<view class="address-box">
<view class="address-box" @click="openLocation(order.address.lng, order.address.lat)">
<text class="iconfont icon-dingwei"></text>
<view>
<view class="contact limit-line clamp-1">
@ -61,7 +61,7 @@
{{ order.address.name }}({{ order.address.sex == "男" ? "先生" : "女士" }})
</text>
<text class="mobile">{{ order.address.mobile }}</text>
<text class="call" @click="utils.callPhone(order.address.mobile)">拨号</text>
<text class="call" @click.stop="utils.callPhone(order.address.mobile)">拨号</text>
</view>
<view class="detail">
<text>{{ order.address.address }}{{ order.address.detail }}</text>
@ -87,22 +87,22 @@
</view>
<view class="detail-section">
<view class="section-title">取货地址</view>
<view class="address-box">
<view class="address-box" @click="openLocation(order.pickupAddress.lng, order.pickupAddress.lat)">
<text class="iconfont icon-dingwei"></text>
<view>
<view class="detail">
<text>{{ order.pickupAddress }}</text>
<text>{{ order.pickupAddress.address }}{{ order.pickupAddress.detail }}</text>
</view>
</view>
</view>
</view>
<view class="detail-section">
<view class="section-title">卸货地址</view>
<view class="address-box">
<view class="address-box" @click="openLocation(order.unloadAddress.lng, order.unloadAddress.lat)">
<text class="iconfont icon-dingwei"></text>
<view>
<view class="detail">
<text>{{ order.unloadAddress }}</text>
<text>{{ order.unloadAddress.address }}{{ order.unloadAddress.detail }}</text>
</view>
</view>
</view>
@ -175,6 +175,12 @@ export default {
onReachBottom() {},
onPullDownRefresh() {},
methods: {
openLocation(lng, lat) {
uni.openLocation({
longitude: parseFloat(lng),
latitude: parseFloat(lat),
});
},
copyOrderId(orderId) {
const that = this;
uni.setClipboardData({