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); + } } } };