Commit 8bfb88a595242afe483b299374c3e8d72c3baad6

Authored by 后端研发-苏泰源
2 parents c601fde7 6cc98719

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

# Conflicts:
#	app.js
#	packageA/pages/goodsInfo/goodsInfo.js
#	packageA/pages/goodsInfo/goodsInfo.wxml
#	packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
#	packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
#	packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
#	packageC/pages/presell/goodsInfo/goodsInfo.js
#	packageC/pages/presell/goodsInfo/goodsInfo.wxml
#	pages/goods/goodsInfo/goodsInfo.js
#	pages/goods/goodsInfo/goodsInfo.wxml
#	pages/user/index/index.js
#	pages/user/index/index.wxml
#	pages/user/index/index.wxss
Showing 127 changed files with 527 additions and 1927 deletions

Too many changes.

To preserve performance only 100 of 127 files are displayed.

... ... @@ -51,7 +51,7 @@ App({
51 51 config: null, //门店参数
52 52 config2: null, //门店配置
53 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 55 buy_now: null,
56 56 picklist: null, //门店列表
57 57 wuliuprice: null, //物流价格表
... ... @@ -61,6 +61,7 @@ App({
61 61 getu: null, //记录会员信息
62 62 sessionKey: null,//记录会员信息
63 63 openid: null, //记录会员信息
  64 +
64 65 to_group: null, //参团传递的数据
65 66 wxapp_buy_obj: null, //微信小程序购买的Object
66 67 pk_store: null, //选择的门店
... ... @@ -69,6 +70,7 @@ App({
69 70 windowWidth: 0, //整个窗体的宽度
70 71 room_id: null, //直播间分享的房间ID
71 72 room_goods_id: null, //直播间分享的商品ID
  73 +
72 74 },
73 75 auth: o,
74 76 request: a,
... ... @@ -669,7 +671,6 @@ App({
669 671  
670 672 //清空登录时候缓存的值
671 673 onHide: function () {
672   -
673 674 if(!this.globalData.no_clear) {
674 675 this.globalData.is_test = 0;
675 676 this.globalData.guide_id = null; //导购清空
... ... @@ -688,7 +689,6 @@ App({
688 689 }else{
689 690 this.globalData.no_clear=0;
690 691 }
691   -
692 692 },
693 693  
694 694 clear_word: function (word) {
... ... @@ -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 840 //b是数组,t是wxml元素返回的
833 841 pre_img2(b,t){
... ...
app.wxss
... ... @@ -744,17 +744,9 @@ background: #ffe3e2;
744 744 /* 图标字体(ty) */
745 745 @font-face {
746 746 font-family: 'iconfont'; /* Project id 2054717 */
747   - src: url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.woff2?t=1646731629521') format('woff2'),
748   - url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.woff?t=1646731629521') format('woff'),
749   - url('//at.alicdn.com/t/font_2054717_qbvqi1zioy.ttf?t=1646731629521') format('truetype');
750   -}
751   -
752   -.icon-kefu1:before {
753   - content: "\e666";
754   -}
755   -
756   -.icon-dianhua:before {
757   - content: "\e623";
  747 + src: url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.woff2?t=1645781927179') format('woff2'),
  748 + url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.woff?t=1645781927179') format('woff'),
  749 + url('//at.alicdn.com/t/font_2054717_o34jrbrtxpk.ttf?t=1645781927179') format('truetype');
758 750 }
759 751  
760 752 .icon-infofill:before {
... ...
components/diy_scan/diy_scan.js
... ... @@ -26,6 +26,7 @@ Component({
26 26 //-- 扫描成功之后 --
27 27 getScancode:function(){
28 28 var _this = this;
  29 + getApp().globalData.no_clear=1;
29 30 //-- 允许从相机和相册扫码 --
30 31 wx.scanCode({
31 32 success: (res) => {
... ...
components/diy_service/diy_service.js
... ... @@ -38,35 +38,16 @@ Component({
38 38  
39 39 //---------联系客服------------
40 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 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 8 </view>
9 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 12 <view style="text-align: center;">
13 13 <image class="cs-img" src="{{object.img}}"></image>
14 14 <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view>
... ...
components/nav_b/nav_b.wxss
... ... @@ -26,6 +26,9 @@
26 26 color: #ffff;
27 27 font-size: 50rpx;
28 28 background: none;
  29 + display: flex;
  30 + justify-content: center;
  31 + align-items: center;
29 32 }
30 33  
31 34 .box_main .dian image {
... ...
packageA/pages/activity_share/activity_share.js
... ... @@ -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 149 if(th.data.currentIndex==3) {
149 150 var lbid=th.data.hui_active.lbId;
... ... @@ -1054,10 +1055,8 @@ Page({
1054 1055 })
1055 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 1061 th.setData({share_good:null});
1063 1062  
... ...
packageA/pages/addCustomer/addCustomer.js
... ... @@ -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 67 \ No newline at end of file
... ...
packageA/pages/cardDetails/cardDetails.js
... ... @@ -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 99 \ No newline at end of file
... ...
packageA/pages/cardList/cardList.js
... ... @@ -134,7 +134,7 @@ Page({
134 134 /**
135 135 * 用户点击右上角分享
136 136 */
137   - onShareAppMessage: function () {
  137 + onShareAppMessage: function () { getApp().globalData.no_clear=1
138 138  
139 139 },
140 140  
... ...
packageA/pages/chongzhi/chongzhi.js
... ... @@ -106,7 +106,7 @@ Page({
106 106 /**
107 107 * 用户点击右上角分享
108 108 */
109   - onShareAppMessage: function () {
  109 + onShareAppMessage: function () { getApp().globalData.no_clear=1
110 110  
111 111 },
112 112  
... ...
packageA/pages/chongzhiDetails/chongzhiDetails.js
... ... @@ -125,7 +125,7 @@ Page({
125 125 /**
126 126 * 用户点击右上角分享
127 127 */
128   - onShareAppMessage: function () {
  128 + onShareAppMessage: function () { getApp().globalData.no_clear=1
129 129  
130 130 },
131 131  
... ...
packageA/pages/choujiang/choujiang.js
... ... @@ -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 67 \ No newline at end of file
... ...
packageA/pages/details_serviceCard/details_serviceCard.js
... ... @@ -112,7 +112,7 @@ Page({
112 112 * 用户点击右上角分享
113 113 */
114 114 onShareAppMessage: function() {
115   -
  115 + getApp().globalData.no_clear=1
116 116 },
117 117  
118 118  
... ... @@ -163,6 +163,7 @@ Page({
163 163  
164 164 // 联系微信客服
165 165 contact_wx() {
  166 + getApp().globalData.no_clear=1;
166 167 var url = this.data.sys_switch.weapp_customertype_url;
167 168 var id = this.data.sys_switch.weapp_customertype_appid;
168 169 wx.openCustomerServiceChat({
... ... @@ -177,24 +178,7 @@ Page({
177 178  
178 179 // 联系电话客服
179 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 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 57 <view class="flex t-c bdt">
58 58 <!-- 客服 -->
59 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 61 session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</button>
62 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 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
... ... @@ -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  
... ...
packageA/pages/distribution/commision/commision.js
... ... @@ -149,7 +149,7 @@ Page({
149 149 /**
150 150 * 用户点击右上角分享
151 151 */
152   - onShareAppMessage: function () {
  152 + onShareAppMessage: function () { getApp().globalData.no_clear=1
153 153  
154 154 },
155 155  
... ...
packageA/pages/distribution/goods/goods.js
... ... @@ -264,7 +264,7 @@ Page({
264 264 /**
265 265 * 用户点击右上角分享
266 266 */
267   - onShareAppMessage: function () {
  267 + onShareAppMessage: function () { getApp().globalData.no_clear=1
268 268  
269 269 },
270 270  
... ...
packageA/pages/distribution/myteam/myteam.js
... ... @@ -157,7 +157,7 @@ Page({
157 157 /**
158 158 * 用户点击右上角分享
159 159 */
160   - onShareAppMessage: function () {
  160 + onShareAppMessage: function () { getApp().globalData.no_clear=1
161 161  
162 162 },
163 163  
... ...
packageA/pages/distribution/order/order.js
... ... @@ -141,7 +141,7 @@ Page({
141 141 /**
142 142 * 用户点击右上角分享
143 143 */
144   - onShareAppMessage: function () {
  144 + onShareAppMessage: function () { getApp().globalData.no_clear=1
145 145  
146 146 },
147 147  
... ...
packageA/pages/distribution/rank/rank.js
... ... @@ -151,7 +151,7 @@ Page({
151 151 /**
152 152 * 用户点击右上角分享
153 153 */
154   - onShareAppMessage: function () {
  154 + onShareAppMessage: function () { getApp().globalData.no_clear=1
155 155  
156 156 },
157 157  
... ...
packageA/pages/distribution/rookie/rookie.js
... ... @@ -112,7 +112,7 @@ Page({
112 112 /**
113 113 * 用户点击右上角分享
114 114 */
115   - onShareAppMessage: function () {
  115 + onShareAppMessage: function () { getApp().globalData.no_clear=1
116 116  
117 117 },
118 118  
... ...
packageA/pages/distribution/shop/shop.js
... ... @@ -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 321 var th = this;
322 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 0 \ No newline at end of file
packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -8,7 +8,6 @@ var t = require(&quot;../../../utils/util.js&quot;),
8 8 oo = s.globalData,
9 9 o = s.globalData.setting,
10 10 os = o;
11   -
12 11 let self = null;
13 12  
14 13 //评价加载更多
... ... @@ -51,7 +50,7 @@ Page({
51 50 supportPageScroll: !1,
52 51 address: {
53 52 address: "",
54   - district: 0,
  53 + district: 0
55 54 },
56 55 shipping: "",
57 56 shippingCost: 0,
... ... @@ -200,17 +199,15 @@ Page({
200 199 sales_rules:1, //默认是线上销售
201 200  
202 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 210 prom_r_null: 0,
212   -
213   - hiddenCS: true, //控制客服操作菜单显示和控制
214 211 },
215 212  
216 213 //------初始化加载----------
... ... @@ -264,10 +261,10 @@ Page({
264 261 first_leader=gid_str[1];
265 262 }
266 263 //-- 如果有room_id的获取 --
267   - if(gid_str.length>2 && gid_str[2]) {
  264 + if(gid_str.length>2 && gid_str[2]){
268 265 room_id=gid_str[2];
269 266 room_user_share=1;
270   - };
  267 + }
271 268 };
272 269  
273 270 ee.setData({ gid: gid});
... ... @@ -312,7 +309,7 @@ Page({
312 309 is_show_gb: 1
313 310 });
314 311 }
315   - // console.log(e);
  312 + console.log(e);
316 313 var json_d = JSON.parse(e.switch_list);
317 314 ee.setData({
318 315 store_config: e,
... ... @@ -321,7 +318,6 @@ Page({
321 318 is_newsales_rules: json_d.is_newsales_rules
322 319 });
323 320 ee.init(gid);
324   -
325 321 //------几人评价-------
326 322 //n.init(th, "", "comments");
327 323  
... ... @@ -374,7 +370,7 @@ Page({
374 370  
375 371 //获取用户的默认门店
376 372 getApp().get_user_store(function(e) {
377   - if(!e) {
  373 + if(!e) {
378 374 th.data.fir_def_store={}; //赋值空对象
379 375 return false;
380 376 }
... ... @@ -435,7 +431,7 @@ Page({
435 431 appd.lat=that.data.lat;
436 432 appd.lon=that.data.lon;
437 433  
438   - } else {
  434 + }else{
439 435 if (e) {
440 436 e.distance = null;
441 437 that.data.fir_def_store=e;
... ... @@ -460,7 +456,7 @@ Page({
460 456  
461 457 setTimeout(()=>{
462 458 wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => {
463   -
  459 + // console.log('node@@@@@@@', res);
464 460 if(res.length != 0) {
465 461 this.setData({
466 462 showFold: res[0].height < res[1].height,
... ... @@ -521,9 +517,7 @@ Page({
521 517  
522 518 if(prom_type) { // 进入商品详情页地址传参有带goods_id、prom_type、prom_id参数, 即从秒杀入口进入
523 519 let prom_id = this.data.options.prom_id;
524   - // 检查活动是否开始
525 520 this.check_prom(goods_id, prom_type, prom_id);
526   -
527 521 } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数
528 522 getApp().request.promiseGet('/api/weshop/activitylist/getGoodActInfo', {
529 523 data: {
... ... @@ -543,16 +537,20 @@ Page({
543 537 let prom_id = result[0].act_id;
544 538 this.setData({
545 539 'options.prom_type': prom_type,
546   - 'options.prom_id': prom_id,
547 540 });
548   - // 检查活动是否开始
549 541 this.check_prom(goods_id, prom_type, prom_id);
550 542 } else if(resLength > 1) { //如果数组长度大于1,表示当前商品参加多个活动,以列表形式显示多活动
551 543 this.setData({
552 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 669  
672 670  
673 671  
  672 +
  673 +
674 674  
675 675 i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, {
676 676 failRollback: !0,
... ... @@ -700,7 +700,6 @@ Page({
700 700 that.setData({
701 701 'data.goods_name': t.data.data.serviceName,
702 702 'data.shop_price': t.data.data.money,
703   - 'data.show_price': t.data.data.show_price,
704 703 'data.validDays': t.data.data.validDays,
705 704 'data.serviceContent': t.data.data.serviceContent,
706 705 'data.image_url': t.data.data.imgUrl,
... ... @@ -745,9 +744,6 @@ Page({
745 744 };
746 745 }
747 746 });
748   -
749   -
750   -
751 747 this.data.enterAddressPage && (this.data.enterAddressPage = !1);
752 748 this.get_sto();
753 749  
... ... @@ -819,23 +815,8 @@ Page({
819 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 821 addCart: function(t) {
841 822 if(this.data.goodsInputNum == 0) {
... ... @@ -852,10 +833,11 @@ Page({
852 833 open_ind_store: ind
853 834 });
854 835  
855   - if(!th.data.sto_sele_name) {
  836 + if(!th.data.sto_sele_name){
856 837 getApp().my_warnning('请选择门店', 1, th, 450);
857 838 return false;
858 839 }
  840 +
859 841  
860 842  
861 843  
... ... @@ -910,6 +892,7 @@ Page({
910 892  
911 893  
912 894  
  895 +
913 896  
914 897 if(action=="buy"){
915 898 //--------------此时操作的数据------------
... ... @@ -927,20 +910,12 @@ Page({
927 910 newd['prom_type'] = this.data.prom_type;
928 911 newd['prom_id'] = this.data.prom_id;
929 912 newd['prom_price'] = this.data.prom_price;
930   - };
931   -
932   - if(this.data.prom_act.is_shop_buy) {
933   - newd['prom_type'] = 0;
934   - newd['prom_price'] = this.data.data.shop_price;
935   - };
  913 + }
936 914  
937 915 // console.log('newd++++++++', newd);
938 916 th.buyNow(newd);
939 917 } else {
940   -
941   -
942   -
943   -
  918 +
944 919 var newd = {
945 920 service_id: th.data.data.id,
946 921 service_sn:th.data.data.service_sn,
... ... @@ -951,7 +926,7 @@ Page({
951 926 store_id:os.stoid,
952 927 money:th.data.data.shop_price
953 928 };
954   - if(getApp().globalData.guide_id) {
  929 + if(getApp().globalData.guide_id){
955 930 newd['guide_id'] = getApp().globalData.guide_id;
956 931 newd['guide_type']=0;
957 932 }
... ... @@ -1011,16 +986,14 @@ Page({
1011 986 }
1012 987  
1013 988  
1014   -
1015   -
1016 989 },
1017 990  
1018 991 //----------立即购买-----------
1019 992 buyNow: function(e) {
1020   - getApp().globalData.service_now=e;
1021   - wx.redirectTo({
1022   - url: "/packageA/pages/cart2_ser/cart2_ser",
1023   - });
  993 + getApp().globalData.service_now=e;
  994 + wx.redirectTo({
  995 + url: "/packageA/pages/cart2_ser/cart2_ser",
  996 + });
1024 997 },
1025 998 //----------增加购买数量-----------
1026 999 addCartNum: function(t) {
... ... @@ -1037,108 +1010,9 @@ Page({
1037 1010  
1038 1011 //------检查数量是不是超出限购------
1039 1012 checkCartNum: function(t) {
1040   -
1041   - var th = this;
1042   -
1043   - // if(this.data.prom_act.is_shop_buy && this.data.options.prom_type != 1) {
1044   - // if(th.data.is_normal) {
1045   -
1046   - if(t<=0) return false;
1047   - th.setData({goodsInputNum:t});
1048   - // } else {
1049   -
1050   - if(this.data.options.prom_type == 1 && !this.data.openSpecModal_flash_normal) {
1051   -
1052   - this.get_buy_num(this.data.sele_g, async function () {
1053   - th.data.sele_g.viplimited = th.data.sele_g.buy_limit;
1054   -
1055   - //--判断商品是否超出限购--
1056   - // if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) {
1057   - if(!th.data.prom_act.is_shop_buy) {
1058   -
1059   - if (th.data.sele_g.viplimited > 0) {
1060   - var gd_buy_num = th.data.sele_g.buy_num;
1061   -
1062   - if (t + gd_buy_num> th.data.sele_g.viplimited) {
1063   - wx.showModal({
1064   - title: '超出商品限购',
1065   - });
1066   -
1067   - var num = th.data.sele_g.viplimited - gd_buy_num;
1068   - if (num < 0) num = 0;
1069   - th.setData({goodsInputNum: num})
1070   - return false;
1071   - }
1072   - }
1073   -
1074   - };
1075   -
1076   -
1077   - //如果是普通购买的情况下
1078   - if(th.data.openSpecModal_flash_normal) th.data.is_normal=1;
1079   -
1080   - //--判断商品是否超出活动限购--
1081   - if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && !th.data.is_normal) {
1082   - if (t + th.data.prom_buy_num > th.data.prom_buy_limit) {
1083   - wx.showModal({
1084   - title: '超出商品活动限购',
1085   - });
1086   -
1087   - var num = th.data.prom_buy_limit - th.data.prom_buy_num;
1088   - if (num < 0) num = 0;
1089   - th.setData({goodsInputNum: num})
1090   - return false;
1091   - }
1092   - }
1093   -
1094   - if (th.data.sele_g.prom_type == 1 && !th.data.is_normal) {
1095   - var redis_num = 0;
1096   - //------判断活动是否抢光-----
1097   - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
1098   - os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, {
1099   - 1: 1
1100   - }).then(res => {
1101   - redis_num = res.data.data;
1102   - });
1103   -
1104   - if (t > redis_num) {
1105   - wx.showModal({
1106   - title: '超出商品活动库存',
1107   - });
1108   - th.setData({goodsInputNum: redis_num})
1109   - return false;
1110   - }
1111   - }
1112   - var e = th.data.sele_g.store_count;
1113   - var p_type = th.data.prom_type; //&& p_type!=1 && p_type!=4
1114   - 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)) {
1115   - if (!th.data.def_pick_store) {
1116   - wx.showModal({title: '请选择门店',});
1117   - return false;
1118   - } else {
1119   - e = th.data.def_pick_store.CanOutQty;
1120   - }
1121   - }
1122   - if (!e) e = 0;
1123   - //库存不足,不增加
1124   - if (e < t) {
1125   - wx.showModal({title: '库存不足',});
1126   - if (e < 0) e = 0;
1127   - th.setData({goodsInputNum: e});
1128   - return false;
1129   - }
1130   - t > e || 0 == e ? t = e : t < 1 && (t = 1);
1131   - th.setData({goodsInputNum: t});
1132   - // th.is_show_more_buy();
1133   -
1134   - })
1135   -
1136   - };
1137   -
1138   -
1139   -
1140   -
1141   -
  1013 + if(t<=0) return false;
  1014 + var th = this;
  1015 + th.setData({goodsInputNum:t})
1142 1016 },
1143 1017  
1144 1018  
... ... @@ -1150,6 +1024,7 @@ Page({
1150 1024 },
1151 1025  
1152 1026 openSpecModel: function(t) {
  1027 + // console.log('****ttttttt***', t);
1153 1028 var th=this;
1154 1029 var open_store = t.currentTarget.dataset.ind;
1155 1030 this.setData({
... ... @@ -1230,6 +1105,7 @@ Page({
1230 1105 });
1231 1106 }
1232 1107 }
  1108 +<<<<<<< HEAD
1233 1109 },
1234 1110 //---------联系客服------------
1235 1111 contactService: function () {
... ... @@ -1282,6 +1158,14 @@ Page({
1282 1158 });
1283 1159 });
1284 1160 },
  1161 +=======
  1162 + },
  1163 +
  1164 + //---------联系客服------------
  1165 + contactService: function() {
  1166 + getApp().con_Service();
  1167 + },
  1168 +>>>>>>> 6cc9871992b5529c4963f34338001ebc04f1af34
1285 1169 //-------获取购物车数量----------
1286 1170 requestCardNum: function() {
1287 1171 var t = this;
... ... @@ -1323,6 +1207,7 @@ Page({
1323 1207  
1324 1208 //--点击分享事件---
1325 1209 onShareAppMessage: function(t) {
  1210 + getApp().globalData.no_clear=1;
1326 1211  
1327 1212 var th = this;
1328 1213 var price = th.data.data.shop_price;
... ... @@ -2776,10 +2661,7 @@ Page({
2776 2661 },
2777 2662  
2778 2663 previewImage() {
2779   - wx.previewImage({
2780   - //将图片预览出来
2781   - urls: [this.data.shareImgPath]
2782   - });
  2664 + getApp().pre_img(this.data.shareImgPath);
2783 2665 },
2784 2666  
2785 2667 onShareTimeline() {
... ... @@ -2803,13 +2685,7 @@ Page({
2803 2685  
2804 2686 //---------联系微信客服------------
2805 2687 con_weixin:function () {
2806   - var url=this.data.sys_switch.weapp_customertype_url;
2807   - var id=this.data.sys_switch.weapp_customertype_appid;
2808   - wx.openCustomerServiceChat({
2809   - extInfo: {url: url},
2810   - corpId: id,
2811   - success(res) {}
2812   - })
  2688 + getApp().con_wx(this)
2813 2689 },
2814 2690  
2815 2691 //评论的调用
... ... @@ -3006,10 +2882,9 @@ Page({
3006 2882 // b[i] = this.data.iurl + e[i];
3007 2883 // }
3008 2884 this.data.show_prew_img = 1;
3009   - wx.previewImage({
3010   - current: b[t.currentTarget.dataset.id],
3011   - urls: b
3012   - });
  2885 + //调用预览图片
  2886 + getApp().pre_img2(b,t);
  2887 +
3013 2888 },
3014 2889  
3015 2890  
... ... @@ -3133,45 +3008,38 @@ Page({
3133 3008 },
3134 3009  
3135 3010  
3136   - //获取redis中的数量
3137   - async getactLen(func) {
3138   - var r_num = 0,
3139   - prom_type = this.data.prom_type,
3140   - prom_id = this.data.prom_id;
3141   - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
3142   - 1: 1
3143   - }).then(res => {
3144   - var em = res;
3145   - if (em.data.code == 0) {
3146   - r_num = em.data.data;
3147   - }
3148   - })
3149   - func(r_num);
3150   - },
3151   -
3152   -
3153 3011  
3154 3012  
3155 3013 //--------检查是否活动,活动是否开始,或者是否结束-------
3156 3014 async check_prom(gid, prom_type, prom_id) {
  3015 + console.log('check_prom');
3157 3016 var ee = this, th = ee;
3158 3017 var user_id = getApp().globalData.user_id;
3159 3018 if (!user_id) user_id = 0;
3160   -
3161   - if (prom_type == 1 && prom_id == 0) {
3162   - // this.setData({
3163   - // prom_type: 0, isshow: 1,
3164   - // });
3165   -
3166   - // //获取门店
3167   - // this.get_sto();
3168   - // this.get_sku(o.stoid, this.data.data, gid);
3169   - // this.check_has_flash();
3170   - // this.data.is_normal = 1;
3171   - // this.check_is_youhui(gid, 1);
3172   - // return false;
3173   - }
3174 3019  
  3020 + // if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9 || prom_type == 10) {
  3021 + // this.setData({
  3022 + // prom_type: 0, isshow: 1,
  3023 + // });
  3024 + // return false;
  3025 + // }
  3026 +
  3027 +
  3028 +
  3029 + // if (prom_type == 1 && prom_id == 0) {
  3030 + // this.setData({
  3031 + // prom_type: 0, isshow: 1,
  3032 + // });
  3033 +
  3034 + // //获取门店
  3035 + // this.get_sto();
  3036 + // this.get_sku(o.stoid, this.data.data, gid);
  3037 + // this.check_has_flash();
  3038 + // this.data.is_normal = 1;
  3039 + // this.check_is_youhui(gid, 1);
  3040 + // return false;
  3041 + // }
  3042 +
3175 3043 //if (prom_type != 3 && prom_type!=0){
3176 3044 //---判断秒杀----
3177 3045 if (prom_type == 1 && prom_id > 0) {
... ... @@ -3180,23 +3048,15 @@ Page({
3180 3048 1: 1
3181 3049 }).then(res => {
3182 3050 var em = res;
3183   - if (em.data.code == 0) {
3184   -
3185   - if (em.data.data <= 0) {
3186   - th.setData({
3187   - prom_r_null: 1,
3188   - goodsInputNum: res.data.data,
3189   - });
3190   -
3191   - // th.setData({goodsInputNum: redis_num})
3192   - };
  3051 + if (res.data.code == 0) {
  3052 + // console.log('!!!!!!res!!!!', res);
  3053 + if (res.data.data <= 0) ee.setData({
  3054 + prom_r_null: 1
  3055 + });
3193 3056 //拿取价格并且判断时间--
3194 3057 getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {
3195 3058 success: function (t) {
3196   - th.setData({
3197   - sele_g: t.data.data,
3198   - });
3199   -
  3059 + // console.log('!!!!!!t!!!!', t);
3200 3060 if (t.data.code != 0) {
3201 3061 ee.get_normal(gid);
3202 3062 return false;
... ... @@ -3223,6 +3083,7 @@ Page({
3223 3083 var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
3224 3084  
3225 3085 ee.setData({
  3086 + 'data.shop_price': t.data.data.user_price,
3226 3087 prom_price: t.data.data.user_price,
3227 3088 prom_type: 1,
3228 3089 prom_id: prom_id,
... ... @@ -3240,6 +3101,7 @@ Page({
3240 3101 if (endTime1 > newTime) {
3241 3102 ee.setData({
3242 3103 prom_time_text: '距秒杀开始还有',
  3104 + prom_st: 0,
3243 3105 })
3244 3106 ee.countDown(endTime1, 0);
3245 3107 } else {
... ... @@ -3253,60 +3115,60 @@ Page({
3253 3115 }
3254 3116  
3255 3117 //如果是进行中的话
3256   - if (endTime1 < newTime) {
3257   - //-- 获取秒杀活动的多少规格 --
3258   - ee.get_more_flahs(function (list) {
3259   - if (list && list.length > 1) {
3260   -
3261   - var n_item = list[0];
3262   - var ind = list.findIndex(function (ele) {
3263   - return ele.goods_id == ee.data.data.goods_id;
3264   - })
3265   - if (ind < 0) return false;
3266   - if (ind > 0) {
3267   - n_item = JSON.parse(JSON.stringify(list[ind]));
3268   - list.splice(ind, 1);
3269   - list.unshift(n_item);
3270   - }
3271   -
3272   - ee.data.sele_g.viplimited = n_item.viplimited;
3273   - ee.data.data.viplimited = n_item.viplimited;
3274   -
3275   - var gb = 1;
3276   - //-- 显示多规格 --
3277   - for (let i in list) {
3278   - let item = list[i];
3279   - var gg = "";
3280   - if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
3281   - if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
3282   -
3283   - if (item.goods_spec != "" && item.goods_color != "") {
3284   - gg = item.goods_spec + "/" + item.goods_color;
3285   - } else if (item.goods_spec != "" || item.goods_color != "") {
3286   - gg = item.goods_spec + item.goods_color;
3287   - } else {
3288   - gg = "规格" + gb;
3289   - gb++;
3290   - }
3291   - item.gg = gg;
3292   - item.prom_id = item.prom_id;
3293   - item.prom_type = 1;
3294   - }
3295   -
3296   - ee.setData({
3297   - sku_g: list,
3298   - });
3299   -
3300   - }
3301   - })
3302   - }
  3118 + // if (endTime1 < newTime) {
  3119 + // //-- 获取秒杀活动的多少规格 --
  3120 + // ee.get_more_flahs(function (list) {
  3121 + // if (list && list.length > 1) {
  3122 +
  3123 + // var n_item = list[0];
  3124 + // var ind = list.findIndex(function (ele) {
  3125 + // return ele.goods_id == ee.data.data.goods_id;
  3126 + // })
  3127 + // if (ind < 0) return false;
  3128 + // if (ind > 0) {
  3129 + // n_item = JSON.parse(JSON.stringify(list[ind]));
  3130 + // list.splice(ind, 1);
  3131 + // list.unshift(n_item);
  3132 + // }
  3133 +
  3134 + // ee.data.sele_g.viplimited = n_item.viplimited;
  3135 + // ee.data.data.viplimited = n_item.viplimited;
  3136 +
  3137 + // var gb = 1;
  3138 + // //-- 显示多规格 --
  3139 + // for (let i in list) {
  3140 + // let item = list[i];
  3141 + // var gg = "";
  3142 + // if (item.goods_spec == "null" || item.goods_spec == null) item.goods_spec = "";
  3143 + // if (item.goods_color == "null" || item.goods_color == null) item.goods_color = "";
  3144 +
  3145 + // if (item.goods_spec != "" && item.goods_color != "") {
  3146 + // gg = item.goods_spec + "/" + item.goods_color;
  3147 + // } else if (item.goods_spec != "" || item.goods_color != "") {
  3148 + // gg = item.goods_spec + item.goods_color;
  3149 + // } else {
  3150 + // gg = "规格" + gb;
  3151 + // gb++;
  3152 + // }
  3153 + // item.gg = gg;
  3154 + // item.prom_id = item.prom_id;
  3155 + // item.prom_type = 1;
  3156 + // }
  3157 +
  3158 + // ee.setData({
  3159 + // sku_g: list,
  3160 + // });
  3161 +
  3162 + // }
  3163 + // })
  3164 + // }
3303 3165  
3304 3166 }
3305 3167 });
3306 3168 }
3307 3169 })
3308 3170 }
3309   -
  3171 +
3310 3172 },
3311 3173  
3312 3174  
... ... @@ -3315,706 +3177,58 @@ Page({
3315 3177 let prom_type = e.currentTarget.dataset.promtype;
3316 3178 let prom_id = e.currentTarget.dataset.promid;
3317 3179 let goods_id = this.data.data.goods_id;
3318   - let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`;s
  3180 + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`;
  3181 + // console.log('url~~~~', url);
3319 3182 getApp().goto(url);
3320 3183 },
3321 3184  
3322 3185  
3323 3186  
3324   - //获取更多秒杀
3325   - get_more_flahs: async function (func) {
3326   - var f_more = false;
3327   - var user_id = getApp().globalData.user_id;
3328   - if (!user_id) user_id = 0;
3329   -
3330   - var url = "/api/weshop/goods/listSkuFlash?store_id=" + os.stoid + "&goods_id=" + this.data.data.goods_id + "&user_id=" + user_id;
3331   - //获取秒杀的多规格
3332   - await getApp().request.promiseGet(url, {}).then(res => {
3333   - if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
3334   - f_more = res.data.data;
3335   - }
3336   - })
3337   - if (!f_more) {
3338   - func(false);
3339   - return false;
3340   - }
3341   - //-- 秒杀的价格要更新 --
3342   - for (let i in f_more) {
3343   -
3344   - let item = f_more[i];
3345   - f_more[i].prom_id = item.act_id;
3346   - f_more[i].prom_type = 1;
3347   - if (item.goods_id == this.data.data.goods_id) {
3348   - continue;
3349   - }
3350   - var url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + item.act_id;
3351   - await getApp().request.promiseGet(url, {}).then(rs => {
3352   - if (rs.data.code == 0) {
3353   - f_more[i].price = rs.data.data.user_price;
3354   -
3355   - }
3356   - })
3357   - }
3358   - func(f_more);
3359   -
3360   - },
3361   -
3362   -
3363   -
3364   -
3365   -
3366   -
3367   - //-------------获取购买数量的总函数----------------
3368   - get_buy_num: function (gd, func) {
3369   -
3370   - var th = this,
3371   - user_id = getApp().globalData.user_id;
3372   -
3373   -
3374   - //----获取商品购买数----
3375   - getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", {
3376   - data: {
3377   - store_id: os.stoid,
3378   - user_id: user_id,
3379   - goods_id: this.data.gid,
3380   - },
3381   - success: function (t) {
3382   - if (t.data.code == 0) {
3383   - var g_buy_num = t.data.data.goodsbuynum;
3384   -
3385   - // 如果是秒杀的时候
3386   - // if (th.data.prom_type == 0 && gd.prom_type == 1) {
3387   - // gd.prom_type = 0;
3388   - // }
3389   -
3390   - //----获取活动购买数----
3391   - getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", {
3392   - data: {
3393   - store_id: os.stoid,
3394   - user_id: user_id,
3395   - goods_id: th.data.gid,
3396   - prom_type: th.data.prom_type,
3397   - prom_id: th.data.prom_id
3398   - },
3399   - //-----获取-----
3400   - success: function (tt) {
3401   - if (tt.data.code == 0) {
3402   - th.setData({
3403   - prom_buy_num: tt.data.data.goodsbuynum,
3404   - });
3405   - "function" == typeof func && func();
3406   - }
3407   - }
3408   - });
3409   -
3410   -
3411   - }
3412   - },
3413   - });
3414   - },
3415   -
3416   -
3417   -
3418   -
3419   -
3420   - // 促销 -> 送礼包 -> 查看详情
3421   - viewLbDetails(e) {
3422   - let id = e.currentTarget.dataset.id; // 获取礼包id
3423   - let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮
3424   - // console.log('myurl', url);
3425   - getApp().goto(url);
3426   - },
3427   -
3428   - go_more_ladder: function (e) {
3429   - var prom_id = e.currentTarget.dataset.id;
3430   - getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id);
3431   - },
3432 3187  
3433   - getHistoryBuy() {
3434   - let _this = this;
3435   - let req_data = {
3436   - store_id: os.stoid,
3437   - goods_id: this.data.gid,
3438   - pay_status: 1,
3439   - rndid: 1
3440   - };
3441   - getApp().request.promiseGet('/api/weshop/ordergoods/list', {
3442   - data: req_data,
3443   - })
3444   - .then(res => {
3445   - if (t.ajax_ok(res)) {
3446   - _this.setData({
3447   - historyBuyInfo: res.data.data.pageData,
3448   - })
3449   - }
3450   - })
3451   - },
3452   -
3453   -
3454   -
3455   - //-- 秒杀的普通购买 --
3456   - openSpecModel_Nor: function () {
3457   - this.data.g_buy_num = new Map();
  3188 + //-- 检验商品的活动情况 --
  3189 + check_gd_prom_new: function (func) {
3458 3190 var th = this;
3459   - this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4
3460   -
3461   - this.setData({openSpecModal_flash_normal: 1});
3462   -
3463   -
3464   - // if (th.data.sku_g_pt) {
3465   - // // this.get_sto(1)
3466   - // this.setData({openSpecModal_flash_normal: 1});
3467   - // } else {
3468   - // th.get_sto(1);
3469   - // th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () {
3470   - // th.setData({
3471   - // openSpecModal_flash_normal: 1
3472   - // });
3473   - // });
3474   - // }
3475   - // this.check_is_youhui(th.data.gid, 1);
3476   - },
3477   -
3478   - closeSpecModal_flash_normal: function () {
3479   - this.setData({openSpecModal_flash_normal: 0});
3480   - },
3481   -
3482   -
3483   - //打开客服操作菜单
3484   - openCS() {
3485   - // csType/在线客服设置:
3486   - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
3487   - // 1小程序客服、
3488   - // 2企业微信客服
3489   - let csType = this.data.sys_switch.weapp_customertype;
3490   - if(csType == 0) {
3491   - // 获取电话号码
3492   - this.contactService();
3493   - } else {
3494   - this.getTel()
3495   - .then(() => {
3496   - self.setData({
3497   - hiddenCS: false,
3498   - });
3499   - });
3500   -
3501   - };
3502   - },
3503   -
3504   - //关闭客服操作菜单
3505   - closeCS() {
3506   - this.setData({
3507   - hiddenCS: true,
3508   - });
3509   - },
3510   -
3511   -
3512   -
3513   -
3514   -
3515   -
3516   -
3517   - //-- 加入购物的函数 --
3518   - add_cart_func: function (t) {
3519   - var i = getApp().request;
3520   - if (oo.user_id == null) {
3521   - return s.my_warnning("还未登录!", 0, this);
3522   - }
  3191 + var user_id = getApp().globalData.user_id;
  3192 + if (!user_id) user_id = 0;
3523 3193  
3524   - if (!getApp().globalData.userInfo) {
3525   - return s.my_warnning("还未登录!", 0, this);
  3194 + var url = '/api/weshop/activitylist/listGoodActInfo2';
  3195 + var req_d = {
  3196 + "store_id": os.stoid,
  3197 + "goods_id": this.data.gid,
  3198 + "user_id": user_id,
3526 3199 }
3527   -
3528   - var e = this,
3529   - th = e,
3530   - a = 0,
3531   - o = this.data.sele_g;
3532   - a = o.goods_id;
3533   -
3534   - //----------添加到购物车时,要判断限购数量,--------
3535   - e.get_buy_num(o, function (ee) {
3536   - //---判断商品是否超出限购---
3537   - if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) {
3538   - if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) {
3539   - wx.showModal({
3540   - title: '提示',
3541   - content: '超出商品限购'
3542   - });
3543   - return false;
3544   - }
3545   - }
3546   - //---判断商品是否超出活动限购---
3547   - if ((th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) && !th.data.is_normal) {
3548   - if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) {
3549   - wx.showModal({
3550   - title: '提示',
3551   - content: '超出商品活动限购'
3552   - });
3553   - return false;
3554   - }
3555   - }
3556   -
3557   - if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th);
3558   - if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined)
3559   - this.setData({
3560   - sto_sele_name: ""
3561   - });
3562   - if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th);
3563   -
3564   - //--------------此时操作的数据------------
3565   - var newd = {
3566   - goods_id: o.goods_id,
3567   - goods_num: th.data.goodsInputNum,
3568   - pick_id: th.data.sto_sele_id,
3569   - user_id: oo.user_id,
3570   - store_id: th.data.stoid,
3571   - goods_price: o.shop_price,
3572   - member_goods_price: o.shop_price,
3573   - goods_name: o.goods_name,
3574   - goods_sn: o.goods_sn,
3575   - sku: o.sku,
3576   - prom_id: th.data.sele_g.prom_id,
3577   - prom_type: th.data.sele_g.prom_type,
3578   - };
3579   -
3580   - //---是不是从收藏夹出来的---
3581   - if (th.data.c_guide_id) {
3582   - newd['guide_id'] = th.data.c_guide_id;
3583   - newd['guide_type'] = 2;
3584   - if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3;
3585   - } else {
3586   - if (getApp().globalData.guide_id) {
3587   - newd['guide_id'] = getApp().globalData.guide_id;
3588   - newd['guide_type'] = 0;
3589   - if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1;
3590   - }
3591   - }
3592   -
3593   - //让商品带上房间号
3594   - //让商品带上房间号
3595   - if (th.data.sys_switch.is_skuroom_id == 1) {
3596   - if (th.data.data.goods_id == getApp().globalData.room_goods_id) {
3597   - newd.room_id = getApp().globalData.room_id;
3598   - }
3599   - } else {
3600   - if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id;
3601   - }
3602   -
3603   - //如果是积分够,is_integral_normal就要有积分购普通购买字段
3604   - if (o.prom_type == 4) {
3605   - newd.is_integral_normal = 1;
3606   - }
3607   -
3608   - //如果有线下取价
3609   - if (o.offline_price) {
3610   - newd.offline_price = o.offline_price;
3611   - newd.pricing_type = o.pricing_type;
3612   - }
3613   -
3614   - //-----如果是秒杀,团购,积分购,拼团-----
3615   - if (th.data.prom_type == 1 || th.data.prom_type == 2) {
3616   -
3617   - if (th.data.openSpecModal_flash_normal) {
3618   -
3619   - newd.prom_type = 0;
3620   - newd.prom_id = 0;
3621   -
3622   - //---如果是线下门店销售的时候---
3623   - if (th.data.sales_rules == 2) {
3624   - var pick = th.get_pick_from_list(th.data.sto_sele_id)
3625   - //---通过接口获取门店的线下库存信息--
3626   - getApp().request.get("/api/weshop/goods/getWareStorages", {
3627   - data: {
3628   - storageNos: pick.pickup_no,
3629   - wareIds: encodeURIComponent(th.data.sele_g.erpwareid),
3630   - storeId: os.stoid
3631   - },
3632   - success: function (res) {
3633   - if (res.data.code == 0) {
3634   - if (res.data.data.pageData.length > 0) {
3635   - var CanOutQty = res.data.data.pageData[0].CanOutQty;
3636   - if (CanOutQty < e.data.goodsInputNum) {
3637   - return s.my_warnning("库存不足!", 0, th);
3638   - }
3639   - //在调一次接口,读取商品的预出库的数量,lock
3640   - getApp().request.get("/api/weshop/order/ware/lock/page", {
3641   - data: {
3642   - store_id: os.stoid,
3643   - wareId: th.data.sele_g.goods_id,
3644   - storageId: pick.pickup_id,
3645   - pageSize: 1000
3646   - },
3647   - success: function (res_data) {
3648   - if (res_data.data.code == 0 && res_data.data.data.total > 0) {
3649   -
3650   - var lock = 0;
3651   - for (var i in res_data.data.data.pageData) {
3652   - lock += res_data.data.data.pageData[i].outQty;
3653   - }
3654   -
3655   - if (CanOutQty <= lock) {
3656   - return s.my_warnning("库存不足!", 0, th);
3657   - }
3658   - th.add_cart_next(e, t, a, o, newd, CanOutQty - lock);
3659   - } else {
3660   - th.add_cart_next(e, t, a, o, newd, CanOutQty);
3661   - }
3662   - }
3663   - })
3664   - } else {
3665   - return s.my_warnning("库存不足!", 0, th);
3666   - }
3667   -
3668   - }
3669   - }
3670   - })
3671   - } else {
3672   - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th);
3673   - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th);
3674   - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
3675   - }
3676   -
3677   - return false;
3678   - }
3679   -
3680   -
3681   - newd.goods_price = th.data.prom_price;
3682   - newd.member_goods_price = th.data.prom_price,
3683   - newd.prom_type = th.data.prom_type;
3684   - newd.prom_id = th.data.prom_id;
3685   -
3686   - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th);
3687   - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th);
3688   -
3689   - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
3690   -
3691   - } else if (o.prom_type == 7) {
3692   -
3693   - //判断进行中的活动,是不是要判断线下库存
3694   - th.check_zh_acting(function (ee) {
3695   - newd.prom_id = 0;
3696   - newd.prom_type = 0;
3697   - if (ee && th.data.sele_g.act) {
3698   - newd.prom_id = th.data.sele_g.act.id;
3699   - newd.prom_type = 7;
3700   - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th);
3701   - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th);
3702   - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
3703   - return false;
3704   - } else {
3705   - //---如果是线下门店销售的时候---
3706   - if (th.data.sales_rules == 2) {
3707   - var pick = th.get_pick_from_list(th.data.sto_sele_id)
3708   - //---通过接口获取门店的线下库存信息--
3709   - getApp().request.get("/api/weshop/goods/getWareStorages", {
3710   - data: {
3711   - storageNos: pick.pickup_no,
3712   - wareIds: encodeURIComponent(th.data.sele_g.erpwareid),
3713   - storeId: os.stoid
3714   - },
3715   - success: function (res) {
3716   - if (res.data.code == 0) {
3717   - if (res.data.data.pageData.length > 0) {
3718   - var CanOutQty = res.data.data.pageData[0].CanOutQty;
3719   - if (CanOutQty < e.data.goodsInputNum) {
3720   - return s.my_warnning("库存不足!", 0, th);
3721   - }
3722   - //在调一次接口,读取商品的预出库的数量,lock
3723   - getApp().request.get("/api/weshop/order/ware/lock/page", {
3724   - data: {
3725   - store_id: os.stoid,
3726   - wareId: th.data.sele_g.goods_id,
3727   - storageId: pick.pickup_id,
3728   - pageSize: 1000
3729   - },
3730   - success: function (res_data) {
3731   - if (res_data.data.code == 0 && res_data.data.data.total > 0) {
3732   -
3733   - var lock = 0;
3734   - for (var i in res_data.data.data.pageData) {
3735   - lock += res_data.data.data.pageData[i].outQty;
3736   - }
3737   -
3738   - if (CanOutQty <= lock) {
3739   - return s.my_warnning("库存不足!", 0, th);
3740   - }
3741   - th.add_cart_next(e, t, a, o, newd, CanOutQty - lock);
3742   - } else {
3743   - th.add_cart_next(e, t, a, o, newd, CanOutQty);
3744   - }
3745   - }
3746   - })
3747   - } else {
3748   - return s.my_warnning("库存不足!", 0, th);
3749   - }
3750   -
3751   - }
3752   - }
3753   - })
3754   - } else {
3755   - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th);
3756   - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th);
3757   - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
3758   - }
3759   - }
3760   - })
3761   -
3762   - }
3763   - 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) {
3764   - newd.prom_type = 0;
3765   - newd.prom_id = 0;
3766   -
3767   - if (th.data.prom_type == 10) {
3768   - newd.prom_type = th.data.prom_type;
3769   - newd.prom_id = th.data.prom_id;
3770   - }
3771   -
3772   - //---如果是线下门店销售的时候---
3773   - if (th.data.sales_rules == 2) {
3774   - var pick = th.get_pick_from_list(th.data.sto_sele_id)
3775   - //---通过接口获取门店的线下库存信息--
3776   - getApp().request.get("/api/weshop/goods/getWareStorages", {
3777   - data: {
3778   - storageNos: pick.pickup_no,
3779   - wareIds: encodeURIComponent(th.data.sele_g.erpwareid),
3780   - storeId: os.stoid
3781   - },
3782   - success: function (res) {
3783   - if (res.data.code == 0) {
3784   - if (res.data.data.pageData.length > 0) {
3785   - var CanOutQty = res.data.data.pageData[0].CanOutQty;
3786   - if (CanOutQty < e.data.goodsInputNum) {
3787   - return s.my_warnning("库存不足!", 0, th);
3788   - }
3789   - //在调一次接口,读取商品的预出库的数量,lock
3790   - getApp().request.get("/api/weshop/order/ware/lock/page", {
3791   - data: {
3792   - store_id: os.stoid,
3793   - wareId: th.data.sele_g.goods_id,
3794   - storageId: pick.pickup_id,
3795   - pageSize: 1000
3796   - },
3797   - success: function (res_data) {
3798   - if (res_data.data.code == 0 && res_data.data.data.total > 0) {
3799   -
3800   - var lock = 0;
3801   - for (var i in res_data.data.data.pageData) {
3802   - lock += res_data.data.data.pageData[i].outQty;
3803   - }
3804   -
3805   - if (CanOutQty <= lock) {
3806   - return s.my_warnning("库存不足!", 0, th);
3807   - }
3808   - th.add_cart_next(e, t, a, o, newd, CanOutQty - lock);
3809   - } else {
3810   - th.add_cart_next(e, t, a, o, newd, CanOutQty);
3811   - }
3812   - }
3813   - })
3814   - } else {
3815   - return s.my_warnning("库存不足!", 0, th);
3816   - }
3817   -
3818   - }
3819   - }
  3200 + getApp().request.get(url, {
  3201 + data: req_d,
  3202 + success: function (e) {
  3203 + if (e.data.code == 0 && e.data.data && e.data.data.length > 0) {
  3204 + var arr = e.data.data;
  3205 + var arr2 = arr.filter(function (e) {
  3206 + return e.s_time < ut.gettimestamp();
3820 3207 })
3821   - } else {
3822   - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th);
3823   - if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th);
3824   - th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
3825   - }
3826   - }
3827   - })
3828   - },
3829   -
3830   - //---加入购物车的最后一步---
3831   - add_cart_next(e, t, a, o, newd, CanOutQty) {
3832   - var th = this, i = getApp().request;
3833   - //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------
3834   - 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)) {
3835   - var conf = th.data.bconfig;
3836   - if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) {
3837   - var s_list = JSON.parse(conf.switch_list);
3838   - var now = ut.gettimestamp();
3839   -
3840   -
3841   - var str = getApp().globalData.userInfo['card_expiredate'].replace(/-/g, '/');
3842   - var end = new Date(str);
3843   - end = Date.parse(end) / 1000;
3844   -
3845   - //--如果后台有开启等级价的功能,而且会员的等级没有过期的情况下--
3846   - if (parseInt(s_list.rank_switch) == 2 && end > now) {
3847   - var card_price = o[getApp().globalData.userInfo['card_field']];
3848   - //如果会员有等级价
3849   - if (getApp().globalData.userInfo['card_field'] != undefined && getApp().globalData.userInfo['card_field'] != null
3850   - && getApp().globalData.userInfo['card_field'] != "" && card_price > 0) {
3851   - newd.goods_price = card_price;
3852   - newd.member_goods_price = card_price;
  3208 + //-- 如果只有一个活动的话 --
  3209 + if (arr.length == 1) {
  3210 + th.data.prom_type = arr[0].prom_type;
  3211 + th.data.prom_id = arr[0].act_id;
3853 3212 }
3854   - }
3855   - }
3856   - }
3857   -
3858   - //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d);
3859   - if ("add" == t.currentTarget.dataset.action) {
3860   -
3861   - if (th.data.prom_goods) {
3862   - newd.prom_type = 3;
3863   - newd.prom_id = th.data.prom_goods[0].prom_id;
3864   - }
3865   -
3866   - //----先看会员在购物车中是否加入了该商品-----
3867   - i.get("/api/weshop/cart/page", {
3868   - data: {
3869   - store_id: e.data.stoid,
3870   - user_id: oo.user_id,
3871   - goods_id: a,
3872   - pick_id: e.data.sto_sele_id,
3873   - state: 0
3874   - },
3875   - success: function (re) {
3876   -
3877   - //-------如果购物车中有相关的数据---------
3878   - if (re.data.data.total > 0) {
3879   -
3880   - var item = re.data.data.pageData[0];
3881   -
3882   - //判断数量,要看下购物车中有没有该商品
3883   - if (CanOutQty) {
3884   - if (item.goods_num + th.data.goodsInputNum > CanOutQty) {
3885   - return s.my_warnning("库存不足!", 0, th);
3886   - }
3887   - } else {
3888   - if (item.goods_num + th.data.goodsInputNum > o.store_count) {
3889   - return s.my_warnning("库存不足!", 0, th);
3890   - }
3891   - }
3892   -
3893   - var updata = {
3894   - id: item.id,
3895   - goods_num: e.data.goodsInputNum + item.goods_num,
3896   - goods_price: newd.goods_price,
3897   - member_goods_price: newd.goods_price,
3898   - store_id: th.data.stoid,
3899   - };
3900   -
3901   - //---是不是从收藏夹出来的---
3902   - if (th.data.c_guide_id) {
3903   - updata['guide_id'] = th.data.c_guide_id;
3904   - updata['guide_type'] = 3; //加入购物车之后就变成了3
3905   - } else {
3906   - if (getApp().globalData.guide_id) {
3907   - updata['guide_id'] = getApp().globalData.guide_id;
3908   - updata['guide_type'] = 0;
3909   - }
3910   - }
3911   -
3912   - i.put("/api/weshop/cart/update", {
3913   - data: updata,
3914   - success: function (t) {
3915   - getApp().my_warnning('加入购物车成功', 1, th, 450);
3916   - var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
3917   - th.setData({
3918   - cartGoodsNum: c_num
3919   - });
3920   - th.closeSpecModal();
3921   - }
3922   - });
3923   - } else {
3924   -
3925   -
3926   - i.post("/api/weshop/cart/save", {
3927   - data: newd,
3928   - success: function (t) {
3929   - getApp().my_warnning('加入购物车成功', 1, th, 450);
3930   - var c_num = th.data.cartGoodsNum + e.data.goodsInputNum;
3931   - th.setData({
3932   - cartGoodsNum: c_num
3933   - });
3934   - th.closeSpecModal();
3935   - }
3936   - });
  3213 + //-- 如果只有一个进行中的活动的话 --
  3214 + else if (arr2.length == 1) {
  3215 + th.data.prom_type = arr2[0].prom_type;
  3216 + th.data.prom_id = arr2[0].act_id;
3937 3217 }
3938 3218 }
3939   - });
3940   -
3941   - }
3942   - else {
3943   -
3944   - //这一步主要是要让立即购买 走 购物车的逻辑 参与活动
3945   - if (newd.prom_type == 10 || newd.prom_type == 7) {
3946   - //----先看会员在购物车中是否加入了该商品,立即购买的-----
3947   - getApp().request.get("/api/weshop/cart/page", {
3948   - data: {
3949   - store_id: e.data.stoid,
3950   - user_id: oo.user_id,
3951   - state: 1
3952   - },
3953   - success: function (res) {
3954   - //-------如果购物车中有相关的数据---------
3955   - if (res.data.code == 0 && res.data.data.total > 0) {
3956   - for (let j in res.data.data.pageData) {
3957   - let item_j = res.data.data.pageData[j];
3958   - var url = '/api/weshop/cart/del/' + e.data.stoid + '/' + item_j.id;
3959   - getApp().request.delete(url, {});
3960   - }
3961   - }
3962   - newd.state = 1;
3963   - getApp().request.post("/api/weshop/cart/save", {
3964   - data: newd,
3965   - success: function (t) {
3966   - th.closeSpecModal();
3967   - getApp().goto("/pages/cart/cart2/cart2?state=1");
3968   - }
3969   - });
3970   - }
3971   - })
3972   - return false;
  3219 + //-- 调用回调 --
  3220 + func();
3973 3221 }
3974   -
3975   - if (th.data.prom_goods) {
3976   - var prom_d = th.data.prom_goods;
3977   - for (var i in prom_d) {
3978   - //判断活动有俩种条件,0元 1件
3979   - var condition_t = prom_d[i].prom_type;
3980   - switch (condition_t) {
3981   - case 0: //按钱
3982   - if (newd.goods_price >= condition_t) {
3983   - newd.prom_type = 3;
3984   - newd.prom_id = prom_d[i].prom_id;
3985   - }
3986   - break
3987   - case 1://按购买数量
3988   - if (newd.goods_num >= condition_t) {
3989   - newd.prom_type = 3;
3990   - newd.prom_id = prom_d[i].prom_id;
3991   - }
3992   - break;
3993   - }
3994   - }
3995   -
3996   - }
3997   -
3998   - newd['pick_name'] = th.data.sto_sele_name;
3999   - newd['pick_dis'] = th.data.sto_sele_distr;
4000   - th.buyNow(newd);
4001   - }
  3222 + });
4002 3223 },
4003   -
4004   -
4005   -
4006   -
4007   -
4008 3224  
  3225 + click_contact:function () {
  3226 + getApp().globalData.no_clear=1;
  3227 + }
4009 3228  
4010 3229  
4011 3230  
4012 3231  
4013   -
4014   -
4015   -
4016   -
4017   -
4018 3232 });
4019 3233  
4020 3234  
... ...
packageA/pages/goodsInfo/goodsInfo.wxml
... ... @@ -101,8 +101,7 @@
101 101 <!-- 秒杀价 -->
102 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 105 <view class="goods-title">
107 106 <view class="goods-name elli">{{data.goods_name}}</view>
108 107 </view>
... ... @@ -507,7 +506,7 @@
507 506 <view class="join-cart jc_sb ai_c">
508 507  
509 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 510 session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
512 511 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
513 512 <view>客服</view>
... ... @@ -522,11 +521,6 @@
522 521 <view wx:else class="custom-service cart-ico new_split pdh20" bindtap="contactService" style="text-align: center">
523 522 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
524 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 524 </view>
531 525  
532 526 <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20">
... ... @@ -548,45 +542,44 @@
548 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 587 <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view>
595 588 <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view>
596 589 </block>
597   -
  590 +
  591 +
  592 +
598 593 </view>
599 594  
  595 +
  596 +
  597 +
  598 +
600 599 </view>
601 600  
602 601 <!-- 制作一个圆球导航 -->
... ... @@ -616,8 +615,7 @@
616 615 <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view>
617 616 <view class="flex ai_end xc-val-money">
618 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 619 </view>
622 620 </view>
623 621 </view>
... ... @@ -904,6 +902,7 @@
904 902 </view>
905 903 </view>
906 904 </view>
  905 +<<<<<<< HEAD
907 906  
908 907 <!-- 弹起来,购买预热商品的普通购买 -->
909 908 <view hidden="{{!openSpecModal_flash_normal}}">
... ... @@ -914,3 +913,5 @@
914 913 <include src="../../../components/com_servicer/com_servicer.wxml"/>
915 914  
916 915  
  916 +=======
  917 +>>>>>>> 6cc9871992b5529c4963f34338001ebc04f1af34
... ...
packageA/pages/goodsInfo/goodsInfo.wxss
... ... @@ -562,7 +562,7 @@ view.cart-btn-lg {
562 562 .spec-model {
563 563 position: fixed;
564 564 bottom: 0;
565   - z-index: 19;
  565 + z-index: 20;
566 566 background: white;
567 567 width: 100%;
568 568 /* padding: 0 30rpx; */
... ... @@ -2968,56 +2968,3 @@ button.custom-service::after{
2968 2968 left: -1000px;
2969 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 177 /**e
178 178 * 用户点击右上角分享
179 179 */
180   - onShareAppMessage: function () {
  180 + onShareAppMessage: function () {
  181 + getApp().globalData.no_clear=1;
181 182 var th = this;
182 183 var item=this.data.share_good;
183 184 var price = item.shop_price;
... ... @@ -732,10 +733,7 @@ Page({
732 733 })
733 734 return false;
734 735 }
735   - wx.previewImage({
736   - //将图片预览出来
737   - urls: [that.data.shareImgPath]
738   - });
  736 + getApp().pre_img(that.data.shareImgPath);
739 737 wx.hideLoading();
740 738 }
741 739 })
... ...
packageA/pages/hongBao/hongBao.js
... ... @@ -113,7 +113,7 @@ Page({
113 113 /**
114 114 * 用户点击右上角分享
115 115 */
116   - onShareAppMessage: function () {
  116 + onShareAppMessage: function () { getApp().globalData.no_clear=1
117 117  
118 118 },
119 119  
... ...
packageA/pages/hongBaoDetails/hongBaoDetails.js
... ... @@ -98,7 +98,7 @@ Page({
98 98 /**
99 99 * 用户点击右上角分享
100 100 */
101   - onShareAppMessage: function () {
  101 + onShareAppMessage: function () { getApp().globalData.no_clear=1
102 102  
103 103 },
104 104  
... ...
packageA/pages/jfbuy/jfbuy.js
... ... @@ -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 192 var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:'';
193 193  
194 194 var pagePath = this.route; //当前页面url
... ...
packageA/pages/liveStream/liveStream.js
... ... @@ -348,7 +348,7 @@ Page({
348 348 /**
349 349 * 用户点击右上角分享
350 350 */
351   - onShareAppMessage: function () {
  351 + onShareAppMessage: function () { getApp().globalData.no_clear=1;
352 352 if (res.from === 'button') {
353 353 // 来自页面内转发按钮
354 354 // console.log(res.target)
... ...
packageA/pages/liveStreamDetails/liveStreamDetails.js
... ... @@ -605,6 +605,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un
605 605 * 用户点击右上角分享
606 606 */
607 607 onShareAppMessage: function (res) {
  608 + getApp().globalData.clear=1;
608 609 this.setData({
609 610 showActionSheet: 'false'
610 611 })
... ...
packageA/pages/live_share/live_share.js
... ... @@ -71,7 +71,7 @@ Page({
71 71 /**
72 72 * 用户点击右上角分享
73 73 */
74   - onShareAppMessage: function () {
  74 + onShareAppMessage: function () { getApp().globalData.no_clear=1;
75 75 var th=this;
76 76 var id=th.data.hui_active.id;
77 77 var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + id + '&live=ing';
... ...
packageA/pages/myGift/myGift.js
... ... @@ -147,7 +147,7 @@ Page({
147 147 /**
148 148 * 用户点击右上角分享
149 149 */
150   - onShareAppMessage: function () {
  150 + onShareAppMessage: function () { getApp().globalData.no_clear=1
151 151  
152 152 },
153 153  
... ...
packageA/pages/myGiftDetails/myGiftDetails.js
... ... @@ -192,7 +192,7 @@ Page({
192 192 /**
193 193 * 用户点击右上角分享
194 194 */
195   - onShareAppMessage: function () {
  195 + onShareAppMessage: function () { getApp().globalData.no_clear=1
196 196  
197 197 },
198 198  
... ...
packageA/pages/my_service/beauty_deta.js
... ... @@ -394,6 +394,7 @@ Page({
394 394 previewImage: function(e) {
395 395 var th = this;
396 396 var current = e.currentTarget.dataset.src;
  397 + getApp().globalData.no_clear=1;
397 398 wx.previewImage({
398 399 current: current, // 当前显示图片的http链接
399 400 urls: [th.data.head_img] // 需要预览的图片http链接列表
... ...
packageA/pages/my_service2/beauty_deta.js
... ... @@ -394,6 +394,7 @@ Page({
394 394 previewImage: function(e) {
395 395 var th = this;
396 396 var current = e.currentTarget.dataset.src;
  397 + getApp().globalData.no_clear=1;
397 398 wx.previewImage({
398 399 current: current, // 当前显示图片的http链接
399 400 urls: [th.data.head_img] // 需要预览的图片http链接列表
... ...
packageA/pages/parseHtml/parseHtml.js
... ... @@ -320,7 +320,7 @@ Page({
320 320 /**
321 321 * 用户点击右上角分享
322 322 */
323   - onShareAppMessage: function () {
  323 + onShareAppMessage: function () { getApp().globalData.no_clear=1
324 324  
325 325 },
326 326  
... ...
packageA/pages/profile/profile.js
... ... @@ -875,6 +875,7 @@ Page({
875 875  
876 876 //--点击分享事件---
877 877 onShareAppMessage: function(t) {
  878 + getApp().globalData.no_clear=1
878 879 return o.share;
879 880 },
880 881  
... ...
packageA/pages/prom_list/prom_list.js
... ... @@ -711,6 +711,7 @@ Page({
711 711  
712 712 //--点击分享事件---
713 713 onShareAppMessage: function(t) {
  714 + getApp().globalData.no_clear=1
714 715 var curPage=this;
715 716 var pagePath = curPage.route; //当前页面url
716 717 if (pagePath.indexOf('/') != 0) {
... ...
packageA/pages/quan/quan.js
... ... @@ -73,7 +73,7 @@ Page({
73 73 /**
74 74 * 用户点击右上角分享
75 75 */
76   - onShareAppMessage: function () {
  76 + onShareAppMessage: function () { getApp().globalData.no_clear=1;
77 77 var th=this;
78 78 var id=th.data.hui_active.id;
79 79 var url="/packageA/pages/quan_pro/quan_pro?id="+id;
... ...
packageA/pages/service_share/service_share.js
... ... @@ -141,7 +141,7 @@ Page({
141 141 /**e
142 142 * 用户点击右上角分享
143 143 */
144   - onShareAppMessage: function () {
  144 + onShareAppMessage: function () { getApp().globalData.no_clear=1;
145 145 var th = this;
146 146 var item=this.data.share_good;
147 147 var price = item.money;
... ... @@ -709,10 +709,7 @@ Page({
709 709 })
710 710 return false;
711 711 }
712   - wx.previewImage({
713   - //将图片预览出来
714   - urls: [that.data.shareImgPath]
715   - });
  712 + getApp().pre_img(that.data.shareImgPath);
716 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 0 \ No newline at end of file
packageA/pages/text/text.json deleted
1   -{
2   - "usingComponents": {}
3   -}
4 0 \ No newline at end of file
packageA/pages/text/text.wxml deleted
1   -<!--packageA//pages/text/text.wxml-->
2   -<text>packageA//pages/text/text.wxml</text>
packageA/pages/text/text.wxss deleted
1   -/* packageA//pages/text/text.wxss */
2 0 \ No newline at end of file
packageA/pages/user/my_service2/appment_main.js
... ... @@ -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 67 \ No newline at end of file
... ...
packageB/pages/boxes-details/boxes-details.js
... ... @@ -124,7 +124,7 @@ Page({
124 124 * 用户点击右上角分享
125 125 */
126 126 onShareAppMessage: function() {
127   -
  127 + getApp().globalData.no_clear=1
128 128 },
129 129  
130 130  
... ...
packageB/pages/luckactivity/index/index.js
... ... @@ -166,7 +166,7 @@ Page({
166 166 /**
167 167 * 用户点击右上角分享
168 168 */
169   - onShareAppMessage: function () {
  169 + onShareAppMessage: function () { getApp().globalData.no_clear=1
170 170  
171 171 },
172 172  
... ...
packageB/pages/user/Change_phone/Change_phone.js
... ... @@ -246,6 +246,6 @@ Page({
246 246 * 用户点击右上角分享
247 247 */
248 248 onShareAppMessage: function() {
249   -
  249 + getApp().globalData.no_clear=1
250 250 }
251 251 })
... ...
packageB/pages/user/add_comment/add_comment.js
... ... @@ -220,6 +220,7 @@ Page({
220 220  
221 221 var imgs = this.data.imgs;
222 222  
  223 + getApp().globalData.no_clear=1;
223 224 wx.chooseImage({
224 225 count: 1, // 默认9
225 226 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
... ... @@ -259,6 +260,7 @@ Page({
259 260 var index = e.currentTarget.dataset.index;
260 261 //所有图片
261 262 var imgs = this.data.imgs;
  263 + getApp().globalData.no_clear=1;
262 264 wx.previewImage({
263 265 //当前显示图片
264 266 current: imgs[index],
... ...
packageB/pages/user/binding_info/binding_info.js
... ... @@ -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 67 \ No newline at end of file
... ...
packageB/pages/user/buyDetails/buyDetails.js
... ... @@ -106,7 +106,7 @@ Page({
106 106 /**
107 107 * 用户点击右上角分享
108 108 */
109   - onShareAppMessage: function () {
  109 + onShareAppMessage: function () { getApp().globalData.no_clear=1
110 110  
111 111 },
112 112  
... ...
packageB/pages/user/choice_guide/choice_guide.js
... ... @@ -26,6 +26,7 @@ Page({
26 26  
27 27 //--点击分享事件---
28 28 onShareAppMessage: function(t) {
  29 + getApp().globalData.no_clear=1
29 30 return o.share;
30 31 },
31 32 get_list: function() {
... ...
packageB/pages/user/comment/comment.js
... ... @@ -161,6 +161,7 @@ Page({
161 161 } else {
162 162 image = imgArr[index].weapp_img[sindex];
163 163 }
  164 + getApp().globalData.no_clear=1;
164 165 wx.previewImage({
165 166 current: image,
166 167 //当前图片地址
... ...
packageB/pages/user/view_comment/view_comment.js
... ... @@ -112,6 +112,7 @@ Page({
112 112 var iurl = th.data.iurl;
113 113 if (image != "") {
114 114 image = imgArr[0].weapp_img[index];
  115 + getApp().globalData.no_clear=1;
115 116 wx.previewImage({
116 117 current: image,
117 118 //当前图片地址
... ... @@ -119,6 +120,7 @@ Page({
119 120 })
120 121 } else {
121 122 image = imgArr[0].img[index];
  123 + getApp().globalData.no_clear=1;
122 124 wx.previewImage({
123 125 current: iurl + image,
124 126 //当前图片地址
... ...
packageB/pages/video/index.js
... ... @@ -7,6 +7,7 @@ Page({
7 7 },
8 8 bindButtonTap: function() {
9 9 var that = this
  10 + getApp().globalData.no_clear=1;
10 11 wx.chooseVideo({
11 12 sourceType: ['album', 'camera'],
12 13 maxDuration: 60,
... ... @@ -34,6 +35,7 @@ Page({
34 35  
35 36 //---------分享配置--------
36 37 onShareAppMessage: function (e) {
  38 + getApp().globalData.no_clear=1
37 39 return {
38 40 title: "直播视频回放",
39 41 }
... ...
packageB/pages/zuhegou/index/index.js
... ... @@ -446,7 +446,7 @@ Page({
446 446 /**
447 447 * 用户点击右上角分享
448 448 */
449   - onShareAppMessage: function () {
  449 + onShareAppMessage: function () { getApp().globalData.no_clear=1;
450 450 var title = this.data.act.name;
451 451 var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id;
452 452 if (getApp().globalData.user_id) {
... ...
packageB/pages/zuhegou/list/list.js
... ... @@ -198,6 +198,7 @@ Page({
198 198  
199 199 //---------分享配置--------
200 200 onShareAppMessage: function (e) {
  201 + getApp().globalData.no_clear=1
201 202 var curPage=this;
202 203 var pagePath = curPage.route; //当前页面url
203 204 if (pagePath.indexOf('/') != 0) {
... ...
packageB/pages/zuhegou/preindex/index.js
... ... @@ -447,7 +447,7 @@ Page({
447 447 /**
448 448 * 用户点击右上角分享
449 449 */
450   - onShareAppMessage: function () {
  450 + onShareAppMessage: function () { getApp().globalData.no_clear=1;
451 451 var title = this.data.act.name;
452 452 var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id;
453 453 if (getApp().globalData.user_id) {
... ...
packageC/pages/goods/distributionCategoryList/index.js
... ... @@ -404,6 +404,7 @@ Page({
404 404 },
405 405 //---------分享配置--------
406 406 onShareAppMessage: function (e) {
  407 + getApp().globalData.no_clear=1
407 408  
408 409 var url = "pages/goods/categoryList/categoryList";
409 410 var userInfo = getApp().globalData.userInfo;
... ... @@ -639,9 +640,9 @@ Page({
639 640 //扫一扫
640 641 getScancode: function () {
641 642 // 允许从相机和相册扫码
  643 + getApp().globalData.no_clear=1;
642 644 wx.scanCode({
643 645 success: (res) => {
644   - console.log(res);
645 646 var key_word = res.result;
646 647 wx.navigateBack({
647 648 delta: 1
... ...
packageC/pages/goods/goodsList/goodsList.js
... ... @@ -240,6 +240,7 @@ Page({
240 240 },
241 241 //---------分享配置--------
242 242 onShareAppMessage: function (e) {
  243 + getApp().globalData.no_clear=1
243 244 var curPage = this;
244 245 var pagePath = curPage.route; //当前页面url
245 246 if (pagePath.indexOf('/') != 0) {
... ...
packageC/pages/goods/search/search.js
... ... @@ -235,6 +235,7 @@ Page({
235 235  
236 236 //---------分享配置--------
237 237 onShareAppMessage: function (e) {
  238 + getApp().globalData.no_clear=1
238 239 var curPage = this;
239 240 var pagePath = curPage.route; //当前页面url
240 241 if (pagePath.indexOf('/') != 0) {
... ...
packageC/pages/group_list/group_list.js
... ... @@ -147,7 +147,7 @@ Page({
147 147 /**
148 148 * 用户点击右上角分享
149 149 */
150   - onShareAppMessage: function () {
  150 + onShareAppMessage: function () { getApp().globalData.no_clear=1
151 151  
152 152 },
153 153  
... ...
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
... ... @@ -191,6 +191,7 @@ Page({
191 191 * 用户点击右上角分享
192 192 */
193 193 onShareAppMessage: function (e) {
  194 + getApp().globalData.no_clear=1
194 195 var pagePath = this.route; //当前页面url
195 196 if (pagePath.indexOf('/') != 0) {
196 197 pagePath = '/' + pagePath;
... ...
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
... ... @@ -972,6 +972,7 @@ Page({
972 972  
973 973 //------ 分享配置 --------
974 974 onShareAppMessage: function (e) {
  975 + getApp().globalData.no_clear=1
975 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 977 // console.log('pagePath=====xxxxxx>', pagePath);
977 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 19 var utils = require('../../../../utils/util.js');
20 20 var regeneratorRuntime = require('../../../../utils/runtime.js');
21 21 const { app } = require("../../../../utils/common.js");
22   -let self = null;
23 22  
24 23 Page({
25 24 data: {
... ... @@ -282,14 +281,11 @@ Page({
282 281 surplus: 0,
283 282 canBuy: false,
284 283 btnHidden: false,
285   -
286   - hiddenCS: true, //控制客服操作菜单显示和控制
287 284 },
288 285  
289 286 //------初始化加载----------
290 287 onLoad: function (t) {
291   - self = this;
292   -
  288 +
293 289 // console.log('onload');
294 290 if (t && t.group_id) {
295 291 this.data.group_id = t.group_id;
... ... @@ -6495,36 +6491,7 @@ Page({
6495 6491  
6496 6492 click_contact:function () {
6497 6493 getApp().globalData.no_clear=1;
6498   - },
6499   -
6500   -
6501   - //打开客服操作菜单
6502   - openCS() {
6503   - // csType/在线客服设置:
6504   - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
6505   - // 1小程序客服、
6506   - // 2企业微信客服
6507   - let csType = this.data.sys_switch.weapp_customertype;
6508   - if(csType == 0) {
6509   - // 获取电话号码
6510   - this.contactService();
6511   - } else {
6512   - this.getTel()
6513   - .then(() => {
6514   - self.setData({
6515   - hiddenCS: false,
6516   - });
6517   - });
6518   -
6519   - };
6520   - },
6521   -
6522   - //关闭客服操作菜单
6523   - closeCS() {
6524   - this.setData({
6525   - hiddenCS: true,
6526   - });
6527   - },
  6494 + }
6528 6495  
6529 6496  
6530 6497 });
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
... ... @@ -871,7 +871,7 @@
871 871 <!-- -----------------底部按钮------------------ -->
872 872 <view class="join-cart">
873 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 875 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
876 876 <view>客服</view>
877 877 </button>
... ... @@ -884,12 +884,7 @@
884 884 <view wx:else class="custom-service cart-ico new_split" bindtap="contactService">
885 885 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
886 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 889 <view bindtap="collectGoods" class="custom-service cart-ico new_split">
895 890 <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image>
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
... ... @@ -3116,6 +3116,4 @@ button.custom-service::after{
3116 3116 max-height: 600rpx;
3117 3117 overflow-y: auto;
3118 3118 }
3119   -
3120   -
3121   -
3122 3119 \ No newline at end of file
  3120 +
... ...
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.js
... ... @@ -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  
... ...
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
... ... @@ -237,24 +237,7 @@ Page({
237 237 },
238 238 /*-----联系客户------*/
239 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 1057 },
1075 1058  
1076 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 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 61 <view bindtap="checkTeam" class="contact-us check-btn" wx:if="{{optionIsGoup}}">查看拼团详情</view>
62 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 66 <view wx:elif="{{sys_switch.weapp_customertype==2}}" bindtap="con_weixin" class="contact-us goods-btn">联系客服</view>
67 67 <view wx:else bindtap="contactService" class="contact-us goods-btn">联系客服</view>
... ...
packageC/pages/luckyGo/luckyGo_winners/luckyGo_winners.js
... ... @@ -114,7 +114,7 @@ Page({
114 114 /**
115 115 * 用户点击右上角分享
116 116 */
117   - onShareAppMessage: function () {
  117 + onShareAppMessage: function () { getApp().globalData.no_clear=1
118 118  
119 119 },
120 120  
... ...
packageC/pages/presell/cart/cart.js
... ... @@ -2601,35 +2601,12 @@ Page({
2601 2601  
2602 2602 //---------联系客服------------
2603 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 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 16 n = new more.default();
17 17 var utils = require('../../../../utils/util.js');
18 18 var regeneratorRuntime = require('../../../../utils/runtime.js');
19   -let self = null;
20 19  
21 20 Page({
22 21 data: {
... ... @@ -249,13 +248,10 @@ Page({
249 248  
250 249 share_hidden: false,
251 250 pre_arr: null,
252   -
253   - hiddenCS: true,
254 251 },
255 252  
256 253 //------初始化加载----------
257 254 onLoad: function (t) {
258   - self = this;
259 255 var ee = this, that = ee, th = ee,
260 256 pre_id = t.pre_id,
261 257 gid = t.goods_id,
... ... @@ -1436,37 +1432,6 @@ Page({
1436 1432 contactService: function () {
1437 1433 getApp().com_call(this);
1438 1434 },
1439   - // 获取客服电话
1440   - getTel() {
1441   - return new Promise((resolve, reject) => {
1442   - s.getConfig(function (t) {
1443   - if (t.store_tel == undefined) {
1444   - getApp().request.get("/api/weshop/store/get/" + os.stoid, {
1445   - isShowLoading: 1,
1446   - data: {},
1447   - success: function (rs) {
1448   - getApp().globalData.config = rs.data.data;
1449   - if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {
1450   - getApp().my_warnning("商家未设置电话", 0, th);
1451   - return false;
1452   - }
1453   - self.setData({
1454   - store_tel: rs.data.data.store_tel,
1455   - });
1456   - // s.confirmBox("请联系客服:" + rs.data.data.store_tel);
1457   - }
1458   - })
1459   - } else {
1460   - self.setData({
1461   - store_tel: t.store_tel,
1462   - });
1463   - // s.confirmBox("请联系客服:" + t.store_tel);
1464   - };
1465   - resolve();
1466   - });
1467   - });
1468   - },
1469   -
1470 1435 //-------获取购物车数量----------
1471 1436 requestCardNum: function () {
1472 1437 var t = this;
... ... @@ -4034,35 +3999,6 @@ Page({
4034 3999  
4035 4000 click_contact:function () {
4036 4001 getApp().globalData.no_clear=1;
4037   - },
4038   -
4039   -
4040   - //打开客服操作菜单
4041   - openCS() {
4042   - // csType/在线客服设置:
4043   - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
4044   - // 1小程序客服、
4045   - // 2企业微信客服
4046   - let csType = this.data.sys_switch.weapp_customertype;
4047   - if(csType == 0) {
4048   - // 获取电话号码
4049   - this.contactService();
4050   - } else {
4051   - this.getTel()
4052   - .then(() => {
4053   - self.setData({
4054   - hiddenCS: false,
4055   - });
4056   - });
4057   -
4058   - };
4059   - },
4060   -
4061   - //关闭客服操作菜单
4062   - closeCS() {
4063   - this.setData({
4064   - hiddenCS: true,
4065   - });
4066   - },
  4002 + }
4067 4003  
4068 4004 });
... ...
packageC/pages/presell/goodsInfo/goodsInfo.wxml
... ... @@ -495,7 +495,7 @@
495 495 <!-- -----------------底部按钮------------------ -->
496 496 <view class="join-cart">
497 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 499 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
500 500 <view>客服</view>
501 501 </button>
... ... @@ -508,13 +508,7 @@
508 508 <view wx:else class="custom-service cart-ico new_split" bindtap="contactService">
509 509 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
510 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 512 <view bindtap="collectGoods" class="custom-service cart-ico new_split">
519 513 <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image>
520 514 <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image>
... ... @@ -957,5 +951,7 @@
957 951  
958 952  
959 953  
  954 +
960 955 <include src="../../../../components/com_servicer/com_servicer.wxml"/>
961 956  
  957 +
... ...
packageC/pages/presell/goodsInfo/goodsInfo.wxss
... ... @@ -1614,7 +1614,6 @@ left:31rpx;}
1614 1614 .icon-share {
1615 1615 font-size: 46rpx;
1616 1616 color: #d60021;
1617   - line-height: 1;
1618 1617 }
1619 1618 .xc-share-frame{
1620 1619 /* width: 129rpx;
... ... @@ -2833,7 +2832,7 @@ button.custom-service::after{
2833 2832 }
2834 2833  
2835 2834 .icon-close {
2836   - font-size: 42rpx;
  2835 + font-size: 48rpx;
2837 2836 }
2838 2837 .quan_price{
2839 2838 background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx;
... ... @@ -2916,56 +2915,3 @@ button.custom-service::after{
2916 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 1431  
1432 1432 //---------联系客服------------
1433 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 1437 requestCardNum: function () {
... ... @@ -1489,11 +1472,7 @@ Page({
1489 1472 b[i] = this.data.iurl + e[i];
1490 1473 }
1491 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 1478 previewCommentImgs_w: function (t) {
... ... @@ -1503,21 +1482,16 @@ Page({
1503 1482 b[i] = this.data.iurl + e[i];
1504 1483 }
1505 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 1488 previewGoodsCommentImgs: function (t) {
1513 1489 var e = this,
1514 1490 a = this.data.data.comment[t.currentTarget.dataset.cidx].img;
  1491 + getApp().globalData.no_clear=1;
1515 1492 a = a.map(function (t) {
1516 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 1495 this.data.show_prew_img = 1;
1522 1496 },
1523 1497 closePromModal: function () {
... ... @@ -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 1511 var th = this;
1538 1512 var price = th.data.pre_arr.presell_price;
... ... @@ -3814,10 +3788,7 @@ Page({
3814 3788  
3815 3789 previewImage() {
3816 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 3985 },
4015 3986  
4016 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 495 <!-- -----------------底部按钮------------------ -->
496 496 <view class="join-cart">
497 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 499 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
500 500 <view>客服</view>
501 501 </button>
... ...
packageD/pages/AI-test-skin/history_record/history_record.js
... ... @@ -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 351 \ No newline at end of file
... ...
packageD/pages/AI-test-skin/history_record/history_record.wxml
... ... @@ -11,7 +11,7 @@
11 11 </view>
12 12 </view>
13 13 <view class="mgb5">历史报告</view>
14   - <scroll-view enable-flex scroll-y class="history_list" bindscrolltolower="bindscrolltolower">
  14 + <view class="history_list">
15 15 <view class="history_list_month" wx:for="{{history}}">
16 16 <view style="color:#333;font-size:26rpx;margin-top: 30rpx">{{item.history_time}}</view>
17 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 19 <view style="color: #9b9b9b;" >去查看<text style="font-size: 24rpx;" class="iconfont icon-arrow_right"></text></view>
20 20 </view>
21 21 </view>
22   - </scroll-view>
  22 + </view>
23 23 <view class="no-more txt-center" wx:if="{{history.length > 0 && no_more}}">- 没有更多了 -</view>
24 24 <nodata class="t-c" wx:if="{{history.length==0 && is_get}}"></nodata>
25 25 </view>
26 26 \ No newline at end of file
... ...
packageD/pages/AI-test-skin/index/aiskin.js
... ... @@ -101,7 +101,7 @@ Page({
101 101 /**
102 102 * 用户点击右上角分享
103 103 */
104   - onShareAppMessage: function () {
  104 + onShareAppMessage: function () { getApp().globalData.no_clear=1
105 105  
106 106 },
107 107  
... ...
packageD/pages/AI-test-skin/select_photo/select_photo.js
... ... @@ -52,6 +52,7 @@ Page({
52 52 //-- 重新从相册中选择图片 --
53 53 show_pai_pop: function () {
54 54 var th = this;
  55 + getApp().globalData.no_clear=1;
55 56 //选择和拍照一张图片
56 57 wx.chooseImage({
57 58 count: 1,
... ... @@ -70,6 +71,7 @@ Page({
70 71 //选择图片
71 72 takePhoto() {
72 73 var that = this;
  74 + getApp().globalData.no_clear=1;
73 75 wx.chooseImage({
74 76 count: 1,
75 77 sizeType: ['compressed'],
... ...
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
... ... @@ -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 76 show_pai_pop: function () {
77 77 let th = this;
  78 + getApp().globalData.no_clear=1;
78 79 //选择和拍照一张图片
79 80 wx.chooseImage({
80 81 count: 1,
... ... @@ -98,7 +99,7 @@ Page({
98 99 //选择图片
99 100 takePhoto() {
100 101 var that = this;
101   -
  102 + getApp().globalData.no_clear=1;
102 103 wx.chooseImage({
103 104 count: 1,
104 105 sizeType: ['compressed'],
... ...
packageD/pages/AI-test-skin/success_result/success_result.js
1 1 /*
2 2 * @Author: abson
3 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 5 * @LastEditors: Please set LastEditors
6 6 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
7 7 * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\success_result\success_result.js
... ... @@ -63,7 +63,14 @@ Page({
63 63 },
64 64  
65 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 83 this.init();
77 84 //var face_result=getApp().globalData.face_result;
78 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/" + setting.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 111 wx.getSystemInfo({
... ... @@ -127,6 +156,7 @@ Page({
127 156 var eye_data1 = face_data1.landmark150.eye_left_corner_right;
128 157 var eye_data2 = face_data1.landmark150.eye_left_corner_left;
129 158 var eye_data3 = face_data1.landmark150.eye_right_corner_right;
  159 +
130 160 var hei1 = Math.abs(eye_data1.x - eye_data2.x);
131 161 var bili_eye = th.data.face_height * 0.56 / hei1;
132 162 var eye_top = eye_data1.y - hei1 / 2
... ... @@ -582,7 +612,15 @@ Page({
582 612 * 用户点击右上角分享
583 613 */
584 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 778 }
741 779 ///二微码
742 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 783 // 读取文件成功则OK--
746 784 wx.getImageInfo({
... ...
pages/activity/pind_list/pind_list.js
... ... @@ -195,6 +195,7 @@ Page({
195 195  
196 196 //---------分享配置--------
197 197 onShareAppMessage: function (e) {
  198 + getApp().globalData.no_clear=1;
198 199 var curPage = this;
199 200 var pagePath = curPage.route; //当前页面url
200 201 if (pagePath.indexOf('/') != 0) {
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -233,6 +233,7 @@ Page({
233 233  
234 234 //---------分享配置--------
235 235 onShareAppMessage: function (e) {
  236 + getApp().globalData.no_clear=1;
236 237 var curPage = this;
237 238 var pagePath = curPage.route; //当前页面url
238 239 if (pagePath.indexOf('/') != 0) {
... ...
pages/cart/cart2/cart2.js
... ... @@ -2257,6 +2257,8 @@ Page({
2257 2257 var order_prom_txt1 = "formData.order_prom_id";
2258 2258 var order_prom_txt2 = "formData.order_prom_amount";
2259 2259 th.setData({ [order_prom_txt1]: 0, [order_prom_txt2]: 0 })
  2260 +
  2261 +
2260 2262 total_m = parseFloat(total_m) + parseFloat(th.data.formData.shipping_price);
2261 2263 order_m = parseFloat(order_m) + parseFloat(th.data.formData.shipping_price);
2262 2264 var atxt = "formData.total_amount";
... ...
pages/cart/cart_wk/cart_wk.js
... ... @@ -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 99 get_wuliu(func) {
100 100 var th = this,
... ...
pages/distribution/distribution.js
... ... @@ -233,7 +233,7 @@ Page({
233 233 /**
234 234 * 用户点击右上角分享
235 235 */
236   - onShareAppMessage: function () {
  236 + onShareAppMessage: function () { getApp().globalData.no_clear=1
237 237  
238 238 },
239 239  
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -163,6 +163,7 @@ Page({
163 163  
164 164 //--- 分享设置 --
165 165 onShareAppMessage: function (e) {
  166 + getApp().globalData.no_clear=1;
166 167 var curPage = this;
167 168 var pagePath = curPage.route; //当前页面url
168 169 if (pagePath.indexOf('/') != 0) {
... ...
pages/goods/categoryList/categoryList.js
... ... @@ -627,7 +627,7 @@ Page({
627 627  
628 628 //---------分享配置--------
629 629 onShareAppMessage: function (e) {
630   -
  630 + getApp().globalData.no_clear=1;
631 631 var url="pages/goods/categoryList/categoryList";
632 632 var userInfo=getApp().globalData.userInfo;
633 633 //是分销商才带
... ... @@ -799,6 +799,7 @@ Page({
799 799 //扫一扫
800 800 getScancode:function(){
801 801 var _this = this;
  802 + getApp().globalData.no_clear=1;
802 803 // 允许从相机和相册扫码
803 804 wx.scanCode({
804 805 success: (res) => {
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -255,8 +255,6 @@ Page({
255 255 share_hidden: false,
256 256 all_activity_list: null, //所有活动的列表
257 257  
258   - hiddenCS: true, //控制客服操作菜单
259   -
260 258 },
261 259  
262 260 //------初始化加载----------
... ... @@ -6645,36 +6643,7 @@ Page({
6645 6643  
6646 6644 click_contact:function () {
6647 6645 getApp().globalData.no_clear=1;
6648   - },
6649   -
6650   -
6651   - //打开客服操作菜单
6652   - openCS() {
6653   - // csType/在线客服设置:
6654   - // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
6655   - // 1小程序客服、
6656   - // 2企业微信客服
6657   - let csType = this.data.sys_switch.weapp_customertype;
6658   - if(csType == 0) {
6659   - // 获取电话号码
6660   - this.contactService();
6661   - } else {
6662   - this.getTel()
6663   - .then(() => {
6664   - self.setData({
6665   - hiddenCS: false,
6666   - });
6667   - });
6668   -
6669   - };
6670   - },
6671   -
6672   - //关闭客服操作菜单
6673   - closeCS() {
6674   - this.setData({
6675   - hiddenCS: true,
6676   - });
6677   - }
  6646 + }
6678 6647  
6679 6648  
6680 6649  
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -274,9 +274,8 @@
274 274 </view>
275 275 </view>
276 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 279 <view class="goods-num">
281 280 <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view>
282 281 <view class="stock">
... ... @@ -392,7 +391,6 @@
392 391 <!-- 许程商品名字 -->
393 392 <view wx:if="{{prom_type!=1 && prom_type!=2 }}">
394 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 394 <view class="goods-name elli">{{data.goods_name}}</view>
397 395 </view>
398 396 </view>
... ... @@ -1012,8 +1010,18 @@
1012 1010  
1013 1011 <!-- -----------------底部按钮------------------ -->
1014 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>
1015 1018  
1016   - <view class="custom-service cart-ico new_split" bindtap="openCS">
  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>
  1023 +
  1024 + <view wx:else class="custom-service cart-ico new_split" bindtap="contactService">
1017 1025 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
1018 1026 <view>客服</view>
1019 1027 </view>
... ... @@ -1711,6 +1719,4 @@
1711 1719 <include src="buy_flash_normal.wxml" />
1712 1720 </view>
1713 1721  
1714   -
1715   -
1716 1722 <include src="../../../components/com_servicer/com_servicer.wxml"></include>
... ...
pages/goods/goodsInfo/goodsInfo.wxss
... ... @@ -126,9 +126,7 @@ image {
126 126  
127 127 .goods-title {
128 128 display: flex;
129   - justify-content: space-between;
130   - align-items: center;
131   - vertical-align: middle;
  129 + justify-content: space-between;
132 130 /* overflow: hidden; */
133 131 /* height: 108rpx; */
134 132 }
... ... @@ -4004,54 +4002,3 @@ button.custom-service::after {
4004 4002 left: -1000px;
4005 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 380 },
381 381 //---------分享配置--------
382 382 onShareAppMessage: function (e) {
  383 + getApp().globalData.no_clear=1;
383 384 var curPage=this;
384 385 var pagePath = curPage.route; //当前页面url
385 386 if (pagePath.indexOf('/') != 0) {
... ...
pages/goods/search/search.js
... ... @@ -389,6 +389,7 @@ Page({
389 389  
390 390 //---------分享配置--------
391 391 onShareAppMessage: function (e) {
  392 + getApp().globalData.no_clear=1;
392 393 var curPage=this;
393 394 var pagePath = curPage.route; //当前页面url
394 395 if (pagePath.indexOf('/') != 0) {
... ...
pages/index/index/index.js
... ... @@ -84,7 +84,6 @@ Page({
84 84 full_ad: null, //全屏广告
85 85 full_screen: 0, //全屏广告
86 86 is_ok_h5:0, //判断要不要显示关注二维码
87   -
88 87 },
89 88  
90 89 onLoad: async function (tt) {
... ... @@ -223,18 +222,20 @@ Page({
223 222 //如果是自定义模板
224 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 239 } else {
239 240 await this.init_fir();
240 241 wx.setNavigationBarColor({
... ... @@ -428,29 +429,18 @@ Page({
428 429 var th = this;
429 430  
430 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 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 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 445 setTimeout(function () {
456 446 const query = wx.createSelectorQuery();
... ... @@ -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 657 setTimeout(function () {
667 658 var goods_list = th.selectComponent("#goods_list"); //组件的id
... ... @@ -743,6 +734,7 @@ Page({
743 734 });
744 735 },
745 736 onShareAppMessage: function (e) {
  737 + getApp().globalData.no_clear=1;
746 738 var url = "/pages/index/index/index";
747 739 var userInfo = getApp().globalData.userInfo;
748 740 //是分销商才带
... ... @@ -938,6 +930,7 @@ Page({
938 930 //---扫一扫的函数---
939 931 getScancode: function () {
940 932 var _this = this;
  933 + getApp().globalData.no_clear=1;
941 934 // 允许从相机和相册扫码
942 935 wx.scanCode({
943 936 success: (res) => {
... ...
pages/team/team_show/team_show.js
... ... @@ -959,6 +959,7 @@ Page({
959 959  
960 960 //------ 分享配置 --------
961 961 onShareAppMessage: function (e) {
  962 + getApp().globalData.no_clear=1;
962 963 var curPage=this;
963 964 var pagePath = curPage.route; //当前页面url
964 965 if (pagePath.indexOf('/') != 0) {
... ...