Commit dff482a6a0651e5c1e5bc629119907c4a984be29
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
1 changed file
with
44 additions
and
0 deletions
app.js
@@ -670,6 +670,10 @@ App({ | @@ -670,6 +670,10 @@ App({ | ||
670 | 670 | ||
671 | //清空登录时候缓存的值 | 671 | //清空登录时候缓存的值 |
672 | onHide: function () { | 672 | onHide: function () { |
673 | + | ||
674 | + console.log("app onhide"); | ||
675 | + console.log(this.globalData.no_clear); | ||
676 | + | ||
673 | if(!this.globalData.no_clear) { | 677 | if(!this.globalData.no_clear) { |
674 | this.globalData.is_test = 0; | 678 | this.globalData.is_test = 0; |
675 | this.globalData.guide_id = null; //导购清空 | 679 | this.globalData.guide_id = null; //导购清空 |
@@ -843,6 +847,46 @@ App({ | @@ -843,6 +847,46 @@ App({ | ||
843 | current: b[t.currentTarget.dataset.id], | 847 | current: b[t.currentTarget.dataset.id], |
844 | urls: b | 848 | urls: b |
845 | }); | 849 | }); |
850 | + }, | ||
851 | + | ||
852 | + con_wx(th){ | ||
853 | + var url=th.data.sys_switch.weapp_customertype_url; | ||
854 | + var id=th.data.sys_switch.weapp_customertype_appid; | ||
855 | + this.globalData.no_clear=1; | ||
856 | + wx.openCustomerServiceChat({ | ||
857 | + extInfo: {url: url}, | ||
858 | + corpId: id, | ||
859 | + success(res) {} | ||
860 | + }) | ||
861 | + }, | ||
862 | + | ||
863 | + con_Service(){ | ||
864 | + var th=this; | ||
865 | + var oss= this.globalData.setting; | ||
866 | + this.getConfig(function(t) { | ||
867 | + if (t.store_tel == undefined) { | ||
868 | + th.request.get("/api/weshop/store/get/" + oss.stoid, { | ||
869 | + isShowLoading: 1, | ||
870 | + data: {}, | ||
871 | + success: function(rs) { | ||
872 | + th.globalData.config = rs.data.data; | ||
873 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
874 | + wx.showToast({ | ||
875 | + title: "商家未设置电话", | ||
876 | + icon: 'none', | ||
877 | + duration: 3000 | ||
878 | + }) | ||
879 | + return false; | ||
880 | + } | ||
881 | + th.globalData.no_clear=1; | ||
882 | + wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, }) | ||
883 | + } | ||
884 | + }) | ||
885 | + } else { | ||
886 | + th.globalData.no_clear=1; | ||
887 | + wx.makePhoneCall({ phoneNumber: t.store_tel, }) | ||
888 | + } | ||
889 | + }); | ||
846 | } | 890 | } |
847 | 891 | ||
848 | 892 |