Commit 687fce2ae564809e7db6bb27427438392c6c1665
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
11 changed files
with
121 additions
and
120 deletions
app.json
... | ... | @@ -87,23 +87,23 @@ |
87 | 87 | "pages/template/index", |
88 | 88 | "pages/store/index" |
89 | 89 | ], |
90 | - | |
90 | + "plugins": { | |
91 | + "live-player-plugin": { | |
92 | + "version": "1.1.1", | |
93 | + "provider": "wx2b03c6e691cd7370" | |
94 | + } | |
95 | + }, | |
91 | 96 | "subPackages": [{ |
92 | 97 | "root": "packageA/", |
93 | 98 | "name":"pack1", |
94 | - "pages": [ | |
95 | - "pages/liveStream/liveStream", | |
99 | + "pages": [ | |
96 | 100 | "pages/prom_list/prom_list", |
97 | 101 | "pages/quan_list/quan_list", |
98 | 102 | "pages/quan_pro/quan_pro", |
103 | + "pages/liveStream/liveStream", | |
99 | 104 | "pages/liveStreamDetails/liveStreamDetails" |
100 | - ], | |
101 | - "plugins": { | |
102 | - "live-player-plugin": { | |
103 | - "version": "1.0.13", | |
104 | - "provider": "wx2b03c6e691cd7370" | |
105 | - } | |
106 | - } | |
105 | + ] | |
106 | + | |
107 | 107 | }], |
108 | 108 | |
109 | 109 | "permission": { | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.js
... | ... | @@ -83,39 +83,10 @@ Component({ |
83 | 83 | }, |
84 | 84 | |
85 | 85 | pageLifetimes: { |
86 | + //游客登陆后,只要更新卡的情况 | |
86 | 87 | show: function () { |
87 | - this.data.firist_type_curr=0, | |
88 | - this.data.currentPage=1, | |
89 | - this.setData({ goods_array: null}) | |
90 | - | |
91 | - // 页面被展示 | |
92 | - // 在组件实例进入页面节点树时执行 | |
93 | - this.data.classstyle_id = this.data.object.classstyle; | |
94 | - this.data.goodscount = this.data.object.goodscount; | |
95 | - this.data.wgroup = this.data.object.wgroup; | |
96 | - | |
97 | - this.setData({ | |
98 | - classstyle_id: this.data.object.classstyle | |
99 | - }) | |
100 | - if (this.data.object.goodsclass == 1) { | |
101 | - this.data.is_recommend = 1 | |
102 | - } | |
103 | - if (this.data.object.goodsclass == 2) { | |
104 | - this.data.is_hot = 1 | |
105 | - } | |
106 | - if (this.data.object.goodsclass == 3) { | |
107 | - this.data.is_new = 1 | |
108 | - } | |
109 | - this.data.requestData = new Array(); | |
110 | - //---将数组--- | |
111 | - this.data.g_id = this.data.object.data; | |
112 | - var arr = []; | |
113 | - for (var i = 0; i < this.data.g_id .length; i += this.data.goodscount) { | |
114 | - arr.push(this.data.g_id .slice(i, i + this.data.goodscount)); | |
115 | - } | |
116 | - | |
117 | - this.data.firist_type_data = arr; | |
118 | - this.init(this.data.classstyle_id, this.data.wgroup); | |
88 | + //--初始化卡类-- | |
89 | + this.card_init(); | |
119 | 90 | }, |
120 | 91 | }, |
121 | 92 | |
... | ... | @@ -178,16 +149,18 @@ Component({ |
178 | 149 | break; |
179 | 150 | case "2": |
180 | 151 | var item = {}; |
152 | + var r_data={ | |
153 | + store_id: os.stoid , | |
154 | + pageSize: th.data.goodscount, | |
155 | + page: th.data.currentPage, | |
156 | + isonsale: 1, | |
157 | + }; | |
158 | + if(th.data.is_recommend) r_data.is_recommend=th.data.is_recommend; | |
159 | + if(th.data.is_hot) r_data.is_hot=th.data.is_hot; | |
160 | + if(th.data.is_new) r_data.is_new=th.data.is_new; | |
161 | + | |
181 | 162 | app.request.promiseGet("/api/weshop/goods/page", { |
182 | - data: { | |
183 | - store_id: os.stoid , | |
184 | - is_recommend: th.data.is_recommend, | |
185 | - is_hot: th.data.is_hot, | |
186 | - is_new: th.data.is_new, | |
187 | - pageSize: th.data.goodscount, | |
188 | - page: th.data.currentPage, | |
189 | - isonsale: 1, | |
190 | - } | |
163 | + data:r_data | |
191 | 164 | }).then(res => { |
192 | 165 | //商品地址 |
193 | 166 | var goods = res.data.data.pageData; | ... | ... |
components/diy_searchbox/diy_searchbox.wxml
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | </view> |
11 | 11 | </view> |
12 | 12 | </view> |
13 | -<view wx:if="{{object.is_top}}" style="height: 120rpx;"></view> | |
13 | +<view wx:if="{{object.is_top==1}}" style="height: 120rpx;"></view> | |
14 | 14 | </block> |
15 | 15 | |
16 | 16 | |
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'> |
27 | 27 | <navigator url="/pages/goods/search/search" class="s1_gk_a2"> |
28 | 28 | <image src='/public/static/images/model/select.png'></image> |
29 | - <text>在店铺内搜索</text> | |
29 | + <text style='color:{{object.word_color?object.word_color:"#fff"}}'>在店铺内搜索</text> | |
30 | 30 | </navigator> |
31 | 31 | </view> |
32 | 32 | ... | ... |
components/goods_list/goods_list.js
pages/giftpack/giftpacklist/giftpacklist.js
... | ... | @@ -239,7 +239,7 @@ Page({ |
239 | 239 | } |
240 | 240 | } |
241 | 241 | } else { |
242 | - getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | |
242 | + getApp().my_warnning(res.data.msg, 0, th); | |
243 | 243 | return false; |
244 | 244 | } |
245 | 245 | } |
... | ... | @@ -283,6 +283,7 @@ Page({ |
283 | 283 | |
284 | 284 | _this2.setData({ |
285 | 285 | giftDate: res.data.data.endTime, |
286 | + giftStart: res.data.data.starTime, | |
286 | 287 | giftPosPrice: res.data.data.giftPosPrice, |
287 | 288 | giftQty: res.data.data.giftQty, |
288 | 289 | giftIntegral: res.data.data.payIntegral, |
... | ... | @@ -293,7 +294,7 @@ Page({ |
293 | 294 | isStart:isStart, |
294 | 295 | }) |
295 | 296 | } else { |
296 | - getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2); | |
297 | + getApp().my_warnning(res.data.msg, 0, _this2); | |
297 | 298 | return false; |
298 | 299 | } |
299 | 300 | } |
... | ... | @@ -337,7 +338,6 @@ Page({ |
337 | 338 | |
338 | 339 | }, |
339 | 340 | "put" |
340 | - | |
341 | 341 | ) |
342 | 342 | |
343 | 343 | }, | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.wxml
... | ... | @@ -7,8 +7,18 @@ |
7 | 7 | <text class="data-v-3a5b7e36 ellipsis-2">{{giftTitle}}</text> |
8 | 8 | </view> |
9 | 9 | <view class="top_time data-v-3a5b7e36"> |
10 | - <text class="data-v-3a5b7e36" wx:if="{{isBuy==0}}">{{"兑换截至时间:"+giftDate}}</text> | |
11 | - <text class="data-v-3a5b7e36" wx:else>{{"活动结束至时间:"+giftDate}}</text> | |
10 | + <block wx:if="{{isBuy==1 && giftTitle && isStart!=1}}" > | |
11 | + <text class="data-v-3a5b7e36"> | |
12 | + {{"活动开始时间:"+giftStart}} | |
13 | + </text> | |
14 | + </block> | |
15 | + <block wx:else> | |
16 | + <text class="data-v-3a5b7e36" wx:if="{{isBuy==0}}">{{"兑换结束时间:"+giftDate}}</text> | |
17 | + <text class="data-v-3a5b7e36" wx:else> | |
18 | + {{"活动结束时间:"+giftDate}} | |
19 | + </text> | |
20 | + </block> | |
21 | + | |
12 | 22 | </view> |
13 | 23 | <view class="top_price data-v-3a5b7e36"> |
14 | 24 | <block wx:if="{{giftPrice>0}}"> |
... | ... | @@ -100,29 +110,39 @@ |
100 | 110 | </view> |
101 | 111 | </view> |
102 | 112 | <view class="foot_empty data-v-3a5b7e36"></view> |
103 | - <block wx:if="{{isBuy==1}}"> | |
104 | - <view class="foot_button data-v-3a5b7e36"> | |
105 | - <block wx:if="{{giftPrice>0&&giftIntegral>0}}"> | |
106 | - <view class="foot_button_left data-v-3a5b7e36 {{isStart?'':'gray'}}" data-money="{{giftPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice"> | |
107 | - <text class="data-v-3a5b7e36 ">立即购买</text> | |
108 | - </view> | |
109 | - </block> | |
110 | - <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | |
111 | - <view class="foot_button_right data-v-3a5b7e36 {{isStart?'':'gray'}}" bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
112 | - <text class="data-v-3a5b7e36">立即兑换</text> | |
113 | - </view> | |
114 | - </block> | |
115 | - <block wx:if="{{giftPrice>0 && giftIntegral<=0}}"> | |
116 | - <view class="foot_button_buy data-v-3a5b7e36 {{isStart?'':'gray'}}" data-money="{{giftPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}"> | |
117 | - <text class="data-v-3a5b7e36">立即购买</text> | |
118 | - </view> | |
119 | - </block> | |
120 | - <block wx:if="{{giftPrice<=0 && giftIntegral>0}}"> | |
121 | - <view class="foot_button_intalge data-v-3a5b7e36 {{isStart?'':'gray'}}" bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
122 | - <text class="data-v-3a5b7e36">立即兑换</text> | |
123 | - </view> | |
124 | - </block> | |
125 | - </view> | |
113 | + <block wx:if="{{isBuy==1 && giftTitle}}"> | |
114 | + <block wx:if="{{isStart==1}}"> | |
115 | + <view class="foot_button data-v-3a5b7e36"> | |
116 | + <block wx:if="{{giftPrice>0&&giftIntegral>0}}"> | |
117 | + <view class="foot_button_left data-v-3a5b7e36 " data-money="{{giftPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice"> | |
118 | + <text class="data-v-3a5b7e36 ">立即购买</text> | |
119 | + </view> | |
120 | + </block> | |
121 | + <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | |
122 | + <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
123 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
124 | + </view> | |
125 | + </block> | |
126 | + <block wx:if="{{giftPrice>0 && giftIntegral<=0}}"> | |
127 | + <view class="foot_button_buy data-v-3a5b7e36 " data-money="{{giftPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}"> | |
128 | + <text class="data-v-3a5b7e36">立即购买</text> | |
129 | + </view> | |
130 | + </block> | |
131 | + <block wx:if="{{giftPrice<=0 && giftIntegral>0}}"> | |
132 | + <view class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}"> | |
133 | + <text class="data-v-3a5b7e36">立即兑换</text> | |
134 | + </view> | |
135 | + </block> | |
136 | + </view> | |
137 | + </block> | |
138 | + <block wx:else> | |
139 | + <view class="foot_button data-v-3a5b7e36"> | |
140 | + <view class="foot_button_intalge data-v-3a5b7e36 gray "> | |
141 | + <text class="data-v-3a5b7e36">活动还未开始</text> | |
142 | + </view> | |
143 | + </view> | |
144 | + </block> | |
145 | + | |
126 | 146 | </block> |
127 | 147 | <block wx:if="{{isBuy==0}}"> |
128 | 148 | <view class="foot_button data-v-3a5b7e36"> | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.wxss
... | ... | @@ -245,5 +245,5 @@ page.data-v-3a5b7e36 { |
245 | 245 | background-color: rgb(153,153,153); |
246 | 246 | } |
247 | 247 | |
248 | -.foot_button_left.data-v-3a5b7e36.gray{ background-color: #aaa; } | |
249 | -.foot_button_right.data-v-3a5b7e36.gray{ background-color: #aaa;} | |
248 | +.foot_button_intalge.data-v-3a5b7e36.gray{ background-color: #aaa; } | |
249 | + | ... | ... |
pages/index/index/index.js
... | ... | @@ -76,7 +76,7 @@ Page({ |
76 | 76 | |
77 | 77 | }, |
78 | 78 | |
79 | - onLoad: function() { | |
79 | + onLoad: async function() { | |
80 | 80 | var th = this; |
81 | 81 | //看一下商家是否开通了权益 |
82 | 82 | //--初始化是否有打勾-- |
... | ... | @@ -92,26 +92,11 @@ Page({ |
92 | 92 | }); |
93 | 93 | } |
94 | 94 | }) |
95 | - | |
96 | - | |
97 | - }, | |
98 | - //关闭新用户领取广告 | |
99 | - close_disgraceful: function() { | |
100 | - var th = this; | |
101 | - th.setData({ | |
102 | - is_disgraceful: 0 | |
103 | - }) | |
104 | - }, | |
105 | 95 | |
106 | - async onShow() { | |
107 | - | |
108 | - var th = this | |
109 | - | |
110 | 96 | //调用底部导航 |
111 | 97 | getApp().globalData.url=th.data.url |
112 | 98 | t.editTabBar(th,o.stoid,th.data.url); |
113 | 99 | |
114 | - | |
115 | 100 | await this.init_load(); |
116 | 101 | //显示的时候要开启计时器 |
117 | 102 | this.data.is_timer = 1; |
... | ... | @@ -119,16 +104,16 @@ Page({ |
119 | 104 | if (this.data.isTemplate) { |
120 | 105 | //---先获取会员--- |
121 | 106 | t.getUserFir(function() { |
122 | - th.is_festival(); | |
123 | - var new_nav = th.data.new_nav; | |
124 | - if (new_nav == "") { | |
125 | - th.is_new(); | |
126 | - } | |
127 | - setTimeout(function () { | |
128 | - if (getApp().globalData.user_id) getApp().requestCardNum(th); | |
129 | - },500) | |
130 | - | |
131 | - }); | |
107 | + th.is_festival(); | |
108 | + var new_nav = th.data.new_nav; | |
109 | + if (new_nav == "") { | |
110 | + th.is_new(); | |
111 | + } | |
112 | + setTimeout(function () { | |
113 | + if (getApp().globalData.user_id) getApp().requestCardNum(th); | |
114 | + },500) | |
115 | + | |
116 | + }); | |
132 | 117 | } else { |
133 | 118 | await this.init_fir(); |
134 | 119 | wx.setNavigationBarColor({ |
... | ... | @@ -168,12 +153,25 @@ Page({ |
168 | 153 | }).then(res => { |
169 | 154 | if (res.data.data) { |
170 | 155 | var gd_category = res.data.data.pageData; |
171 | - | |
172 | 156 | th.setData({ |
173 | 157 | gd_category: gd_category |
174 | 158 | }); |
175 | 159 | } |
176 | 160 | }) |
161 | + | |
162 | + | |
163 | + | |
164 | + }, | |
165 | + //关闭新用户领取广告 | |
166 | + close_disgraceful: function() { | |
167 | + var th = this; | |
168 | + th.setData({ | |
169 | + is_disgraceful: 0 | |
170 | + }) | |
171 | + }, | |
172 | + | |
173 | + async onShow() { | |
174 | + var th = this | |
177 | 175 | }, |
178 | 176 | //当隐藏的时候就关闭计时器 |
179 | 177 | onHide: function() { |
... | ... | @@ -185,6 +183,7 @@ Page({ |
185 | 183 | clearInterval(i); |
186 | 184 | } |
187 | 185 | |
186 | + | |
188 | 187 | }, |
189 | 188 | |
190 | 189 | //同步初始加载 |
... | ... | @@ -469,13 +468,12 @@ Page({ |
469 | 468 | this.data.timer && (clearInterval(this.data.timer), this.data.timer = null); |
470 | 469 | }, |
471 | 470 | onPageScroll: function(e) { |
472 | - this.setData({ | |
473 | - scrollTop: e.scrollTop | |
474 | - }); | |
471 | + this.data.scrollTop=e.scrollTop; | |
472 | + | |
473 | + | |
475 | 474 | var t = getCurrentPages(); |
476 | 475 | "pages/index/index/index" == t[t.length - 1].route; |
477 | - /*-- | |
478 | - && (e.scrollTop > 10 ? wx.setNavigationBarColor({ | |
476 | + /*--(e.scrollTop > 10 ? wx.setNavigationBarColor({ | |
479 | 477 | frontColor: "#ffffff", |
480 | 478 | backgroundColor: "#f95959" |
481 | 479 | }) : wx.setNavigationBarColor({ |
... | ... | @@ -829,5 +827,4 @@ Page({ |
829 | 827 | }) |
830 | 828 | } |
831 | 829 | |
832 | - | |
833 | 830 | }); |
834 | 831 | \ No newline at end of file | ... | ... |
pages/index/index/index.wxml
pages/index/index/index.wxss
pages/template/index.js
... | ... | @@ -45,6 +45,11 @@ Page({ |
45 | 45 | var data = res.data.data; |
46 | 46 | if (data) { |
47 | 47 | var temp_data = data; |
48 | + | |
49 | + wx.setNavigationBarTitle({ | |
50 | + title: temp_data.page_title, | |
51 | + }); | |
52 | + | |
48 | 53 | var t_arr = JSON.parse(temp_data.json_str); |
49 | 54 | th.setData({ |
50 | 55 | template_arr: t_arr, |
... | ... | @@ -63,9 +68,7 @@ Page({ |
63 | 68 | } |
64 | 69 | }) |
65 | 70 | |
66 | - wx.setNavigationBarTitle({ | |
67 | - title: '模板预览', | |
68 | - }); | |
71 | + | |
69 | 72 | |
70 | 73 | }, |
71 | 74 | ... | ... |