Commit 516a9f62c0d5c2886aa752adabaa965b674ce327
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
31 changed files
with
247 additions
and
84 deletions
app.js
... | ... | @@ -51,7 +51,7 @@ App({ |
51 | 51 | config: null, //门店参数 |
52 | 52 | config2: null, //门店配置 |
53 | 53 | code: null, |
54 | - user_id:null,//6520352 | |
54 | + user_id:null,//6520491,// 6519913,//6520352 | |
55 | 55 | // user_id:6520314,// qa-6519858,// |
56 | 56 | // user_id:14148118,// qa-6519858,// |
57 | 57 | buy_now: null, |
... | ... | @@ -75,6 +75,7 @@ App({ |
75 | 75 | sp_scene: null, |
76 | 76 | |
77 | 77 | navBarHeight:44, //默认高度44 |
78 | + is_pc:0, //是不是在pc端打开小程序 | |
78 | 79 | }, |
79 | 80 | auth: o, |
80 | 81 | request: a, |
... | ... | @@ -202,7 +203,16 @@ App({ |
202 | 203 | if (modelmes && modelmes.indexOf('iPhone X') != -1) { //XS,XR,XS MAX均可以适配,因为indexOf()会将包含'iPhone X'的字段都查出来 |
203 | 204 | this.globalData.isIpx = true |
204 | 205 | } |
205 | - this.globalData.navBarHeight = 44 + res.statusBarHeight | |
206 | + | |
207 | + /*-- 判断是不是PC端打开的 */ | |
208 | + if (res && ["windows", "mac"].some((v) => v === res["platform"])) { | |
209 | + app.globalData.is_pc=1; | |
210 | + this.globalData.navBarHeight =0 | |
211 | + }else{ | |
212 | + this.globalData.navBarHeight = 44 + res.statusBarHeight | |
213 | + } | |
214 | + | |
215 | + | |
206 | 216 | }, |
207 | 217 | }) |
208 | 218 | this.globalData.menuInfo = wx.getMenuButtonBoundingClientRect() || {} |
... | ... | @@ -1634,6 +1644,8 @@ App({ |
1634 | 1644 | } |
1635 | 1645 | a.wxParse(content, "html", ut.format_content(ob.text), th, 6); |
1636 | 1646 | e.wxParseAddFullImageUrl(th, content); |
1647 | + | |
1648 | + | |
1637 | 1649 | }, |
1638 | 1650 | |
1639 | 1651 | async deal_iframe_next(ob){ | ... | ... |
components/add_purchase/add_purchase.wxml
components/add_purchase/add_purchase.wxss
components/com_top_nav/com_top_nav.js
... | ... | @@ -19,7 +19,8 @@ Component({ |
19 | 19 | height:0, |
20 | 20 | h1:0, |
21 | 21 | h2:0, |
22 | - user_id:0 | |
22 | + user_id:0, | |
23 | + is_pc:0 | |
23 | 24 | }, |
24 | 25 | ready: function() { |
25 | 26 | let height= getApp().globalData.navBarHeight; |
... | ... | @@ -30,6 +31,9 @@ Component({ |
30 | 31 | } |
31 | 32 | //-- 胶囊的高度 -- |
32 | 33 | this.setData({height,h1:menuInfo.top,h2:menuInfo.height,user_no}); |
34 | + if(getApp().globalData.is_pc){ | |
35 | + this.setData({is_pc:1}) | |
36 | + } | |
33 | 37 | }, |
34 | 38 | pageLifetimes: { |
35 | 39 | //要处理一下,游客登录后的界面的变化,主要还该是改变会员 | ... | ... |
components/com_top_nav/com_top_nav.wxml
1 | 1 | <!-- 需要cover-view是大转盘才会 --> |
2 | +<block wx:if="{{!is_pc}}"> | |
3 | + | |
2 | 4 | <block wx:if="{{need_cover}}"> |
3 | 5 | <cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}"> |
4 | 6 | <cover-view class="tab" style="height:{{h1}}px;"> |
... | ... | @@ -31,4 +33,6 @@ |
31 | 33 | |
32 | 34 | |
33 | 35 | <!-- 用于顶开层的高 --> |
34 | -<view style="height:{{height}}px"></view> | |
35 | 36 | \ No newline at end of file |
37 | +<view style="height:{{height}}px"></view> | |
38 | + | |
39 | +</block> | |
36 | 40 | \ No newline at end of file | ... | ... |
components/diy_public/diy_public.wxml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | <view class='t_ms n_t_ms' style="font-size: 30rpx;">{{object.column_name}}</view> |
9 | 9 | </view> |
10 | 10 | <view class='right_k' wx:if="{{!object.column_diy_title}}"> |
11 | - 更多<image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | |
11 | + 更多<image style="vertical-align: baseline;" src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | |
12 | 12 | </view> |
13 | 13 | </view> |
14 | 14 | <!-- 大图模式 --> | ... | ... |
components/diy_searchbox/diy_searchbox.wxml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <view class='ss' style="position: relative;{{transparent ? '' : (nav_backgroundColor ? ('background-color:' + nav_backgroundColor) : 'background-color:#fff;')}}"> |
6 | 6 | <view bindtap='click_sear' class="s1_gk_a1 " wx:if="{{first}}"> |
7 | 7 | <view class="s_ge {{object.is_bord==1 ? 'is_bord' : ''}}" style="text-align: {{object.searchbox_center}};"> |
8 | - <image src='{{imghost}}/miniapp/images/search.png'></image> | |
8 | + <image src='{{imghost}}/miniapp/images/search.png' style="vertical-align:baseline;"></image> | |
9 | 9 | <text wx:if="{{object.searchbox_text}}">{{object.searchbox_text}}</text> |
10 | 10 | <text wx:else>请输入商品关键字</text> |
11 | 11 | </view> | ... | ... |
components/diy_seckill/diy_seckill.wxml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | <view class='t_ms n_t_ms' style="font-size: 30rpx;">{{object.column_name}}</view> |
9 | 9 | </view> |
10 | 10 | <view class='right_k' wx:if="{{!object.column_diy_title}}"> |
11 | - 更多<image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | |
11 | + 更多<image style="vertical-align: baseline;" src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | |
12 | 12 | </view> |
13 | 13 | </view> |
14 | 14 | <!-- 大图模式 --> | ... | ... |
components/diy_top_nav/diy_top_nav.js
... | ... | @@ -65,43 +65,51 @@ Component({ |
65 | 65 | // img:'', |
66 | 66 | // url:'' |
67 | 67 | // }, |
68 | - ] | |
68 | + ], | |
69 | + is_pc:0 | |
69 | 70 | }, |
70 | 71 | lifetimes:{ |
71 | 72 | attached:function(){ |
72 | - //满屏顶部导航参数获取----------- | |
73 | - try { | |
74 | - let systemInfo = wx.getSystemInfoSync() | |
75 | - let mentButt = wx.getMenuButtonBoundingClientRect() | |
76 | - let nav_pb = mentButt.top - systemInfo.statusBarHeight | |
77 | - let navleft_pb = systemInfo.windowWidth - mentButt.right | |
78 | 73 | |
79 | - let user_no=''; | |
80 | - if(getApp().globalData.userInfo){ | |
81 | - user_no=getApp().globalData.userInfo.erpvipno | |
82 | - } | |
74 | + var is_pc=getApp().globalData.is_pc; | |
75 | + if(!is_pc) { | |
76 | + | |
77 | + //满屏顶部导航参数获取----------- | |
78 | + try { | |
79 | + let systemInfo = wx.getSystemInfoSync() | |
80 | + let mentButt = wx.getMenuButtonBoundingClientRect() | |
81 | + let nav_pb = mentButt.top - systemInfo.statusBarHeight | |
82 | + let navleft_pb = systemInfo.windowWidth - mentButt.right | |
83 | + | |
84 | + let user_no = ''; | |
85 | + if (getApp().globalData.userInfo) { | |
86 | + user_no = getApp().globalData.userInfo.erpvipno | |
87 | + } | |
83 | 88 | |
84 | - this.setData({ | |
85 | - nav_h:mentButt.top, | |
86 | - mentButt_h:mentButt.height, | |
87 | - nav_left_w:mentButt.left, | |
88 | - navleft_pb, | |
89 | - nav_pb, | |
90 | - navleft_w:mentButt.width*0.9, | |
91 | - user_no | |
92 | - }) | |
93 | - } catch (e) { | |
94 | - console.error(e); | |
95 | - wx.showToast({ | |
96 | - title: '系统参数获取失败', | |
97 | - icon: 'none', | |
98 | - duration: 2000 | |
99 | - }) | |
100 | - // this.setData({ | |
101 | - // is_full_screen_navigation:false | |
102 | - // }) | |
103 | - // Do something when catch error | |
104 | - } | |
89 | + this.setData({ | |
90 | + nav_h: mentButt.top, | |
91 | + mentButt_h: mentButt.height, | |
92 | + nav_left_w: mentButt.left, | |
93 | + navleft_pb, | |
94 | + nav_pb, | |
95 | + navleft_w: mentButt.width * 0.9, | |
96 | + user_no | |
97 | + }) | |
98 | + } catch (e) { | |
99 | + console.error(e); | |
100 | + wx.showToast({ | |
101 | + title: '系统参数获取失败', | |
102 | + icon: 'none', | |
103 | + duration: 2000 | |
104 | + }) | |
105 | + // this.setData({ | |
106 | + // is_full_screen_navigation:false | |
107 | + // }) | |
108 | + // Do something when catch error | |
109 | + } | |
110 | + }else{ | |
111 | + this.setData({is_pc:1}); | |
112 | + } | |
105 | 113 | } |
106 | 114 | }, |
107 | 115 | /** | ... | ... |
components/diy_top_nav/diy_top_nav.wxml
1 | 1 | <!--components/diy_top_nav/diy_top_nav.wxml--> |
2 | 2 | <!-- 支撑作用 --> |
3 | +<block wx:if="{{!is_pc}}"> | |
4 | + | |
3 | 5 | <view wx:if="{{nav_type==-1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};"> |
4 | 6 | <view style="height: {{nav_h}}px;width: 100%;"></view> |
5 | 7 | <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;"></view> |
6 | 8 | </view> |
9 | + | |
10 | + | |
7 | 11 | <!-- 默认没有返回按钮 --> |
8 | 12 | <view wx:if="{{nav_type==0}}" style="padding-bottom:{{nav_pb}}px;background-color:{{nav_backgroundColor}};color: {{nav_frontColor}};"> |
9 | 13 | <view style="height: {{nav_h}}px;width: 100%;"></view> |
... | ... | @@ -67,3 +71,5 @@ |
67 | 71 | <view class="nav_right">1212121</view> |
68 | 72 | </view> |
69 | 73 | </view> |
74 | + | |
75 | +</block> | |
70 | 76 | \ No newline at end of file | ... | ... |
packageA/pages/goodsInfo/goodsInfo.wxml
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
16 | 16 | </view> |
17 | 17 | |
18 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | |
18 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> | |
19 | 19 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
20 | 20 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
21 | 21 | {{item.name}} | ... | ... |
packageA/pages/quan_pro/quan_pro.js
... | ... | @@ -88,13 +88,19 @@ Page({ |
88 | 88 | th.setData({is_get:1}); |
89 | 89 | return false; |
90 | 90 | } |
91 | + | |
92 | + //-- 券已经领取完的优化 -- | |
93 | + if(r_data.sum_num && r_data.sum_num<=r_data.use_sumnum){ | |
94 | + th.setData({is_get:1}); | |
95 | + return false; | |
96 | + } | |
97 | + | |
91 | 98 | if(r_data.type!=1){ |
92 | 99 | th.setData({is_get:2}); |
93 | 100 | return false; |
94 | 101 | } |
95 | 102 | |
96 | 103 | var now=ut.gettimestamp(); |
97 | - | |
98 | 104 | if(r_data.send_start_time>now){ |
99 | 105 | th.setData({is_get:3}); |
100 | 106 | return false; |
... | ... | @@ -102,26 +108,26 @@ Page({ |
102 | 108 | |
103 | 109 | if(r_data.send_end_time<now){ |
104 | 110 | th.setData({is_get:4}); |
105 | - return false; | |
106 | 111 | } |
107 | 112 | |
108 | - th.setData({is_get:1}); | |
109 | 113 | th.setData({ q_data:r_data }); |
110 | 114 | |
115 | + var url2='/api/weshop/couponList/getUserCouponListMsg?store_id='+os.stoid+'&cid='+th.data.id+'&uid='+getApp().globalData.user_id; | |
116 | + var rss=await getApp().request.promiseGet(url2, {}) | |
117 | + if(rss && rss.data.code==-1){ | |
118 | + if(rss.data.msg.indexOf('您下一次')>-1){ | |
119 | + th.setData({is_get:5,err_txt:'您已领过该券'}); | |
120 | + }else if(rss.data.msg.indexOf('您已领完该券')>-1){ | |
121 | + th.setData({is_get:5,err_txt:'您已领完该券'}); | |
122 | + } | |
123 | + }else if(rss && rss.data.code==0){ | |
124 | + //获取会员已经领取了多少张券 | |
125 | + var n1=rss.data.data.usercounted?rss.data.data.usercounted:0; | |
126 | + th.setData({'q_data.lqnum':n1}) | |
127 | + } | |
111 | 128 | |
112 | 129 | |
113 | 130 | |
114 | - // var user_id=getApp().globalData.user_id; | |
115 | - // await getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { | |
116 | - // data:{store_id:os.stoid,type:1,id:th.data.id,user_id:user_id} | |
117 | - // }).then(res => { | |
118 | - // th.setData({is_get:1}); | |
119 | - // if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length){ | |
120 | - // th.setData({q_data:res.data.data.pageData[0]}); | |
121 | - // } | |
122 | - // }); | |
123 | - | |
124 | - | |
125 | 131 | }, |
126 | 132 | onUnload:function(){ |
127 | 133 | wx.offCopyUrl() |
... | ... | @@ -198,7 +204,7 @@ Page({ |
198 | 204 | success: function(res) { |
199 | 205 | th.data.linging = 0; |
200 | 206 | if (res.data.code == 0) { |
201 | - item.lqnum++; | |
207 | + | |
202 | 208 | var text3="q_data"; |
203 | 209 | var obj = {};obj[text3] = item; |
204 | 210 | th.setData(obj); |
... | ... | @@ -214,9 +220,24 @@ Page({ |
214 | 220 | } |
215 | 221 | }) |
216 | 222 | } else { |
217 | - th.setData({ | |
223 | + | |
224 | + //设置一下优惠券领取的数量 | |
225 | + var q_data=th.data.q_data; | |
226 | + q_data.use_sumnum++; | |
227 | + q_data.lqnum++; | |
228 | + | |
229 | + th.setData({ | |
218 | 230 | show_success: 1, |
231 | + q_data | |
219 | 232 | }) |
233 | + | |
234 | + if(q_data.everyone_num>0 && q_data.everyone_num<= q_data.lqnum){ | |
235 | + th.setData({is_get:5,err_txt:'您已领完该券'}); | |
236 | + }else if(q_data.interval_time>0){ | |
237 | + th.setData({is_get:5,err_txt:'您已领过该券'}); | |
238 | + } | |
239 | + | |
240 | + | |
220 | 241 | } |
221 | 242 | } else { |
222 | 243 | app.confirmBox(res.data.msg); | ... | ... |
packageA/pages/quan_pro/quan_pro.wxml
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | </view> |
35 | 35 | </view> |
36 | 36 | |
37 | - <block wx:if="{{ q_data}}"> | |
37 | + <block wx:if="{{q_data}}"> | |
38 | 38 | <view wx:if="{{ q_data.endtype==0}}" class="lower fs30">有效期 |
39 | 39 | <text wx:if="{{q_data.starttype==1}}"> {{filters.format_time(getcurday+3600*24*q_data.startdays)}}</text> |
40 | 40 | <text wx:if="{{q_data.use_start_time>0 && q_data.starttype==0}}"> {{filters.format_time(q_data.use_start_time)}}</text>至 |
... | ... | @@ -58,7 +58,9 @@ |
58 | 58 | </view> |
59 | 59 | |
60 | 60 | <view wx:if="{{q_data}}" class="flex jc-center" style="margin-top: 40rpx"> |
61 | - <view wx:if="{{q_data.everyone_num>0 && q_data.lqnum>=q_data.everyone_num}}" class="btn flex jc-center ai-center gray" bindtap="get_quan">已领取</view> | |
61 | + <view wx:if="{{q_data.sum_num>0 && q_data.use_sumnum>=q_data.sum_num}}" class="btn flex jc-center ai-center gray" >该券已领完</view> | |
62 | + <view wx:elif="{{is_get==4}}" class="btn flex jc-center ai-center gray" >优惠券已过期</view> | |
63 | + <view wx:elif="{{is_get==5}}" class="btn flex jc-center ai-center gray" >{{err_txt}}</view> | |
62 | 64 | <view wx:else class="btn flex jc-center ai-center" bindtap="get_quan">立即领取</view> |
63 | 65 | </view> |
64 | 66 | ... | ... |
packageA/pages/quan_pro/quan_pro.wxss
... | ... | @@ -26,7 +26,7 @@ page{background-color: #f8f8f8;} |
26 | 26 | border-bottom-left-radius:25rpx; |
27 | 27 | } |
28 | 28 | |
29 | -.btn.gray{background-color: #dcdcdc; color: #adb3be;} | |
29 | +.btn.gray{background-color: #aaa; color: #fff;} | |
30 | 30 | .coupon_remark{padding: 30rpx 0 10rpx 0; box-sizing: border-box; overflow: hidden;} |
31 | 31 | |
32 | 32 | .q_title{ | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
18 | 18 | </view> |
19 | 19 | |
20 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | |
20 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> | |
21 | 21 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
22 | 22 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
23 | 23 | {{item.name}} | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss
packageB/pages/zuhegou/index/index.js
... | ... | @@ -2782,7 +2782,12 @@ Page({ |
2782 | 2782 | }, |
2783 | 2783 | |
2784 | 2784 | go_cart: function () { |
2785 | - getApp().goto("/pages/cart/cart/cart"); | |
2785 | + //-- 组合购选中的跳转链接 -- | |
2786 | + getApp().globalData.from_act_link={ | |
2787 | + prom_type:7, | |
2788 | + prom_id:this.data.act.id | |
2789 | + } | |
2790 | + getApp().goto("/pages/cart/cart/cart"); | |
2786 | 2791 | }, |
2787 | 2792 | |
2788 | 2793 | //获取购物车中,相应的门店已购买的商品 | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... | ... | @@ -495,7 +495,14 @@ Page({ |
495 | 495 | //------几人评价------- |
496 | 496 | //n.init(th, "", "comments"); |
497 | 497 | |
498 | - if(e && e.goods_bottomconent){ | |
498 | + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ | |
499 | + //商品详情广告---- | |
500 | + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); | |
501 | + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); | |
502 | + //------- | |
503 | + } | |
504 | + | |
505 | + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1){ | |
499 | 506 | //商品详情广告---- |
500 | 507 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); |
501 | 508 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | </view> |
21 | 21 | |
22 | 22 | <!-- tab选项卡 --> |
23 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | |
23 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> | |
24 | 24 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
25 | 25 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
26 | 26 | </view> |
... | ... | @@ -681,6 +681,10 @@ |
681 | 681 | </view> |
682 | 682 | </view> |
683 | 683 | </view> |
684 | + <!-- 详情广告顶部--> | |
685 | + <view class="wxParse"> | |
686 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | |
687 | + </view> | |
684 | 688 | <!-- 详情图片 --> |
685 | 689 | <view class="wxParse"> |
686 | 690 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
... | ... | @@ -689,6 +693,7 @@ |
689 | 693 | <view class="wxParse"> |
690 | 694 | <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> |
691 | 695 | </view> |
696 | + | |
692 | 697 | </view> |
693 | 698 | <!-- 推荐商品 --> |
694 | 699 | <view class="flex-center rel xc-linellae-frame"> |
... | ... | @@ -768,6 +773,12 @@ |
768 | 773 | </view> |
769 | 774 | </view> |
770 | 775 | </view> |
776 | + | |
777 | + <!-- 详情广告顶部--> | |
778 | + <view class="wxParse"> | |
779 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | |
780 | + </view> | |
781 | + | |
771 | 782 | <view class="wxParse"> |
772 | 783 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
773 | 784 | </view> | ... | ... |
packageC/pages/presell/cardInfo/goodsInfo.wxml
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="1" |
17 | 17 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
18 | 18 | </view> |
19 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | |
19 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> | |
20 | 20 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
21 | 21 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
22 | 22 | {{item.name}} | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.js
... | ... | @@ -423,7 +423,14 @@ Page({ |
423 | 423 | |
424 | 424 | }); |
425 | 425 | |
426 | - if(e && e.goods_bottomconent){ | |
426 | + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ | |
427 | + //商品详情广告---- | |
428 | + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); | |
429 | + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); | |
430 | + //------- | |
431 | + } | |
432 | + | |
433 | + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1){ | |
427 | 434 | //商品详情广告---- |
428 | 435 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); |
429 | 436 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
20 | 20 | </view> |
21 | 21 | |
22 | - <view class="type-navbar" style="top:{{top_nav-4}}px"> | |
22 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> | |
23 | 23 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
24 | 24 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
25 | 25 | {{item.name}} |
... | ... | @@ -346,14 +346,21 @@ |
346 | 346 | </view> |
347 | 347 | </view> |
348 | 348 | </view> |
349 | + | |
350 | + <!-- 详情广告顶部--> | |
351 | + <view class="wxParse"> | |
352 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | |
353 | + </view> | |
354 | + | |
349 | 355 | <!-- 详情图片 --> |
350 | 356 | <view class="wxParse"> |
351 | 357 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
352 | 358 | </view> |
353 | - <!-- 详情广告 --> | |
359 | + <!-- 详情广告底部 --> | |
354 | 360 | <view class="wxParse"> |
355 | 361 | <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template> |
356 | 362 | </view> |
363 | + | |
357 | 364 | </view> |
358 | 365 | <!-- 推荐商品 --> |
359 | 366 | <view class="flex-center rel xc-linellae-frame"> |
... | ... | @@ -440,6 +447,13 @@ |
440 | 447 | </view> |
441 | 448 | </view> |
442 | 449 | </view> |
450 | + | |
451 | + | |
452 | + <!-- 详情广告顶部--> | |
453 | + <view class="wxParse"> | |
454 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | |
455 | + </view> | |
456 | + | |
443 | 457 | <view class="wxParse"> |
444 | 458 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
445 | 459 | </view> | ... | ... |
packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js
... | ... | @@ -203,6 +203,7 @@ Page({ |
203 | 203 | |
204 | 204 | |
205 | 205 | }, |
206 | + | |
206 | 207 | GetBuyIntegral: function (e) { |
207 | 208 | var that = this.data; |
208 | 209 | var th = this; |
... | ... | @@ -344,7 +345,8 @@ Page({ |
344 | 345 | data: { |
345 | 346 | "storeId": a.stoid, //商家ID |
346 | 347 | "userId": d.user_id, //用户ID |
347 | - "giftBagId": th.getGiftID | |
348 | + "giftBagId": th.getGiftID, | |
349 | + isnNewUserLb:1 | |
348 | 350 | }, |
349 | 351 | success: function success(res) { |
350 | 352 | if (res.data.code == 0) { |
... | ... | @@ -402,6 +404,11 @@ Page({ |
402 | 404 | |
403 | 405 | } else { |
404 | 406 | getApp().my_warnning(res.data.msg, 0, _this2); |
407 | + | |
408 | + setTimeout(()=>{ | |
409 | + getApp().goto('/pages/index/index/index') | |
410 | + },2000) | |
411 | + | |
405 | 412 | return false; |
406 | 413 | } |
407 | 414 | } | ... | ... |
pages/cart/cart/cart.js
... | ... | @@ -126,6 +126,11 @@ Page({ |
126 | 126 | }, |
127 | 127 | onShow: function () { |
128 | 128 | |
129 | + if(getApp().globalData.from_act_link){ | |
130 | + this.data.from_act_link= ut.deep_cp(getApp().globalData.from_act_link); | |
131 | + getApp().globalData.from_act_link=null; | |
132 | + } | |
133 | + | |
129 | 134 | //-- 看一下隐私政策要不要显示 -- |
130 | 135 | var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id |
131 | 136 | if (privacy_pop) { |
... | ... | @@ -923,7 +928,7 @@ Page({ |
923 | 928 | }), |
924 | 929 | th.doCheckAll(), wx.stopPullDownRefresh(); |
925 | 930 | |
926 | - wx.hideLoading(); | |
931 | + wx.hideLoading(); | |
927 | 932 | |
928 | 933 | } |
929 | 934 | }); |
... | ... | @@ -2445,7 +2450,7 @@ Page({ |
2445 | 2450 | if (item[c].prom_type == 7) { |
2446 | 2451 | item[c].act = th.data.zuhe_map[item[c].prom_id]; |
2447 | 2452 | if(item[c].zh_b_num===undefined || item[c].zh_b_num===null ){ |
2448 | - var prom_goodsbuynum = 0; | |
2453 | + var prom_goodsbuynum = 0; | |
2449 | 2454 | //--要获得商品,该用户买了多少件,同步应用,用于限购的计算-- |
2450 | 2455 | await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { |
2451 | 2456 | data: { |
... | ... | @@ -2460,7 +2465,7 @@ Page({ |
2460 | 2465 | if(res.data.code==0 && res.data.data) |
2461 | 2466 | |
2462 | 2467 | if (res.data.data.promgoodsbuynum) { |
2463 | - promgoodsbuynum = res.data.data.promgoodsbuynum; | |
2468 | + prom_goodsbuynum = res.data.data.promgoodsbuynum; | |
2464 | 2469 | } |
2465 | 2470 | |
2466 | 2471 | }) | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
... | ... | @@ -526,7 +526,8 @@ Page({ |
526 | 526 | data: { |
527 | 527 | "storeId": a.stoid, //商家ID |
528 | 528 | "userId": d.user_id, //用户ID |
529 | - "giftBagId": th.getGiftID | |
529 | + "giftBagId": th.getGiftID, | |
530 | + isnNewUserLb:1 | |
530 | 531 | }, |
531 | 532 | success: function success(res) { |
532 | 533 | if (res.data.code == 0) { |
... | ... | @@ -604,6 +605,11 @@ Page({ |
604 | 605 | |
605 | 606 | } else { |
606 | 607 | getApp().my_warnning(res.data.msg, 0, _this2); |
608 | + | |
609 | + setTimeout(()=>{ | |
610 | + getApp().goto('/pages/index/index/index') | |
611 | + },2000) | |
612 | + | |
607 | 613 | return false; |
608 | 614 | } |
609 | 615 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -517,8 +517,15 @@ Page({ |
517 | 517 | // goods_bottomconent:e.goods_bottomconent |
518 | 518 | }); |
519 | 519 | |
520 | + if(e && e.goods_topconent && e.goods_ad_position.indexOf('1')>-1){ | |
521 | + //商品详情广告---- | |
522 | + a.wxParse("goodInfo_ad2", "html", ut.format_content(e.goods_topconent), ee, 6); | |
523 | + common.wxParseAddFullImageUrl(ee, "goodInfo_ad2"); | |
524 | + //------- | |
525 | + } | |
526 | + | |
520 | 527 | //判断商品详情要有东西 |
521 | - if(e && e.goods_bottomconent) { | |
528 | + if(e && e.goods_bottomconent && e.goods_ad_position.indexOf('2')>-1) { | |
522 | 529 | //商品详情广告---- |
523 | 530 | a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6); |
524 | 531 | common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> |
23 | 23 | </view> |
24 | 24 | |
25 | - <view class="type-navbar" style="top:{{top_nav-4}}px" wx:if="{{activeCategoryId>0 || !istop || ( istop && !searchbox_transparent)}}" > | |
25 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px" wx:if="{{activeCategoryId>0 || !istop || ( istop && !searchbox_transparent)}}" > | |
26 | 26 | <view class="type-box" wx:for="{{categories}}" wx:key="id"> |
27 | 27 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
28 | 28 | </view> |
... | ... | @@ -273,10 +273,10 @@ |
273 | 273 | <view class="goods-price"> |
274 | 274 | <!-- 价格显示 --> |
275 | 275 | <view class="co-red flex jc_sb ai-center"> |
276 | - <view class="market-price" style="overflow: hidden; height: 66rpx;display: flex; align-items: flex-end;"> | |
277 | - <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> | |
276 | + <view class="market-price" style="overflow: hidden; height: 66rpx;display: flex; align-items: flex-end;line-height: normal;"> | |
277 | + <image class="rel_img" style="display: block;top:12rpx" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> | |
278 | 278 | <block wx:if="{{prom_integral}}"> |
279 | - <text style="position: relative;top:10rpx">{{prom_integral}}</text> | |
279 | + <text style="display: block;font-size:58rpx; line-height: 58rpx;position: relative;top:8rpx ">{{prom_integral}}</text> | |
280 | 280 | <text class="rel_txt">积分</text> |
281 | 281 | </block> |
282 | 282 | <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> |
... | ... | @@ -878,6 +878,12 @@ |
878 | 878 | </view> |
879 | 879 | </view> |
880 | 880 | </view> |
881 | + | |
882 | + <!-- 详情广告顶部--> | |
883 | + <view class="wxParse"> | |
884 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | |
885 | + </view> | |
886 | + | |
881 | 887 | <!-- 详情图片 --> |
882 | 888 | <view class="wxParse"> |
883 | 889 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
... | ... | @@ -965,6 +971,12 @@ |
965 | 971 | </view> |
966 | 972 | </view> |
967 | 973 | </view> |
974 | + | |
975 | + <!-- 详情广告顶部--> | |
976 | + <view class="wxParse"> | |
977 | + <template is="wxParse" data="{{wxParseData:goodInfo_ad2.nodes}}"></template> | |
978 | + </view> | |
979 | + | |
968 | 980 | <view class="wxParse"> |
969 | 981 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
970 | 982 | </view> |
... | ... | @@ -1313,17 +1325,19 @@ |
1313 | 1325 | </view> |
1314 | 1326 | |
1315 | 1327 | </block> --> |
1316 | - <view class="buy-btn-all cart-btn" style="width: 30%;border-radius:0rpx 55rpx 55rpx 0rpx;" wx:if="{{can_integral}}"> | |
1328 | + <view class="buy-btn-all cart-btn" style="width: 30%;border-radius:0rpx 55rpx 55rpx 0rpx;overflow: hidden; " wx:if="{{can_integral}}"> | |
1317 | 1329 | <!-- 立即兑换 --> |
1318 | 1330 | <!-- <view wx:if="{{ prom_act.show_time_off}}" >即将开始</view> --> |
1319 | 1331 | <view wx:if="{{ prom_act.show_time_off}}" style="background-color: #aaa;">即将开始</view> |
1332 | + <view wx:elif="{{ prom_act.limitqty<= prom_act.buy_num}}" style="background-color: #aaa;">已兑光</view> | |
1320 | 1333 | <view bindtap="go_pay_integral" wx:else>立即兑换</view> |
1321 | 1334 | </view> |
1322 | 1335 | <view class="buy-btn cart-btn" style="background-color: #aaa;border-radius:0rpx 55rpx 55rpx 0rpx;" wx:else>积分不足</view> |
1323 | 1336 | </block> |
1324 | 1337 | <block wx:else> |
1325 | - <view class="buy-btn-all cart-btn" style="width: 58%; margin-left:1%;" wx:if="{{can_integral}}"> | |
1338 | + <view class="buy-btn-all cart-btn" style="width: 58%; margin-left:1%;overflow: hidden;" wx:if="{{can_integral}}"> | |
1326 | 1339 | <view wx:if="{{ prom_act.show_time_off}}" style="background-color: #aaa;" >即将开始</view> |
1340 | + <view wx:elif="{{ prom_act.limitqty<= prom_act.buy_num}}" style="background-color: #aaa;" >已兑光</view> | |
1327 | 1341 | <view bindtap="go_pay_integral" wx:else>立即兑换</view> |
1328 | 1342 | </view> |
1329 | 1343 | <!-- <block wx:if="{{can_integral}}"> | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
pages/user/my_service/i_service.js
pages/user/my_service/i_service.wxml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | |
4 | 4 | <!-- 背景图片 --> |
5 | 5 | <view catchtap="close"> |
6 | - <image class="backimage" style="top:{{navBarHeight}}px" mode="widthFix" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"/> | |
6 | + <image class="backimage" style="top:{{navBarHeight}}px" mode="widthFix" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"/> | |
7 | 7 | <view class="flex jc_sb pd20"> |
8 | 8 | <navigator class="fs26 white" url="/packageA/pages/service_record/service_record">服务记录</navigator> |
9 | 9 | <navigator class="fs26 white" url="/packageG/pages/user/my_service/hist_service">历史预约</navigator> | ... | ... |
utils/more_cx.js
... | ... | @@ -718,6 +718,24 @@ module.exports = { |
718 | 718 | //活动要排序一下 |
719 | 719 | k_item.act_arr.sort(comp); |
720 | 720 | |
721 | + //-- 看一下是不是组合购 -- 点击 --如果是从活动链接过来的,点亮 --,新增优化2024-1-20 | |
722 | + if(th.data.from_act_link){ | |
723 | + var fd_idx=k_item.act_arr.findIndex(function (eh){ | |
724 | + return eh.prom_type==th.data.from_act_link.prom_type && eh.prom_id==th.data.from_act_link.prom_id; | |
725 | + }) | |
726 | + | |
727 | + if(fd_idx>-1) { | |
728 | + ck_prom_type= k_item.act_arr[fd_idx]; | |
729 | + for (var idf = 0; idf < k_item.act_arr.length; idf++) { | |
730 | + if(fd_idx==idf){ | |
731 | + k_item.act_arr[idf].sele=1; | |
732 | + }else{ | |
733 | + k_item.act_arr[idf].sele=0; | |
734 | + } | |
735 | + } | |
736 | + } | |
737 | + } | |
738 | + | |
721 | 739 | //确定一下活动,先看一下有没有选择的活动 |
722 | 740 | ck_prom_type=k_item.act_arr.find(function (el){ |
723 | 741 | return el.sele; | ... | ... |