dengjie commit : 产品详情和厂家详情下方的联系客服样式及跳转
This commit is contained in:
@@ -21,10 +21,17 @@
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view class="footer" @click="showModal()">
|
||||
<u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
<u-modal :show="showCall" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
|
||||
@confirm="confirmCall" @cancel="cancelCall">
|
||||
<view>
|
||||
<view>{{phone}}</view>
|
||||
<text>是否拨打客服电话</text>
|
||||
</view>
|
||||
</u-modal>
|
||||
<view style="margin:0 20rpx;">
|
||||
<u-overlay :show="!isLoad">
|
||||
<login @success="reOnLoad()" @fail="failToLoad()"></login>
|
||||
@@ -44,7 +51,9 @@
|
||||
id: '',
|
||||
detailList: [],
|
||||
imgUrl: '',
|
||||
isLoad: true
|
||||
isLoad: true,
|
||||
showCall: false,
|
||||
phone: '138 1222 222',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -84,6 +93,26 @@
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
// 联系客服模态框
|
||||
showModal() {
|
||||
this.showCall = true
|
||||
},
|
||||
confirmCall() {
|
||||
this.showCall = false
|
||||
let phone = '1381222222'
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone,
|
||||
success: function() {
|
||||
console.log('拨打电话成功');
|
||||
},
|
||||
fail() {
|
||||
console.log('打电话失败了');
|
||||
}
|
||||
})
|
||||
},
|
||||
cancelCall() {
|
||||
this.showCall = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user