修改bug
This commit is contained in:
@@ -74,12 +74,8 @@
|
||||
|
||||
<u-parse :content="detailList.desc" @preview="preview" @navigate="navigate"></u-parse>
|
||||
|
||||
<u-modal :show="showCall" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
|
||||
@confirm="confirmCall" @cancel="cancelCall">
|
||||
<view>
|
||||
<view style="text-indent: 25rpx;">{{mobile}}</view>
|
||||
<text>是否拨打客服电话</text>
|
||||
</view>
|
||||
<u-modal :show="showCall" closeOnClickOverlay="false" confirmText="确定" @confirm="confirmCopy">
|
||||
<rich-text :nodes="contentCopy"></rich-text>
|
||||
</u-modal>
|
||||
<view style="margin:0 20rpx;">
|
||||
<u-overlay :show="!isLoad">
|
||||
@@ -120,24 +116,24 @@
|
||||
showUpdate: false,
|
||||
showUpdating: false,
|
||||
showCall: false,
|
||||
mobile: '',
|
||||
kf_email: '',
|
||||
updateContent: '您暂无权限访问,请升级VIP访问',
|
||||
updatingContent: '升级VIP,正在审核中',
|
||||
timoutText: 1
|
||||
timoutText: 1,
|
||||
contentCopy: `邮箱已复制,如需联系客服,请发送邮件。`
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
this.id = option.id
|
||||
this.getProductDetail()
|
||||
this.getCsTel()
|
||||
this.getKfEmail()
|
||||
},
|
||||
methods: {
|
||||
//获取客服电话
|
||||
getCsTel() {
|
||||
this.$apiServe.getCsTel().then(res => {
|
||||
this.mobile = res.data.data.cs_tel
|
||||
getKfEmail() {
|
||||
this.$apiServe.getKfEmail().then(res => {
|
||||
this.kf_email = res.data.data.kf_email
|
||||
}).finally(_ => {})
|
||||
},
|
||||
//获取详情信息
|
||||
@@ -261,30 +257,28 @@
|
||||
},
|
||||
// 联系客服模态框
|
||||
showContact() {
|
||||
this.showCall = true
|
||||
},
|
||||
confirmCall() {
|
||||
this.showCall = false
|
||||
let phone = this.mobile
|
||||
phone = phone.toString()
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone,
|
||||
success: function() {
|
||||
console.log('拨打电话成功');
|
||||
},
|
||||
fail() {
|
||||
console.log('打电话失败了');
|
||||
uni.setClipboardData({
|
||||
data: this.kf_email, //要被复制的内容
|
||||
success: () => { //复制成功的回调函数
|
||||
wx.hideLoading();
|
||||
wx.hideToast();
|
||||
this.showCall = true
|
||||
}
|
||||
})
|
||||
},
|
||||
cancelCall() {
|
||||
confirmCopy() {
|
||||
this.showCall = false
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.u-modal__content {
|
||||
padding: 43rpx 43rpx !important;
|
||||
// text-indent: 14rpx;
|
||||
}
|
||||
|
||||
.collect {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
|
||||
@@ -347,6 +347,13 @@ const apiService = {
|
||||
resolve(service.get(url))
|
||||
})
|
||||
},
|
||||
// 获取客服邮箱
|
||||
getKfEmail() {
|
||||
const url = `/center/cfg?key=kf_email`
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(service.get(url))
|
||||
})
|
||||
},
|
||||
// 获取首页分类Tag
|
||||
getTags(data) {
|
||||
const url = `/home/tags`
|
||||
|
||||
Reference in New Issue
Block a user