diff --git a/pages/goods/seckillDetail.vue b/pages/goods/seckillDetail.vue index 2a08395..20d2c22 100644 --- a/pages/goods/seckillDetail.vue +++ b/pages/goods/seckillDetail.vue @@ -213,13 +213,23 @@ - - + + + + + + 客服 + - - 客服 + + + + + + 客服 + + - @@ -487,7 +497,8 @@ province: '江苏省', city: '南京市', district: '玄武区' - } + }, + setting: {} } }, computed: { @@ -527,6 +538,35 @@ } }, methods: { + // 在线客服 + handleContact() { + // 商城客服设置 + const setting = this.setting + // 企业微信客服 + if (setting.provider == 'wxqykf') { + if (!setting.config.wxqykf.url || !setting.config.wxqykf.corpId) { + this.$toast('客服链接和企业ID不能为空') + return + } + // #ifdef H5 + window.open(setting.config.wxqykf.url) + // #endif + // #ifdef MP-WEIXIN + wx.openCustomerServiceChat({ + extInfo: { + url: setting.config.wxqykf.url + }, + corpId: setting.config.wxqykf.corpId, + success(res) {}, + fail(res) { + console.log(res, '企业微信') + } + }) + // #endif + } else { + this.$toast('暂不支持企业微信客服') + } + }, onLook(isLink, url) { if (isLink) { uni.navigateTo({ @@ -910,6 +950,7 @@ SharpGoodsApi.detail(that.activeTimeId, that.sharpGoodsId) .then(result => { let info = result.data.goods; + that.setting=result.data.detail.setting that.activeInfo = result.data.active that.goodsId = info.goods_id that.goods.skuList = [];