Commit 050cc754 by 侯体倬

客服逻辑优化

parent 5b84c7ec
...@@ -41,6 +41,7 @@ const { log } = app; ...@@ -41,6 +41,7 @@ const { log } = app;
export default { export default {
data() { data() {
return { return {
options: {},
sessionFrom: "", sessionFrom: "",
defaultContact: null, defaultContact: null,
result: null, result: null,
...@@ -48,6 +49,7 @@ export default { ...@@ -48,6 +49,7 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
this.options = options;
if(options.wxConcatGoods){ if(options.wxConcatGoods){
let wxConcatGoods = JSON.parse(options.wxConcatGoods) let wxConcatGoods = JSON.parse(options.wxConcatGoods)
wxConcatGoods['pathLink'] = pathToNavigation.toPageUrl(pathToNavigation.getUrlofLink(wxConcatGoods), pathToNavigation.getUrlofQuery(wxConcatGoods)); wxConcatGoods['pathLink'] = pathToNavigation.toPageUrl(pathToNavigation.getUrlofLink(wxConcatGoods), pathToNavigation.getUrlofQuery(wxConcatGoods));
...@@ -62,8 +64,12 @@ export default { ...@@ -62,8 +64,12 @@ export default {
}); });
}, },
onShow() { onShow() {
const { offlineShopCode } = getStoreInfo(); let shopCode = this.options.shopCode;
getWxContact({ shopCode: offlineShopCode }).then(res => { if (!shopCode) {
const { offlineShopCode } = getStoreInfo();
shopCode = offlineShopCode;
}
getWxContact({ shopCode }).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
const result = res.data.data const result = res.data.data
if (result.whetherOpenCustomerChannel == 0) { if (result.whetherOpenCustomerChannel == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment