|
|
|
@ -262,14 +262,25 @@ |
|
|
|
|
客服 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="footerCus firstBtn" v-else> |
|
|
|
|
<view class="cusIcon"> |
|
|
|
|
<image src="/static/detail/customer.png"></image> |
|
|
|
|
<view class="" v-if="setting.customer.provider=='wxqykf'" @click="handleContact"> |
|
|
|
|
<view class="cusIcon"> |
|
|
|
|
<image src="/static/detail/customer.png"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="customer"> |
|
|
|
|
客服 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="customer"> |
|
|
|
|
客服 |
|
|
|
|
<view class="" v-else> |
|
|
|
|
<view class="cusIcon"> |
|
|
|
|
<image src="/static/detail/customer.png"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="customer"> |
|
|
|
|
客服 |
|
|
|
|
</view> |
|
|
|
|
<button v-if="setting.customer.provider!='wxqykf'" open-type="contact"></button> |
|
|
|
|
</view> |
|
|
|
|
<button open-type="contact"></button> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="goods.is_show_ktk == 1" class="footerCus firstBtn" @click="toJDdetal()"> |
|
|
|
|
<view class="cusIcon"> |
|
|
|
@ -484,6 +495,8 @@ |
|
|
|
|
import * as address from '@/api/address.js' |
|
|
|
|
import * as CartApi from '@/api/cart' |
|
|
|
|
import store from '@/store' |
|
|
|
|
import SettingKeyEnum from '@/common/enum/setting/Key' |
|
|
|
|
import SettingModel from '@/common/model/Setting' |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
SkuPopup, |
|
|
|
@ -555,6 +568,8 @@ |
|
|
|
|
district: '玄武区' |
|
|
|
|
}, |
|
|
|
|
seckillCountTime: 0, |
|
|
|
|
// 系统设置 |
|
|
|
|
setting: {}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -587,6 +602,7 @@ |
|
|
|
|
this.getGoodsStockInfor() |
|
|
|
|
this.getCartTotal() |
|
|
|
|
this.getProvinceAll() |
|
|
|
|
this.getSetting() |
|
|
|
|
uni.$on("onenPrice", function(selectShop) { |
|
|
|
|
that.openPirce(); |
|
|
|
|
that.isTodo = false; |
|
|
|
@ -620,6 +636,47 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取商城设置 |
|
|
|
|
getSetting() { |
|
|
|
|
const app = this |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
SettingModel.data() |
|
|
|
|
.then(setting => { |
|
|
|
|
app.setting = setting |
|
|
|
|
resolve(setting) |
|
|
|
|
}) |
|
|
|
|
.catch(reject) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 在线客服 |
|
|
|
|
handleContact() { |
|
|
|
|
// 商城客服设置 |
|
|
|
|
const setting = this.setting[SettingKeyEnum.CUSTOMER.value] |
|
|
|
|
// 企业微信客服 |
|
|
|
|
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 |
|
|
|
|
console.log(setting.config.wxqykf.url,setting.config.wxqykf.corpId) |
|
|
|
|
wx.openCustomerServiceChat({ |
|
|
|
|
extInfo: { |
|
|
|
|
url: setting.config.wxqykf.url |
|
|
|
|
}, |
|
|
|
|
corpId: setting.config.wxqykf.corpId, |
|
|
|
|
success(res) {}, |
|
|
|
|
fail(res){ |
|
|
|
|
console.log(res,'企业微信') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// #endif |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLook(isLink, url) { |
|
|
|
|
if (isLink) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|