From 3180b5e99c1dea0a4bbc5a98ac8cbc6087033cbc Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 3 Dec 2021 10:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E7=BB=84=E4=BB=B6=E9=80=82?= =?UTF-8?q?=E9=85=8Dh5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/online-service/online-service.vue | 42 ++++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/components/online-service/online-service.vue b/components/online-service/online-service.vue index 5bf4ef7b..9b88a291 100644 --- a/components/online-service/online-service.vue +++ b/components/online-service/online-service.vue @@ -3,14 +3,21 @@ - + + + + + + + @@ -21,7 +28,8 @@ export default { data() { return { - common_static_url: common_static_url, + common_static_url: common_static_url, + common_app_customer_service_tel: null, online_service_status: 0, mini_alipay_tnt_inst_id: null, mini_alipay_scene: null, @@ -107,10 +115,19 @@ init_config(status) { if ((status || false) == true) { // #ifdef MP-WEIXIN || MP-TOUTIAO || MP-BAIDU || MP-ALIPAY || H5 || APP - this.setData({ + this.setData({ + common_app_customer_service_tel: app.globalData.get_config('config.common_app_customer_service_tel'), online_service_status: app.globalData.get_config('config.common_app_is_online_service') || 0 }); // #endif + + // #ifdef H5 || APP + if((this.common_app_customer_service_tel || null) == null) { + this.setData({ + online_service_status: 0 + }); + } + // #endif // #ifdef MP-ALIPAY // 在线客服开启,获取用户openid @@ -126,6 +143,15 @@ } else { app.globalData.is_config(this, 'init_config'); } + }, + + // 客服电话 + call_event() { + if (this.common_app_customer_service_tel == null) { + app.globalData.showToast("客服电话有误"); + } else { + app.globalData.call_tel(this.common_app_customer_service_tel); + } } } };