dengjie ;拨打电话功能
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<u-modal :show="showCall" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
|
||||
@confirm="confirmCall" @cancel="cancelCall">
|
||||
<view>
|
||||
<view>{{phone}}</view>
|
||||
<view style="text-indent: 25rpx;">{{mobile}}</view>
|
||||
<text>是否拨打客服电话</text>
|
||||
</view>
|
||||
</u-modal>
|
||||
@@ -53,12 +53,13 @@
|
||||
imgUrl: '',
|
||||
isLoad: true,
|
||||
showCall: false,
|
||||
phone: '138 1222 222',
|
||||
mobile: '',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.getCertifiedCjDetail()
|
||||
this.getCsTel()
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
|
||||
this.isLoad = false
|
||||
@@ -67,6 +68,12 @@
|
||||
this.isLoad = true
|
||||
},
|
||||
methods: {
|
||||
//获取客服电话
|
||||
getCsTel() {
|
||||
this.$apiServe.getCsTel().then(res => {
|
||||
this.mobile = res.data.data.cs_tel
|
||||
}).finally(_ => {})
|
||||
},
|
||||
//获取认证厂家详情
|
||||
getCertifiedCjDetail() {
|
||||
this.$apiServe.getCertifiedCjDetail(this.id).then(res => {
|
||||
@@ -100,7 +107,8 @@
|
||||
},
|
||||
confirmCall() {
|
||||
this.showCall = false
|
||||
let phone = '1381222222'
|
||||
let phone = this.mobile
|
||||
phone = phone.toString()
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone,
|
||||
success: function() {
|
||||
@@ -119,6 +127,11 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.u-modal__content {
|
||||
padding: 43rpx 104rpx !important;
|
||||
text-indent: 25rpx;
|
||||
}
|
||||
|
||||
.feature {
|
||||
padding: 20rpx 16rpx;
|
||||
background-color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user