Commit b988d311d77a5b0bffe7476c0a2de2ce5b02b6e9
1 parent
07d0fe14
1.分享的会员的user_id,分销的上下级关系的bug优化。 打开相册,分享,预览图片,照相扫描,聊天,打电话,获取微信地址的时候。
2.自定义模板时候,首页分享空白页的OA单优化 3. 测肤的分享和生成海报的bug优化
Showing
130 changed files
with
532 additions
and
2463 deletions
Too many changes.
To preserve performance only 100 of 130 files are displayed.
app.js
@@ -51,7 +51,7 @@ App({ | @@ -51,7 +51,7 @@ App({ | ||
51 | config: null, //门店参数 | 51 | config: null, //门店参数 |
52 | config2: null, //门店配置 | 52 | config2: null, //门店配置 |
53 | code: null, | 53 | code: null, |
54 | - user_id: null,//1564704,// 10153869,// 6453964,//5682094,6520044,6520119 qa 4687 6519901 | 54 | + user_id: null,//5682094,6520044,6520119 qa 4687 6519901 |
55 | buy_now: null, | 55 | buy_now: null, |
56 | picklist: null, //门店列表 | 56 | picklist: null, //门店列表 |
57 | wuliuprice: null, //物流价格表 | 57 | wuliuprice: null, //物流价格表 |
@@ -61,6 +61,7 @@ App({ | @@ -61,6 +61,7 @@ App({ | ||
61 | getu: null, //记录会员信息 | 61 | getu: null, //记录会员信息 |
62 | sessionKey: null,//记录会员信息 | 62 | sessionKey: null,//记录会员信息 |
63 | openid: null, //记录会员信息 | 63 | openid: null, //记录会员信息 |
64 | + | ||
64 | to_group: null, //参团传递的数据 | 65 | to_group: null, //参团传递的数据 |
65 | wxapp_buy_obj: null, //微信小程序购买的Object | 66 | wxapp_buy_obj: null, //微信小程序购买的Object |
66 | pk_store: null, //选择的门店 | 67 | pk_store: null, //选择的门店 |
@@ -69,6 +70,7 @@ App({ | @@ -69,6 +70,7 @@ App({ | ||
69 | windowWidth: 0, //整个窗体的宽度 | 70 | windowWidth: 0, //整个窗体的宽度 |
70 | room_id: null, //直播间分享的房间ID | 71 | room_id: null, //直播间分享的房间ID |
71 | room_goods_id: null, //直播间分享的商品ID | 72 | room_goods_id: null, //直播间分享的商品ID |
73 | + | ||
72 | }, | 74 | }, |
73 | auth: o, | 75 | auth: o, |
74 | request: a, | 76 | request: a, |
@@ -669,7 +671,6 @@ App({ | @@ -669,7 +671,6 @@ App({ | ||
669 | 671 | ||
670 | //清空登录时候缓存的值 | 672 | //清空登录时候缓存的值 |
671 | onHide: function () { | 673 | onHide: function () { |
672 | - | ||
673 | if(!this.globalData.no_clear) { | 674 | if(!this.globalData.no_clear) { |
674 | this.globalData.is_test = 0; | 675 | this.globalData.is_test = 0; |
675 | this.globalData.guide_id = null; //导购清空 | 676 | this.globalData.guide_id = null; //导购清空 |
@@ -688,7 +689,6 @@ App({ | @@ -688,7 +689,6 @@ App({ | ||
688 | }else{ | 689 | }else{ |
689 | this.globalData.no_clear=0; | 690 | this.globalData.no_clear=0; |
690 | } | 691 | } |
691 | - | ||
692 | }, | 692 | }, |
693 | 693 | ||
694 | clear_word: function (word) { | 694 | clear_word: function (word) { |
@@ -828,6 +828,14 @@ App({ | @@ -828,6 +828,14 @@ App({ | ||
828 | } | 828 | } |
829 | }, | 829 | }, |
830 | 830 | ||
831 | + //重复函数,统一调用, | ||
832 | + pre_img(path){ | ||
833 | + this.globalData.no_clear=1; | ||
834 | + wx.previewImage({ | ||
835 | + //将图片预览出来 | ||
836 | + urls: [path] | ||
837 | + }); | ||
838 | + }, | ||
831 | 839 | ||
832 | //b是数组,t是wxml元素返回的 | 840 | //b是数组,t是wxml元素返回的 |
833 | pre_img2(b,t){ | 841 | pre_img2(b,t){ |
@@ -836,48 +844,7 @@ App({ | @@ -836,48 +844,7 @@ App({ | ||
836 | current: b[t.currentTarget.dataset.id], | 844 | current: b[t.currentTarget.dataset.id], |
837 | urls: b | 845 | urls: b |
838 | }); | 846 | }); |
839 | - }, | ||
840 | - | ||
841 | - con_wx(th){ | ||
842 | - var url=th.data.sys_switch.weapp_customertype_url; | ||
843 | - var id=th.data.sys_switch.weapp_customertype_appid; | ||
844 | - this.globalData.no_clear=1; | ||
845 | - wx.openCustomerServiceChat({ | ||
846 | - extInfo: {url: url}, | ||
847 | - corpId: id, | ||
848 | - success(res) {} | ||
849 | - }) | ||
850 | - }, | ||
851 | - | ||
852 | - con_Service(){ | ||
853 | - var th=this; | ||
854 | - var oss= this.globalData.setting; | ||
855 | - this.getConfig(function(t) { | ||
856 | - if (t.store_tel == undefined) { | ||
857 | - th.request.get("/api/weshop/store/get/" + oss.stoid, { | ||
858 | - isShowLoading: 1, | ||
859 | - data: {}, | ||
860 | - success: function(rs) { | ||
861 | - th.globalData.config = rs.data.data; | ||
862 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
863 | - wx.showToast({ | ||
864 | - title: "商家未设置电话", | ||
865 | - icon: 'none', | ||
866 | - duration: 3000 | ||
867 | - }) | ||
868 | - return false; | ||
869 | - } | ||
870 | - th.globalData.no_clear=1; | ||
871 | - wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, }) | ||
872 | - } | ||
873 | - }) | ||
874 | - } else { | ||
875 | - th.globalData.no_clear=1; | ||
876 | - wx.makePhoneCall({ phoneNumber: t.store_tel, }) | ||
877 | - } | ||
878 | - }); | ||
879 | } | 847 | } |
880 | 848 | ||
881 | 849 | ||
882 | - | ||
883 | }); | 850 | }); |
app.wxss
@@ -743,17 +743,9 @@ background: #ffe3e2; | @@ -743,17 +743,9 @@ background: #ffe3e2; | ||
743 | /* 图标字体(ty) */ | 743 | /* 图标字体(ty) */ |
744 | @font-face { | 744 | @font-face { |
745 | font-family: 'iconfont'; /* Project id 2054717 */ | 745 | font-family: 'iconfont'; /* Project id 2054717 */ |
746 | - src: url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.woff2?t=1646731629521') format('woff2'), | ||
747 | - url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.woff?t=1646731629521') format('woff'), | ||
748 | - url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.ttf?t=1646731629521') format('truetype'); | ||
749 | -} | ||
750 | - | ||
751 | -.icon-kefu1:before { | ||
752 | - content: "\e666"; | ||
753 | -} | ||
754 | - | ||
755 | -.icon-dianhua:before { | ||
756 | - content: "\e623"; | 746 | + src: url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.woff2?t=1645781927179') format('woff2'), |
747 | + url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.woff?t=1645781927179') format('woff'), | ||
748 | + url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.ttf?t=1645781927179') format('truetype'); | ||
757 | } | 749 | } |
758 | 750 | ||
759 | .icon-infofill:before { | 751 | .icon-infofill:before { |
components/diy_scan/diy_scan.js
@@ -26,6 +26,7 @@ Component({ | @@ -26,6 +26,7 @@ Component({ | ||
26 | //-- 扫描成功之后 -- | 26 | //-- 扫描成功之后 -- |
27 | getScancode:function(){ | 27 | getScancode:function(){ |
28 | var _this = this; | 28 | var _this = this; |
29 | + getApp().globalData.no_clear=1; | ||
29 | //-- 允许从相机和相册扫码 -- | 30 | //-- 允许从相机和相册扫码 -- |
30 | wx.scanCode({ | 31 | wx.scanCode({ |
31 | success: (res) => { | 32 | success: (res) => { |
components/diy_service/diy_service.js
@@ -38,35 +38,16 @@ Component({ | @@ -38,35 +38,16 @@ Component({ | ||
38 | 38 | ||
39 | //---------联系客服------------ | 39 | //---------联系客服------------ |
40 | contactService: function() { | 40 | contactService: function() { |
41 | - getApp().getConfig(function(t) { | ||
42 | - if (t.store_tel == undefined) { | ||
43 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
44 | - isShowLoading: 1, | ||
45 | - data: {}, | ||
46 | - success: function(rs) { | ||
47 | - getApp().globalData.config = rs.data.data; | ||
48 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
49 | - getApp().my_warnning("商家未设置电话", 0, th); | ||
50 | - return false; | ||
51 | - } | ||
52 | - wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, }) | ||
53 | - } | ||
54 | - }) | ||
55 | - } else { | ||
56 | - wx.makePhoneCall({ phoneNumber: t.store_tel, }) | ||
57 | - } | ||
58 | - }); | ||
59 | - }, | 41 | + getApp().con_Service(); |
42 | + }, | ||
60 | 43 | ||
61 | //---------联系微信客服------------ | 44 | //---------联系微信客服------------ |
62 | con_weixin:function () { | 45 | con_weixin:function () { |
63 | - var url=this.data.sys_switch.weapp_customertype_url; | ||
64 | - var id=this.data.sys_switch.weapp_customertype_appid; | ||
65 | - wx.openCustomerServiceChat({ | ||
66 | - extInfo: {url: url}, | ||
67 | - corpId: id, | ||
68 | - success(res) {} | ||
69 | - }) | 46 | + getApp().con_wx(this); |
47 | + }, | ||
48 | + | ||
49 | + click_contact:function () { | ||
50 | + getApp().globalData.no_clear=1; | ||
70 | } | 51 | } |
71 | } | 52 | } |
72 | }) | 53 | }) |
components/diy_service/diy_service.wxml
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | </view> | 8 | </view> |
9 | </view> | 9 | </view> |
10 | 10 | ||
11 | - <button wx:else class="custom-service" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 11 | + <button wx:else class="custom-service" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
12 | <view style="text-align: center;"> | 12 | <view style="text-align: center;"> |
13 | <image class="cs-img" src="{{object.img}}"></image> | 13 | <image class="cs-img" src="{{object.img}}"></image> |
14 | <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view> | 14 | <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view> |
components/nav_b/nav_b.wxss
packageA/pages/activity_share/activity_share.js
@@ -141,9 +141,10 @@ Page({ | @@ -141,9 +141,10 @@ Page({ | ||
141 | /** | 141 | /** |
142 | * 用户点击右上角分享 | 142 | * 用户点击右上角分享 |
143 | */ | 143 | */ |
144 | - onShareAppMessage: function () { | ||
145 | - console.log('abc'); | ||
146 | - var th = this; | 144 | + onShareAppMessage: function () { |
145 | + getApp().globalData.no_clear=1; | ||
146 | + | ||
147 | + var th = this; | ||
147 | //礼包的转发 | 148 | //礼包的转发 |
148 | if(th.data.currentIndex==3) { | 149 | if(th.data.currentIndex==3) { |
149 | var lbid=th.data.hui_active.lbId; | 150 | var lbid=th.data.hui_active.lbId; |
@@ -1054,10 +1055,8 @@ Page({ | @@ -1054,10 +1055,8 @@ Page({ | ||
1054 | }) | 1055 | }) |
1055 | return false; | 1056 | return false; |
1056 | } | 1057 | } |
1057 | - wx.previewImage({ | ||
1058 | - //将图片预览出来 | ||
1059 | - urls: [that.data.shareImgPath] | ||
1060 | - }); | 1058 | + getApp().pre_img(that.data.shareImgPath); |
1059 | + | ||
1061 | //-- 将商品清空 -- | 1060 | //-- 将商品清空 -- |
1062 | th.setData({share_good:null}); | 1061 | th.setData({share_good:null}); |
1063 | 1062 |
packageA/pages/addCustomer/addCustomer.js
@@ -60,7 +60,7 @@ Page({ | @@ -60,7 +60,7 @@ Page({ | ||
60 | /** | 60 | /** |
61 | * 用户点击右上角分享 | 61 | * 用户点击右上角分享 |
62 | */ | 62 | */ |
63 | - onShareAppMessage: function () { | ||
64 | - | ||
65 | - } | 63 | + onShareAppMessage: function () { |
64 | + getApp().globalData.no_clear=1 | ||
65 | + } | ||
66 | }) | 66 | }) |
67 | \ No newline at end of file | 67 | \ No newline at end of file |
packageA/pages/cardDetails/cardDetails.js
@@ -92,7 +92,7 @@ Page({ | @@ -92,7 +92,7 @@ Page({ | ||
92 | /** | 92 | /** |
93 | * 用户点击右上角分享 | 93 | * 用户点击右上角分享 |
94 | */ | 94 | */ |
95 | - onShareAppMessage: function () { | 95 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 |
96 | 96 | ||
97 | } | 97 | } |
98 | }) | 98 | }) |
99 | \ No newline at end of file | 99 | \ No newline at end of file |
packageA/pages/cardList/cardList.js
packageA/pages/chongzhi/chongzhi.js
packageA/pages/chongzhiDetails/chongzhiDetails.js
packageA/pages/choujiang/choujiang.js
@@ -60,7 +60,7 @@ Page({ | @@ -60,7 +60,7 @@ Page({ | ||
60 | /** | 60 | /** |
61 | * 用户点击右上角分享 | 61 | * 用户点击右上角分享 |
62 | */ | 62 | */ |
63 | - onShareAppMessage: function () { | 63 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 |
64 | 64 | ||
65 | } | 65 | } |
66 | }) | 66 | }) |
67 | \ No newline at end of file | 67 | \ No newline at end of file |
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -112,7 +112,7 @@ Page({ | @@ -112,7 +112,7 @@ Page({ | ||
112 | * 用户点击右上角分享 | 112 | * 用户点击右上角分享 |
113 | */ | 113 | */ |
114 | onShareAppMessage: function() { | 114 | onShareAppMessage: function() { |
115 | - | 115 | + getApp().globalData.no_clear=1 |
116 | }, | 116 | }, |
117 | 117 | ||
118 | 118 | ||
@@ -163,6 +163,7 @@ Page({ | @@ -163,6 +163,7 @@ Page({ | ||
163 | 163 | ||
164 | // 联系微信客服 | 164 | // 联系微信客服 |
165 | contact_wx() { | 165 | contact_wx() { |
166 | + getApp().globalData.no_clear=1; | ||
166 | var url = this.data.sys_switch.weapp_customertype_url; | 167 | var url = this.data.sys_switch.weapp_customertype_url; |
167 | var id = this.data.sys_switch.weapp_customertype_appid; | 168 | var id = this.data.sys_switch.weapp_customertype_appid; |
168 | wx.openCustomerServiceChat({ | 169 | wx.openCustomerServiceChat({ |
@@ -177,24 +178,7 @@ Page({ | @@ -177,24 +178,7 @@ Page({ | ||
177 | 178 | ||
178 | // 联系电话客服 | 179 | // 联系电话客服 |
179 | contactService() { | 180 | contactService() { |
180 | - app.getConfig(function(t) { | ||
181 | - if (t.store_tel == undefined) { | ||
182 | - app.request.get('/api/weshop/store/get/' + os.stoid, { | ||
183 | - isShowLoading: 1, | ||
184 | - data: {}, | ||
185 | - success: function(rs) { | ||
186 | - app.globalData.config = rs.data.data; | ||
187 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
188 | - app.my_warnning('商家未设置电话', 0, self); | ||
189 | - return false; | ||
190 | - } | ||
191 | - app.confirmBox('请联系客服:' + rs.data.data.store_tel); | ||
192 | - } | ||
193 | - }) | ||
194 | - } else { | ||
195 | - app.confirmBox('请联系客服:' + t.store_tel); | ||
196 | - } | ||
197 | - }); | 181 | + getApp().con_Service(); |
198 | }, | 182 | }, |
199 | 183 | ||
200 | 184 | ||
@@ -478,9 +462,9 @@ Page({ | @@ -478,9 +462,9 @@ Page({ | ||
478 | }); | 462 | }); |
479 | }, | 463 | }, |
480 | 464 | ||
481 | - | ||
482 | - | ||
483 | - | 465 | + click_contact:function () { |
466 | + getApp().globalData.no_clear=1; | ||
467 | + } | ||
484 | 468 | ||
485 | 469 | ||
486 | 470 |
packageA/pages/details_serviceCard/details_serviceCard.wxml
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | <view class="flex t-c bdt"> | 57 | <view class="flex t-c bdt"> |
58 | <!-- 客服 --> | 58 | <!-- 客服 --> |
59 | <block> | 59 | <block> |
60 | - <button class="f1" wx:if="{{sys_switch.weapp_customertype == 1}}" hover-class="none" open-type="contact" | 60 | + <button class="f1" wx:if="{{sys_switch.weapp_customertype == 1}}" hover-class="none" open-type="contact" bindtap="click_contact" |
61 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</button> | 61 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</button> |
62 | <view class="f1 pd20" wx:elif="{{sys_switch.weapp_customertype== 2}}" bindtap="contact_wx"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</view> | 62 | <view class="f1 pd20" wx:elif="{{sys_switch.weapp_customertype== 2}}" bindtap="contact_wx"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</view> |
63 | <view class="f1 pd20" wx:else bindtap="contactService"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</view> | 63 | <view class="f1 pd20" wx:else bindtap="contactService"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</view> |
packageA/pages/distribution/card/card.js
packageA/pages/distribution/commision/commision.js
packageA/pages/distribution/goods/goods.js
packageA/pages/distribution/myteam/myteam.js
packageA/pages/distribution/order/order.js
packageA/pages/distribution/rank/rank.js
packageA/pages/distribution/rookie/rookie.js
packageA/pages/distribution/shop/shop.js
@@ -316,7 +316,7 @@ Page({ | @@ -316,7 +316,7 @@ Page({ | ||
316 | * 用户点击右上角分享 | 316 | * 用户点击右上角分享 |
317 | *--点击分享事件--分享我的小店 | 317 | *--点击分享事件--分享我的小店 |
318 | *--*/ | 318 | *--*/ |
319 | - onShareAppMessage: function (t) { | 319 | + onShareAppMessage: function (t) { getApp().globalData.no_clear=1; |
320 | 320 | ||
321 | var th = this; | 321 | var th = this; |
322 | var title = "我的小店"; | 322 | var title = "我的小店"; |
packageA/pages/goodsInfo/buy_flash_normal.wxml deleted
1 | -<view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view> | ||
2 | - <view class="spec-model"> | ||
3 | - <view class="pding"> | ||
4 | - <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
5 | - <view class="spec-goods"> | ||
6 | - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl + (data.image_url ? data.image_url:'miniapp/images/default_g_img.gif')}}" binderror="pop_err_img" data-errorimg="data.img_url"></image> | ||
7 | - <view class="spec-goods-info"> | ||
8 | - <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | ||
9 | - <view class="flex ai_end xc-val-money"> | ||
10 | - <text class="fs20">¥</text>{{data.shop_price}} | ||
11 | - <!-- 如果是等级会员,且有等级价 --> | ||
12 | - <!-- <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> --> | ||
13 | - <!-- <block wx:else>{{sele_g.shop_price}}</block> --> | ||
14 | - </view> | ||
15 | - | ||
16 | - <!-- <view class="flex"> | ||
17 | - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
18 | - <block wx:if="{{sales_rules==2}}"> | ||
19 | - <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | ||
20 | - <view class="spec-goods-stock" wx:else>可售:0</view> | ||
21 | - </block> | ||
22 | - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | ||
23 | - </view> --> | ||
24 | - | ||
25 | - | ||
26 | - </view> | ||
27 | - | ||
28 | - <!-- 选择门店模块 --> | ||
29 | - <view class="flex-space-between address ai_end xc-width "> | ||
30 | - | ||
31 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
32 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
33 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
34 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
35 | - | ||
36 | - </view> | ||
37 | - </view> | ||
38 | - | ||
39 | - <!-- 没有门店的时候 --> | ||
40 | - <view class="flex" bindtap="choice_store" wx:else> | ||
41 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
42 | - <view class="fs30" style="color:black;">选择门店</view> | ||
43 | - </view> | ||
44 | - | ||
45 | - <view class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | ||
46 | - </view> | ||
47 | - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
48 | - <block wx:else> | ||
49 | - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
50 | - <block wx:else> | ||
51 | - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
52 | - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | ||
53 | - </block> | ||
54 | - </block> | ||
55 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | ||
56 | - | ||
57 | - | ||
58 | - <!--商品的属性项目--> | ||
59 | - <!-- <view class="xc-goods-attribute"> | ||
60 | - <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | ||
61 | - <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
62 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | ||
63 | - {{item.gg}} | ||
64 | - </view> | ||
65 | - </view> | ||
66 | - </view> --> | ||
67 | - | ||
68 | - <view class="b_num"> | ||
69 | - <view>购买数量</view> | ||
70 | - <view class="count"> | ||
71 | - <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | ||
72 | - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
73 | - <view bindtap="addCartNum" class="add">+</view> | ||
74 | - </view> | ||
75 | - </view> | ||
76 | - </view> | ||
77 | - | ||
78 | - | ||
79 | - <!-- 提示再买多少优惠 --> | ||
80 | - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | ||
81 | - 再买{{hui_condition.need}} | ||
82 | - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | ||
83 | - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | ||
84 | - <text wx:if="{{hui_condition.past==1}}">,包邮</text> | ||
85 | - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | ||
86 | - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | ||
87 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | ||
88 | - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | ||
89 | - <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | ||
90 | - </view> | ||
91 | - | ||
92 | - | ||
93 | - <!-- 按钮部分 --> | ||
94 | - <view class="spec-cart-btns"> | ||
95 | - | ||
96 | - <!-- 根本就找不到门店 --> | ||
97 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
98 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | ||
99 | - </block> | ||
100 | - <block wx:else> | ||
101 | - <!-- 根本就找不到门店 --> | ||
102 | - <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
103 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
104 | - </block> | ||
105 | - <block wx:else> | ||
106 | - | ||
107 | - | ||
108 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
109 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
110 | - </block> | ||
111 | - <block wx:else> | ||
112 | - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
113 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
114 | - </block> | ||
115 | - <block wx:else> | ||
116 | - <block wx:if="{{!def_pick_store}}"> | ||
117 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | ||
118 | - </block> | ||
119 | - <block wx:else> | ||
120 | - <block wx:if="{{data.store_count<=0}}"> | ||
121 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
122 | - </block> | ||
123 | - <block wx:else> | ||
124 | - <view class="flex jc_sb"> | ||
125 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
126 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | ||
127 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
128 | - data-action="buy">立即购买</view> | ||
129 | - </view> | ||
130 | - </block> | ||
131 | - | ||
132 | - </block> | ||
133 | - </block> | ||
134 | - </block> | ||
135 | - </block> | ||
136 | - </block> | ||
137 | - </view> | ||
138 | - | ||
139 | - </view> | ||
140 | - </view> | ||
141 | - <view class="clear"></view> | ||
142 | \ No newline at end of file | 0 | \ No newline at end of file |
packageA/pages/goodsInfo/goodsInfo.js
@@ -8,7 +8,6 @@ var t = require("../../../utils/util.js"), | @@ -8,7 +8,6 @@ var t = require("../../../utils/util.js"), | ||
8 | oo = s.globalData, | 8 | oo = s.globalData, |
9 | o = s.globalData.setting, | 9 | o = s.globalData.setting, |
10 | os = o; | 10 | os = o; |
11 | - | ||
12 | let self = null; | 11 | let self = null; |
13 | 12 | ||
14 | //评价加载更多 | 13 | //评价加载更多 |
@@ -51,7 +50,7 @@ Page({ | @@ -51,7 +50,7 @@ Page({ | ||
51 | supportPageScroll: !1, | 50 | supportPageScroll: !1, |
52 | address: { | 51 | address: { |
53 | address: "", | 52 | address: "", |
54 | - district: 0, | 53 | + district: 0 |
55 | }, | 54 | }, |
56 | shipping: "", | 55 | shipping: "", |
57 | shippingCost: 0, | 56 | shippingCost: 0, |
@@ -200,17 +199,15 @@ Page({ | @@ -200,17 +199,15 @@ Page({ | ||
200 | sales_rules:1, //默认是线上销售 | 199 | sales_rules:1, //默认是线上销售 |
201 | 200 | ||
202 | wait_for_user_store:null, | 201 | wait_for_user_store:null, |
203 | - poster:null, //自定义海报 | ||
204 | - share_b_img:'', //自定义分享的背景 | ||
205 | - showPoster: false, | ||
206 | - hui_condition:null, | ||
207 | - sto_sele_name_1:'',//分享的门店名称 | 202 | + poster:null, //自定义海报 |
203 | + share_b_img:'', //自定义分享的背景 | ||
204 | + showPoster: false, | ||
205 | + hui_condition:null, | ||
206 | + sto_sele_name_1:'',//分享的门店名称 | ||
208 | 207 | ||
209 | // 秒杀 | 208 | // 秒杀 |
210 | - prom_st: 0, | 209 | + prom_st: 1, |
211 | prom_r_null: 0, | 210 | prom_r_null: 0, |
212 | - | ||
213 | - hiddenCS: true, //控制客服操作菜单显示和控制 | ||
214 | }, | 211 | }, |
215 | 212 | ||
216 | //------初始化加载---------- | 213 | //------初始化加载---------- |
@@ -264,10 +261,10 @@ Page({ | @@ -264,10 +261,10 @@ Page({ | ||
264 | first_leader=gid_str[1]; | 261 | first_leader=gid_str[1]; |
265 | } | 262 | } |
266 | //-- 如果有room_id的获取 -- | 263 | //-- 如果有room_id的获取 -- |
267 | - if(gid_str.length>2 && gid_str[2]) { | 264 | + if(gid_str.length>2 && gid_str[2]){ |
268 | room_id=gid_str[2]; | 265 | room_id=gid_str[2]; |
269 | room_user_share=1; | 266 | room_user_share=1; |
270 | - }; | 267 | + } |
271 | }; | 268 | }; |
272 | 269 | ||
273 | ee.setData({ gid: gid}); | 270 | ee.setData({ gid: gid}); |
@@ -312,7 +309,7 @@ Page({ | @@ -312,7 +309,7 @@ Page({ | ||
312 | is_show_gb: 1 | 309 | is_show_gb: 1 |
313 | }); | 310 | }); |
314 | } | 311 | } |
315 | - // console.log(e); | 312 | + console.log(e); |
316 | var json_d = JSON.parse(e.switch_list); | 313 | var json_d = JSON.parse(e.switch_list); |
317 | ee.setData({ | 314 | ee.setData({ |
318 | store_config: e, | 315 | store_config: e, |
@@ -321,7 +318,6 @@ Page({ | @@ -321,7 +318,6 @@ Page({ | ||
321 | is_newsales_rules: json_d.is_newsales_rules | 318 | is_newsales_rules: json_d.is_newsales_rules |
322 | }); | 319 | }); |
323 | ee.init(gid); | 320 | ee.init(gid); |
324 | - | ||
325 | //------几人评价------- | 321 | //------几人评价------- |
326 | //n.init(th, "", "comments"); | 322 | //n.init(th, "", "comments"); |
327 | 323 | ||
@@ -374,7 +370,7 @@ Page({ | @@ -374,7 +370,7 @@ Page({ | ||
374 | 370 | ||
375 | //获取用户的默认门店 | 371 | //获取用户的默认门店 |
376 | getApp().get_user_store(function(e) { | 372 | getApp().get_user_store(function(e) { |
377 | - if(!e) { | 373 | + if(!e) { |
378 | th.data.fir_def_store={}; //赋值空对象 | 374 | th.data.fir_def_store={}; //赋值空对象 |
379 | return false; | 375 | return false; |
380 | } | 376 | } |
@@ -435,7 +431,7 @@ Page({ | @@ -435,7 +431,7 @@ Page({ | ||
435 | appd.lat=that.data.lat; | 431 | appd.lat=that.data.lat; |
436 | appd.lon=that.data.lon; | 432 | appd.lon=that.data.lon; |
437 | 433 | ||
438 | - } else { | 434 | + }else{ |
439 | if (e) { | 435 | if (e) { |
440 | e.distance = null; | 436 | e.distance = null; |
441 | that.data.fir_def_store=e; | 437 | that.data.fir_def_store=e; |
@@ -460,7 +456,7 @@ Page({ | @@ -460,7 +456,7 @@ Page({ | ||
460 | 456 | ||
461 | setTimeout(()=>{ | 457 | setTimeout(()=>{ |
462 | wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => { | 458 | wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => { |
463 | - | 459 | + // console.log('node@@@@@@@', res); |
464 | if(res.length != 0) { | 460 | if(res.length != 0) { |
465 | this.setData({ | 461 | this.setData({ |
466 | showFold: res[0].height < res[1].height, | 462 | showFold: res[0].height < res[1].height, |
@@ -521,9 +517,7 @@ Page({ | @@ -521,9 +517,7 @@ Page({ | ||
521 | 517 | ||
522 | if(prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入 | 518 | if(prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入 |
523 | let prom_id = this.data.options.prom_id; | 519 | let prom_id = this.data.options.prom_id; |
524 | - // 检查活动是否开始 | ||
525 | this.check_prom(goods_id, prom_type, prom_id); | 520 | this.check_prom(goods_id, prom_type, prom_id); |
526 | - | ||
527 | } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数 | 521 | } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数 |
528 | getApp().request.promiseGet('/api/weshop/activitylist/getGoodActInfo', { | 522 | getApp().request.promiseGet('/api/weshop/activitylist/getGoodActInfo', { |
529 | data: { | 523 | data: { |
@@ -543,16 +537,20 @@ Page({ | @@ -543,16 +537,20 @@ Page({ | ||
543 | let prom_id = result[0].act_id; | 537 | let prom_id = result[0].act_id; |
544 | this.setData({ | 538 | this.setData({ |
545 | 'options.prom_type': prom_type, | 539 | 'options.prom_type': prom_type, |
546 | - 'options.prom_id': prom_id, | ||
547 | }); | 540 | }); |
548 | - // 检查活动是否开始 | ||
549 | this.check_prom(goods_id, prom_type, prom_id); | 541 | this.check_prom(goods_id, prom_type, prom_id); |
550 | } else if(resLength > 1) { //如果数组长度大于1,表示当前商品参加多个活动,以列表形式显示多活动 | 542 | } else if(resLength > 1) { //如果数组长度大于1,表示当前商品参加多个活动,以列表形式显示多活动 |
551 | this.setData({ | 543 | this.setData({ |
552 | actList: res.data.data, | 544 | actList: res.data.data, |
553 | }); | 545 | }); |
554 | }; | 546 | }; |
555 | - | 547 | + |
548 | + // console.log('!!!!!!~~~~~~~~~prom~~~~~~~~~~!!!!!!'); | ||
549 | + | ||
550 | + // this.setData({ | ||
551 | + // prom, | ||
552 | + // }); | ||
553 | + | ||
556 | }; | 554 | }; |
557 | }); | 555 | }); |
558 | }; | 556 | }; |
@@ -671,6 +669,8 @@ Page({ | @@ -671,6 +669,8 @@ Page({ | ||
671 | 669 | ||
672 | 670 | ||
673 | 671 | ||
672 | + | ||
673 | + | ||
674 | 674 | ||
675 | i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { | 675 | i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { |
676 | failRollback: !0, | 676 | failRollback: !0, |
@@ -700,7 +700,6 @@ Page({ | @@ -700,7 +700,6 @@ Page({ | ||
700 | that.setData({ | 700 | that.setData({ |
701 | 'data.goods_name': t.data.data.serviceName, | 701 | 'data.goods_name': t.data.data.serviceName, |
702 | 'data.shop_price': t.data.data.money, | 702 | 'data.shop_price': t.data.data.money, |
703 | - 'data.show_price': t.data.data.show_price, | ||
704 | 'data.validDays': t.data.data.validDays, | 703 | 'data.validDays': t.data.data.validDays, |
705 | 'data.serviceContent': t.data.data.serviceContent, | 704 | 'data.serviceContent': t.data.data.serviceContent, |
706 | 'data.image_url': t.data.data.imgUrl, | 705 | 'data.image_url': t.data.data.imgUrl, |
@@ -745,9 +744,6 @@ Page({ | @@ -745,9 +744,6 @@ Page({ | ||
745 | }; | 744 | }; |
746 | } | 745 | } |
747 | }); | 746 | }); |
748 | - | ||
749 | - | ||
750 | - | ||
751 | this.data.enterAddressPage && (this.data.enterAddressPage = !1); | 747 | this.data.enterAddressPage && (this.data.enterAddressPage = !1); |
752 | this.get_sto(); | 748 | this.get_sto(); |
753 | 749 | ||
@@ -819,23 +815,8 @@ Page({ | @@ -819,23 +815,8 @@ Page({ | ||
819 | activeCategoryId: 1 | 815 | activeCategoryId: 1 |
820 | }); | 816 | }); |
821 | }, | 817 | }, |
822 | - | ||
823 | - //获取redis中的数量 | ||
824 | - async getactLen(func) { | ||
825 | - var r_num = 0, | ||
826 | - prom_type = this.data.prom_type, | ||
827 | - prom_id = this.data.prom_id; | ||
828 | - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | ||
829 | - 1: 1 | ||
830 | - }).then(res => { | ||
831 | - var em = res; | ||
832 | - if (em.data.code == 0) { | ||
833 | - r_num = em.data.data; | ||
834 | - } | ||
835 | - }) | ||
836 | - func(r_num); | ||
837 | - }, | ||
838 | - | 818 | + |
819 | + | ||
839 | //------------加入购物车-------------- | 820 | //------------加入购物车-------------- |
840 | addCart: function(t) { | 821 | addCart: function(t) { |
841 | var th = this; | 822 | var th = this; |
@@ -847,61 +828,10 @@ Page({ | @@ -847,61 +828,10 @@ Page({ | ||
847 | open_ind_store: ind | 828 | open_ind_store: ind |
848 | }); | 829 | }); |
849 | 830 | ||
850 | - if(!th.data.sto_sele_name) { | 831 | + if(!th.data.sto_sele_name){ |
851 | getApp().my_warnning('请选择门店', 1, th, 450); | 832 | getApp().my_warnning('请选择门店', 1, th, 450); |
852 | return false; | 833 | return false; |
853 | } | 834 | } |
854 | - | ||
855 | - | ||
856 | - | ||
857 | - //000000 | ||
858 | - //如果是秒杀的话,要看redis够不够 | ||
859 | - // if (this.data.prom_type == 1) { | ||
860 | - | ||
861 | - // if (this.data.openSpecModal_flash_normal) { | ||
862 | - // this.data.is_normal=1; //是普通购买 | ||
863 | - // return false; | ||
864 | - // } | ||
865 | - | ||
866 | - | ||
867 | - // this.getactLen(function (num) { | ||
868 | - // if (num < th.data.goodsInputNum) { | ||
869 | - // getApp().my_warnning("活动库存不足!", 0, th); | ||
870 | - // return false; | ||
871 | - // } else { | ||
872 | - // // th.add_cart_func(t); | ||
873 | - // } | ||
874 | - // }); | ||
875 | - // } else { | ||
876 | - // // th.add_cart_func(t); | ||
877 | - // } | ||
878 | - //000000 | ||
879 | - | ||
880 | - | ||
881 | - if(this.data.options.prom_type == 1 && !this.data.prom_act.is_shop_buy) { | ||
882 | - var t = th.data.goodsInputNum + 1; | ||
883 | - th.data.sele_g.viplimited = th.data.sele_g.buy_limit; | ||
884 | - if (th.data.sele_g.viplimited > 0) { | ||
885 | - var gd_buy_num = th.data.sele_g.buy_num; | ||
886 | - | ||
887 | - if (t + gd_buy_num > th.data.sele_g.viplimited) { | ||
888 | - wx.showModal({ | ||
889 | - title: '超出商品限购', | ||
890 | - }); | ||
891 | - | ||
892 | - let num = th.data.sele_g.viplimited - gd_buy_num; | ||
893 | - if (num < 0) num = 0; | ||
894 | - th.setData({goodsInputNum: num}); | ||
895 | - return false; | ||
896 | - } | ||
897 | - }; | ||
898 | - }; | ||
899 | - | ||
900 | - | ||
901 | - | ||
902 | - | ||
903 | - | ||
904 | - | ||
905 | 835 | ||
906 | 836 | ||
907 | if(action=="buy"){ | 837 | if(action=="buy"){ |
@@ -920,20 +850,12 @@ Page({ | @@ -920,20 +850,12 @@ Page({ | ||
920 | newd['prom_type'] = this.data.prom_type; | 850 | newd['prom_type'] = this.data.prom_type; |
921 | newd['prom_id'] = this.data.prom_id; | 851 | newd['prom_id'] = this.data.prom_id; |
922 | newd['prom_price'] = this.data.prom_price; | 852 | newd['prom_price'] = this.data.prom_price; |
923 | - }; | ||
924 | - | ||
925 | - if(this.data.prom_act.is_shop_buy) { | ||
926 | - newd['prom_type'] = 0; | ||
927 | - newd['prom_price'] = this.data.data.shop_price; | ||
928 | - }; | 853 | + } |
929 | 854 | ||
930 | // console.log('newd++++++++', newd); | 855 | // console.log('newd++++++++', newd); |
931 | th.buyNow(newd); | 856 | th.buyNow(newd); |
932 | } else { | 857 | } else { |
933 | - | ||
934 | - | ||
935 | - | ||
936 | - | 858 | + |
937 | var newd = { | 859 | var newd = { |
938 | service_id: th.data.data.id, | 860 | service_id: th.data.data.id, |
939 | service_sn:th.data.data.service_sn, | 861 | service_sn:th.data.data.service_sn, |
@@ -944,7 +866,7 @@ Page({ | @@ -944,7 +866,7 @@ Page({ | ||
944 | store_id:os.stoid, | 866 | store_id:os.stoid, |
945 | money:th.data.data.shop_price | 867 | money:th.data.data.shop_price |
946 | }; | 868 | }; |
947 | - if(getApp().globalData.guide_id) { | 869 | + if(getApp().globalData.guide_id){ |
948 | newd['guide_id'] = getApp().globalData.guide_id; | 870 | newd['guide_id'] = getApp().globalData.guide_id; |
949 | newd['guide_type']=0; | 871 | newd['guide_type']=0; |
950 | } | 872 | } |
@@ -1004,16 +926,14 @@ Page({ | @@ -1004,16 +926,14 @@ Page({ | ||
1004 | } | 926 | } |
1005 | 927 | ||
1006 | 928 | ||
1007 | - | ||
1008 | - | ||
1009 | }, | 929 | }, |
1010 | 930 | ||
1011 | //----------立即购买----------- | 931 | //----------立即购买----------- |
1012 | buyNow: function(e) { | 932 | buyNow: function(e) { |
1013 | - getApp().globalData.service_now=e; | ||
1014 | - wx.redirectTo({ | ||
1015 | - url: "/packageA/pages/cart2_ser/cart2_ser", | ||
1016 | - }); | 933 | + getApp().globalData.service_now=e; |
934 | + wx.redirectTo({ | ||
935 | + url: "/packageA/pages/cart2_ser/cart2_ser", | ||
936 | + }); | ||
1017 | }, | 937 | }, |
1018 | //----------增加购买数量----------- | 938 | //----------增加购买数量----------- |
1019 | addCartNum: function(t) { | 939 | addCartNum: function(t) { |
@@ -1030,108 +950,9 @@ Page({ | @@ -1030,108 +950,9 @@ Page({ | ||
1030 | 950 | ||
1031 | //------检查数量是不是超出限购------ | 951 | //------检查数量是不是超出限购------ |
1032 | checkCartNum: function(t) { | 952 | checkCartNum: function(t) { |
1033 | - | ||
1034 | - var th = this; | ||
1035 | - | ||
1036 | - // if(this.data.prom_act.is_shop_buy && this.data.options.prom_type != 1) { | ||
1037 | - // if(th.data.is_normal) { | ||
1038 | - | ||
1039 | - if(t<=0) return false; | ||
1040 | - th.setData({goodsInputNum:t}); | ||
1041 | - // } else { | ||
1042 | - | ||
1043 | - if(this.data.options.prom_type == 1 && !this.data.openSpecModal_flash_normal) { | ||
1044 | - | ||
1045 | - this.get_buy_num(this.data.sele_g, async function () { | ||
1046 | - th.data.sele_g.viplimited = th.data.sele_g.buy_limit; | ||
1047 | - | ||
1048 | - //--判断商品是否超出限购-- | ||
1049 | - // if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
1050 | - if(!th.data.prom_act.is_shop_buy) { | ||
1051 | - | ||
1052 | - if (th.data.sele_g.viplimited > 0) { | ||
1053 | - var gd_buy_num = th.data.sele_g.buy_num; | ||
1054 | - | ||
1055 | - if (t + gd_buy_num> th.data.sele_g.viplimited) { | ||
1056 | - wx.showModal({ | ||
1057 | - title: '超出商品限购', | ||
1058 | - }); | ||
1059 | - | ||
1060 | - var num = th.data.sele_g.viplimited - gd_buy_num; | ||
1061 | - if (num < 0) num = 0; | ||
1062 | - th.setData({goodsInputNum: num}) | ||
1063 | - return false; | ||
1064 | - } | ||
1065 | - } | ||
1066 | - | ||
1067 | - }; | ||
1068 | - | ||
1069 | - | ||
1070 | - //如果是普通购买的情况下 | ||
1071 | - if(th.data.openSpecModal_flash_normal) th.data.is_normal=1; | ||
1072 | - | ||
1073 | - //--判断商品是否超出活动限购-- | ||
1074 | - if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && !th.data.is_normal) { | ||
1075 | - if (t + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
1076 | - wx.showModal({ | ||
1077 | - title: '超出商品活动限购', | ||
1078 | - }); | ||
1079 | - | ||
1080 | - var num = th.data.prom_buy_limit - th.data.prom_buy_num; | ||
1081 | - if (num < 0) num = 0; | ||
1082 | - th.setData({goodsInputNum: num}) | ||
1083 | - return false; | ||
1084 | - } | ||
1085 | - } | ||
1086 | - | ||
1087 | - if (th.data.sele_g.prom_type == 1 && !th.data.is_normal) { | ||
1088 | - var redis_num = 0; | ||
1089 | - //------判断活动是否抢光----- | ||
1090 | - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | ||
1091 | - os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, { | ||
1092 | - 1: 1 | ||
1093 | - }).then(res => { | ||
1094 | - redis_num = res.data.data; | ||
1095 | - }); | ||
1096 | - | ||
1097 | - if (t > redis_num) { | ||
1098 | - wx.showModal({ | ||
1099 | - title: '超出商品活动库存', | ||
1100 | - }); | ||
1101 | - th.setData({goodsInputNum: redis_num}) | ||
1102 | - return false; | ||
1103 | - } | ||
1104 | - } | ||
1105 | - var e = th.data.sele_g.store_count; | ||
1106 | - var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4 | ||
1107 | - if (th.data.sales_rules == 2 && (p_type != 1 && p_type != 4 && p_type != 6 || th.data.openSpecModal_inte_normal == 1 || th.data.is_normal == 1)) { | ||
1108 | - if (!th.data.def_pick_store) { | ||
1109 | - wx.showModal({title: '请选择门店',}); | ||
1110 | - return false; | ||
1111 | - } else { | ||
1112 | - e = th.data.def_pick_store.CanOutQty; | ||
1113 | - } | ||
1114 | - } | ||
1115 | - if (!e) e = 0; | ||
1116 | - //库存不足,不增加 | ||
1117 | - if (e < t) { | ||
1118 | - wx.showModal({title: '库存不足',}); | ||
1119 | - if (e < 0) e = 0; | ||
1120 | - th.setData({goodsInputNum: e}); | ||
1121 | - return false; | ||
1122 | - } | ||
1123 | - t > e || 0 == e ? t = e : t < 1 && (t = 1); | ||
1124 | - th.setData({goodsInputNum: t}); | ||
1125 | - // th.is_show_more_buy(); | ||
1126 | - | ||
1127 | - }) | ||
1128 | - | ||
1129 | - }; | ||
1130 | - | ||
1131 | - | ||
1132 | - | ||
1133 | - | ||
1134 | - | 953 | + if(t<=0) return false; |
954 | + var th = this; | ||
955 | + th.setData({goodsInputNum:t}) | ||
1135 | }, | 956 | }, |
1136 | 957 | ||
1137 | 958 | ||
@@ -1143,6 +964,7 @@ Page({ | @@ -1143,6 +964,7 @@ Page({ | ||
1143 | }, | 964 | }, |
1144 | 965 | ||
1145 | openSpecModel: function(t) { | 966 | openSpecModel: function(t) { |
967 | + // console.log('****ttttttt***', t); | ||
1146 | var th=this; | 968 | var th=this; |
1147 | var open_store = t.currentTarget.dataset.ind; | 969 | var open_store = t.currentTarget.dataset.ind; |
1148 | this.setData({ | 970 | this.setData({ |
@@ -1223,57 +1045,12 @@ Page({ | @@ -1223,57 +1045,12 @@ Page({ | ||
1223 | }); | 1045 | }); |
1224 | } | 1046 | } |
1225 | } | 1047 | } |
1226 | - }, | ||
1227 | - //---------联系客服------------ | ||
1228 | - contactService: function () { | ||
1229 | - this.getTel() | ||
1230 | - .then(() => { | ||
1231 | - if(self.data.store_tel) { | ||
1232 | - wx.showModal({ | ||
1233 | - title: '联系客服', | ||
1234 | - content: '客服热线:' + self.data.store_tel, | ||
1235 | - confirmText: '拨打', | ||
1236 | - success(res) { | ||
1237 | - if(res.confirm) { | ||
1238 | - wx.makePhoneCall({ | ||
1239 | - phoneNumber: self.data.store_tel, | ||
1240 | - }) | ||
1241 | - }; | ||
1242 | - }, | ||
1243 | - }); | ||
1244 | - }; | ||
1245 | - }); | ||
1246 | - }, | ||
1247 | - // 获取客服电话 | ||
1248 | - getTel() { | ||
1249 | - return new Promise((resolve, reject) => { | ||
1250 | - s.getConfig(function (t) { | ||
1251 | - if (t.store_tel == undefined) { | ||
1252 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
1253 | - isShowLoading: 1, | ||
1254 | - data: {}, | ||
1255 | - success: function (rs) { | ||
1256 | - getApp().globalData.config = rs.data.data; | ||
1257 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
1258 | - getApp().my_warnning("商家未设置电话", 0, th); | ||
1259 | - return false; | ||
1260 | - } | ||
1261 | - self.setData({ | ||
1262 | - store_tel: rs.data.data.store_tel, | ||
1263 | - }); | ||
1264 | - // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
1265 | - } | ||
1266 | - }) | ||
1267 | - } else { | ||
1268 | - self.setData({ | ||
1269 | - store_tel: t.store_tel, | ||
1270 | - }); | ||
1271 | - // s.confirmBox("请联系客服:" + t.store_tel); | ||
1272 | - }; | ||
1273 | - resolve(); | ||
1274 | - }); | ||
1275 | - }); | ||
1276 | - }, | 1048 | + }, |
1049 | + | ||
1050 | + //---------联系客服------------ | ||
1051 | + contactService: function() { | ||
1052 | + getApp().con_Service(); | ||
1053 | + }, | ||
1277 | //-------获取购物车数量---------- | 1054 | //-------获取购物车数量---------- |
1278 | requestCardNum: function() { | 1055 | requestCardNum: function() { |
1279 | var t = this; | 1056 | var t = this; |
@@ -1315,6 +1092,7 @@ Page({ | @@ -1315,6 +1092,7 @@ Page({ | ||
1315 | 1092 | ||
1316 | //--点击分享事件--- | 1093 | //--点击分享事件--- |
1317 | onShareAppMessage: function(t) { | 1094 | onShareAppMessage: function(t) { |
1095 | + getApp().globalData.no_clear=1; | ||
1318 | 1096 | ||
1319 | var th = this; | 1097 | var th = this; |
1320 | var price = th.data.data.shop_price; | 1098 | var price = th.data.data.shop_price; |
@@ -2768,10 +2546,7 @@ Page({ | @@ -2768,10 +2546,7 @@ Page({ | ||
2768 | }, | 2546 | }, |
2769 | 2547 | ||
2770 | previewImage() { | 2548 | previewImage() { |
2771 | - wx.previewImage({ | ||
2772 | - //将图片预览出来 | ||
2773 | - urls: [this.data.shareImgPath] | ||
2774 | - }); | 2549 | + getApp().pre_img(this.data.shareImgPath); |
2775 | }, | 2550 | }, |
2776 | 2551 | ||
2777 | onShareTimeline() { | 2552 | onShareTimeline() { |
@@ -2795,13 +2570,7 @@ Page({ | @@ -2795,13 +2570,7 @@ Page({ | ||
2795 | 2570 | ||
2796 | //---------联系微信客服------------ | 2571 | //---------联系微信客服------------ |
2797 | con_weixin:function () { | 2572 | con_weixin:function () { |
2798 | - var url=this.data.sys_switch.weapp_customertype_url; | ||
2799 | - var id=this.data.sys_switch.weapp_customertype_appid; | ||
2800 | - wx.openCustomerServiceChat({ | ||
2801 | - extInfo: {url: url}, | ||
2802 | - corpId: id, | ||
2803 | - success(res) {} | ||
2804 | - }) | 2573 | + getApp().con_wx(this) |
2805 | }, | 2574 | }, |
2806 | 2575 | ||
2807 | //评论的调用 | 2576 | //评论的调用 |
@@ -2998,10 +2767,9 @@ Page({ | @@ -2998,10 +2767,9 @@ Page({ | ||
2998 | // b[i] = this.data.iurl + e[i]; | 2767 | // b[i] = this.data.iurl + e[i]; |
2999 | // } | 2768 | // } |
3000 | this.data.show_prew_img = 1; | 2769 | this.data.show_prew_img = 1; |
3001 | - wx.previewImage({ | ||
3002 | - current: b[t.currentTarget.dataset.id], | ||
3003 | - urls: b | ||
3004 | - }); | 2770 | + //调用预览图片 |
2771 | + getApp().pre_img2(b,t); | ||
2772 | + | ||
3005 | }, | 2773 | }, |
3006 | 2774 | ||
3007 | 2775 | ||
@@ -3125,45 +2893,38 @@ Page({ | @@ -3125,45 +2893,38 @@ Page({ | ||
3125 | }, | 2893 | }, |
3126 | 2894 | ||
3127 | 2895 | ||
3128 | - //获取redis中的数量 | ||
3129 | - async getactLen(func) { | ||
3130 | - var r_num = 0, | ||
3131 | - prom_type = this.data.prom_type, | ||
3132 | - prom_id = this.data.prom_id; | ||
3133 | - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | ||
3134 | - 1: 1 | ||
3135 | - }).then(res => { | ||
3136 | - var em = res; | ||
3137 | - if (em.data.code == 0) { | ||
3138 | - r_num = em.data.data; | ||
3139 | - } | ||
3140 | - }) | ||
3141 | - func(r_num); | ||
3142 | - }, | ||
3143 | - | ||
3144 | - | ||
3145 | 2896 | ||
3146 | 2897 | ||
3147 | //--------检查是否活动,活动是否开始,或者是否结束------- | 2898 | //--------检查是否活动,活动是否开始,或者是否结束------- |
3148 | async check_prom(gid, prom_type, prom_id) { | 2899 | async check_prom(gid, prom_type, prom_id) { |
2900 | + console.log('check_prom'); | ||
3149 | var ee = this, th = ee; | 2901 | var ee = this, th = ee; |
3150 | var user_id = getApp().globalData.user_id; | 2902 | var user_id = getApp().globalData.user_id; |
3151 | if (!user_id) user_id = 0; | 2903 | if (!user_id) user_id = 0; |
3152 | - | ||
3153 | - if (prom_type == 1 && prom_id == 0) { | ||
3154 | - // this.setData({ | ||
3155 | - // prom_type: 0, isshow: 1, | ||
3156 | - // }); | ||
3157 | - | ||
3158 | - // //获取门店 | ||
3159 | - // this.get_sto(); | ||
3160 | - // this.get_sku(o.stoid, this.data.data, gid); | ||
3161 | - // this.check_has_flash(); | ||
3162 | - // this.data.is_normal = 1; | ||
3163 | - // this.check_is_youhui(gid, 1); | ||
3164 | - // return false; | ||
3165 | - } | ||
3166 | 2904 | ||
2905 | + // if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9 || prom_type == 10) { | ||
2906 | + // this.setData({ | ||
2907 | + // prom_type: 0, isshow: 1, | ||
2908 | + // }); | ||
2909 | + // return false; | ||
2910 | + // } | ||
2911 | + | ||
2912 | + | ||
2913 | + | ||
2914 | + // if (prom_type == 1 && prom_id == 0) { | ||
2915 | + // this.setData({ | ||
2916 | + // prom_type: 0, isshow: 1, | ||
2917 | + // }); | ||
2918 | + | ||
2919 | + // //获取门店 | ||
2920 | + // this.get_sto(); | ||
2921 | + // this.get_sku(o.stoid, this.data.data, gid); | ||
2922 | + // this.check_has_flash(); | ||
2923 | + // this.data.is_normal = 1; | ||
2924 | + // this.check_is_youhui(gid, 1); | ||
2925 | + // return false; | ||
2926 | + // } | ||
2927 | + | ||
3167 | //if (prom_type != 3 && prom_type!=0){ | 2928 | //if (prom_type != 3 && prom_type!=0){ |
3168 | //---判断秒杀---- | 2929 | //---判断秒杀---- |
3169 | if (prom_type == 1 && prom_id > 0) { | 2930 | if (prom_type == 1 && prom_id > 0) { |
@@ -3172,23 +2933,15 @@ Page({ | @@ -3172,23 +2933,15 @@ Page({ | ||
3172 | 1: 1 | 2933 | 1: 1 |
3173 | }).then(res => { | 2934 | }).then(res => { |
3174 | var em = res; | 2935 | var em = res; |
3175 | - if (em.data.code == 0) { | ||
3176 | - | ||
3177 | - if (em.data.data <= 0) { | ||
3178 | - th.setData({ | ||
3179 | - prom_r_null: 1, | ||
3180 | - goodsInputNum: res.data.data, | ||
3181 | - }); | ||
3182 | - | ||
3183 | - // th.setData({goodsInputNum: redis_num}) | ||
3184 | - }; | 2936 | + if (res.data.code == 0) { |
2937 | + // console.log('!!!!!!res!!!!', res); | ||
2938 | + if (res.data.data <= 0) ee.setData({ | ||
2939 | + prom_r_null: 1 | ||
2940 | + }); | ||
3185 | //拿取价格并且判断时间-- | 2941 | //拿取价格并且判断时间-- |
3186 | getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { | 2942 | getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { |
3187 | success: function (t) { | 2943 | success: function (t) { |
3188 | - th.setData({ | ||
3189 | - sele_g: t.data.data, | ||
3190 | - }); | ||
3191 | - | 2944 | + // console.log('!!!!!!t!!!!', t); |
3192 | if (t.data.code != 0) { | 2945 | if (t.data.code != 0) { |
3193 | ee.get_normal(gid); | 2946 | ee.get_normal(gid); |
3194 | return false; | 2947 | return false; |
@@ -3215,6 +2968,7 @@ Page({ | @@ -3215,6 +2968,7 @@ Page({ | ||
3215 | var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | 2968 | var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); |
3216 | 2969 | ||
3217 | ee.setData({ | 2970 | ee.setData({ |
2971 | + 'data.shop_price': t.data.data.user_price, | ||
3218 | prom_price: t.data.data.user_price, | 2972 | prom_price: t.data.data.user_price, |
3219 | prom_type: 1, | 2973 | prom_type: 1, |
3220 | prom_id: prom_id, | 2974 | prom_id: prom_id, |
@@ -3232,6 +2986,7 @@ Page({ | @@ -3232,6 +2986,7 @@ Page({ | ||
3232 | if (endTime1 > newTime) { | 2986 | if (endTime1 > newTime) { |
3233 | ee.setData({ | 2987 | ee.setData({ |
3234 | prom_time_text: '距秒杀开始还有', | 2988 | prom_time_text: '距秒杀开始还有', |
2989 | + prom_st: 0, | ||
3235 | }) | 2990 | }) |
3236 | ee.countDown(endTime1, 0); | 2991 | ee.countDown(endTime1, 0); |
3237 | } else { | 2992 | } else { |
@@ -3245,60 +3000,60 @@ Page({ | @@ -3245,60 +3000,60 @@ Page({ | ||
3245 | } | 3000 | } |
3246 | 3001 | ||
3247 | //如果是进行中的话 | 3002 | //如果是进行中的话 |
3248 | - if (endTime1 < newTime) { | ||
3249 | - //-- 获取秒杀活动的多少规格 -- | ||
3250 | - ee.get_more_flahs(function (list) { | ||
3251 | - if (list && list.length > 1) { | ||
3252 | - | ||
3253 | - var n_item = list[0]; | ||
3254 | - var ind = list.findIndex(function (ele) { | ||
3255 | - return ele.goods_id == ee.data.data.goods_id; | ||
3256 | - }) | ||
3257 | - if (ind < 0) return false; | ||
3258 | - if (ind > 0) { | ||
3259 | - n_item = JSON.parse(JSON.stringify(list[ind])); | ||
3260 | - list.splice(ind, 1); | ||
3261 | - list.unshift(n_item); | ||
3262 | - } | ||
3263 | - | ||
3264 | - ee.data.sele_g.viplimited = n_item.viplimited; | ||
3265 | - ee.data.data.viplimited = n_item.viplimited; | ||
3266 | - | ||
3267 | - var gb = 1; | ||
3268 | - //-- 显示多规格 -- | ||
3269 | - for (let i in list) { | ||
3270 | - let item = list[i]; | ||
3271 | - var gg = ""; | ||
3272 | - if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = ""; | ||
3273 | - if (item.goods_color == "null" || item.goods_color == null) item.goods_color = ""; | ||
3274 | - | ||
3275 | - if (item.goods_spec != "" && item.goods_color != "") { | ||
3276 | - gg = item.goods_spec + "/" + item.goods_color; | ||
3277 | - } else if (item.goods_spec != "" || item.goods_color != "") { | ||
3278 | - gg = item.goods_spec + item.goods_color; | ||
3279 | - } else { | ||
3280 | - gg = "规格" + gb; | ||
3281 | - gb++; | ||
3282 | - } | ||
3283 | - item.gg = gg; | ||
3284 | - item.prom_id = item.prom_id; | ||
3285 | - item.prom_type = 1; | ||
3286 | - } | ||
3287 | - | ||
3288 | - ee.setData({ | ||
3289 | - sku_g: list, | ||
3290 | - }); | ||
3291 | - | ||
3292 | - } | ||
3293 | - }) | ||
3294 | - } | 3003 | + // if (endTime1 < newTime) { |
3004 | + // //-- 获取秒杀活动的多少规格 -- | ||
3005 | + // ee.get_more_flahs(function (list) { | ||
3006 | + // if (list && list.length > 1) { | ||
3007 | + | ||
3008 | + // var n_item = list[0]; | ||
3009 | + // var ind = list.findIndex(function (ele) { | ||
3010 | + // return ele.goods_id == ee.data.data.goods_id; | ||
3011 | + // }) | ||
3012 | + // if (ind < 0) return false; | ||
3013 | + // if (ind > 0) { | ||
3014 | + // n_item = JSON.parse(JSON.stringify(list[ind])); | ||
3015 | + // list.splice(ind, 1); | ||
3016 | + // list.unshift(n_item); | ||
3017 | + // } | ||
3018 | + | ||
3019 | + // ee.data.sele_g.viplimited = n_item.viplimited; | ||
3020 | + // ee.data.data.viplimited = n_item.viplimited; | ||
3021 | + | ||
3022 | + // var gb = 1; | ||
3023 | + // //-- 显示多规格 -- | ||
3024 | + // for (let i in list) { | ||
3025 | + // let item = list[i]; | ||
3026 | + // var gg = ""; | ||
3027 | + // if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = ""; | ||
3028 | + // if (item.goods_color == "null" || item.goods_color == null) item.goods_color = ""; | ||
3029 | + | ||
3030 | + // if (item.goods_spec != "" && item.goods_color != "") { | ||
3031 | + // gg = item.goods_spec + "/" + item.goods_color; | ||
3032 | + // } else if (item.goods_spec != "" || item.goods_color != "") { | ||
3033 | + // gg = item.goods_spec + item.goods_color; | ||
3034 | + // } else { | ||
3035 | + // gg = "规格" + gb; | ||
3036 | + // gb++; | ||
3037 | + // } | ||
3038 | + // item.gg = gg; | ||
3039 | + // item.prom_id = item.prom_id; | ||
3040 | + // item.prom_type = 1; | ||
3041 | + // } | ||
3042 | + | ||
3043 | + // ee.setData({ | ||
3044 | + // sku_g: list, | ||
3045 | + // }); | ||
3046 | + | ||
3047 | + // } | ||
3048 | + // }) | ||
3049 | + // } | ||
3295 | 3050 | ||
3296 | } | 3051 | } |
3297 | }); | 3052 | }); |
3298 | } | 3053 | } |
3299 | }) | 3054 | }) |
3300 | } | 3055 | } |
3301 | - | 3056 | + |
3302 | }, | 3057 | }, |
3303 | 3058 | ||
3304 | 3059 | ||
@@ -3307,706 +3062,58 @@ Page({ | @@ -3307,706 +3062,58 @@ Page({ | ||
3307 | let prom_type = e.currentTarget.dataset.promtype; | 3062 | let prom_type = e.currentTarget.dataset.promtype; |
3308 | let prom_id = e.currentTarget.dataset.promid; | 3063 | let prom_id = e.currentTarget.dataset.promid; |
3309 | let goods_id = this.data.data.goods_id; | 3064 | let goods_id = this.data.data.goods_id; |
3310 | - let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`;s | 3065 | + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; |
3066 | + // console.log('url~~~~', url); | ||
3311 | getApp().goto(url); | 3067 | getApp().goto(url); |
3312 | }, | 3068 | }, |
3313 | 3069 | ||
3314 | 3070 | ||
3315 | 3071 | ||
3316 | - //获取更多秒杀 | ||
3317 | - get_more_flahs: async function (func) { | ||
3318 | - var f_more = false; | ||
3319 | - var user_id = getApp().globalData.user_id; | ||
3320 | - if (!user_id) user_id = 0; | ||
3321 | - | ||
3322 | - var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.data.goods_id + "&user_id=" + user_id; | ||
3323 | - //获取秒杀的多规格 | ||
3324 | - await getApp().request.promiseGet(url, {}).then(res => { | ||
3325 | - if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
3326 | - f_more = res.data.data; | ||
3327 | - } | ||
3328 | - }) | ||
3329 | - if (!f_more) { | ||
3330 | - func(false); | ||
3331 | - return false; | ||
3332 | - } | ||
3333 | - //-- 秒杀的价格要更新 -- | ||
3334 | - for (let i in f_more) { | ||
3335 | - | ||
3336 | - let item = f_more[i]; | ||
3337 | - f_more[i].prom_id = item.act_id; | ||
3338 | - f_more[i].prom_type = 1; | ||
3339 | - if (item.goods_id == this.data.data.goods_id) { | ||
3340 | - continue; | ||
3341 | - } | ||
3342 | - var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id; | ||
3343 | - await getApp().request.promiseGet(url, {}).then(rs => { | ||
3344 | - if (rs.data.code == 0) { | ||
3345 | - f_more[i].price = rs.data.data.user_price; | ||
3346 | - | ||
3347 | - } | ||
3348 | - }) | ||
3349 | - } | ||
3350 | - func(f_more); | ||
3351 | - | ||
3352 | - }, | ||
3353 | - | ||
3354 | - | ||
3355 | - | ||
3356 | - | ||
3357 | - | ||
3358 | - | ||
3359 | - //-------------获取购买数量的总函数---------------- | ||
3360 | - get_buy_num: function (gd, func) { | ||
3361 | - | ||
3362 | - var th = this, | ||
3363 | - user_id = getApp().globalData.user_id; | ||
3364 | - | ||
3365 | - | ||
3366 | - //----获取商品购买数---- | ||
3367 | - getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", { | ||
3368 | - data: { | ||
3369 | - store_id: os.stoid, | ||
3370 | - user_id: user_id, | ||
3371 | - goods_id: this.data.gid, | ||
3372 | - }, | ||
3373 | - success: function (t) { | ||
3374 | - if (t.data.code == 0) { | ||
3375 | - var g_buy_num = t.data.data.goodsbuynum; | ||
3376 | - | ||
3377 | - // 如果是秒杀的时候 | ||
3378 | - // if (th.data.prom_type == 0 && gd.prom_type == 1) { | ||
3379 | - // gd.prom_type = 0; | ||
3380 | - // } | ||
3381 | - | ||
3382 | - //----获取活动购买数---- | ||
3383 | - getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", { | ||
3384 | - data: { | ||
3385 | - store_id: os.stoid, | ||
3386 | - user_id: user_id, | ||
3387 | - goods_id: th.data.gid, | ||
3388 | - prom_type: th.data.prom_type, | ||
3389 | - prom_id: th.data.prom_id | ||
3390 | - }, | ||
3391 | - //-----获取----- | ||
3392 | - success: function (tt) { | ||
3393 | - if (tt.data.code == 0) { | ||
3394 | - th.setData({ | ||
3395 | - prom_buy_num: tt.data.data.goodsbuynum, | ||
3396 | - }); | ||
3397 | - "function" == typeof func && func(); | ||
3398 | - } | ||
3399 | - } | ||
3400 | - }); | ||
3401 | - | ||
3402 | - | ||
3403 | - } | ||
3404 | - }, | ||
3405 | - }); | ||
3406 | - }, | ||
3407 | - | ||
3408 | - | ||
3409 | - | ||
3410 | - | ||
3411 | - | ||
3412 | - // 促销 -> 送礼包 -> 查看详情 | ||
3413 | - viewLbDetails(e) { | ||
3414 | - let id = e.currentTarget.dataset.id; // 获取礼包id | ||
3415 | - let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 | ||
3416 | - // console.log('myurl', url); | ||
3417 | - getApp().goto(url); | ||
3418 | - }, | ||
3419 | 3072 | ||
3420 | - go_more_ladder: function (e) { | ||
3421 | - var prom_id = e.currentTarget.dataset.id; | ||
3422 | - getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id); | ||
3423 | - }, | ||
3424 | - | ||
3425 | - getHistoryBuy() { | ||
3426 | - let _this = this; | ||
3427 | - let req_data = { | ||
3428 | - store_id: os.stoid, | ||
3429 | - goods_id: this.data.gid, | ||
3430 | - pay_status: 1, | ||
3431 | - rndid: 1 | ||
3432 | - }; | ||
3433 | - getApp().request.promiseGet('/api/weshop/ordergoods/list', { | ||
3434 | - data: req_data, | ||
3435 | - }) | ||
3436 | - .then(res => { | ||
3437 | - if (t.ajax_ok(res)) { | ||
3438 | - _this.setData({ | ||
3439 | - historyBuyInfo: res.data.data.pageData, | ||
3440 | - }) | ||
3441 | - } | ||
3442 | - }) | ||
3443 | - }, | ||
3444 | - | ||
3445 | - | ||
3446 | - | ||
3447 | - //-- 秒杀的普通购买 -- | ||
3448 | - openSpecModel_Nor: function () { | ||
3449 | - this.data.g_buy_num = new Map(); | 3073 | + //-- 检验商品的活动情况 -- |
3074 | + check_gd_prom_new: function (func) { | ||
3450 | var th = this; | 3075 | var th = this; |
3451 | - this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4 | ||
3452 | - | ||
3453 | - this.setData({openSpecModal_flash_normal: 1}); | ||
3454 | - | ||
3455 | - | ||
3456 | - // if (th.data.sku_g_pt) { | ||
3457 | - // // this.get_sto(1) | ||
3458 | - // this.setData({openSpecModal_flash_normal: 1}); | ||
3459 | - // } else { | ||
3460 | - // th.get_sto(1); | ||
3461 | - // th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | ||
3462 | - // th.setData({ | ||
3463 | - // openSpecModal_flash_normal: 1 | ||
3464 | - // }); | ||
3465 | - // }); | ||
3466 | - // } | ||
3467 | - // this.check_is_youhui(th.data.gid, 1); | ||
3468 | - }, | ||
3469 | - | ||
3470 | - closeSpecModal_flash_normal: function () { | ||
3471 | - this.setData({openSpecModal_flash_normal: 0}); | ||
3472 | - }, | ||
3473 | - | ||
3474 | - | ||
3475 | - //打开客服操作菜单 | ||
3476 | - openCS() { | ||
3477 | - // csType/在线客服设置: | ||
3478 | - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
3479 | - // 1小程序客服、 | ||
3480 | - // 2企业微信客服 | ||
3481 | - let csType = this.data.sys_switch.weapp_customertype; | ||
3482 | - if(csType == 0) { | ||
3483 | - // 获取电话号码 | ||
3484 | - this.contactService(); | ||
3485 | - } else { | ||
3486 | - this.getTel() | ||
3487 | - .then(() => { | ||
3488 | - self.setData({ | ||
3489 | - hiddenCS: false, | ||
3490 | - }); | ||
3491 | - }); | ||
3492 | - | ||
3493 | - }; | ||
3494 | - }, | ||
3495 | - | ||
3496 | - //关闭客服操作菜单 | ||
3497 | - closeCS() { | ||
3498 | - this.setData({ | ||
3499 | - hiddenCS: true, | ||
3500 | - }); | ||
3501 | - }, | ||
3502 | - | ||
3503 | - | ||
3504 | - | ||
3505 | - | ||
3506 | - | ||
3507 | - | ||
3508 | - | ||
3509 | - //-- 加入购物的函数 -- | ||
3510 | - add_cart_func: function (t) { | ||
3511 | - var i = getApp().request; | ||
3512 | - if (oo.user_id == null) { | ||
3513 | - return s.my_warnning("还未登录!", 0, this); | ||
3514 | - } | 3076 | + var user_id = getApp().globalData.user_id; |
3077 | + if (!user_id) user_id = 0; | ||
3515 | 3078 | ||
3516 | - if (!getApp().globalData.userInfo) { | ||
3517 | - return s.my_warnning("还未登录!", 0, this); | 3079 | + var url = '/api/weshop/activitylist/listGoodActInfo2'; |
3080 | + var req_d = { | ||
3081 | + "store_id": os.stoid, | ||
3082 | + "goods_id": this.data.gid, | ||
3083 | + "user_id": user_id, | ||
3518 | } | 3084 | } |
3519 | - | ||
3520 | - var e = this, | ||
3521 | - th = e, | ||
3522 | - a = 0, | ||
3523 | - o = this.data.sele_g; | ||
3524 | - a = o.goods_id; | ||
3525 | - | ||
3526 | - //----------添加到购物车时,要判断限购数量,-------- | ||
3527 | - e.get_buy_num(o, function (ee) { | ||
3528 | - //---判断商品是否超出限购--- | ||
3529 | - if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
3530 | - if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | ||
3531 | - wx.showModal({ | ||
3532 | - title: '提示', | ||
3533 | - content: '超出商品限购' | ||
3534 | - }); | ||
3535 | - return false; | ||
3536 | - } | ||
3537 | - } | ||
3538 | - //---判断商品是否超出活动限购--- | ||
3539 | - if ((th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) && !th.data.is_normal) { | ||
3540 | - if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
3541 | - wx.showModal({ | ||
3542 | - title: '提示', | ||
3543 | - content: '超出商品活动限购' | ||
3544 | - }); | ||
3545 | - return false; | ||
3546 | - } | ||
3547 | - } | ||
3548 | - | ||
3549 | - if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | ||
3550 | - if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | ||
3551 | - this.setData({ | ||
3552 | - sto_sele_name: "" | ||
3553 | - }); | ||
3554 | - if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | ||
3555 | - | ||
3556 | - //--------------此时操作的数据------------ | ||
3557 | - var newd = { | ||
3558 | - goods_id: o.goods_id, | ||
3559 | - goods_num: th.data.goodsInputNum, | ||
3560 | - pick_id: th.data.sto_sele_id, | ||
3561 | - user_id: oo.user_id, | ||
3562 | - store_id: th.data.stoid, | ||
3563 | - goods_price: o.shop_price, | ||
3564 | - member_goods_price: o.shop_price, | ||
3565 | - goods_name: o.goods_name, | ||
3566 | - goods_sn: o.goods_sn, | ||
3567 | - sku: o.sku, | ||
3568 | - prom_id: th.data.sele_g.prom_id, | ||
3569 | - prom_type: th.data.sele_g.prom_type, | ||
3570 | - }; | ||
3571 | - | ||
3572 | - //---是不是从收藏夹出来的--- | ||
3573 | - if (th.data.c_guide_id) { | ||
3574 | - newd['guide_id'] = th.data.c_guide_id; | ||
3575 | - newd['guide_type'] = 2; | ||
3576 | - if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3; | ||
3577 | - } else { | ||
3578 | - if (getApp().globalData.guide_id) { | ||
3579 | - newd['guide_id'] = getApp().globalData.guide_id; | ||
3580 | - newd['guide_type'] = 0; | ||
3581 | - if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1; | ||
3582 | - } | ||
3583 | - } | ||
3584 | - | ||
3585 | - //让商品带上房间号 | ||
3586 | - //让商品带上房间号 | ||
3587 | - if (th.data.sys_switch.is_skuroom_id == 1) { | ||
3588 | - if (th.data.data.goods_id == getApp().globalData.room_goods_id) { | ||
3589 | - newd.room_id = getApp().globalData.room_id; | ||
3590 | - } | ||
3591 | - } else { | ||
3592 | - if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id; | ||
3593 | - } | ||
3594 | - | ||
3595 | - //如果是积分够,is_integral_normal就要有积分购普通购买字段 | ||
3596 | - if (o.prom_type == 4) { | ||
3597 | - newd.is_integral_normal = 1; | ||
3598 | - } | ||
3599 | - | ||
3600 | - //如果有线下取价 | ||
3601 | - if (o.offline_price) { | ||
3602 | - newd.offline_price = o.offline_price; | ||
3603 | - newd.pricing_type = o.pricing_type; | ||
3604 | - } | ||
3605 | - | ||
3606 | - //-----如果是秒杀,团购,积分购,拼团----- | ||
3607 | - if (th.data.prom_type == 1 || th.data.prom_type == 2) { | ||
3608 | - | ||
3609 | - if (th.data.openSpecModal_flash_normal) { | ||
3610 | - | ||
3611 | - newd.prom_type = 0; | ||
3612 | - newd.prom_id = 0; | ||
3613 | - | ||
3614 | - //---如果是线下门店销售的时候--- | ||
3615 | - if (th.data.sales_rules == 2) { | ||
3616 | - var pick = th.get_pick_from_list(th.data.sto_sele_id) | ||
3617 | - //---通过接口获取门店的线下库存信息-- | ||
3618 | - getApp().request.get("/api/weshop/goods/getWareStorages", { | ||
3619 | - data: { | ||
3620 | - storageNos: pick.pickup_no, | ||
3621 | - wareIds: encodeURIComponent(th.data.sele_g.erpwareid), | ||
3622 | - storeId: os.stoid | ||
3623 | - }, | ||
3624 | - success: function (res) { | ||
3625 | - if (res.data.code == 0) { | ||
3626 | - if (res.data.data.pageData.length > 0) { | ||
3627 | - var CanOutQty = res.data.data.pageData[0].CanOutQty; | ||
3628 | - if (CanOutQty < e.data.goodsInputNum) { | ||
3629 | - return s.my_warnning("库存不足!", 0, th); | ||
3630 | - } | ||
3631 | - //在调一次接口,读取商品的预出库的数量,lock | ||
3632 | - getApp().request.get("/api/weshop/order/ware/lock/page", { | ||
3633 | - data: { | ||
3634 | - store_id: os.stoid, | ||
3635 | - wareId: th.data.sele_g.goods_id, | ||
3636 | - storageId: pick.pickup_id, | ||
3637 | - pageSize: 1000 | ||
3638 | - }, | ||
3639 | - success: function (res_data) { | ||
3640 | - if (res_data.data.code == 0 && res_data.data.data.total > 0) { | ||
3641 | - | ||
3642 | - var lock = 0; | ||
3643 | - for (var i in res_data.data.data.pageData) { | ||
3644 | - lock += res_data.data.data.pageData[i].outQty; | ||
3645 | - } | ||
3646 | - | ||
3647 | - if (CanOutQty <= lock) { | ||
3648 | - return s.my_warnning("库存不足!", 0, th); | ||
3649 | - } | ||
3650 | - th.add_cart_next(e, t, a, o, newd, CanOutQty - lock); | ||
3651 | - } else { | ||
3652 | - th.add_cart_next(e, t, a, o, newd, CanOutQty); | ||
3653 | - } | ||
3654 | - } | ||
3655 | - }) | ||
3656 | - } else { | ||
3657 | - return s.my_warnning("库存不足!", 0, th); | ||
3658 | - } | ||
3659 | - | ||
3660 | - } | ||
3661 | - } | ||
3662 | - }) | ||
3663 | - } else { | ||
3664 | - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
3665 | - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
3666 | - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | ||
3667 | - } | ||
3668 | - | ||
3669 | - return false; | ||
3670 | - } | ||
3671 | - | ||
3672 | - | ||
3673 | - newd.goods_price = th.data.prom_price; | ||
3674 | - newd.member_goods_price = th.data.prom_price, | ||
3675 | - newd.prom_type = th.data.prom_type; | ||
3676 | - newd.prom_id = th.data.prom_id; | ||
3677 | - | ||
3678 | - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
3679 | - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
3680 | - | ||
3681 | - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | ||
3682 | - | ||
3683 | - } else if (o.prom_type == 7) { | ||
3684 | - | ||
3685 | - //判断进行中的活动,是不是要判断线下库存 | ||
3686 | - th.check_zh_acting(function (ee) { | ||
3687 | - newd.prom_id = 0; | ||
3688 | - newd.prom_type = 0; | ||
3689 | - if (ee && th.data.sele_g.act) { | ||
3690 | - newd.prom_id = th.data.sele_g.act.id; | ||
3691 | - newd.prom_type = 7; | ||
3692 | - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
3693 | - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
3694 | - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | ||
3695 | - return false; | ||
3696 | - } else { | ||
3697 | - //---如果是线下门店销售的时候--- | ||
3698 | - if (th.data.sales_rules == 2) { | ||
3699 | - var pick = th.get_pick_from_list(th.data.sto_sele_id) | ||
3700 | - //---通过接口获取门店的线下库存信息-- | ||
3701 | - getApp().request.get("/api/weshop/goods/getWareStorages", { | ||
3702 | - data: { | ||
3703 | - storageNos: pick.pickup_no, | ||
3704 | - wareIds: encodeURIComponent(th.data.sele_g.erpwareid), | ||
3705 | - storeId: os.stoid | ||
3706 | - }, | ||
3707 | - success: function (res) { | ||
3708 | - if (res.data.code == 0) { | ||
3709 | - if (res.data.data.pageData.length > 0) { | ||
3710 | - var CanOutQty = res.data.data.pageData[0].CanOutQty; | ||
3711 | - if (CanOutQty < e.data.goodsInputNum) { | ||
3712 | - return s.my_warnning("库存不足!", 0, th); | ||
3713 | - } | ||
3714 | - //在调一次接口,读取商品的预出库的数量,lock | ||
3715 | - getApp().request.get("/api/weshop/order/ware/lock/page", { | ||
3716 | - data: { | ||
3717 | - store_id: os.stoid, | ||
3718 | - wareId: th.data.sele_g.goods_id, | ||
3719 | - storageId: pick.pickup_id, | ||
3720 | - pageSize: 1000 | ||
3721 | - }, | ||
3722 | - success: function (res_data) { | ||
3723 | - if (res_data.data.code == 0 && res_data.data.data.total > 0) { | ||
3724 | - | ||
3725 | - var lock = 0; | ||
3726 | - for (var i in res_data.data.data.pageData) { | ||
3727 | - lock += res_data.data.data.pageData[i].outQty; | ||
3728 | - } | ||
3729 | - | ||
3730 | - if (CanOutQty <= lock) { | ||
3731 | - return s.my_warnning("库存不足!", 0, th); | ||
3732 | - } | ||
3733 | - th.add_cart_next(e, t, a, o, newd, CanOutQty - lock); | ||
3734 | - } else { | ||
3735 | - th.add_cart_next(e, t, a, o, newd, CanOutQty); | ||
3736 | - } | ||
3737 | - } | ||
3738 | - }) | ||
3739 | - } else { | ||
3740 | - return s.my_warnning("库存不足!", 0, th); | ||
3741 | - } | ||
3742 | - | ||
3743 | - } | ||
3744 | - } | ||
3745 | - }) | ||
3746 | - } else { | ||
3747 | - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
3748 | - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
3749 | - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | ||
3750 | - } | ||
3751 | - } | ||
3752 | - }) | ||
3753 | - | ||
3754 | - } | ||
3755 | - else if (th.data.prom_type == 0 || th.data.prom_type == 3 || th.data.prom_type == 4 || th.data.prom_type == 5 || th.data.prom_type == 10) { | ||
3756 | - newd.prom_type = 0; | ||
3757 | - newd.prom_id = 0; | ||
3758 | - | ||
3759 | - if (th.data.prom_type == 10) { | ||
3760 | - newd.prom_type = th.data.prom_type; | ||
3761 | - newd.prom_id = th.data.prom_id; | ||
3762 | - } | ||
3763 | - | ||
3764 | - //---如果是线下门店销售的时候--- | ||
3765 | - if (th.data.sales_rules == 2) { | ||
3766 | - var pick = th.get_pick_from_list(th.data.sto_sele_id) | ||
3767 | - //---通过接口获取门店的线下库存信息-- | ||
3768 | - getApp().request.get("/api/weshop/goods/getWareStorages", { | ||
3769 | - data: { | ||
3770 | - storageNos: pick.pickup_no, | ||
3771 | - wareIds: encodeURIComponent(th.data.sele_g.erpwareid), | ||
3772 | - storeId: os.stoid | ||
3773 | - }, | ||
3774 | - success: function (res) { | ||
3775 | - if (res.data.code == 0) { | ||
3776 | - if (res.data.data.pageData.length > 0) { | ||
3777 | - var CanOutQty = res.data.data.pageData[0].CanOutQty; | ||
3778 | - if (CanOutQty < e.data.goodsInputNum) { | ||
3779 | - return s.my_warnning("库存不足!", 0, th); | ||
3780 | - } | ||
3781 | - //在调一次接口,读取商品的预出库的数量,lock | ||
3782 | - getApp().request.get("/api/weshop/order/ware/lock/page", { | ||
3783 | - data: { | ||
3784 | - store_id: os.stoid, | ||
3785 | - wareId: th.data.sele_g.goods_id, | ||
3786 | - storageId: pick.pickup_id, | ||
3787 | - pageSize: 1000 | ||
3788 | - }, | ||
3789 | - success: function (res_data) { | ||
3790 | - if (res_data.data.code == 0 && res_data.data.data.total > 0) { | ||
3791 | - | ||
3792 | - var lock = 0; | ||
3793 | - for (var i in res_data.data.data.pageData) { | ||
3794 | - lock += res_data.data.data.pageData[i].outQty; | ||
3795 | - } | ||
3796 | - | ||
3797 | - if (CanOutQty <= lock) { | ||
3798 | - return s.my_warnning("库存不足!", 0, th); | ||
3799 | - } | ||
3800 | - th.add_cart_next(e, t, a, o, newd, CanOutQty - lock); | ||
3801 | - } else { | ||
3802 | - th.add_cart_next(e, t, a, o, newd, CanOutQty); | ||
3803 | - } | ||
3804 | - } | ||
3805 | - }) | ||
3806 | - } else { | ||
3807 | - return s.my_warnning("库存不足!", 0, th); | ||
3808 | - } | ||
3809 | - | ||
3810 | - } | ||
3811 | - } | 3085 | + getApp().request.get(url, { |
3086 | + data: req_d, | ||
3087 | + success: function (e) { | ||
3088 | + if (e.data.code == 0 && e.data.data && e.data.data.length > 0) { | ||
3089 | + var arr = e.data.data; | ||
3090 | + var arr2 = arr.filter(function (e) { | ||
3091 | + return e.s_time < ut.gettimestamp(); | ||
3812 | }) | 3092 | }) |
3813 | - } else { | ||
3814 | - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
3815 | - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
3816 | - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步 | ||
3817 | - } | ||
3818 | - } | ||
3819 | - }) | ||
3820 | - }, | ||
3821 | - | ||
3822 | - //---加入购物车的最后一步--- | ||
3823 | - add_cart_next(e, t, a, o, newd, CanOutQty) { | ||
3824 | - var th = this, i = getApp().request; | ||
3825 | - //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | ||
3826 | - if ((o.prom_type != 1 || o.prom_id <= 0) && ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 ) || th.data.is_normal)) { | ||
3827 | - var conf = th.data.bconfig; | ||
3828 | - if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) { | ||
3829 | - var s_list = JSON.parse(conf.switch_list); | ||
3830 | - var now = ut.gettimestamp(); | ||
3831 | - | ||
3832 | - | ||
3833 | - var str = getApp().globalData.userInfo['card_expiredate'].replace(/-/g, '/'); | ||
3834 | - var end = new Date(str); | ||
3835 | - end = Date.parse(end) / 1000; | ||
3836 | - | ||
3837 | - //--如果后台有开启等级价的功能,而且会员的等级没有过期的情况下-- | ||
3838 | - if (parseInt(s_list.rank_switch) == 2 && end > now) { | ||
3839 | - var card_price = o[getApp().globalData.userInfo['card_field']]; | ||
3840 | - //如果会员有等级价 | ||
3841 | - if (getApp().globalData.userInfo['card_field'] != undefined && getApp().globalData.userInfo['card_field'] != null | ||
3842 | - && getApp().globalData.userInfo['card_field'] != "" && card_price > 0) { | ||
3843 | - newd.goods_price = card_price; | ||
3844 | - newd.member_goods_price = card_price; | ||
3845 | - } | ||
3846 | - } | ||
3847 | - } | ||
3848 | - } | ||
3849 | - | ||
3850 | - //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d); | ||
3851 | - if ("add" == t.currentTarget.dataset.action) { | ||
3852 | - | ||
3853 | - if (th.data.prom_goods) { | ||
3854 | - newd.prom_type = 3; | ||
3855 | - newd.prom_id = th.data.prom_goods[0].prom_id; | ||
3856 | - } | ||
3857 | - | ||
3858 | - //----先看会员在购物车中是否加入了该商品----- | ||
3859 | - i.get("/api/weshop/cart/page", { | ||
3860 | - data: { | ||
3861 | - store_id: e.data.stoid, | ||
3862 | - user_id: oo.user_id, | ||
3863 | - goods_id: a, | ||
3864 | - pick_id: e.data.sto_sele_id, | ||
3865 | - state: 0 | ||
3866 | - }, | ||
3867 | - success: function (re) { | ||
3868 | - | ||
3869 | - //-------如果购物车中有相关的数据--------- | ||
3870 | - if (re.data.data.total > 0) { | ||
3871 | - | ||
3872 | - var item = re.data.data.pageData[0]; | ||
3873 | - | ||
3874 | - //判断数量,要看下购物车中有没有该商品 | ||
3875 | - if (CanOutQty) { | ||
3876 | - if (item.goods_num + th.data.goodsInputNum > CanOutQty) { | ||
3877 | - return s.my_warnning("库存不足!", 0, th); | ||
3878 | - } | ||
3879 | - } else { | ||
3880 | - if (item.goods_num + th.data.goodsInputNum > o.store_count) { | ||
3881 | - return s.my_warnning("库存不足!", 0, th); | ||
3882 | - } | ||
3883 | - } | ||
3884 | - | ||
3885 | - var updata = { | ||
3886 | - id: item.id, | ||
3887 | - goods_num: e.data.goodsInputNum + item.goods_num, | ||
3888 | - goods_price: newd.goods_price, | ||
3889 | - member_goods_price: newd.goods_price, | ||
3890 | - store_id: th.data.stoid, | ||
3891 | - }; | ||
3892 | - | ||
3893 | - //---是不是从收藏夹出来的--- | ||
3894 | - if (th.data.c_guide_id) { | ||
3895 | - updata['guide_id'] = th.data.c_guide_id; | ||
3896 | - updata['guide_type'] = 3; //加入购物车之后就变成了3 | ||
3897 | - } else { | ||
3898 | - if (getApp().globalData.guide_id) { | ||
3899 | - updata['guide_id'] = getApp().globalData.guide_id; | ||
3900 | - updata['guide_type'] = 0; | ||
3901 | - } | ||
3902 | - } | ||
3903 | - | ||
3904 | - i.put("/api/weshop/cart/update", { | ||
3905 | - data: updata, | ||
3906 | - success: function (t) { | ||
3907 | - getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
3908 | - var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | ||
3909 | - th.setData({ | ||
3910 | - cartGoodsNum: c_num | ||
3911 | - }); | ||
3912 | - th.closeSpecModal(); | ||
3913 | - } | ||
3914 | - }); | ||
3915 | - } else { | ||
3916 | - | ||
3917 | - | ||
3918 | - i.post("/api/weshop/cart/save", { | ||
3919 | - data: newd, | ||
3920 | - success: function (t) { | ||
3921 | - getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
3922 | - var c_num = th.data.cartGoodsNum + e.data.goodsInputNum; | ||
3923 | - th.setData({ | ||
3924 | - cartGoodsNum: c_num | ||
3925 | - }); | ||
3926 | - th.closeSpecModal(); | ||
3927 | - } | ||
3928 | - }); | 3093 | + //-- 如果只有一个活动的话 -- |
3094 | + if (arr.length == 1) { | ||
3095 | + th.data.prom_type = arr[0].prom_type; | ||
3096 | + th.data.prom_id = arr[0].act_id; | ||
3929 | } | 3097 | } |
3930 | - } | ||
3931 | - }); | ||
3932 | - | ||
3933 | - } | ||
3934 | - else { | ||
3935 | - | ||
3936 | - //这一步主要是要让立即购买 走 购物车的逻辑 参与活动 | ||
3937 | - if (newd.prom_type == 10 || newd.prom_type == 7) { | ||
3938 | - //----先看会员在购物车中是否加入了该商品,立即购买的----- | ||
3939 | - getApp().request.get("/api/weshop/cart/page", { | ||
3940 | - data: { | ||
3941 | - store_id: e.data.stoid, | ||
3942 | - user_id: oo.user_id, | ||
3943 | - state: 1 | ||
3944 | - }, | ||
3945 | - success: function (res) { | ||
3946 | - //-------如果购物车中有相关的数据--------- | ||
3947 | - if (res.data.code == 0 && res.data.data.total > 0) { | ||
3948 | - for (let j in res.data.data.pageData) { | ||
3949 | - let item_j = res.data.data.pageData[j]; | ||
3950 | - var url = '/api/weshop/cart/del/' + e.data.stoid + '/' + item_j.id; | ||
3951 | - getApp().request.delete(url, {}); | ||
3952 | - } | ||
3953 | - } | ||
3954 | - newd.state = 1; | ||
3955 | - getApp().request.post("/api/weshop/cart/save", { | ||
3956 | - data: newd, | ||
3957 | - success: function (t) { | ||
3958 | - th.closeSpecModal(); | ||
3959 | - getApp().goto("/pages/cart/cart2/cart2?state=1"); | ||
3960 | - } | ||
3961 | - }); | ||
3962 | - } | ||
3963 | - }) | ||
3964 | - return false; | ||
3965 | - } | ||
3966 | - | ||
3967 | - if (th.data.prom_goods) { | ||
3968 | - var prom_d = th.data.prom_goods; | ||
3969 | - for (var i in prom_d) { | ||
3970 | - //判断活动有俩种条件,0元 1件 | ||
3971 | - var condition_t = prom_d[i].prom_type; | ||
3972 | - switch (condition_t) { | ||
3973 | - case 0: //按钱 | ||
3974 | - if (newd.goods_price >= condition_t) { | ||
3975 | - newd.prom_type = 3; | ||
3976 | - newd.prom_id = prom_d[i].prom_id; | ||
3977 | - } | ||
3978 | - break | ||
3979 | - case 1://按购买数量 | ||
3980 | - if (newd.goods_num >= condition_t) { | ||
3981 | - newd.prom_type = 3; | ||
3982 | - newd.prom_id = prom_d[i].prom_id; | ||
3983 | - } | ||
3984 | - break; | 3098 | + //-- 如果只有一个进行中的活动的话 -- |
3099 | + else if (arr2.length == 1) { | ||
3100 | + th.data.prom_type = arr2[0].prom_type; | ||
3101 | + th.data.prom_id = arr2[0].act_id; | ||
3985 | } | 3102 | } |
3986 | } | 3103 | } |
3987 | - | 3104 | + //-- 调用回调 -- |
3105 | + func(); | ||
3988 | } | 3106 | } |
3989 | - | ||
3990 | - newd['pick_name'] = th.data.sto_sele_name; | ||
3991 | - newd['pick_dis'] = th.data.sto_sele_distr; | ||
3992 | - th.buyNow(newd); | ||
3993 | - } | 3107 | + }); |
3994 | }, | 3108 | }, |
3995 | - | ||
3996 | - | ||
3997 | - | ||
3998 | - | ||
3999 | - | ||
4000 | 3109 | ||
3110 | + click_contact:function () { | ||
3111 | + getApp().globalData.no_clear=1; | ||
3112 | + } | ||
4001 | 3113 | ||
4002 | 3114 | ||
4003 | 3115 | ||
4004 | 3116 | ||
4005 | - | ||
4006 | - | ||
4007 | - | ||
4008 | - | ||
4009 | - | ||
4010 | }); | 3117 | }); |
4011 | 3118 | ||
4012 | 3119 |
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -101,8 +101,7 @@ | @@ -101,8 +101,7 @@ | ||
101 | <!-- 秒杀价 --> | 101 | <!-- 秒杀价 --> |
102 | <!-- <view class="co-red" wx:if="{{options.prom_type == 1}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(prom_price,2)}}</view> --> | 102 | <!-- <view class="co-red" wx:if="{{options.prom_type == 1}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(prom_price,2)}}</view> --> |
103 | <!-- 手店价 --> | 103 | <!-- 手店价 --> |
104 | - <view class="co-red" wx:if="{{options.prom_type == 1}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(prom_price,2)}}</view> | ||
105 | - <view class="co-red" wx:else><text class="rel yuan fs28">¥</text>{{filters.toFix(data.shop_price,2)}}</view> | 104 | + <view class="co-red"><text class="rel yuan fs28">¥</text>{{filters.toFix(data.shop_price,2)}}</view> |
106 | <view class="goods-title"> | 105 | <view class="goods-title"> |
107 | <view class="goods-name elli">{{data.goods_name}}</view> | 106 | <view class="goods-name elli">{{data.goods_name}}</view> |
108 | </view> | 107 | </view> |
@@ -507,7 +506,7 @@ | @@ -507,7 +506,7 @@ | ||
507 | <view class="join-cart jc_sb ai_c"> | 506 | <view class="join-cart jc_sb ai_c"> |
508 | 507 | ||
509 | <view class="flex"> | 508 | <view class="flex"> |
510 | - <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split pdh20" open-type="contact" | 509 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split pdh20" open-type="contact" bindtap="click_contact" |
511 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 510 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
512 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 511 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
513 | <view>客服</view> | 512 | <view>客服</view> |
@@ -522,11 +521,6 @@ | @@ -522,11 +521,6 @@ | ||
522 | <view wx:else class="custom-service cart-ico new_split pdh20" bindtap="contactService" style="text-align: center"> | 521 | <view wx:else class="custom-service cart-ico new_split pdh20" bindtap="contactService" style="text-align: center"> |
523 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 522 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
524 | <view>客服</view> | 523 | <view>客服</view> |
525 | - </view> --> | ||
526 | - | ||
527 | - <view class="custom-service cart-ico new_split pdh20" bindtap="openCS"> | ||
528 | - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
529 | - <view>客服</view> | ||
530 | </view> | 524 | </view> |
531 | 525 | ||
532 | <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20"> | 526 | <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20"> |
@@ -548,45 +542,44 @@ | @@ -548,45 +542,44 @@ | ||
548 | <view class="flex f1 btn-group"> | 542 | <view class="flex f1 btn-group"> |
549 | 543 | ||
550 | <!-- 从“秒杀”入口进入购买商品 --> | 544 | <!-- 从“秒杀”入口进入购买商品 --> |
551 | - <block wx:if="{{options.prom_type == 1}}"> | ||
552 | - <!-- 活动正在开始,商品还没抢光 --> | ||
553 | - <block wx:if="{{prom_st==1 && !prom_r_null}}"> | ||
554 | - <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> | ||
555 | - <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即抢购</view> | ||
556 | - </block> | 545 | + <!-- <block wx:if="{{options.prom_type == 1}}"> --> |
546 | + <block wx:if="{{options.prom_type == 1}}"> | ||
547 | + <block wx:if="{{prom_st==1 && !prom_r_null}}"> | ||
548 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> | ||
549 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即抢购</view> | ||
550 | + </block> | ||
557 | 551 | ||
558 | - <!-- 活动还没开始,商品还没抢光 --> | ||
559 | - <block wx:if="{{prom_st == 0 && !prom_r_null}}"> | ||
560 | - <!-- 秒杀预热要单独购买 --> | ||
561 | - <!-- is_shop_buy支持以原价购买 --> | ||
562 | - <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | ||
563 | - <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view> | ||
564 | - <view class="buy-btn cart-btn lanse">即将开始</view> | ||
565 | - </block> | ||
566 | - <block wx:else> | ||
567 | - <view class="buy-btn cart-btn cart-btn-lg lanse set_width f1">即将开始</view> | ||
568 | - </block> | ||
569 | - </block> | 552 | + <block wx:if="{{prom_st == 0 && !prom_r_null}}"> |
553 | + <!-- 秒杀预热要单独购买 --> | ||
554 | + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | ||
555 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view> | ||
556 | + <view class="buy-btn cart-btn lanse">即将开始</view> | ||
557 | + </block> | ||
558 | + <block wx:else> | ||
559 | + <view class="buy-btn cart-btn cart-btn-lg lanse set_width f1">即将开始</view> | ||
560 | + </block> | ||
561 | + </block> | ||
570 | 562 | ||
571 | - <!-- 商品已被抢光 --> | ||
572 | - <block wx:if="{{prom_r_null}}"> | ||
573 | - <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | ||
574 | - <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view> | ||
575 | - <view class="buy-btn cart-btn huise f1">已抢光</view> | ||
576 | - </block> | ||
577 | - <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width f1">已抢光</view> | ||
578 | - </block> | ||
579 | 563 | ||
580 | - <!-- 活动已经结束,商品还没抢光 --> | ||
581 | - <block wx:if="{{prom_st==3 && !prom_r_null}}"> | ||
582 | - <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | ||
583 | - <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view> | ||
584 | - <view class="buy-btn cart-btn huise f1">活动已经结束</view> | ||
585 | - </block> | ||
586 | - <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width f1">活动已经结束</view> | ||
587 | - </block> | 564 | + <block wx:if="{{prom_r_null}}"> |
588 | 565 | ||
589 | - </block> | 566 | + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> |
567 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view> | ||
568 | + <view class="buy-btn cart-btn huise f1">已抢光</view> | ||
569 | + </block> | ||
570 | + <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width f1">已抢光</view> | ||
571 | + </block> | ||
572 | + | ||
573 | + <block wx:if="{{prom_st==3 && !prom_r_null}}"> | ||
574 | + <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | ||
575 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn f1">单独购买</view> | ||
576 | + <view class="buy-btn cart-btn huise f1">活动已经结束</view> | ||
577 | + </block> | ||
578 | + | ||
579 | + <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width f1">活动已经结束</view> | ||
580 | + </block> | ||
581 | + </block> | ||
582 | + <!-- </block> --> | ||
590 | 583 | ||
591 | 584 | ||
592 | <!-- 从“我的服务”入口进入购买商品 --> | 585 | <!-- 从“我的服务”入口进入购买商品 --> |
@@ -594,9 +587,15 @@ | @@ -594,9 +587,15 @@ | ||
594 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> | 587 | <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> |
595 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view> | 588 | <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view> |
596 | </block> | 589 | </block> |
597 | - | 590 | + |
591 | + | ||
592 | + | ||
598 | </view> | 593 | </view> |
599 | 594 | ||
595 | + | ||
596 | + | ||
597 | + | ||
598 | + | ||
600 | </view> | 599 | </view> |
601 | 600 | ||
602 | <!-- 制作一个圆球导航 --> | 601 | <!-- 制作一个圆球导航 --> |
@@ -616,8 +615,7 @@ | @@ -616,8 +615,7 @@ | ||
616 | <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | 615 | <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> |
617 | <view class="flex ai_end xc-val-money"> | 616 | <view class="flex ai_end xc-val-money"> |
618 | <view class="spec-goods-price"><text class="fs20">¥</text> | 617 | <view class="spec-goods-price"><text class="fs20">¥</text> |
619 | - <block wx:if="{{options.prom_type == 1}}">{{prom_price}}</block> | ||
620 | - <block wx:else>{{data.shop_price}}</block> | 618 | + <block wx>{{data.shop_price}}</block> |
621 | </view> | 619 | </view> |
622 | </view> | 620 | </view> |
623 | </view> | 621 | </view> |
@@ -904,36 +902,3 @@ | @@ -904,36 +902,3 @@ | ||
904 | </view> | 902 | </view> |
905 | </view> | 903 | </view> |
906 | </view> | 904 | </view> |
907 | - | ||
908 | -<!-- 弹起来,购买预热商品的普通购买 --> | ||
909 | -<view hidden="{{!openSpecModal_flash_normal}}"> | ||
910 | - <include src="buy_flash_normal.wxml" /> | ||
911 | -</view> | ||
912 | - | ||
913 | - | ||
914 | -<!-- 联系客服操作菜单 --> | ||
915 | -<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}"> | ||
916 | - <view class="pd20 t-c pr"> | ||
917 | - <text class="bold">联系客服</text> | ||
918 | - <text class="iconfont icon-guan" bindtap="closeCS"></text> | ||
919 | - </view> | ||
920 | - <!-- 客服热线 --> | ||
921 | - <view class="pd20 bdt fs30 btn2" bindtap="contactService"> | ||
922 | - <text class="iconfont icon-dianhua"></text>客服热线: | ||
923 | - <text class="c-red">{{store_tel}}</text> | ||
924 | - </view> | ||
925 | - <!-- 小程序客服 --> | ||
926 | - <block wx:if="{{sys_switch.weapp_customertype == 1}}"> | ||
927 | - <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
928 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
929 | - </button> | ||
930 | - </block> | ||
931 | - <!-- 微信客服 --> | ||
932 | - <block wx:elif="{{sys_switch.weapp_customertype == 2}}"> | ||
933 | - <view class="pd20 bdt fs30 btn2" bindtap="con_weixin"> | ||
934 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
935 | - </view> | ||
936 | - </block> | ||
937 | -</view> | ||
938 | - | ||
939 | -<view class="mask2" bindtap="closeCS"></view> |
packageA/pages/goodsInfo/goodsInfo.wxss
@@ -562,7 +562,7 @@ view.cart-btn-lg { | @@ -562,7 +562,7 @@ view.cart-btn-lg { | ||
562 | .spec-model { | 562 | .spec-model { |
563 | position: fixed; | 563 | position: fixed; |
564 | bottom: 0; | 564 | bottom: 0; |
565 | - z-index: 19; | 565 | + z-index: 20; |
566 | background: white; | 566 | background: white; |
567 | width: 100%; | 567 | width: 100%; |
568 | /* padding: 0 30rpx; */ | 568 | /* padding: 0 30rpx; */ |
@@ -2968,56 +2968,3 @@ button.custom-service::after{ | @@ -2968,56 +2968,3 @@ button.custom-service::after{ | ||
2968 | left: -1000px; | 2968 | left: -1000px; |
2969 | top: -1000px; | 2969 | top: -1000px; |
2970 | } | 2970 | } |
2971 | - | ||
2972 | - | ||
2973 | - | ||
2974 | -/* 联系客服操作菜单 */ | ||
2975 | -.action { | ||
2976 | - position: fixed; | ||
2977 | - bottom: 100rpx; | ||
2978 | - z-index: 1; | ||
2979 | - width: 100%; | ||
2980 | - background-color: white; | ||
2981 | - border-radius: 20rpx 20rpx 0 0; | ||
2982 | -} | ||
2983 | - | ||
2984 | -.action .icon-guan { | ||
2985 | - position: absolute; | ||
2986 | - left: 20rpx !important; | ||
2987 | - right: auto !important; | ||
2988 | -} | ||
2989 | - | ||
2990 | -.action .iconfont { | ||
2991 | - color: #ff7295; | ||
2992 | - margin-right: 10rpx; | ||
2993 | -} | ||
2994 | - | ||
2995 | -.action button { | ||
2996 | - text-align: left; | ||
2997 | - line-height: normal; | ||
2998 | -} | ||
2999 | - | ||
3000 | -.action button::after { | ||
3001 | - border-width: 0; | ||
3002 | -} | ||
3003 | - | ||
3004 | -.action .btn2 { | ||
3005 | - box-sizing: border-box; | ||
3006 | - height: 100rpx; | ||
3007 | - display: flex; | ||
3008 | - align-items: center; | ||
3009 | -} | ||
3010 | - | ||
3011 | -.mask2 { | ||
3012 | - display: none; | ||
3013 | - position: fixed; | ||
3014 | - left: 0; | ||
3015 | - right: 0; | ||
3016 | - top: 0; | ||
3017 | - bottom: 0; | ||
3018 | - background-color: rgba(0,0,0,.5); | ||
3019 | -} | ||
3020 | - | ||
3021 | -.action.active ~ .mask2 { | ||
3022 | - display: block; | ||
3023 | -} |
packageA/pages/goods_share/goods_share.js
@@ -177,7 +177,8 @@ Page({ | @@ -177,7 +177,8 @@ Page({ | ||
177 | /**e | 177 | /**e |
178 | * 用户点击右上角分享 | 178 | * 用户点击右上角分享 |
179 | */ | 179 | */ |
180 | - onShareAppMessage: function () { | 180 | + onShareAppMessage: function () { |
181 | + getApp().globalData.no_clear=1; | ||
181 | var th = this; | 182 | var th = this; |
182 | var item=this.data.share_good; | 183 | var item=this.data.share_good; |
183 | var price = item.shop_price; | 184 | var price = item.shop_price; |
@@ -732,10 +733,7 @@ Page({ | @@ -732,10 +733,7 @@ Page({ | ||
732 | }) | 733 | }) |
733 | return false; | 734 | return false; |
734 | } | 735 | } |
735 | - wx.previewImage({ | ||
736 | - //将图片预览出来 | ||
737 | - urls: [that.data.shareImgPath] | ||
738 | - }); | 736 | + getApp().pre_img(that.data.shareImgPath); |
739 | wx.hideLoading(); | 737 | wx.hideLoading(); |
740 | } | 738 | } |
741 | }) | 739 | }) |
packageA/pages/hongBao/hongBao.js
packageA/pages/hongBaoDetails/hongBaoDetails.js
packageA/pages/jfbuy/jfbuy.js
@@ -187,8 +187,8 @@ Page({ | @@ -187,8 +187,8 @@ Page({ | ||
187 | /** | 187 | /** |
188 | * 用户点击右上角分享 | 188 | * 用户点击右上角分享 |
189 | */ | 189 | */ |
190 | - onShareAppMessage: function () { | ||
191 | - | 190 | + onShareAppMessage: function () { |
191 | + getApp().globalData.no_clear=1; | ||
192 | var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:''; | 192 | var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:''; |
193 | 193 | ||
194 | var pagePath = this.route; //当前页面url | 194 | var pagePath = this.route; //当前页面url |
packageA/pages/liveStream/liveStream.js
@@ -348,7 +348,7 @@ Page({ | @@ -348,7 +348,7 @@ Page({ | ||
348 | /** | 348 | /** |
349 | * 用户点击右上角分享 | 349 | * 用户点击右上角分享 |
350 | */ | 350 | */ |
351 | - onShareAppMessage: function () { | 351 | + onShareAppMessage: function () { getApp().globalData.no_clear=1; |
352 | if (res.from === 'button') { | 352 | if (res.from === 'button') { |
353 | // 来自页面内转发按钮 | 353 | // 来自页面内转发按钮 |
354 | // console.log(res.target) | 354 | // console.log(res.target) |
packageA/pages/liveStreamDetails/liveStreamDetails.js
@@ -605,6 +605,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | @@ -605,6 +605,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
605 | * 用户点击右上角分享 | 605 | * 用户点击右上角分享 |
606 | */ | 606 | */ |
607 | onShareAppMessage: function (res) { | 607 | onShareAppMessage: function (res) { |
608 | + getApp().globalData.clear=1; | ||
608 | this.setData({ | 609 | this.setData({ |
609 | showActionSheet: 'false' | 610 | showActionSheet: 'false' |
610 | }) | 611 | }) |
packageA/pages/live_share/live_share.js
@@ -71,7 +71,7 @@ Page({ | @@ -71,7 +71,7 @@ Page({ | ||
71 | /** | 71 | /** |
72 | * 用户点击右上角分享 | 72 | * 用户点击右上角分享 |
73 | */ | 73 | */ |
74 | - onShareAppMessage: function () { | 74 | + onShareAppMessage: function () { getApp().globalData.no_clear=1; |
75 | var th=this; | 75 | var th=this; |
76 | var id=th.data.hui_active.id; | 76 | var id=th.data.hui_active.id; |
77 | var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + id + '&live=ing'; | 77 | var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + id + '&live=ing'; |
packageA/pages/myGift/myGift.js
packageA/pages/myGiftDetails/myGiftDetails.js
packageA/pages/my_service/beauty_deta.js
@@ -394,6 +394,7 @@ Page({ | @@ -394,6 +394,7 @@ Page({ | ||
394 | previewImage: function(e) { | 394 | previewImage: function(e) { |
395 | var th = this; | 395 | var th = this; |
396 | var current = e.currentTarget.dataset.src; | 396 | var current = e.currentTarget.dataset.src; |
397 | + getApp().globalData.no_clear=1; | ||
397 | wx.previewImage({ | 398 | wx.previewImage({ |
398 | current: current, // 当前显示图片的http链接 | 399 | current: current, // 当前显示图片的http链接 |
399 | urls: [th.data.head_img] // 需要预览的图片http链接列表 | 400 | urls: [th.data.head_img] // 需要预览的图片http链接列表 |
packageA/pages/my_service2/beauty_deta.js
@@ -394,6 +394,7 @@ Page({ | @@ -394,6 +394,7 @@ Page({ | ||
394 | previewImage: function(e) { | 394 | previewImage: function(e) { |
395 | var th = this; | 395 | var th = this; |
396 | var current = e.currentTarget.dataset.src; | 396 | var current = e.currentTarget.dataset.src; |
397 | + getApp().globalData.no_clear=1; | ||
397 | wx.previewImage({ | 398 | wx.previewImage({ |
398 | current: current, // 当前显示图片的http链接 | 399 | current: current, // 当前显示图片的http链接 |
399 | urls: [th.data.head_img] // 需要预览的图片http链接列表 | 400 | urls: [th.data.head_img] // 需要预览的图片http链接列表 |
packageA/pages/parseHtml/parseHtml.js
packageA/pages/profile/profile.js
packageA/pages/prom_list/prom_list.js
@@ -711,6 +711,7 @@ Page({ | @@ -711,6 +711,7 @@ Page({ | ||
711 | 711 | ||
712 | //--点击分享事件--- | 712 | //--点击分享事件--- |
713 | onShareAppMessage: function(t) { | 713 | onShareAppMessage: function(t) { |
714 | + getApp().globalData.no_clear=1 | ||
714 | var curPage=this; | 715 | var curPage=this; |
715 | var pagePath = curPage.route; //当前页面url | 716 | var pagePath = curPage.route; //当前页面url |
716 | if (pagePath.indexOf('/') != 0) { | 717 | if (pagePath.indexOf('/') != 0) { |
packageA/pages/quan/quan.js
@@ -73,7 +73,7 @@ Page({ | @@ -73,7 +73,7 @@ Page({ | ||
73 | /** | 73 | /** |
74 | * 用户点击右上角分享 | 74 | * 用户点击右上角分享 |
75 | */ | 75 | */ |
76 | - onShareAppMessage: function () { | 76 | + onShareAppMessage: function () { getApp().globalData.no_clear=1; |
77 | var th=this; | 77 | var th=this; |
78 | var id=th.data.hui_active.id; | 78 | var id=th.data.hui_active.id; |
79 | var url="/packageA/pages/quan_pro/quan_pro?id="+id; | 79 | var url="/packageA/pages/quan_pro/quan_pro?id="+id; |
packageA/pages/service_share/service_share.js
@@ -141,7 +141,7 @@ Page({ | @@ -141,7 +141,7 @@ Page({ | ||
141 | /**e | 141 | /**e |
142 | * 用户点击右上角分享 | 142 | * 用户点击右上角分享 |
143 | */ | 143 | */ |
144 | - onShareAppMessage: function () { | 144 | + onShareAppMessage: function () { getApp().globalData.no_clear=1; |
145 | var th = this; | 145 | var th = this; |
146 | var item=this.data.share_good; | 146 | var item=this.data.share_good; |
147 | var price = item.money; | 147 | var price = item.money; |
@@ -709,10 +709,7 @@ Page({ | @@ -709,10 +709,7 @@ Page({ | ||
709 | }) | 709 | }) |
710 | return false; | 710 | return false; |
711 | } | 711 | } |
712 | - wx.previewImage({ | ||
713 | - //将图片预览出来 | ||
714 | - urls: [that.data.shareImgPath] | ||
715 | - }); | 712 | + getApp().pre_img(that.data.shareImgPath); |
716 | wx.hideLoading(); | 713 | wx.hideLoading(); |
717 | } | 714 | } |
718 | }) | 715 | }) |
packageA/pages/text/text.js deleted
1 | -// packageA//pages/text/text.js | ||
2 | -Page({ | ||
3 | - | ||
4 | - /** | ||
5 | - * 页面的初始数据 | ||
6 | - */ | ||
7 | - data: { | ||
8 | - | ||
9 | - }, | ||
10 | - | ||
11 | - /** | ||
12 | - * 生命周期函数--监听页面加载 | ||
13 | - */ | ||
14 | - onLoad: function (options) { | ||
15 | - | ||
16 | - }, | ||
17 | - | ||
18 | - /** | ||
19 | - * 生命周期函数--监听页面初次渲染完成 | ||
20 | - */ | ||
21 | - onReady: function () { | ||
22 | - | ||
23 | - }, | ||
24 | - | ||
25 | - /** | ||
26 | - * 生命周期函数--监听页面显示 | ||
27 | - */ | ||
28 | - onShow: function () { | ||
29 | - | ||
30 | - }, | ||
31 | - | ||
32 | - /** | ||
33 | - * 生命周期函数--监听页面隐藏 | ||
34 | - */ | ||
35 | - onHide: function () { | ||
36 | - | ||
37 | - }, | ||
38 | - | ||
39 | - /** | ||
40 | - * 生命周期函数--监听页面卸载 | ||
41 | - */ | ||
42 | - onUnload: function () { | ||
43 | - | ||
44 | - }, | ||
45 | - | ||
46 | - /** | ||
47 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | - */ | ||
49 | - onPullDownRefresh: function () { | ||
50 | - | ||
51 | - }, | ||
52 | - | ||
53 | - /** | ||
54 | - * 页面上拉触底事件的处理函数 | ||
55 | - */ | ||
56 | - onReachBottom: function () { | ||
57 | - | ||
58 | - }, | ||
59 | - | ||
60 | - /** | ||
61 | - * 用户点击右上角分享 | ||
62 | - */ | ||
63 | - onShareAppMessage: function () { | ||
64 | - | ||
65 | - } | ||
66 | -}) | ||
67 | \ No newline at end of file | 0 | \ No newline at end of file |
packageA/pages/text/text.json deleted
packageA/pages/text/text.wxml deleted
packageA/pages/text/text.wxss deleted
packageA/pages/user/my_service2/appment_main.js
@@ -60,7 +60,7 @@ Page({ | @@ -60,7 +60,7 @@ Page({ | ||
60 | /** | 60 | /** |
61 | * 用户点击右上角分享 | 61 | * 用户点击右上角分享 |
62 | */ | 62 | */ |
63 | - onShareAppMessage: function () { | 63 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 |
64 | 64 | ||
65 | } | 65 | } |
66 | }) | 66 | }) |
67 | \ No newline at end of file | 67 | \ No newline at end of file |
packageB/pages/boxes-details/boxes-details.js
packageB/pages/luckactivity/index/index.js
packageB/pages/user/Change_phone/Change_phone.js
packageB/pages/user/add_comment/add_comment.js
@@ -220,6 +220,7 @@ Page({ | @@ -220,6 +220,7 @@ Page({ | ||
220 | 220 | ||
221 | var imgs = this.data.imgs; | 221 | var imgs = this.data.imgs; |
222 | 222 | ||
223 | + getApp().globalData.no_clear=1; | ||
223 | wx.chooseImage({ | 224 | wx.chooseImage({ |
224 | count: 1, // 默认9 | 225 | count: 1, // 默认9 |
225 | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 | 226 | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
@@ -259,6 +260,7 @@ Page({ | @@ -259,6 +260,7 @@ Page({ | ||
259 | var index = e.currentTarget.dataset.index; | 260 | var index = e.currentTarget.dataset.index; |
260 | //所有图片 | 261 | //所有图片 |
261 | var imgs = this.data.imgs; | 262 | var imgs = this.data.imgs; |
263 | + getApp().globalData.no_clear=1; | ||
262 | wx.previewImage({ | 264 | wx.previewImage({ |
263 | //当前显示图片 | 265 | //当前显示图片 |
264 | current: imgs[index], | 266 | current: imgs[index], |
packageB/pages/user/binding_info/binding_info.js
@@ -60,7 +60,7 @@ Page({ | @@ -60,7 +60,7 @@ Page({ | ||
60 | /** | 60 | /** |
61 | * 用户点击右上角分享 | 61 | * 用户点击右上角分享 |
62 | */ | 62 | */ |
63 | - onShareAppMessage: function () { | 63 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 |
64 | 64 | ||
65 | } | 65 | } |
66 | }) | 66 | }) |
67 | \ No newline at end of file | 67 | \ No newline at end of file |
packageB/pages/user/buyDetails/buyDetails.js
packageB/pages/user/choice_guide/choice_guide.js
packageB/pages/user/comment/comment.js
@@ -161,6 +161,7 @@ Page({ | @@ -161,6 +161,7 @@ Page({ | ||
161 | } else { | 161 | } else { |
162 | image = imgArr[index].weapp_img[sindex]; | 162 | image = imgArr[index].weapp_img[sindex]; |
163 | } | 163 | } |
164 | + getApp().globalData.no_clear=1; | ||
164 | wx.previewImage({ | 165 | wx.previewImage({ |
165 | current: image, | 166 | current: image, |
166 | //当前图片地址 | 167 | //当前图片地址 |
packageB/pages/user/view_comment/view_comment.js
@@ -112,6 +112,7 @@ Page({ | @@ -112,6 +112,7 @@ Page({ | ||
112 | var iurl = th.data.iurl; | 112 | var iurl = th.data.iurl; |
113 | if (image != "") { | 113 | if (image != "") { |
114 | image = imgArr[0].weapp_img[index]; | 114 | image = imgArr[0].weapp_img[index]; |
115 | + getApp().globalData.no_clear=1; | ||
115 | wx.previewImage({ | 116 | wx.previewImage({ |
116 | current: image, | 117 | current: image, |
117 | //当前图片地址 | 118 | //当前图片地址 |
@@ -119,6 +120,7 @@ Page({ | @@ -119,6 +120,7 @@ Page({ | ||
119 | }) | 120 | }) |
120 | } else { | 121 | } else { |
121 | image = imgArr[0].img[index]; | 122 | image = imgArr[0].img[index]; |
123 | + getApp().globalData.no_clear=1; | ||
122 | wx.previewImage({ | 124 | wx.previewImage({ |
123 | current: iurl + image, | 125 | current: iurl + image, |
124 | //当前图片地址 | 126 | //当前图片地址 |
packageB/pages/video/index.js
@@ -7,6 +7,7 @@ Page({ | @@ -7,6 +7,7 @@ Page({ | ||
7 | }, | 7 | }, |
8 | bindButtonTap: function() { | 8 | bindButtonTap: function() { |
9 | var that = this | 9 | var that = this |
10 | + getApp().globalData.no_clear=1; | ||
10 | wx.chooseVideo({ | 11 | wx.chooseVideo({ |
11 | sourceType: ['album', 'camera'], | 12 | sourceType: ['album', 'camera'], |
12 | maxDuration: 60, | 13 | maxDuration: 60, |
@@ -34,6 +35,7 @@ Page({ | @@ -34,6 +35,7 @@ Page({ | ||
34 | 35 | ||
35 | //---------分享配置-------- | 36 | //---------分享配置-------- |
36 | onShareAppMessage: function (e) { | 37 | onShareAppMessage: function (e) { |
38 | + getApp().globalData.no_clear=1 | ||
37 | return { | 39 | return { |
38 | title: "直播视频回放", | 40 | title: "直播视频回放", |
39 | } | 41 | } |
packageB/pages/zuhegou/index/index.js
@@ -446,7 +446,7 @@ Page({ | @@ -446,7 +446,7 @@ Page({ | ||
446 | /** | 446 | /** |
447 | * 用户点击右上角分享 | 447 | * 用户点击右上角分享 |
448 | */ | 448 | */ |
449 | - onShareAppMessage: function () { | 449 | + onShareAppMessage: function () { getApp().globalData.no_clear=1; |
450 | var title = this.data.act.name; | 450 | var title = this.data.act.name; |
451 | var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id; | 451 | var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id; |
452 | if (getApp().globalData.user_id) { | 452 | if (getApp().globalData.user_id) { |
packageB/pages/zuhegou/list/list.js
@@ -198,6 +198,7 @@ Page({ | @@ -198,6 +198,7 @@ Page({ | ||
198 | 198 | ||
199 | //---------分享配置-------- | 199 | //---------分享配置-------- |
200 | onShareAppMessage: function (e) { | 200 | onShareAppMessage: function (e) { |
201 | + getApp().globalData.no_clear=1 | ||
201 | var curPage=this; | 202 | var curPage=this; |
202 | var pagePath = curPage.route; //当前页面url | 203 | var pagePath = curPage.route; //当前页面url |
203 | if (pagePath.indexOf('/') != 0) { | 204 | if (pagePath.indexOf('/') != 0) { |
packageB/pages/zuhegou/preindex/index.js
@@ -447,7 +447,7 @@ Page({ | @@ -447,7 +447,7 @@ Page({ | ||
447 | /** | 447 | /** |
448 | * 用户点击右上角分享 | 448 | * 用户点击右上角分享 |
449 | */ | 449 | */ |
450 | - onShareAppMessage: function () { | 450 | + onShareAppMessage: function () { getApp().globalData.no_clear=1; |
451 | var title = this.data.act.name; | 451 | var title = this.data.act.name; |
452 | var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id; | 452 | var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id; |
453 | if (getApp().globalData.user_id) { | 453 | if (getApp().globalData.user_id) { |
packageC/pages/goods/distributionCategoryList/index.js
@@ -404,6 +404,7 @@ Page({ | @@ -404,6 +404,7 @@ Page({ | ||
404 | }, | 404 | }, |
405 | //---------分享配置-------- | 405 | //---------分享配置-------- |
406 | onShareAppMessage: function (e) { | 406 | onShareAppMessage: function (e) { |
407 | + getApp().globalData.no_clear=1 | ||
407 | 408 | ||
408 | var url = "pages/goods/categoryList/categoryList"; | 409 | var url = "pages/goods/categoryList/categoryList"; |
409 | var userInfo = getApp().globalData.userInfo; | 410 | var userInfo = getApp().globalData.userInfo; |
@@ -639,9 +640,9 @@ Page({ | @@ -639,9 +640,9 @@ Page({ | ||
639 | //扫一扫 | 640 | //扫一扫 |
640 | getScancode: function () { | 641 | getScancode: function () { |
641 | // 允许从相机和相册扫码 | 642 | // 允许从相机和相册扫码 |
643 | + getApp().globalData.no_clear=1; | ||
642 | wx.scanCode({ | 644 | wx.scanCode({ |
643 | success: (res) => { | 645 | success: (res) => { |
644 | - console.log(res); | ||
645 | var key_word = res.result; | 646 | var key_word = res.result; |
646 | wx.navigateBack({ | 647 | wx.navigateBack({ |
647 | delta: 1 | 648 | delta: 1 |
packageC/pages/goods/goodsList/goodsList.js
@@ -240,6 +240,7 @@ Page({ | @@ -240,6 +240,7 @@ Page({ | ||
240 | }, | 240 | }, |
241 | //---------分享配置-------- | 241 | //---------分享配置-------- |
242 | onShareAppMessage: function (e) { | 242 | onShareAppMessage: function (e) { |
243 | + getApp().globalData.no_clear=1 | ||
243 | var curPage = this; | 244 | var curPage = this; |
244 | var pagePath = curPage.route; //当前页面url | 245 | var pagePath = curPage.route; //当前页面url |
245 | if (pagePath.indexOf('/') != 0) { | 246 | if (pagePath.indexOf('/') != 0) { |
packageC/pages/goods/search/search.js
@@ -235,6 +235,7 @@ Page({ | @@ -235,6 +235,7 @@ Page({ | ||
235 | 235 | ||
236 | //---------分享配置-------- | 236 | //---------分享配置-------- |
237 | onShareAppMessage: function (e) { | 237 | onShareAppMessage: function (e) { |
238 | + getApp().globalData.no_clear=1 | ||
238 | var curPage = this; | 239 | var curPage = this; |
239 | var pagePath = curPage.route; //当前页面url | 240 | var pagePath = curPage.route; //当前页面url |
240 | if (pagePath.indexOf('/') != 0) { | 241 | if (pagePath.indexOf('/') != 0) { |
packageC/pages/group_list/group_list.js
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
@@ -191,6 +191,7 @@ Page({ | @@ -191,6 +191,7 @@ Page({ | ||
191 | * 用户点击右上角分享 | 191 | * 用户点击右上角分享 |
192 | */ | 192 | */ |
193 | onShareAppMessage: function (e) { | 193 | onShareAppMessage: function (e) { |
194 | + getApp().globalData.no_clear=1 | ||
194 | var pagePath = this.route; //当前页面url | 195 | var pagePath = this.route; //当前页面url |
195 | if (pagePath.indexOf('/') != 0) { | 196 | if (pagePath.indexOf('/') != 0) { |
196 | pagePath = '/' + pagePath; | 197 | pagePath = '/' + pagePath; |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
@@ -972,6 +972,7 @@ Page({ | @@ -972,6 +972,7 @@ Page({ | ||
972 | 972 | ||
973 | //------ 分享配置 -------- | 973 | //------ 分享配置 -------- |
974 | onShareAppMessage: function (e) { | 974 | onShareAppMessage: function (e) { |
975 | + getApp().globalData.no_clear=1 | ||
975 | var pagePath = `packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=${this.data.param.goods_id}&prom_type=9&group_id=${this.data.param.group_id}`; //当前页面url | 976 | var pagePath = `packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=${this.data.param.goods_id}&prom_type=9&group_id=${this.data.param.group_id}`; //当前页面url |
976 | // console.log('pagePath=====xxxxxx>', pagePath); | 977 | // console.log('pagePath=====xxxxxx>', pagePath); |
977 | var imgPath = this.data.iurl + this.data.luckyGoInfo.original_img; | 978 | var imgPath = this.data.iurl + this.data.luckyGoInfo.original_img; |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -19,7 +19,6 @@ var more = function (e) { | @@ -19,7 +19,6 @@ var more = function (e) { | ||
19 | var utils = require('../../../../utils/util.js'); | 19 | var utils = require('../../../../utils/util.js'); |
20 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 20 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
21 | const { app } = require("../../../../utils/common.js"); | 21 | const { app } = require("../../../../utils/common.js"); |
22 | -let self = null; | ||
23 | 22 | ||
24 | Page({ | 23 | Page({ |
25 | data: { | 24 | data: { |
@@ -282,14 +281,11 @@ Page({ | @@ -282,14 +281,11 @@ Page({ | ||
282 | surplus: 0, | 281 | surplus: 0, |
283 | canBuy: false, | 282 | canBuy: false, |
284 | btnHidden: false, | 283 | btnHidden: false, |
285 | - | ||
286 | - hiddenCS: true, //控制客服操作菜单显示和控制 | ||
287 | }, | 284 | }, |
288 | 285 | ||
289 | //------初始化加载---------- | 286 | //------初始化加载---------- |
290 | onLoad: function (t) { | 287 | onLoad: function (t) { |
291 | - self = this; | ||
292 | - | 288 | + |
293 | // console.log('onload'); | 289 | // console.log('onload'); |
294 | if (t && t.group_id) { | 290 | if (t && t.group_id) { |
295 | this.data.group_id = t.group_id; | 291 | this.data.group_id = t.group_id; |
@@ -2252,53 +2248,7 @@ Page({ | @@ -2252,53 +2248,7 @@ Page({ | ||
2252 | 2248 | ||
2253 | //---------联系客服------------ | 2249 | //---------联系客服------------ |
2254 | contactService: function () { | 2250 | contactService: function () { |
2255 | - this.getTel() | ||
2256 | - .then(() => { | ||
2257 | - if(self.data.store_tel) { | ||
2258 | - wx.showModal({ | ||
2259 | - title: '联系客服', | ||
2260 | - content: '客服热线:' + self.data.store_tel, | ||
2261 | - confirmText: '拨打', | ||
2262 | - success(res) { | ||
2263 | - if(res.confirm) { | ||
2264 | - wx.makePhoneCall({ | ||
2265 | - phoneNumber: self.data.store_tel, | ||
2266 | - }) | ||
2267 | - }; | ||
2268 | - }, | ||
2269 | - }); | ||
2270 | - }; | ||
2271 | - }); | ||
2272 | - }, | ||
2273 | - // 获取客服电话 | ||
2274 | - getTel() { | ||
2275 | - return new Promise((resolve, reject) => { | ||
2276 | - s.getConfig(function (t) { | ||
2277 | - if (t.store_tel == undefined) { | ||
2278 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
2279 | - isShowLoading: 1, | ||
2280 | - data: {}, | ||
2281 | - success: function (rs) { | ||
2282 | - getApp().globalData.config = rs.data.data; | ||
2283 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
2284 | - getApp().my_warnning("商家未设置电话", 0, th); | ||
2285 | - return false; | ||
2286 | - } | ||
2287 | - self.setData({ | ||
2288 | - store_tel: rs.data.data.store_tel, | ||
2289 | - }); | ||
2290 | - // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
2291 | - } | ||
2292 | - }) | ||
2293 | - } else { | ||
2294 | - self.setData({ | ||
2295 | - store_tel: t.store_tel, | ||
2296 | - }); | ||
2297 | - // s.confirmBox("请联系客服:" + t.store_tel); | ||
2298 | - }; | ||
2299 | - resolve(); | ||
2300 | - }); | ||
2301 | - }); | 2251 | + getApp().con_Service(); |
2302 | }, | 2252 | }, |
2303 | //-------获取购物车数量---------- | 2253 | //-------获取购物车数量---------- |
2304 | requestCardNum: function () { | 2254 | requestCardNum: function () { |
@@ -6511,36 +6461,7 @@ Page({ | @@ -6511,36 +6461,7 @@ Page({ | ||
6511 | 6461 | ||
6512 | click_contact:function () { | 6462 | click_contact:function () { |
6513 | getApp().globalData.no_clear=1; | 6463 | getApp().globalData.no_clear=1; |
6514 | - }, | ||
6515 | - | ||
6516 | - | ||
6517 | - //打开客服操作菜单 | ||
6518 | - openCS() { | ||
6519 | - // csType/在线客服设置: | ||
6520 | - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
6521 | - // 1小程序客服、 | ||
6522 | - // 2企业微信客服 | ||
6523 | - let csType = this.data.sys_switch.weapp_customertype; | ||
6524 | - if(csType == 0) { | ||
6525 | - // 获取电话号码 | ||
6526 | - this.contactService(); | ||
6527 | - } else { | ||
6528 | - this.getTel() | ||
6529 | - .then(() => { | ||
6530 | - self.setData({ | ||
6531 | - hiddenCS: false, | ||
6532 | - }); | ||
6533 | - }); | ||
6534 | - | ||
6535 | - }; | ||
6536 | - }, | ||
6537 | - | ||
6538 | - //关闭客服操作菜单 | ||
6539 | - closeCS() { | ||
6540 | - this.setData({ | ||
6541 | - hiddenCS: true, | ||
6542 | - }); | ||
6543 | - }, | 6464 | + } |
6544 | 6465 | ||
6545 | 6466 | ||
6546 | }); | 6467 | }); |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -871,7 +871,7 @@ | @@ -871,7 +871,7 @@ | ||
871 | <!-- -----------------底部按钮------------------ --> | 871 | <!-- -----------------底部按钮------------------ --> |
872 | <view class="join-cart"> | 872 | <view class="join-cart"> |
873 | <!-- bindtap="contactService" --> | 873 | <!-- bindtap="contactService" --> |
874 | - <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 874 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
875 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 875 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
876 | <view>客服</view> | 876 | <view>客服</view> |
877 | </button> | 877 | </button> |
@@ -884,12 +884,7 @@ | @@ -884,12 +884,7 @@ | ||
884 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | 884 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
885 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 885 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
886 | <view>客服</view> | 886 | <view>客服</view> |
887 | - </view> --> | ||
888 | - | ||
889 | - <view class="custom-service cart-ico new_split" bindtap="openCS"> | ||
890 | - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
891 | - <view>客服</view> | ||
892 | - </view> | 887 | + </view> |
893 | 888 | ||
894 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | 889 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> |
895 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | 890 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> |
@@ -1652,32 +1647,4 @@ | @@ -1652,32 +1647,4 @@ | ||
1652 | 1647 | ||
1653 | <!-- 制作一个圆球导航 --> | 1648 | <!-- 制作一个圆球导航 --> |
1654 | <nav_box></nav_box> | 1649 | <nav_box></nav_box> |
1655 | - | ||
1656 | - | ||
1657 | -<!-- 联系客服操作菜单 --> | ||
1658 | -<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}"> | ||
1659 | - <view class="pd20 t-c pr"> | ||
1660 | - <text class="bold">联系客服</text> | ||
1661 | - <text class="iconfont icon-guan" bindtap="closeCS"></text> | ||
1662 | - </view> | ||
1663 | - <!-- 客服热线 --> | ||
1664 | - <view class="pd20 bdt fs30 btn2" bindtap="contactService"> | ||
1665 | - <text class="iconfont icon-dianhua"></text>客服热线: | ||
1666 | - <text class="c-red">{{store_tel}}</text> | ||
1667 | - </view> | ||
1668 | - <!-- 小程序客服 --> | ||
1669 | - <block wx:if="{{sys_switch.weapp_customertype == 1}}"> | ||
1670 | - <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
1671 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
1672 | - </button> | ||
1673 | - </block> | ||
1674 | - <!-- 微信客服 --> | ||
1675 | - <block wx:elif="{{sys_switch.weapp_customertype == 2}}"> | ||
1676 | - <view class="pd20 bdt fs30 btn2" bindtap="con_weixin"> | ||
1677 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
1678 | - </view> | ||
1679 | - </block> | ||
1680 | -</view> | ||
1681 | - | ||
1682 | -<view class="mask2" bindtap="closeCS"></view> | ||
1683 | 1650 |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
@@ -3115,56 +3115,4 @@ button.custom-service::after{ | @@ -3115,56 +3115,4 @@ button.custom-service::after{ | ||
3115 | .popup-content { | 3115 | .popup-content { |
3116 | max-height: 600rpx; | 3116 | max-height: 600rpx; |
3117 | overflow-y: auto; | 3117 | overflow-y: auto; |
3118 | - } | ||
3119 | - | ||
3120 | - | ||
3121 | - /* 联系客服操作菜单 */ | ||
3122 | - .action { | ||
3123 | - position: fixed; | ||
3124 | - bottom: 100rpx; | ||
3125 | - z-index: 1; | ||
3126 | - width: 100%; | ||
3127 | - background-color: white; | ||
3128 | - border-radius: 20rpx 20rpx 0 0; | ||
3129 | - } | ||
3130 | - | ||
3131 | - .action .icon-guan { | ||
3132 | - position: absolute; | ||
3133 | - left: 20rpx !important; | ||
3134 | - right: auto !important; | ||
3135 | - } | ||
3136 | - | ||
3137 | - .action .iconfont { | ||
3138 | - color: #ff7295; | ||
3139 | - margin-right: 10rpx; | ||
3140 | - } | ||
3141 | - | ||
3142 | - .action button { | ||
3143 | - text-align: left; | ||
3144 | - line-height: normal; | ||
3145 | - } | ||
3146 | - | ||
3147 | - .action button::after { | ||
3148 | - border-width: 0; | ||
3149 | - } | ||
3150 | - | ||
3151 | - .action .btn2 { | ||
3152 | - box-sizing: border-box; | ||
3153 | - height: 100rpx; | ||
3154 | - display: flex; | ||
3155 | - align-items: center; | ||
3156 | - } | ||
3157 | - | ||
3158 | - .mask2 { | ||
3159 | - display: none; | ||
3160 | - position: fixed; | ||
3161 | - left: 0; | ||
3162 | - right: 0; | ||
3163 | - top: 0; | ||
3164 | - bottom: 0; | ||
3165 | - background-color: rgba(0,0,0,.5); | ||
3166 | - } | ||
3167 | - | ||
3168 | - .action.active ~ .mask2 { | ||
3169 | - display: block; | ||
3170 | } | 3118 | } |
3171 | \ No newline at end of file | 3119 | \ No newline at end of file |
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.js
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
@@ -237,24 +237,7 @@ Page({ | @@ -237,24 +237,7 @@ Page({ | ||
237 | }, | 237 | }, |
238 | /*-----联系客户------*/ | 238 | /*-----联系客户------*/ |
239 | contactService: function() { | 239 | contactService: function() { |
240 | - e.getConfig(function(t) { | ||
241 | - if (t.store_tel == undefined) { | ||
242 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
243 | - isShowLoading: 1, | ||
244 | - data: {}, | ||
245 | - success: function (rs) { | ||
246 | - getApp().globalData.config = rs.data.data; | ||
247 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
248 | - getApp().showWarning("商家未设置电话"); | ||
249 | - return false; | ||
250 | - } | ||
251 | - e.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
252 | - } | ||
253 | - }) | ||
254 | - } else { | ||
255 | - e.confirmBox("请联系客服:" + t.store_tel); | ||
256 | - } | ||
257 | - }); | 240 | + getApp().con_Service(); |
258 | }, | 241 | }, |
259 | 242 | ||
260 | //--------取消订单--------- | 243 | //--------取消订单--------- |
@@ -1074,13 +1057,7 @@ Page({ | @@ -1074,13 +1057,7 @@ Page({ | ||
1074 | }, | 1057 | }, |
1075 | 1058 | ||
1076 | con_weixin:function () { | 1059 | con_weixin:function () { |
1077 | - var url=this.data.sys_switch.weapp_customertype_url; | ||
1078 | - var id=this.data.sys_switch.weapp_customertype_appid; | ||
1079 | - wx.openCustomerServiceChat({ | ||
1080 | - extInfo: {url: url}, | ||
1081 | - corpId: id, | ||
1082 | - success(res) {} | ||
1083 | - }) | 1060 | + getApp().con_wx(this); |
1084 | }, | 1061 | }, |
1085 | 1062 | ||
1086 | //跳转到商品 | 1063 | //跳转到商品 |
@@ -1115,6 +1092,11 @@ Page({ | @@ -1115,6 +1092,11 @@ Page({ | ||
1115 | // } | 1092 | // } |
1116 | // }) | 1093 | // }) |
1117 | }, | 1094 | }, |
1095 | + | ||
1096 | + | ||
1097 | + click_contact:function () { | ||
1098 | + getApp().globalData.no_clear=1; | ||
1099 | + } | ||
1118 | 1100 | ||
1119 | 1101 | ||
1120 | 1102 |
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | <view bindtap="checkTeam" class="contact-us check-btn" wx:if="{{optionIsGoup}}">查看拼团详情</view> | 61 | <view bindtap="checkTeam" class="contact-us check-btn" wx:if="{{optionIsGoup}}">查看拼团详情</view> |
62 | <view> | 62 | <view> |
63 | 63 | ||
64 | - <button wx:if="{{sys_switch.weapp_customertype==1}}" class="contact-us goods-btn" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">联系客服</button> | 64 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="contact-us goods-btn" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">联系客服</button> |
65 | 65 | ||
66 | <view wx:elif="{{sys_switch.weapp_customertype==2}}" bindtap="con_weixin" class="contact-us goods-btn">联系客服</view> | 66 | <view wx:elif="{{sys_switch.weapp_customertype==2}}" bindtap="con_weixin" class="contact-us goods-btn">联系客服</view> |
67 | <view wx:else bindtap="contactService" class="contact-us goods-btn">联系客服</view> | 67 | <view wx:else bindtap="contactService" class="contact-us goods-btn">联系客服</view> |
packageC/pages/luckyGo/luckyGo_winners/luckyGo_winners.js
packageC/pages/presell/cart/cart.js
@@ -2601,35 +2601,12 @@ Page({ | @@ -2601,35 +2601,12 @@ Page({ | ||
2601 | 2601 | ||
2602 | //---------联系客服------------ | 2602 | //---------联系客服------------ |
2603 | contactService: function () { | 2603 | contactService: function () { |
2604 | - getApp().getConfig(function (t) { | ||
2605 | - if (t.store_tel == undefined) { | ||
2606 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
2607 | - isShowLoading: 1, | ||
2608 | - data: {}, | ||
2609 | - success: function (rs) { | ||
2610 | - getApp().globalData.config = rs.data.data; | ||
2611 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
2612 | - getApp().my_warnning("商家未设置电话", 0, th); | ||
2613 | - return false; | ||
2614 | - } | ||
2615 | - wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, }) | ||
2616 | - } | ||
2617 | - }) | ||
2618 | - } else { | ||
2619 | - wx.makePhoneCall({ phoneNumber: t.store_tel, }) | ||
2620 | - } | ||
2621 | - }); | 2604 | + getApp().con_Service(); |
2622 | }, | 2605 | }, |
2623 | 2606 | ||
2624 | //---------联系微信客服------------ | 2607 | //---------联系微信客服------------ |
2625 | con_weixin: function () { | 2608 | con_weixin: function () { |
2626 | - var url = this.data.sys_switch.weapp_customertype_url; | ||
2627 | - var id = this.data.sys_switch.weapp_customertype_appid; | ||
2628 | - wx.openCustomerServiceChat({ | ||
2629 | - extInfo: { url: url }, | ||
2630 | - corpId: id, | ||
2631 | - success(res) { } | ||
2632 | - }) | 2609 | + getApp().con_wx(this); |
2633 | } | 2610 | } |
2634 | 2611 | ||
2635 | 2612 |
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -16,7 +16,6 @@ var more = function (e) { | @@ -16,7 +16,6 @@ var more = function (e) { | ||
16 | n = new more.default(); | 16 | n = new more.default(); |
17 | var utils = require('../../../../utils/util.js'); | 17 | var utils = require('../../../../utils/util.js'); |
18 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 18 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
19 | -let self = null; | ||
20 | 19 | ||
21 | Page({ | 20 | Page({ |
22 | data: { | 21 | data: { |
@@ -249,13 +248,10 @@ Page({ | @@ -249,13 +248,10 @@ Page({ | ||
249 | 248 | ||
250 | share_hidden: false, | 249 | share_hidden: false, |
251 | pre_arr: null, | 250 | pre_arr: null, |
252 | - | ||
253 | - hiddenCS: true, | ||
254 | }, | 251 | }, |
255 | 252 | ||
256 | //------初始化加载---------- | 253 | //------初始化加载---------- |
257 | onLoad: function (t) { | 254 | onLoad: function (t) { |
258 | - self = this; | ||
259 | var ee = this, that = ee, th = ee, | 255 | var ee = this, that = ee, th = ee, |
260 | pre_id = t.pre_id, | 256 | pre_id = t.pre_id, |
261 | gid = t.goods_id, | 257 | gid = t.goods_id, |
@@ -1434,55 +1430,8 @@ Page({ | @@ -1434,55 +1430,8 @@ Page({ | ||
1434 | 1430 | ||
1435 | //---------联系客服------------ | 1431 | //---------联系客服------------ |
1436 | contactService: function () { | 1432 | contactService: function () { |
1437 | - this.getTel() | ||
1438 | - .then(() => { | ||
1439 | - if(self.data.store_tel) { | ||
1440 | - wx.showModal({ | ||
1441 | - title: '联系客服', | ||
1442 | - content: '客服热线:' + self.data.store_tel, | ||
1443 | - confirmText: '拨打', | ||
1444 | - success(res) { | ||
1445 | - if(res.confirm) { | ||
1446 | - wx.makePhoneCall({ | ||
1447 | - phoneNumber: self.data.store_tel, | ||
1448 | - }) | ||
1449 | - }; | ||
1450 | - }, | ||
1451 | - }); | ||
1452 | - }; | ||
1453 | - }); | ||
1454 | - }, | ||
1455 | - // 获取客服电话 | ||
1456 | - getTel() { | ||
1457 | - return new Promise((resolve, reject) => { | ||
1458 | - s.getConfig(function (t) { | ||
1459 | - if (t.store_tel == undefined) { | ||
1460 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
1461 | - isShowLoading: 1, | ||
1462 | - data: {}, | ||
1463 | - success: function (rs) { | ||
1464 | - getApp().globalData.config = rs.data.data; | ||
1465 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
1466 | - getApp().my_warnning("商家未设置电话", 0, th); | ||
1467 | - return false; | ||
1468 | - } | ||
1469 | - self.setData({ | ||
1470 | - store_tel: rs.data.data.store_tel, | ||
1471 | - }); | ||
1472 | - // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
1473 | - } | ||
1474 | - }) | ||
1475 | - } else { | ||
1476 | - self.setData({ | ||
1477 | - store_tel: t.store_tel, | ||
1478 | - }); | ||
1479 | - // s.confirmBox("请联系客服:" + t.store_tel); | ||
1480 | - }; | ||
1481 | - resolve(); | ||
1482 | - }); | ||
1483 | - }); | 1433 | + getApp().con_Service(); |
1484 | }, | 1434 | }, |
1485 | - | ||
1486 | //-------获取购物车数量---------- | 1435 | //-------获取购物车数量---------- |
1487 | requestCardNum: function () { | 1436 | requestCardNum: function () { |
1488 | var t = this; | 1437 | var t = this; |
@@ -4050,35 +3999,6 @@ Page({ | @@ -4050,35 +3999,6 @@ Page({ | ||
4050 | 3999 | ||
4051 | click_contact:function () { | 4000 | click_contact:function () { |
4052 | getApp().globalData.no_clear=1; | 4001 | getApp().globalData.no_clear=1; |
4053 | - }, | ||
4054 | - | ||
4055 | - | ||
4056 | - //打开客服操作菜单 | ||
4057 | - openCS() { | ||
4058 | - // csType/在线客服设置: | ||
4059 | - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
4060 | - // 1小程序客服、 | ||
4061 | - // 2企业微信客服 | ||
4062 | - let csType = this.data.sys_switch.weapp_customertype; | ||
4063 | - if(csType == 0) { | ||
4064 | - // 获取电话号码 | ||
4065 | - this.contactService(); | ||
4066 | - } else { | ||
4067 | - this.getTel() | ||
4068 | - .then(() => { | ||
4069 | - self.setData({ | ||
4070 | - hiddenCS: false, | ||
4071 | - }); | ||
4072 | - }); | ||
4073 | - | ||
4074 | - }; | ||
4075 | - }, | ||
4076 | - | ||
4077 | - //关闭客服操作菜单 | ||
4078 | - closeCS() { | ||
4079 | - this.setData({ | ||
4080 | - hiddenCS: true, | ||
4081 | - }); | ||
4082 | - }, | 4002 | + } |
4083 | 4003 | ||
4084 | }); | 4004 | }); |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -495,7 +495,7 @@ | @@ -495,7 +495,7 @@ | ||
495 | <!-- -----------------底部按钮------------------ --> | 495 | <!-- -----------------底部按钮------------------ --> |
496 | <view class="join-cart"> | 496 | <view class="join-cart"> |
497 | <!-- bindtap="contactService" --> | 497 | <!-- bindtap="contactService" --> |
498 | - <!-- <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 498 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
499 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 499 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
500 | <view>客服</view> | 500 | <view>客服</view> |
501 | </button> | 501 | </button> |
@@ -508,13 +508,7 @@ | @@ -508,13 +508,7 @@ | ||
508 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | 508 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
509 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 509 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
510 | <view>客服</view> | 510 | <view>客服</view> |
511 | - </view> --> | ||
512 | - | ||
513 | - <view class="custom-service cart-ico new_split pdh20" bindtap="openCS"> | ||
514 | - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
515 | - <view>客服</view> | ||
516 | - </view> | ||
517 | - | 511 | + </view> |
518 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | 512 | <view bindtap="collectGoods" class="custom-service cart-ico new_split"> |
519 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | 513 | <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> |
520 | <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | 514 | <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> |
@@ -955,33 +949,3 @@ | @@ -955,33 +949,3 @@ | ||
955 | </view> | 949 | </view> |
956 | </view> | 950 | </view> |
957 | 951 | ||
958 | - | ||
959 | - | ||
960 | - | ||
961 | -<!-- 联系客服操作菜单 --> | ||
962 | -<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}"> | ||
963 | - <view class="pd20 t-c pr"> | ||
964 | - <text class="bold">联系客服</text> | ||
965 | - <text class="iconfont icon-guan" bindtap="closeCS"></text> | ||
966 | - </view> | ||
967 | - <!-- 客服热线 --> | ||
968 | - <view class="pd20 bdt fs30 btn2" bindtap="contactService"> | ||
969 | - <text class="iconfont icon-dianhua"></text>客服热线: | ||
970 | - <text class="c-red">{{store_tel}}</text> | ||
971 | - </view> | ||
972 | - <!-- 小程序客服 --> | ||
973 | - <block wx:if="{{sys_switch.weapp_customertype == 1}}"> | ||
974 | - <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
975 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
976 | - </button> | ||
977 | - </block> | ||
978 | - <!-- 微信客服 --> | ||
979 | - <block wx:elif="{{sys_switch.weapp_customertype == 2}}"> | ||
980 | - <view class="pd20 bdt fs30 btn2" bindtap="con_weixin"> | ||
981 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
982 | - </view> | ||
983 | - </block> | ||
984 | -</view> | ||
985 | - | ||
986 | -<view class="mask2" bindtap="closeCS"></view> | ||
987 | - |
packageC/pages/presell/goodsInfo/goodsInfo.wxss
@@ -1614,7 +1614,6 @@ left:31rpx;} | @@ -1614,7 +1614,6 @@ left:31rpx;} | ||
1614 | .icon-share { | 1614 | .icon-share { |
1615 | font-size: 46rpx; | 1615 | font-size: 46rpx; |
1616 | color: #d60021; | 1616 | color: #d60021; |
1617 | - line-height: 1; | ||
1618 | } | 1617 | } |
1619 | .xc-share-frame{ | 1618 | .xc-share-frame{ |
1620 | /* width: 129rpx; | 1619 | /* width: 129rpx; |
@@ -2833,7 +2832,7 @@ button.custom-service::after{ | @@ -2833,7 +2832,7 @@ button.custom-service::after{ | ||
2833 | } | 2832 | } |
2834 | 2833 | ||
2835 | .icon-close { | 2834 | .icon-close { |
2836 | - font-size: 42rpx; | 2835 | + font-size: 48rpx; |
2837 | } | 2836 | } |
2838 | .quan_price{ | 2837 | .quan_price{ |
2839 | background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; | 2838 | background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; |
@@ -2916,56 +2915,3 @@ button.custom-service::after{ | @@ -2916,56 +2915,3 @@ button.custom-service::after{ | ||
2916 | margin-right: 10rpx; | 2915 | margin-right: 10rpx; |
2917 | } | 2916 | } |
2918 | 2917 | ||
2919 | - | ||
2920 | - | ||
2921 | -/* 联系客服操作菜单 */ | ||
2922 | -.action { | ||
2923 | - position: fixed; | ||
2924 | - bottom: 100rpx; | ||
2925 | - z-index: 1; | ||
2926 | - width: 100%; | ||
2927 | - background-color: white; | ||
2928 | - border-radius: 20rpx 20rpx 0 0; | ||
2929 | -} | ||
2930 | - | ||
2931 | -.action .icon-guan { | ||
2932 | - position: absolute; | ||
2933 | - left: 20rpx !important; | ||
2934 | - right: auto !important; | ||
2935 | -} | ||
2936 | - | ||
2937 | -.action .iconfont { | ||
2938 | - color: #ff7295; | ||
2939 | - margin-right: 10rpx; | ||
2940 | -} | ||
2941 | - | ||
2942 | -.action button { | ||
2943 | - text-align: left; | ||
2944 | - line-height: normal; | ||
2945 | -} | ||
2946 | - | ||
2947 | -.action button::after { | ||
2948 | - border-width: 0; | ||
2949 | -} | ||
2950 | - | ||
2951 | -.action .btn2 { | ||
2952 | - box-sizing: border-box; | ||
2953 | - height: 100rpx; | ||
2954 | - display: flex; | ||
2955 | - align-items: center; | ||
2956 | -} | ||
2957 | - | ||
2958 | -.mask2 { | ||
2959 | - display: none; | ||
2960 | - position: fixed; | ||
2961 | - left: 0; | ||
2962 | - right: 0; | ||
2963 | - top: 0; | ||
2964 | - bottom: 0; | ||
2965 | - background-color: rgba(0,0,0,.5); | ||
2966 | -} | ||
2967 | - | ||
2968 | -.action.active ~ .mask2 { | ||
2969 | - display: block; | ||
2970 | -} | ||
2971 | - |
packageC/pages/presell/pregoodsInfo/goodsInfo.js
@@ -1431,24 +1431,7 @@ Page({ | @@ -1431,24 +1431,7 @@ Page({ | ||
1431 | 1431 | ||
1432 | //---------联系客服------------ | 1432 | //---------联系客服------------ |
1433 | contactService: function () { | 1433 | contactService: function () { |
1434 | - s.getConfig(function (t) { | ||
1435 | - if (t.store_tel == undefined) { | ||
1436 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
1437 | - isShowLoading: 1, | ||
1438 | - data: {}, | ||
1439 | - success: function (rs) { | ||
1440 | - getApp().globalData.config = rs.data.data; | ||
1441 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
1442 | - getApp().my_warnning("商家未设置电话", 0, th); | ||
1443 | - return false; | ||
1444 | - } | ||
1445 | - s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
1446 | - } | ||
1447 | - }) | ||
1448 | - } else { | ||
1449 | - s.confirmBox("请联系客服:" + t.store_tel); | ||
1450 | - } | ||
1451 | - }); | 1434 | + getApp().con_Service(); |
1452 | }, | 1435 | }, |
1453 | //-------获取购物车数量---------- | 1436 | //-------获取购物车数量---------- |
1454 | requestCardNum: function () { | 1437 | requestCardNum: function () { |
@@ -1489,11 +1472,7 @@ Page({ | @@ -1489,11 +1472,7 @@ Page({ | ||
1489 | b[i] = this.data.iurl + e[i]; | 1472 | b[i] = this.data.iurl + e[i]; |
1490 | } | 1473 | } |
1491 | this.data.show_prew_img = 1; | 1474 | this.data.show_prew_img = 1; |
1492 | - | ||
1493 | - wx.previewImage({ | ||
1494 | - current: b[t.currentTarget.dataset.id], | ||
1495 | - urls: b | ||
1496 | - }); | 1475 | + getApp().pre_img2(b,t) |
1497 | }, | 1476 | }, |
1498 | 1477 | ||
1499 | previewCommentImgs_w: function (t) { | 1478 | previewCommentImgs_w: function (t) { |
@@ -1503,21 +1482,16 @@ Page({ | @@ -1503,21 +1482,16 @@ Page({ | ||
1503 | b[i] = this.data.iurl + e[i]; | 1482 | b[i] = this.data.iurl + e[i]; |
1504 | } | 1483 | } |
1505 | this.data.show_prew_img = 1; | 1484 | this.data.show_prew_img = 1; |
1506 | - wx.previewImage({ | ||
1507 | - current: b[t.currentTarget.dataset.id], | ||
1508 | - urls: b | ||
1509 | - }); | 1485 | + getApp().pre_img2(b,t) |
1510 | }, | 1486 | }, |
1511 | 1487 | ||
1512 | previewGoodsCommentImgs: function (t) { | 1488 | previewGoodsCommentImgs: function (t) { |
1513 | var e = this, | 1489 | var e = this, |
1514 | a = this.data.data.comment[t.currentTarget.dataset.cidx].img; | 1490 | a = this.data.data.comment[t.currentTarget.dataset.cidx].img; |
1491 | + getApp().globalData.no_clear=1; | ||
1515 | a = a.map(function (t) { | 1492 | a = a.map(function (t) { |
1516 | return e.data.url + t; | 1493 | return e.data.url + t; |
1517 | - }), wx.previewImage({ | ||
1518 | - current: a[t.currentTarget.dataset.id], | ||
1519 | - urls: a | ||
1520 | - }); | 1494 | + }), getApp().pre_img2(a,t); |
1521 | this.data.show_prew_img = 1; | 1495 | this.data.show_prew_img = 1; |
1522 | }, | 1496 | }, |
1523 | closePromModal: function () { | 1497 | closePromModal: function () { |
@@ -1532,7 +1506,7 @@ Page({ | @@ -1532,7 +1506,7 @@ Page({ | ||
1532 | }, | 1506 | }, |
1533 | 1507 | ||
1534 | //--点击分享事件--- | 1508 | //--点击分享事件--- |
1535 | - onShareAppMessage: function (t) { | 1509 | + onShareAppMessage: function (t) { getApp().globalData.no_clear=1; |
1536 | 1510 | ||
1537 | var th = this; | 1511 | var th = this; |
1538 | var price = th.data.pre_arr.presell_price; | 1512 | var price = th.data.pre_arr.presell_price; |
@@ -3814,10 +3788,7 @@ Page({ | @@ -3814,10 +3788,7 @@ Page({ | ||
3814 | 3788 | ||
3815 | previewImage() { | 3789 | previewImage() { |
3816 | this.data.show_prew_img = 1; | 3790 | this.data.show_prew_img = 1; |
3817 | - wx.previewImage({ | ||
3818 | - //将图片预览出来 | ||
3819 | - urls: [this.data.shareImgPath] | ||
3820 | - }); | 3791 | + getApp().pre_img(this.data.shareImgPath); |
3821 | }, | 3792 | }, |
3822 | 3793 | ||
3823 | 3794 | ||
@@ -4014,13 +3985,12 @@ Page({ | @@ -4014,13 +3985,12 @@ Page({ | ||
4014 | }, | 3985 | }, |
4015 | 3986 | ||
4016 | con_weixin:function () { | 3987 | con_weixin:function () { |
4017 | - var url=this.data.sys_switch.weapp_customertype_url; | ||
4018 | - var id=this.data.sys_switch.weapp_customertype_appid; | ||
4019 | - wx.openCustomerServiceChat({ | ||
4020 | - extInfo: {url: url}, | ||
4021 | - corpId: id, | ||
4022 | - success(res) {} | ||
4023 | - }) | 3988 | + getApp().con_wx(this); |
3989 | + }, | ||
3990 | + | ||
3991 | + | ||
3992 | + click_contact:function () { | ||
3993 | + getApp().globalData.no_clear=1; | ||
4024 | } | 3994 | } |
4025 | 3995 | ||
4026 | }); | 3996 | }); |
packageC/pages/presell/pregoodsInfo/goodsInfo.wxml
@@ -495,7 +495,7 @@ | @@ -495,7 +495,7 @@ | ||
495 | <!-- -----------------底部按钮------------------ --> | 495 | <!-- -----------------底部按钮------------------ --> |
496 | <view class="join-cart"> | 496 | <view class="join-cart"> |
497 | <!-- bindtap="contactService" --> | 497 | <!-- bindtap="contactService" --> |
498 | - <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 498 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
499 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 499 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
500 | <view>客服</view> | 500 | <view>客服</view> |
501 | </button> | 501 | </button> |
packageD/pages/AI-test-skin/history_record/history_record.js
@@ -344,7 +344,7 @@ Page({ | @@ -344,7 +344,7 @@ Page({ | ||
344 | /** | 344 | /** |
345 | * 用户点击右上角分享 | 345 | * 用户点击右上角分享 |
346 | */ | 346 | */ |
347 | - onShareAppMessage: function () { | 347 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 |
348 | 348 | ||
349 | } | 349 | } |
350 | }) | 350 | }) |
351 | \ No newline at end of file | 351 | \ No newline at end of file |
packageD/pages/AI-test-skin/history_record/history_record.wxml
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | <view class="mgb5">历史报告</view> | 13 | <view class="mgb5">历史报告</view> |
14 | - <scroll-view enable-flex scroll-y class="history_list" bindscrolltolower="bindscrolltolower"> | 14 | + <view class="history_list"> |
15 | <view class="history_list_month" wx:for="{{history}}"> | 15 | <view class="history_list_month" wx:for="{{history}}"> |
16 | <view style="color:#333;font-size:26rpx;margin-top: 30rpx">{{item.history_time}}</view> | 16 | <view style="color:#333;font-size:26rpx;margin-top: 30rpx">{{item.history_time}}</view> |
17 | <view class="souce" wx:for="{{item.time_arr}}" wx:for-item="subitem" bindtap="go_result" data-id="{{subitem.id}}" wx:for-index="subindex" wx:key="subindex"> | 17 | <view class="souce" wx:for="{{item.time_arr}}" wx:for-item="subitem" bindtap="go_result" data-id="{{subitem.id}}" wx:for-index="subindex" wx:key="subindex"> |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | <view style="color: #9b9b9b;" >去查看<text style="font-size: 24rpx;" class="iconfont icon-arrow_right"></text></view> | 19 | <view style="color: #9b9b9b;" >去查看<text style="font-size: 24rpx;" class="iconfont icon-arrow_right"></text></view> |
20 | </view> | 20 | </view> |
21 | </view> | 21 | </view> |
22 | - </scroll-view> | 22 | + </view> |
23 | <view class="no-more txt-center" wx:if="{{history.length > 0 && no_more}}">- 没有更多了 -</view> | 23 | <view class="no-more txt-center" wx:if="{{history.length > 0 && no_more}}">- 没有更多了 -</view> |
24 | <nodata class="t-c" wx:if="{{history.length==0 && is_get}}"></nodata> | 24 | <nodata class="t-c" wx:if="{{history.length==0 && is_get}}"></nodata> |
25 | </view> | 25 | </view> |
26 | \ No newline at end of file | 26 | \ No newline at end of file |
packageD/pages/AI-test-skin/index/aiskin.js
packageD/pages/AI-test-skin/select_photo/select_photo.js
@@ -52,6 +52,7 @@ Page({ | @@ -52,6 +52,7 @@ Page({ | ||
52 | //-- 重新从相册中选择图片 -- | 52 | //-- 重新从相册中选择图片 -- |
53 | show_pai_pop: function () { | 53 | show_pai_pop: function () { |
54 | var th = this; | 54 | var th = this; |
55 | + getApp().globalData.no_clear=1; | ||
55 | //选择和拍照一张图片 | 56 | //选择和拍照一张图片 |
56 | wx.chooseImage({ | 57 | wx.chooseImage({ |
57 | count: 1, | 58 | count: 1, |
@@ -70,6 +71,7 @@ Page({ | @@ -70,6 +71,7 @@ Page({ | ||
70 | //选择图片 | 71 | //选择图片 |
71 | takePhoto() { | 72 | takePhoto() { |
72 | var that = this; | 73 | var that = this; |
74 | + getApp().globalData.no_clear=1; | ||
73 | wx.chooseImage({ | 75 | wx.chooseImage({ |
74 | count: 1, | 76 | count: 1, |
75 | sizeType: ['compressed'], | 77 | sizeType: ['compressed'], |
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
@@ -68,13 +68,14 @@ Page({ | @@ -68,13 +68,14 @@ Page({ | ||
68 | /** | 68 | /** |
69 | * 用户点击右上角分享 | 69 | * 用户点击右上角分享 |
70 | */ | 70 | */ |
71 | - onShareAppMessage: function () { | 71 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 |
72 | 72 | ||
73 | }, | 73 | }, |
74 | 74 | ||
75 | //从相册中选择图片 | 75 | //从相册中选择图片 |
76 | show_pai_pop: function () { | 76 | show_pai_pop: function () { |
77 | let th = this; | 77 | let th = this; |
78 | + getApp().globalData.no_clear=1; | ||
78 | //选择和拍照一张图片 | 79 | //选择和拍照一张图片 |
79 | wx.chooseImage({ | 80 | wx.chooseImage({ |
80 | count: 1, | 81 | count: 1, |
@@ -98,7 +99,7 @@ Page({ | @@ -98,7 +99,7 @@ Page({ | ||
98 | //选择图片 | 99 | //选择图片 |
99 | takePhoto() { | 100 | takePhoto() { |
100 | var that = this; | 101 | var that = this; |
101 | - | 102 | + getApp().globalData.no_clear=1; |
102 | wx.chooseImage({ | 103 | wx.chooseImage({ |
103 | count: 1, | 104 | count: 1, |
104 | sizeType: ['compressed'], | 105 | sizeType: ['compressed'], |
packageD/pages/AI-test-skin/success_result/success_result.js
1 | /* | 1 | /* |
2 | * @Author: abson | 2 | * @Author: abson |
3 | * @Date: 2022-02-16 15:36:47 | 3 | * @Date: 2022-02-16 15:36:47 |
4 | - * @LastEditTime: 2022-03-10 11:16:23 | 4 | + * @LastEditTime: 2022-02-28 16:01:07 |
5 | * @LastEditors: Please set LastEditors | 5 | * @LastEditors: Please set LastEditors |
6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js | 7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js |
@@ -63,7 +63,14 @@ Page({ | @@ -63,7 +63,14 @@ Page({ | ||
63 | }, | 63 | }, |
64 | 64 | ||
65 | onReady: function () { | 65 | onReady: function () { |
66 | - | 66 | + //用异步的获取比较准一点 |
67 | + wx.getSystemInfo({ | ||
68 | + success(res) { | ||
69 | + console.log(111); | ||
70 | + console.log(res.windowWidth); | ||
71 | + console.log(res.windowHeight); | ||
72 | + } | ||
73 | + }) | ||
67 | }, | 74 | }, |
68 | 75 | ||
69 | /** | 76 | /** |
@@ -76,7 +83,29 @@ Page({ | @@ -76,7 +83,29 @@ Page({ | ||
76 | this.init(); | 83 | this.init(); |
77 | //var face_result=getApp().globalData.face_result; | 84 | //var face_result=getApp().globalData.face_result; |
78 | //var face_data=face_result.face_list[0]; | 85 | //var face_data=face_result.face_list[0]; |
79 | - this.data.id = options.id; | 86 | + var id=options.id; |
87 | + var first_leader = options.first_leader; | ||
88 | + | ||
89 | + if (id == undefined || id == null || id == "") { | ||
90 | + var gid_str = decodeURIComponent(options.scene); | ||
91 | + gid_str = gid_str.split("_"); | ||
92 | + id=gid_str[0]; | ||
93 | + if (gid_str.length > 1) { | ||
94 | + first_leader = gid_str[1]; | ||
95 | + } | ||
96 | + } | ||
97 | + | ||
98 | + this.data.id=id; | ||
99 | + if (first_leader) { | ||
100 | + console.log("log---".first_leader); | ||
101 | + getApp().globalData.first_leader = first_leader; | ||
102 | + //调用接口判断是不是会员 | ||
103 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | ||
104 | + if (res.data.code == 0) { | ||
105 | + getApp().globalData.guide_id = res.data.data.id; | ||
106 | + } | ||
107 | + }) | ||
108 | + } | ||
80 | 109 | ||
81 | //用异步的获取比较准一点 | 110 | //用异步的获取比较准一点 |
82 | wx.getSystemInfo({ | 111 | wx.getSystemInfo({ |
@@ -127,6 +156,7 @@ Page({ | @@ -127,6 +156,7 @@ Page({ | ||
127 | var eye_data1 = face_data1.landmark150.eye_left_corner_right; | 156 | var eye_data1 = face_data1.landmark150.eye_left_corner_right; |
128 | var eye_data2 = face_data1.landmark150.eye_left_corner_left; | 157 | var eye_data2 = face_data1.landmark150.eye_left_corner_left; |
129 | var eye_data3 = face_data1.landmark150.eye_right_corner_right; | 158 | var eye_data3 = face_data1.landmark150.eye_right_corner_right; |
159 | + | ||
130 | var hei1 = Math.abs(eye_data1.x - eye_data2.x); | 160 | var hei1 = Math.abs(eye_data1.x - eye_data2.x); |
131 | var bili_eye = th.data.face_height * 0.56 / hei1; | 161 | var bili_eye = th.data.face_height * 0.56 / hei1; |
132 | var eye_top = eye_data1.y - hei1 / 2 | 162 | var eye_top = eye_data1.y - hei1 / 2 |
@@ -582,7 +612,15 @@ Page({ | @@ -582,7 +612,15 @@ Page({ | ||
582 | * 用户点击右上角分享 | 612 | * 用户点击右上角分享 |
583 | */ | 613 | */ |
584 | onShareAppMessage: function () { | 614 | onShareAppMessage: function () { |
615 | + getApp().globalData.no_clear=1; | ||
616 | + var url="packageD/pages/AI-test-skin/success_result/success_result?id="+this.data.id+"&first_leader="+getApp().globalData.user_id; | ||
617 | + | ||
618 | + var ob = { | ||
619 | + title: "测肤报告", | ||
620 | + path: url, | ||
621 | + }; | ||
585 | 622 | ||
623 | + return ob; | ||
586 | }, | 624 | }, |
587 | 625 | ||
588 | //商品页面跳转 | 626 | //商品页面跳转 |
@@ -740,7 +778,7 @@ Page({ | @@ -740,7 +778,7 @@ Page({ | ||
740 | } | 778 | } |
741 | ///二微码 | 779 | ///二微码 |
742 | var path3 = setting.url + "/api/wx/open/app/user/getWeAppEwm/" + | 780 | var path3 = setting.url + "/api/wx/open/app/user/getWeAppEwm/" + |
743 | - setting.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | 781 | + setting.stoid + "?sceneValue=" + scene + "&pageValue=packageD/pages/AI-test-skin/success_result/success_result"; |
744 | 782 | ||
745 | // 读取文件成功则OK-- | 783 | // 读取文件成功则OK-- |
746 | wx.getImageInfo({ | 784 | wx.getImageInfo({ |
pages/activity/pind_list/pind_list.js
@@ -195,6 +195,7 @@ Page({ | @@ -195,6 +195,7 @@ Page({ | ||
195 | 195 | ||
196 | //---------分享配置-------- | 196 | //---------分享配置-------- |
197 | onShareAppMessage: function (e) { | 197 | onShareAppMessage: function (e) { |
198 | + getApp().globalData.no_clear=1; | ||
198 | var curPage = this; | 199 | var curPage = this; |
199 | var pagePath = curPage.route; //当前页面url | 200 | var pagePath = curPage.route; //当前页面url |
200 | if (pagePath.indexOf('/') != 0) { | 201 | if (pagePath.indexOf('/') != 0) { |
pages/activity/seckill_list/seckill_list.js
@@ -233,6 +233,7 @@ Page({ | @@ -233,6 +233,7 @@ Page({ | ||
233 | 233 | ||
234 | //---------分享配置-------- | 234 | //---------分享配置-------- |
235 | onShareAppMessage: function (e) { | 235 | onShareAppMessage: function (e) { |
236 | + getApp().globalData.no_clear=1; | ||
236 | var curPage = this; | 237 | var curPage = this; |
237 | var pagePath = curPage.route; //当前页面url | 238 | var pagePath = curPage.route; //当前页面url |
238 | if (pagePath.indexOf('/') != 0) { | 239 | if (pagePath.indexOf('/') != 0) { |
pages/cart/cart2/cart2.js
@@ -2257,6 +2257,8 @@ Page({ | @@ -2257,6 +2257,8 @@ Page({ | ||
2257 | var order_prom_txt1 = "formData.order_prom_id"; | 2257 | var order_prom_txt1 = "formData.order_prom_id"; |
2258 | var order_prom_txt2 = "formData.order_prom_amount"; | 2258 | var order_prom_txt2 = "formData.order_prom_amount"; |
2259 | th.setData({ [order_prom_txt1]: 0, [order_prom_txt2]: 0 }) | 2259 | th.setData({ [order_prom_txt1]: 0, [order_prom_txt2]: 0 }) |
2260 | + | ||
2261 | + | ||
2260 | total_m = parseFloat(total_m) + parseFloat(th.data.formData.shipping_price); | 2262 | total_m = parseFloat(total_m) + parseFloat(th.data.formData.shipping_price); |
2261 | order_m = parseFloat(order_m) + parseFloat(th.data.formData.shipping_price); | 2263 | order_m = parseFloat(order_m) + parseFloat(th.data.formData.shipping_price); |
2262 | var atxt = "formData.total_amount"; | 2264 | var atxt = "formData.total_amount"; |
pages/cart/cart_wk/cart_wk.js
@@ -94,7 +94,7 @@ Page({ | @@ -94,7 +94,7 @@ Page({ | ||
94 | /** | 94 | /** |
95 | * 用户点击右上角分享 | 95 | * 用户点击右上角分享 |
96 | */ | 96 | */ |
97 | - onShareAppMessage: function () { }, | 97 | + onShareAppMessage: function () { getApp().globalData.no_clear=1 }, |
98 | //---------------获取物流--------------- | 98 | //---------------获取物流--------------- |
99 | get_wuliu(func) { | 99 | get_wuliu(func) { |
100 | var th = this, | 100 | var th = this, |
pages/distribution/distribution.js
pages/giftpack/mygiftpack/mygiftpack.js
@@ -163,6 +163,7 @@ Page({ | @@ -163,6 +163,7 @@ Page({ | ||
163 | 163 | ||
164 | //--- 分享设置 -- | 164 | //--- 分享设置 -- |
165 | onShareAppMessage: function (e) { | 165 | onShareAppMessage: function (e) { |
166 | + getApp().globalData.no_clear=1; | ||
166 | var curPage = this; | 167 | var curPage = this; |
167 | var pagePath = curPage.route; //当前页面url | 168 | var pagePath = curPage.route; //当前页面url |
168 | if (pagePath.indexOf('/') != 0) { | 169 | if (pagePath.indexOf('/') != 0) { |
pages/goods/categoryList/categoryList.js
@@ -627,7 +627,7 @@ Page({ | @@ -627,7 +627,7 @@ Page({ | ||
627 | 627 | ||
628 | //---------分享配置-------- | 628 | //---------分享配置-------- |
629 | onShareAppMessage: function (e) { | 629 | onShareAppMessage: function (e) { |
630 | - | 630 | + getApp().globalData.no_clear=1; |
631 | var url="pages/goods/categoryList/categoryList"; | 631 | var url="pages/goods/categoryList/categoryList"; |
632 | var userInfo=getApp().globalData.userInfo; | 632 | var userInfo=getApp().globalData.userInfo; |
633 | //是分销商才带 | 633 | //是分销商才带 |
@@ -799,6 +799,7 @@ Page({ | @@ -799,6 +799,7 @@ Page({ | ||
799 | //扫一扫 | 799 | //扫一扫 |
800 | getScancode:function(){ | 800 | getScancode:function(){ |
801 | var _this = this; | 801 | var _this = this; |
802 | + getApp().globalData.no_clear=1; | ||
802 | // 允许从相机和相册扫码 | 803 | // 允许从相机和相册扫码 |
803 | wx.scanCode({ | 804 | wx.scanCode({ |
804 | success: (res) => { | 805 | success: (res) => { |
pages/goods/goodsInfo/goodsInfo.js
@@ -255,8 +255,6 @@ Page({ | @@ -255,8 +255,6 @@ Page({ | ||
255 | share_hidden: false, | 255 | share_hidden: false, |
256 | all_activity_list: null, //所有活动的列表 | 256 | all_activity_list: null, //所有活动的列表 |
257 | 257 | ||
258 | - hiddenCS: true, //控制客服操作菜单 | ||
259 | - | ||
260 | }, | 258 | }, |
261 | 259 | ||
262 | //------初始化加载---------- | 260 | //------初始化加载---------- |
@@ -2290,55 +2288,8 @@ Page({ | @@ -2290,55 +2288,8 @@ Page({ | ||
2290 | 2288 | ||
2291 | //---------联系客服------------ | 2289 | //---------联系客服------------ |
2292 | contactService: function () { | 2290 | contactService: function () { |
2293 | - this.getTel() | ||
2294 | - .then(() => { | ||
2295 | - if(self.data.store_tel) { | ||
2296 | - wx.showModal({ | ||
2297 | - title: '联系客服', | ||
2298 | - content: '客服热线:' + self.data.store_tel, | ||
2299 | - confirmText: '拨打', | ||
2300 | - success(res) { | ||
2301 | - if(res.confirm) { | ||
2302 | - wx.makePhoneCall({ | ||
2303 | - phoneNumber: self.data.store_tel, | ||
2304 | - }) | ||
2305 | - }; | ||
2306 | - }, | ||
2307 | - }); | ||
2308 | - }; | ||
2309 | - }); | 2291 | + getApp().con_Service(); |
2310 | }, | 2292 | }, |
2311 | - // 获取客服电话 | ||
2312 | - getTel() { | ||
2313 | - return new Promise((resolve, reject) => { | ||
2314 | - s.getConfig(function (t) { | ||
2315 | - if (t.store_tel == undefined) { | ||
2316 | - getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
2317 | - isShowLoading: 1, | ||
2318 | - data: {}, | ||
2319 | - success: function (rs) { | ||
2320 | - getApp().globalData.config = rs.data.data; | ||
2321 | - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
2322 | - getApp().my_warnning("商家未设置电话", 0, th); | ||
2323 | - return false; | ||
2324 | - } | ||
2325 | - self.setData({ | ||
2326 | - store_tel: rs.data.data.store_tel, | ||
2327 | - }); | ||
2328 | - // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
2329 | - } | ||
2330 | - }) | ||
2331 | - } else { | ||
2332 | - self.setData({ | ||
2333 | - store_tel: t.store_tel, | ||
2334 | - }); | ||
2335 | - // s.confirmBox("请联系客服:" + t.store_tel); | ||
2336 | - }; | ||
2337 | - resolve(); | ||
2338 | - }); | ||
2339 | - }); | ||
2340 | - }, | ||
2341 | - | ||
2342 | //-------获取购物车数量---------- | 2293 | //-------获取购物车数量---------- |
2343 | requestCardNum: function () { | 2294 | requestCardNum: function () { |
2344 | var t = this; | 2295 | var t = this; |
@@ -6659,36 +6610,7 @@ Page({ | @@ -6659,36 +6610,7 @@ Page({ | ||
6659 | 6610 | ||
6660 | click_contact:function () { | 6611 | click_contact:function () { |
6661 | getApp().globalData.no_clear=1; | 6612 | getApp().globalData.no_clear=1; |
6662 | - }, | ||
6663 | - | ||
6664 | - | ||
6665 | - //打开客服操作菜单 | ||
6666 | - openCS() { | ||
6667 | - // csType/在线客服设置: | ||
6668 | - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | ||
6669 | - // 1小程序客服、 | ||
6670 | - // 2企业微信客服 | ||
6671 | - let csType = this.data.sys_switch.weapp_customertype; | ||
6672 | - if(csType == 0) { | ||
6673 | - // 获取电话号码 | ||
6674 | - this.contactService(); | ||
6675 | - } else { | ||
6676 | - this.getTel() | ||
6677 | - .then(() => { | ||
6678 | - self.setData({ | ||
6679 | - hiddenCS: false, | ||
6680 | - }); | ||
6681 | - }); | ||
6682 | - | ||
6683 | - }; | ||
6684 | - }, | ||
6685 | - | ||
6686 | - //关闭客服操作菜单 | ||
6687 | - closeCS() { | ||
6688 | - this.setData({ | ||
6689 | - hiddenCS: true, | ||
6690 | - }); | ||
6691 | - } | 6613 | + } |
6692 | 6614 | ||
6693 | 6615 | ||
6694 | 6616 |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -274,9 +274,8 @@ | @@ -274,9 +274,8 @@ | ||
274 | </view> | 274 | </view> |
275 | </view> | 275 | </view> |
276 | <view class="goods-title"> | 276 | <view class="goods-title"> |
277 | - <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
278 | - <view class="goods-name elli">{{data.goods_name}}</view> | ||
279 | - </view> | 277 | + <view class="goods-name elli">{{data.goods_name}}</view> |
278 | + </view> | ||
280 | <view class="goods-num"> | 279 | <view class="goods-num"> |
281 | <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> | 280 | <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view> |
282 | <view class="stock"> | 281 | <view class="stock"> |
@@ -392,7 +391,6 @@ | @@ -392,7 +391,6 @@ | ||
392 | <!-- 许程商品名字 --> | 391 | <!-- 许程商品名字 --> |
393 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> | 392 | <view wx:if="{{prom_type!=1 && prom_type!=2 }}"> |
394 | <view class="goods-title"> | 393 | <view class="goods-title"> |
395 | - <image wx:if="{{data.commission > 0}}" style="width: 25rpx;height: 25rpx;margin-right: 6rpx;" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/addmoney.png"></image> | ||
396 | <view class="goods-name elli">{{data.goods_name}}</view> | 394 | <view class="goods-name elli">{{data.goods_name}}</view> |
397 | </view> | 395 | </view> |
398 | </view> | 396 | </view> |
@@ -1012,8 +1010,18 @@ | @@ -1012,8 +1010,18 @@ | ||
1012 | 1010 | ||
1013 | <!-- -----------------底部按钮------------------ --> | 1011 | <!-- -----------------底部按钮------------------ --> |
1014 | <view class="join-cart"> | 1012 | <view class="join-cart"> |
1013 | + <!-- bindtap="contactService" --> | ||
1014 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" bindtap="click_contact" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
1015 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
1016 | + <view>客服</view> | ||
1017 | + </button> | ||
1018 | + | ||
1019 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split" bindtap="con_weixin"> | ||
1020 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
1021 | + <view>客服</view> | ||
1022 | + </view> | ||
1015 | 1023 | ||
1016 | - <view class="custom-service cart-ico new_split" bindtap="openCS"> | 1024 | + <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
1017 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 1025 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
1018 | <view>客服</view> | 1026 | <view>客服</view> |
1019 | </view> | 1027 | </view> |
@@ -1710,32 +1718,3 @@ | @@ -1710,32 +1718,3 @@ | ||
1710 | <view hidden="{{!openSpecModal_flash_normal}}"> | 1718 | <view hidden="{{!openSpecModal_flash_normal}}"> |
1711 | <include src="buy_flash_normal.wxml" /> | 1719 | <include src="buy_flash_normal.wxml" /> |
1712 | </view> | 1720 | </view> |
1713 | - | ||
1714 | - | ||
1715 | - | ||
1716 | -<!-- 联系客服操作菜单 --> | ||
1717 | -<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}"> | ||
1718 | - <view class="pd20 t-c pr"> | ||
1719 | - <text class="bold">联系客服</text> | ||
1720 | - <text class="iconfont icon-guan" bindtap="closeCS"></text> | ||
1721 | - </view> | ||
1722 | - <!-- 客服热线 --> | ||
1723 | - <view class="pd20 bdt fs30 btn2" bindtap="contactService"> | ||
1724 | - <text class="iconfont icon-dianhua"></text>客服热线: | ||
1725 | - <text class="c-red">{{store_tel}}</text> | ||
1726 | - </view> | ||
1727 | - <!-- 小程序客服 --> | ||
1728 | - <block wx:if="{{sys_switch.weapp_customertype == 1}}"> | ||
1729 | - <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
1730 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
1731 | - </button> | ||
1732 | - </block> | ||
1733 | - <!-- 微信客服 --> | ||
1734 | - <block wx:elif="{{sys_switch.weapp_customertype == 2}}"> | ||
1735 | - <view class="pd20 bdt fs30 btn2" bindtap="con_weixin"> | ||
1736 | - <text class="iconfont icon-kefu1"></text>在线客服 | ||
1737 | - </view> | ||
1738 | - </block> | ||
1739 | -</view> | ||
1740 | - | ||
1741 | -<view class="mask2" bindtap="closeCS"></view> |
pages/goods/goodsInfo/goodsInfo.wxss
@@ -126,9 +126,7 @@ image { | @@ -126,9 +126,7 @@ image { | ||
126 | 126 | ||
127 | .goods-title { | 127 | .goods-title { |
128 | display: flex; | 128 | display: flex; |
129 | - justify-content: space-between; | ||
130 | - align-items: center; | ||
131 | - vertical-align: middle; | 129 | + justify-content: space-between; |
132 | /* overflow: hidden; */ | 130 | /* overflow: hidden; */ |
133 | /* height: 108rpx; */ | 131 | /* height: 108rpx; */ |
134 | } | 132 | } |
@@ -4004,54 +4002,3 @@ button.custom-service::after { | @@ -4004,54 +4002,3 @@ button.custom-service::after { | ||
4004 | left: -1000px; | 4002 | left: -1000px; |
4005 | top: -1000px; | 4003 | top: -1000px; |
4006 | } | 4004 | } |
4007 | - | ||
4008 | - | ||
4009 | - | ||
4010 | - | ||
4011 | -/* 联系客服操作菜单 */ | ||
4012 | -.action { | ||
4013 | - position: fixed; | ||
4014 | - bottom: 100rpx; | ||
4015 | - z-index: 1; | ||
4016 | - width: 100%; | ||
4017 | - background-color: white; | ||
4018 | - border-radius: 20rpx 20rpx 0 0; | ||
4019 | -} | ||
4020 | - | ||
4021 | -.action .icon-guan { | ||
4022 | - position: absolute; | ||
4023 | - left: 20rpx !important; | ||
4024 | - right: auto !important; | ||
4025 | -} | ||
4026 | - | ||
4027 | -.action .iconfont { | ||
4028 | - color: #ff7295; | ||
4029 | - margin-right: 10rpx; | ||
4030 | -} | ||
4031 | - | ||
4032 | -.action button { | ||
4033 | - text-align: left; | ||
4034 | - line-height: normal; | ||
4035 | -} | ||
4036 | - | ||
4037 | -.action .btn2 { | ||
4038 | - box-sizing: border-box; | ||
4039 | - height: 100rpx; | ||
4040 | - display: flex; | ||
4041 | - align-items: center; | ||
4042 | -} | ||
4043 | - | ||
4044 | -.mask2 { | ||
4045 | - display: none; | ||
4046 | - position: fixed; | ||
4047 | - left: 0; | ||
4048 | - right: 0; | ||
4049 | - top: 0; | ||
4050 | - bottom: 0; | ||
4051 | - background-color: rgba(0,0,0,.5); | ||
4052 | -} | ||
4053 | - | ||
4054 | -.action.active ~ .mask2 { | ||
4055 | - display: block; | ||
4056 | -} | ||
4057 | - |
pages/goods/goodsList/goodsList.js
@@ -380,6 +380,7 @@ Page({ | @@ -380,6 +380,7 @@ Page({ | ||
380 | }, | 380 | }, |
381 | //---------分享配置-------- | 381 | //---------分享配置-------- |
382 | onShareAppMessage: function (e) { | 382 | onShareAppMessage: function (e) { |
383 | + getApp().globalData.no_clear=1; | ||
383 | var curPage=this; | 384 | var curPage=this; |
384 | var pagePath = curPage.route; //当前页面url | 385 | var pagePath = curPage.route; //当前页面url |
385 | if (pagePath.indexOf('/') != 0) { | 386 | if (pagePath.indexOf('/') != 0) { |
pages/goods/search/search.js
@@ -389,6 +389,7 @@ Page({ | @@ -389,6 +389,7 @@ Page({ | ||
389 | 389 | ||
390 | //---------分享配置-------- | 390 | //---------分享配置-------- |
391 | onShareAppMessage: function (e) { | 391 | onShareAppMessage: function (e) { |
392 | + getApp().globalData.no_clear=1; | ||
392 | var curPage=this; | 393 | var curPage=this; |
393 | var pagePath = curPage.route; //当前页面url | 394 | var pagePath = curPage.route; //当前页面url |
394 | if (pagePath.indexOf('/') != 0) { | 395 | if (pagePath.indexOf('/') != 0) { |
pages/index/index/index.js
@@ -84,7 +84,6 @@ Page({ | @@ -84,7 +84,6 @@ Page({ | ||
84 | full_ad: null, //全屏广告 | 84 | full_ad: null, //全屏广告 |
85 | full_screen: 0, //全屏广告 | 85 | full_screen: 0, //全屏广告 |
86 | is_ok_h5:0, //判断要不要显示关注二维码 | 86 | is_ok_h5:0, //判断要不要显示关注二维码 |
87 | - | ||
88 | }, | 87 | }, |
89 | 88 | ||
90 | onLoad: async function (tt) { | 89 | onLoad: async function (tt) { |
@@ -223,18 +222,20 @@ Page({ | @@ -223,18 +222,20 @@ Page({ | ||
223 | //如果是自定义模板 | 222 | //如果是自定义模板 |
224 | if (this.data.isTemplate) { | 223 | if (this.data.isTemplate) { |
225 | //---先获取会员--- | 224 | //---先获取会员--- |
226 | - t.getUserFir(function () { | ||
227 | - th.is_festival(); | ||
228 | - var new_nav = th.data.new_nav; | ||
229 | - if (new_nav == "") { | ||
230 | - th.is_new(); | ||
231 | - } | ||
232 | - // sty | ||
233 | - setTimeout(function () { | ||
234 | - if (getApp().globalData.user_id) getApp().requestCardNum(th); | ||
235 | - }, 500) | 225 | + //t.getUserFir(function () { |
226 | + if(getApp().globalData.user_id) { | ||
227 | + th.is_festival(); | ||
228 | + var new_nav = th.data.new_nav; | ||
229 | + if (new_nav == "") { | ||
230 | + th.is_new(); | ||
231 | + } | ||
232 | + // sty | ||
233 | + setTimeout(function () { | ||
234 | + if (getApp().globalData.user_id) getApp().requestCardNum(th); | ||
235 | + }, 500) | ||
236 | + } | ||
236 | 237 | ||
237 | - }); | 238 | + //}); |
238 | } else { | 239 | } else { |
239 | await this.init_fir(); | 240 | await this.init_fir(); |
240 | wx.setNavigationBarColor({ | 241 | wx.setNavigationBarColor({ |
@@ -428,29 +429,18 @@ Page({ | @@ -428,29 +429,18 @@ Page({ | ||
428 | var th = this; | 429 | var th = this; |
429 | 430 | ||
430 | var show = getApp().globalData.isLoad_ad; | 431 | var show = getApp().globalData.isLoad_ad; |
431 | - setTimeout(function () { | ||
432 | - //user没有及时更新 | ||
433 | - var userInfo = getApp().globalData.userInfo; | ||
434 | - if (!userInfo || !userInfo.user_id) userInfo = null; | ||
435 | - //有加载过一次首页,就显示 | ||
436 | - if (show || userInfo || getApp().globalData.user_id) { | 432 | + if(!show){ |
437 | setTimeout(function () { | 433 | setTimeout(function () { |
438 | - full_screen.get_the_full_screen(th); | ||
439 | - }, 800) | ||
440 | - //动画效果 | 434 | + full_screen.get_the_full_screen(th); |
435 | + }, 800); | ||
436 | + getApp().globalData.isLoad_ad=1; | ||
441 | if (!th.data.f_hidden) { | 437 | if (!th.data.f_hidden) { |
442 | - wx.showLoading({ | ||
443 | - title: '加载中..' | ||
444 | - }); | ||
445 | - setTimeout(function () { | ||
446 | - th.setData({ f_hidden: 1 }) | ||
447 | - wx.hideLoading(); | ||
448 | - }, 960) | 438 | + setTimeout(function () { |
439 | + th.setData({ f_hidden: 1 }) | ||
440 | + wx.hideLoading(); | ||
441 | + }, 960) | ||
449 | } | 442 | } |
450 | - } else { | ||
451 | - getApp().globalData.isLoad_ad = 1; | ||
452 | - } | ||
453 | - }, 1500) | 443 | + } |
454 | 444 | ||
455 | setTimeout(function () { | 445 | setTimeout(function () { |
456 | const query = wx.createSelectorQuery(); | 446 | const query = wx.createSelectorQuery(); |
@@ -649,19 +639,20 @@ Page({ | @@ -649,19 +639,20 @@ Page({ | ||
649 | }); | 639 | }); |
650 | 640 | ||
651 | //---先获取会员--- | 641 | //---先获取会员--- |
652 | - t.getUserFir(function () { | ||
653 | - th.is_festival(); | ||
654 | - var new_nav = th.data.new_nav; | ||
655 | - if (new_nav == "") { | ||
656 | - th.is_new(); | ||
657 | - } | ||
658 | - | ||
659 | - // sty | ||
660 | - setTimeout(function () { | ||
661 | - if (getApp().globalData.user_id) getApp().requestCardNum(th); | ||
662 | - }, 500) | 642 | + //t.getUserFir(function () { |
643 | + if(getApp().globalData.user_id) { | ||
644 | + th.is_festival(); | ||
645 | + var new_nav = th.data.new_nav; | ||
646 | + if (new_nav == "") { | ||
647 | + th.is_new(); | ||
648 | + } | ||
663 | 649 | ||
664 | - }); | 650 | + // sty |
651 | + setTimeout(function () { | ||
652 | + if (getApp().globalData.user_id) getApp().requestCardNum(th); | ||
653 | + }, 500) | ||
654 | + } | ||
655 | + //}); | ||
665 | 656 | ||
666 | setTimeout(function () { | 657 | setTimeout(function () { |
667 | var goods_list = th.selectComponent("#goods_list"); //组件的id | 658 | var goods_list = th.selectComponent("#goods_list"); //组件的id |
@@ -743,6 +734,7 @@ Page({ | @@ -743,6 +734,7 @@ Page({ | ||
743 | }); | 734 | }); |
744 | }, | 735 | }, |
745 | onShareAppMessage: function (e) { | 736 | onShareAppMessage: function (e) { |
737 | + getApp().globalData.no_clear=1; | ||
746 | var url = "/pages/index/index/index"; | 738 | var url = "/pages/index/index/index"; |
747 | var userInfo = getApp().globalData.userInfo; | 739 | var userInfo = getApp().globalData.userInfo; |
748 | //是分销商才带 | 740 | //是分销商才带 |
@@ -938,6 +930,7 @@ Page({ | @@ -938,6 +930,7 @@ Page({ | ||
938 | //---扫一扫的函数--- | 930 | //---扫一扫的函数--- |
939 | getScancode: function () { | 931 | getScancode: function () { |
940 | var _this = this; | 932 | var _this = this; |
933 | + getApp().globalData.no_clear=1; | ||
941 | // 允许从相机和相册扫码 | 934 | // 允许从相机和相册扫码 |
942 | wx.scanCode({ | 935 | wx.scanCode({ |
943 | success: (res) => { | 936 | success: (res) => { |
pages/team/team_show/team_show.js
@@ -959,6 +959,7 @@ Page({ | @@ -959,6 +959,7 @@ Page({ | ||
959 | 959 | ||
960 | //------ 分享配置 -------- | 960 | //------ 分享配置 -------- |
961 | onShareAppMessage: function (e) { | 961 | onShareAppMessage: function (e) { |
962 | + getApp().globalData.no_clear=1; | ||
962 | var curPage=this; | 963 | var curPage=this; |
963 | var pagePath = curPage.route; //当前页面url | 964 | var pagePath = curPage.route; //当前页面url |
964 | if (pagePath.indexOf('/') != 0) { | 965 | if (pagePath.indexOf('/') != 0) { |