feat: 拨打电话调整
This commit is contained in:
parent
e6ff122ee9
commit
a1f1bd46b8
|
|
@ -27,7 +27,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="item-row flex-sb line-after">
|
<view class="item-row flex-sb line-after">
|
||||||
<view class="title flex-l">客户电话</view>
|
<view class="title flex-l">客户电话</view>
|
||||||
<view class="value flex-r value-theme">
|
<view class="value flex-r value-theme" @click="helpers.makePhoneCall(data.order_info.tel)">
|
||||||
<me-icon class="icon" type="icon-call" color="var(--themeColor)" size="40rpx"></me-icon>
|
<me-icon class="icon" type="icon-call" color="var(--themeColor)" size="40rpx"></me-icon>
|
||||||
<text>{{ data.order_info.tel }}</text>
|
<text>{{ data.order_info.tel }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
<view class="phone flex-l">{{ item.order_info.tel }}</view>
|
<view class="phone flex-l">{{ item.order_info.tel }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right flex-c">
|
<view class="right flex-c">
|
||||||
<view @click="call(item.order_info.tel)" class="icon-ctr flex-c" hover-class="auto-mask-layer-radius8" hover-stay-time="100">
|
<view @click="helpers.makePhoneCall(item.order_info.tel)" class="icon-ctr flex-c" hover-class="auto-mask-layer-radius8" hover-stay-time="100">
|
||||||
<me-icon type="icon-call" color="var(--themeColor)" size="80rpx"></me-icon>
|
<me-icon type="icon-call" color="var(--themeColor)" size="80rpx"></me-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -112,16 +112,6 @@ const getOrderStatusText = (status) => {
|
||||||
return enums.WORKBENCH_STATUS_TEXT[status]
|
return enums.WORKBENCH_STATUS_TEXT[status]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 拨打电话
|
|
||||||
* @param tel
|
|
||||||
*/
|
|
||||||
const call = (tel) => {
|
|
||||||
uni.makePhoneCall({
|
|
||||||
phoneNumber: tel
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,11 @@ class helpers {
|
||||||
return datetimeStr.slice(0, 16);
|
return datetimeStr.slice(0, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开客户地址
|
||||||
|
* @param lat
|
||||||
|
* @param lng
|
||||||
|
*/
|
||||||
static openLocation (lat, lng) {
|
static openLocation (lat, lng) {
|
||||||
uni.openLocation({
|
uni.openLocation({
|
||||||
latitude: Number(lat),
|
latitude: Number(lat),
|
||||||
|
|
@ -148,5 +153,17 @@ class helpers {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拨打电话
|
||||||
|
* @param tel
|
||||||
|
*/
|
||||||
|
static makePhoneCall (tel){
|
||||||
|
uni.makePhoneCall({
|
||||||
|
phoneNumber: tel,
|
||||||
|
fail: function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export default helpers
|
export default helpers
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user