From 85eda860b31a4ffb9b4038a2fa9d1bb66b089d05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Mon, 8 May 2023 00:20:37 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../detail/productsDetail/productsDetail.vue | 48 ++++++++-----------
service/request.js | 7 +++
2 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/pages/detail/productsDetail/productsDetail.vue b/pages/detail/productsDetail/productsDetail.vue
index d2db4e5..dad1dbd 100644
--- a/pages/detail/productsDetail/productsDetail.vue
+++ b/pages/detail/productsDetail/productsDetail.vue
@@ -74,12 +74,8 @@
-
-
- {{mobile}}
- 是否拨打客服电话
-
+
+
@@ -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
}
- }
+ },
}