Commit a0a37ea8e4dd917b34d309632499362f51e475b0
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
34 changed files
with
449 additions
and
103 deletions
app.wxss
... | ... | @@ -446,12 +446,12 @@ background: #ffe3e2; |
446 | 446 | /* 图标字体(ty) */ |
447 | 447 | @font-face { |
448 | 448 | font-family: 'iconfont'; /* project id 2054717 */ |
449 | - src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot'); | |
450 | - src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot?#iefix') format('embedded-opentype'), | |
451 | - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff2') format('woff2'), | |
452 | - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff') format('woff'), | |
453 | - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.ttf') format('truetype'), | |
454 | - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.svg#iconfont') format('svg'); | |
449 | + src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot'); | |
450 | + src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot?#iefix') format('embedded-opentype'), | |
451 | + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff2') format('woff2'), | |
452 | + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff') format('woff'), | |
453 | + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.ttf') format('truetype'), | |
454 | + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.svg#iconfont') format('svg'); | |
455 | 455 | } |
456 | 456 | |
457 | 457 | .iconfont { |
... | ... | @@ -462,6 +462,10 @@ background: #ffe3e2; |
462 | 462 | -moz-osx-font-smoothing: grayscale; |
463 | 463 | } |
464 | 464 | |
465 | +.icon-shanchu:before { | |
466 | + content: "\e61b"; | |
467 | +} | |
468 | + | |
465 | 469 | .icon-buqian:before { |
466 | 470 | content: "\e65f"; |
467 | 471 | } | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.js
... | ... | @@ -121,9 +121,13 @@ Component({ |
121 | 121 | |
122 | 122 | methods: { |
123 | 123 | // 这里是一个自定义方法 |
124 | - init: function (classstyle_id, wgroup) { | |
124 | + init:async function (classstyle_id, wgroup) { | |
125 | + | |
126 | + this.setData({classstyle_id:classstyle_id}) | |
127 | + | |
125 | 128 | var th = this; |
126 | 129 | var g_id = this.data.g_id; |
130 | + var len=this.data.firist_type_data.length; | |
127 | 131 | if (classstyle_id == 1) { |
128 | 132 | //---手动选择的时候--- |
129 | 133 | g_id = this.data.firist_type_data[th.data.firist_type_curr]; |
... | ... | @@ -147,7 +151,7 @@ Component({ |
147 | 151 | str += g_id[i].goodsid + ","; |
148 | 152 | } |
149 | 153 | str=str.substring(0, str.length - 1); |
150 | - app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, { | |
154 | + await app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, { | |
151 | 155 | isShowLoading:false, |
152 | 156 | success: function(res) { |
153 | 157 | |
... | ... | @@ -179,8 +183,8 @@ Component({ |
179 | 183 | } |
180 | 184 | |
181 | 185 | //---控制有没有加载更多的按钮--- |
182 | - if (th.data.firist_type_curr == th.data.firist_type_data.length) {th.setData({ goods_btn: [] }); } | |
183 | - else th.setData({ goods_btn: res.data}); | |
186 | + if (th.data.firist_type_curr >= len) {th.setData({ goods_btn: [] }); } | |
187 | + else th.setData({ goods_btn: [1,2]}); | |
184 | 188 | } |
185 | 189 | } |
186 | 190 | |
... | ... | @@ -199,7 +203,7 @@ Component({ |
199 | 203 | if(th.data.is_hot) r_data.is_hot=th.data.is_hot; |
200 | 204 | if(th.data.is_new) r_data.is_new=th.data.is_new; |
201 | 205 | |
202 | - app.request.promiseGet("/api/weshop/goods/page", { | |
206 | + await app.request.promiseGet("/api/weshop/goods/page", { | |
203 | 207 | data:r_data |
204 | 208 | }).then(res => { |
205 | 209 | //商品地址 |
... | ... | @@ -216,7 +220,7 @@ Component({ |
216 | 220 | break; |
217 | 221 | case "3": |
218 | 222 | var item = {}; |
219 | - app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", { | |
223 | + await app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", { | |
220 | 224 | data: { |
221 | 225 | store_id:os.stoid , |
222 | 226 | gpid: wgroup, | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.wxml
... | ... | @@ -602,14 +602,16 @@ |
602 | 602 | </block> |
603 | 603 | <view class="clear"></view> |
604 | 604 | </view> |
605 | + | |
606 | + | |
605 | 607 | <!-- 商品的显示不是左右 --> |
606 | 608 | <block wx:if="{{object.column!=5}}"> |
607 | -<block wx:if="{{object.classstyle=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none"> | |
609 | +<block wx:if="{{classstyle_id=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none"> | |
608 | 610 | <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> |
609 | 611 | {{loadText}} |
610 | 612 | </button> |
611 | 613 | </view></block> |
612 | -<block wx:if="{{object.classstyle!='1' }}"> | |
614 | +<block wx:if="{{classstyle_id!='1' }}"> | |
613 | 615 | <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> |
614 | 616 | <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">{{loadText}}</button> |
615 | 617 | </view> | ... | ... |
components/diy_video/diy_video.js
1 | +var t = getApp(), | |
2 | + a = t.request, | |
3 | + os = t.globalData.setting; | |
4 | + | |
1 | 5 | Component({ |
2 | 6 | properties: { |
3 | 7 | object: { |
... | ... | @@ -11,10 +15,17 @@ Component({ |
11 | 15 | // 这里是一些组件内部数据 |
12 | 16 | someData: {}, |
13 | 17 | videoUrl: "", |
18 | + url:os.imghost | |
14 | 19 | }, |
15 | 20 | |
16 | - ready: function () { | |
17 | - this.create_url(); | |
21 | + ready: function () { | |
22 | + //-- 如果是本地视频的时候 -- | |
23 | + if(this.properties.object.style!=2){ | |
24 | + //网络地址 | |
25 | + this.create_url(); | |
26 | + }else{ | |
27 | + this.setData({videoUrl:this.properties.object.src}); | |
28 | + } | |
18 | 29 | }, |
19 | 30 | methods: { |
20 | 31 | // 这里是一个自定义方法 | ... | ... |
components/diy_video/diy_video.wxml
packageA/pages/chongzhi/chongzhi.wxml
... | ... | @@ -36,6 +36,7 @@ |
36 | 36 | <view class="bottom" wx:if="{{currentIndex == 0}}" > |
37 | 37 | <text wx:if="{{g_filter.is_acting(item.EndDate)}}" |
38 | 38 | catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text> |
39 | + <text wx:else class="btn" style="background-color: #ccc;">已过期</text> | |
39 | 40 | <text data-index="{{index}}" class="btn details" >详情</text> |
40 | 41 | </view> |
41 | 42 | <view class="bottom" wx:if="{{currentIndex == 1}}" > | ... | ... |
packageA/pages/liveStreamDetails/liveStreamDetails.js
... | ... | @@ -399,13 +399,18 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un |
399 | 399 | this.getSystemInfo(); |
400 | 400 | |
401 | 401 | var first_leader=options.first_leader; |
402 | + var staffId=options.staffId; | |
403 | + var storageId=options.storageId; | |
404 | + | |
402 | 405 | if(first_leader){ |
403 | 406 | //-- user_id代过来免登陆 -- |
404 | 407 | getApp().globalData.first_leader=first_leader; |
405 | 408 | //调用接口判断是不是会员 |
406 | 409 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{ |
407 | 410 | if(res.data.code==0){ |
408 | - getApp().globalData.guide_id=res.data.data.id; | |
411 | + getApp().globalData.guide_id=res.data.data.id; | |
412 | + getApp().globalData.staffId=staffId; | |
413 | + getApp().globalData.storageId=storageId; | |
409 | 414 | } |
410 | 415 | }) |
411 | 416 | } |
... | ... | @@ -420,6 +425,22 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un |
420 | 425 | that.setData({ |
421 | 426 | details: obj |
422 | 427 | }) |
428 | + | |
429 | + //-- 如果是导购的时候 -- | |
430 | + if(getApp().globalData.guide_id && getApp().globalData.user_id){ | |
431 | + //报错领取记录 | |
432 | + var record={}; | |
433 | + record.storeId=os.stoid; | |
434 | + record.ReceiveTime=ut.formatTime(); | |
435 | + record.ReceiveType=7; | |
436 | + record.ReceiveUserId=getApp().globalData.user_id; | |
437 | + record.ShareStaffId=getApp().globalData.staffId; | |
438 | + record.ShareStorageId=getApp().globalData.storageId; | |
439 | + record.shareActId=details.id; | |
440 | + record.shareActName=details.name; | |
441 | + getApp().request.promiseGet.post('api/weshop/MdReceiveType/saveReceive',{data:record}).then(res=>{}) | |
442 | + } | |
443 | + | |
423 | 444 | |
424 | 445 | |
425 | 446 | // 请求主图 | ... | ... |
pages/activity/pind_list/pind_list.js
... | ... | @@ -14,12 +14,14 @@ Page({ |
14 | 14 | timer:null, |
15 | 15 | ismore:1, |
16 | 16 | isshow:0, |
17 | - iurl: os.imghost, | |
17 | + iurl: os.imghost, | |
18 | + ad_data:null, | |
18 | 19 | }, |
19 | 20 | |
20 | 21 | //------初始化加载---------- |
21 | 22 | onLoad: function(t) { |
22 | 23 | var first_leader = t.first_leader; |
24 | + var th=this; | |
23 | 25 | |
24 | 26 | console.log("------------"); |
25 | 27 | console.log(first_leader); |
... | ... | @@ -33,6 +35,22 @@ Page({ |
33 | 35 | } |
34 | 36 | }) |
35 | 37 | } |
38 | + | |
39 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=801&store_id=" + os.stoid, { | |
40 | + data: { | |
41 | + enabled: 1 | |
42 | + } | |
43 | + }).then(res => { | |
44 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
45 | + var a = res.data.data.pageData; | |
46 | + var tt = { | |
47 | + 'ad_code': os.imghost + a[0].ad_code, | |
48 | + 'media_link': '', | |
49 | + 'ad_weapplink':a[0].ad_weapplink | |
50 | + }; | |
51 | + th.setData({ad_data:tt}); | |
52 | + } | |
53 | + }) | |
36 | 54 | }, |
37 | 55 | |
38 | 56 | onShow: function(t) { | ... | ... |
pages/activity/pind_list/pind_list.wxml
... | ... | @@ -2,8 +2,13 @@ |
2 | 2 | |
3 | 3 | <view class=" body_frame"> |
4 | 4 | |
5 | -<image class="xc-top-img" src="{{url}}/miniapp/images/team.jpg"> | |
6 | -</image> | |
5 | +<block wx:if="{{ad_data}}"> | |
6 | + <image class="xc-top-img" src="{{ad_data.ad_code}}"></image> | |
7 | +</block> | |
8 | +<block wx:else> | |
9 | + <image class="xc-top-img" src="{{url}}/miniapp/images/team.jpg"></image> | |
10 | +</block> | |
11 | + | |
7 | 12 | |
8 | 13 | <view class="kill-list"> |
9 | 14 | <view class="kill-item" wx:for="{{goodlist}}" wx:if="{{item.djs.hide==1}}"> | ... | ... |
pages/activity/seckill_list/seckill_list.js
... | ... | @@ -11,11 +11,13 @@ Page({ |
11 | 11 | timer:null, |
12 | 12 | ismore:1, //是否可以加载更多 |
13 | 13 | isshow:0, |
14 | + ad_data:null, | |
14 | 15 | }, |
15 | 16 | |
16 | 17 | //------初始化加载---------- |
17 | 18 | onLoad: function(t) { |
18 | 19 | var first_leader = t.first_leader; |
20 | + var th=this; | |
19 | 21 | |
20 | 22 | console.log("------------"); |
21 | 23 | console.log(first_leader); |
... | ... | @@ -29,6 +31,23 @@ Page({ |
29 | 31 | } |
30 | 32 | }) |
31 | 33 | } |
34 | + | |
35 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=701&store_id=" + os.stoid, { | |
36 | + data: { | |
37 | + enabled: 1 | |
38 | + } | |
39 | + }).then(res => { | |
40 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
41 | + var a = res.data.data.pageData; | |
42 | + var tt = { | |
43 | + 'ad_code': os.imghost + a[0].ad_code, | |
44 | + 'media_link': '', | |
45 | + 'ad_weapplink':a[0].ad_weapplink | |
46 | + }; | |
47 | + th.setData({ad_data:tt}); | |
48 | + } | |
49 | + }) | |
50 | + | |
32 | 51 | }, |
33 | 52 | |
34 | 53 | ... | ... |
pages/activity/seckill_list/seckill_list.wxml
... | ... | @@ -2,8 +2,12 @@ |
2 | 2 | <block wx:if="{{isshow}}"> |
3 | 3 | <view class=" body_frame"> |
4 | 4 | |
5 | -<image class="xc-top-img" src="{{url}}/miniapp/images/seckill_top_img.jpg"> | |
6 | -</image> | |
5 | +<block wx:if="{{ad_data}}"> | |
6 | + <image class="xc-top-img" src="{{ad_data.ad_code}}"></image> | |
7 | +</block> | |
8 | +<block wx:else> | |
9 | + <image class="xc-top-img" src="{{url}}/miniapp/images/seckill_top_img.jpg"></image> | |
10 | +</block> | |
7 | 11 | |
8 | 12 | |
9 | 13 | <view class="kill-list abs seckill_list"> | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.js
... | ... | @@ -25,6 +25,7 @@ Page({ |
25 | 25 | curpage: 1, //当前分页数 |
26 | 26 | pageSize: 10, //页大小 |
27 | 27 | total: 0, //总数量 |
28 | + ad_data:null, | |
28 | 29 | }, |
29 | 30 | onLoad: function(options) { |
30 | 31 | |
... | ... | @@ -35,6 +36,25 @@ Page({ |
35 | 36 | getStorageID: a.stoid, |
36 | 37 | getUserID: d.user_id |
37 | 38 | }) |
39 | + | |
40 | + | |
41 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, { | |
42 | + data: { | |
43 | + enabled: 1 | |
44 | + } | |
45 | + }).then(res => { | |
46 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
47 | + var a = res.data.data.pageData; | |
48 | + var tt = { | |
49 | + 'ad_code': os.imghost + a[0].ad_code, | |
50 | + 'media_link': '', | |
51 | + 'ad_weapplink':a[0].ad_weapplink, | |
52 | + 'bgcolor':a[0].bgcolor, | |
53 | + }; | |
54 | + th.setData({ad_data:tt}); | |
55 | + } | |
56 | + }) | |
57 | + | |
38 | 58 | |
39 | 59 | }, |
40 | 60 | onShow: function() { |
... | ... | @@ -73,6 +93,13 @@ Page({ |
73 | 93 | "userId": that.getUserID, //用户ID |
74 | 94 | "buyFrom": 2 |
75 | 95 | }; |
96 | + | |
97 | + //-- 分享导购要记录 -- | |
98 | + if(getApp().globalData.guide_id){ | |
99 | + json.guide_id=getApp().globalData.guide_id; | |
100 | + } | |
101 | + | |
102 | + | |
76 | 103 | var data = JSON.stringify(json); |
77 | 104 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
78 | 105 | getApp().request.json_post(url, json, |
... | ... | @@ -134,6 +161,13 @@ Page({ |
134 | 161 | "userId": that.getUserID, //用户ID |
135 | 162 | "buyFrom": 2 |
136 | 163 | }; |
164 | + | |
165 | + //-- 分享导购要记录 -- | |
166 | + if(getApp().globalData.guide_id){ | |
167 | + json.guide_id=getApp().globalData.guide_id; | |
168 | + } | |
169 | + | |
170 | + | |
137 | 171 | var data = JSON.stringify(json); |
138 | 172 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
139 | 173 | getApp().request.json_post(url, json, | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.wxml
1 | -<view class="top_img"> | |
2 | - <view class="top_img"> | |
3 | - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
4 | - </view> | |
1 | +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};"> | |
2 | + <block wx:if="{{ad_data}}"> | |
3 | + <view class="top_img"> | |
4 | + <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
5 | + </view> | |
6 | + </block> | |
7 | + <block wx:else> | |
8 | + <view class="top_img"> | |
9 | + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
10 | + </view> | |
11 | + </block> | |
12 | + | |
13 | + | |
5 | 14 | <view class="top_title"> |
6 | 15 | <view class="top_title_box"> |
7 | 16 | <text class="top_title_redtext">礼包列表</text> | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.wxss
pages/giftpack/giftpacklist/giftpacklist.js
... | ... | @@ -141,10 +141,8 @@ Page({ |
141 | 141 | |
142 | 142 | } |
143 | 143 | |
144 | - | |
145 | 144 | ) |
146 | 145 | |
147 | - | |
148 | 146 | }, |
149 | 147 | GetBuyIntegral: function(e) { |
150 | 148 | var that = this.data; |
... | ... | @@ -175,6 +173,13 @@ Page({ |
175 | 173 | "userId": d.user_id, //用户ID |
176 | 174 | "buyFrom":2 |
177 | 175 | }; |
176 | + | |
177 | + //-- 分享导购要记录 -- | |
178 | + if(getApp().globalData.guide_id){ | |
179 | + json.guide_id=getApp().globalData.guide_id; | |
180 | + } | |
181 | + | |
182 | + | |
178 | 183 | var data = JSON.stringify(json); |
179 | 184 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
180 | 185 | getApp().request.json_post(url, json, | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.js
... | ... | @@ -25,6 +25,7 @@ Page({ |
25 | 25 | curpage: 1, //当前分页数 |
26 | 26 | pageSize: 10, //页大小 |
27 | 27 | total: 0, //总数量 |
28 | + ad_data:null, | |
28 | 29 | }, |
29 | 30 | |
30 | 31 | onLoad: function(options) { |
... | ... | @@ -36,6 +37,23 @@ Page({ |
36 | 37 | loadingType: 0, |
37 | 38 | getDate: i.formatTime(new Date().getTime()) |
38 | 39 | }) |
40 | + | |
41 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, { | |
42 | + data: { | |
43 | + enabled: 1 | |
44 | + } | |
45 | + }).then(res => { | |
46 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
47 | + var a = res.data.data.pageData; | |
48 | + var tt = { | |
49 | + 'ad_code': os.imghost + a[0].ad_code, | |
50 | + 'media_link': '', | |
51 | + 'ad_weapplink':a[0].ad_weapplink, | |
52 | + 'bgcolor':a[0].bgcolor, | |
53 | + }; | |
54 | + th.setData({ad_data:tt}); | |
55 | + } | |
56 | + }) | |
39 | 57 | |
40 | 58 | }, |
41 | 59 | onShow: function() { | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxml
1 | -<view class="top_img"> | |
2 | - <view class="top_img"> | |
3 | - <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> --> | |
4 | - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image> | |
5 | - </view> | |
1 | +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};"> | |
2 | + <block wx:if="{{ad_data}}"> | |
3 | + <view class="top_img"> | |
4 | + <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
5 | + </view> | |
6 | + </block> | |
7 | + <block wx:else> | |
8 | + <view class="top_img"> | |
9 | + <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> --> | |
10 | + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image> | |
11 | + </view> | |
12 | + </block> | |
13 | + | |
14 | + | |
6 | 15 | <view class="top_title"> |
7 | 16 | <view class="top_title_box"> |
8 | 17 | <text class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">礼包列表</text> | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxss
pages/goods/categoryList/categoryList.js
... | ... | @@ -819,7 +819,7 @@ Page({ |
819 | 819 | // }, |
820 | 820 | // 左侧更新 |
821 | 821 | scrollLower: function (data) { |
822 | - //console.log("上拉加载更多", JSON.stringify(data)) | |
822 | + if(this.data.is_no_more) return false; | |
823 | 823 | var that = this; |
824 | 824 | clearInterval(that.data.timer); |
825 | 825 | that.setData({ |
... | ... | @@ -843,18 +843,17 @@ Page({ |
843 | 843 | }); |
844 | 844 | if (e.data.data.pageData.length > 0) { |
845 | 845 | s.setData({ |
846 | - msgStatus: false, | |
846 | + msgStatus: false,is_no_more:0 | |
847 | 847 | }); |
848 | 848 | //如果有数据 判断分页为第一页的时候直接渲染数据 |
849 | 849 | if (page > 1) { |
850 | 850 | //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面 |
851 | 851 | var arr = s.data.requestData |
852 | - console.log("arr:=" + JSON.stringify(arr)) | |
853 | - | |
852 | + | |
854 | 853 | for (var i = 0; i < e.data.data.pageData.length;i++){ |
855 | 854 | arr.push(e.data.data.pageData[i]); |
856 | 855 | } |
857 | - console.log(arr) | |
856 | + | |
858 | 857 | s.setData({ |
859 | 858 | requestData: arr |
860 | 859 | }); |
... | ... | @@ -875,19 +874,28 @@ Page({ |
875 | 874 | if (page != 1) { |
876 | 875 | var dataArray = s.data.one_level_classify |
877 | 876 | var index = s.data.index |
878 | - dataArray[index]['items']['is_show_class'] = false | |
879 | - dataArray[index+1]['items']['is_show_class'] = true | |
880 | - console.log(dataArray[index + 1]['items']) | |
881 | - s.setData({ | |
882 | - msgStatus: true, | |
883 | - stylePage: 1, | |
884 | - index: index + 1, | |
885 | - select_classify_on: index + 1, | |
886 | - cat_id: dataArray[index + 1]['items']['id'], | |
887 | - classify_name: dataArray[index + 1]['items']['name'], | |
888 | - one_level_classify: dataArray | |
889 | - }); | |
890 | - s.style(s.data.stylePage, dataArray[index + 1]['items']['id']) | |
877 | + dataArray[index]['items']['is_show_class'] = false | |
878 | + //没有下一个类别的时候 | |
879 | + if(index+1>=dataArray.length){ | |
880 | + s.setData({is_no_more:1}); | |
881 | + }else{ | |
882 | + dataArray[index+1]['items']['is_show_class'] = true | |
883 | + console.log(dataArray[index + 1]['items']) | |
884 | + s.setData({ | |
885 | + msgStatus: true, | |
886 | + stylePage: 1, | |
887 | + index: index + 1, | |
888 | + select_classify_on: index + 1, | |
889 | + cat_id: dataArray[index + 1]['items']['id'], | |
890 | + classify_name: dataArray[index + 1]['items']['name'], | |
891 | + one_level_classify: dataArray, | |
892 | + is_no_more:0 | |
893 | + }); | |
894 | + s.style(s.data.stylePage, dataArray[index + 1]['items']['id']) | |
895 | + } | |
896 | + | |
897 | + | |
898 | + | |
891 | 899 | }else{ |
892 | 900 | //没有数据而且是第一页的时候 |
893 | 901 | s.setData({ |
... | ... | @@ -897,7 +905,8 @@ Page({ |
897 | 905 | s.setData({ |
898 | 906 | msgStatus: true, |
899 | 907 | countDownNum: countDownNum, |
900 | - requestData: [] | |
908 | + requestData: [], | |
909 | + is_no_more:0, | |
901 | 910 | }); |
902 | 911 | s.data.timer=setInterval(function () { |
903 | 912 | if (countDownNum == 0) { |
... | ... | @@ -1012,6 +1021,12 @@ Page({ |
1012 | 1021 | if(!url || url=='') return; |
1013 | 1022 | if(url[0]!='/') url='/'+url; |
1014 | 1023 | getApp().goto(url); |
1024 | + }, | |
1025 | + | |
1026 | + onShareTimeline(){ | |
1027 | + return { | |
1028 | + title:'商品分类-'+getApp().globalData.config.store_name, | |
1029 | + } | |
1015 | 1030 | } |
1016 | 1031 | |
1017 | 1032 | }); |
1018 | 1033 | \ No newline at end of file | ... | ... |
pages/goods/categoryList/categoryList.wxml
... | ... | @@ -493,6 +493,9 @@ |
493 | 493 | </block> |
494 | 494 | </view> |
495 | 495 | </navigator> |
496 | + <!-- 暂无更多 --> | |
497 | + <view style="height: 30rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;" | |
498 | + wx:if="{{is_no_more}}">暂无更多</view> | |
496 | 499 | </view> |
497 | 500 | <view class="no-data" wx:if="{{msgStatus == true}}"> |
498 | 501 | <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> |
... | ... | @@ -500,8 +503,9 @@ |
500 | 503 | <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px"> |
501 | 504 | <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view><view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> </view> |
502 | 505 | <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view> |
503 | - <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> --> | |
506 | + <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> --> | |
504 | 507 | </view> |
508 | + | |
505 | 509 | |
506 | 510 | </scroll-view> |
507 | 511 | <!-- /goodslist --> | ... | ... |
pages/goods/goodsInfo/buy_integral.wxml
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 | <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> |
12 | 12 | <text wx:if="{{prom_integral && prom_price}}">+</text> |
13 | 13 | <text wx:if="{{prom_price}}">{{prom_price}}元</text> |
14 | + <text wx:if="{{!prom_integral && !prom_price}}">0积分</text> | |
14 | 15 | </view> |
15 | 16 | </view> |
16 | 17 | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -261,10 +261,10 @@ Page({ |
261 | 261 | room_user_share=t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id |
262 | 262 | |
263 | 263 | //-- 自定义海报 -- |
264 | - getApp().request.promiseGet("/api/weshop/goods/poster/page",{ | |
265 | - data:{store_id:os.stoid, type:1, is_use:1 } | |
264 | + getApp().request.promiseGet("/api/weshop/goods/poster/page", { | |
265 | + data:{store_id:os.stoid, type:1, is_use:1} | |
266 | 266 | }).then(res=>{ |
267 | - if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){ | |
267 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]){ | |
268 | 268 | |
269 | 269 | var poster_data=res.data.data.pageData[0]; |
270 | 270 | var json_str=poster_data.jsonStr; |
... | ... | @@ -314,7 +314,6 @@ Page({ |
314 | 314 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ |
315 | 315 | if(res.data.code==0){ |
316 | 316 | getApp().globalData.guide_id=res.data.data.id; |
317 | - console.log("log2---".getApp().globalData.guide_id); | |
318 | 317 | } |
319 | 318 | }) |
320 | 319 | } |
... | ... | @@ -3587,6 +3586,12 @@ Page({ |
3587 | 3586 | 'store_id': os.stoid, |
3588 | 3587 | 'type': 5 |
3589 | 3588 | }; |
3589 | + | |
3590 | + //-- 导购ID -- | |
3591 | + if(getApp().globalData.guide_id){ | |
3592 | + pdata.guide_id=getApp().globalData.guide_id; | |
3593 | + } | |
3594 | + | |
3590 | 3595 | var app = getApp(), |
3591 | 3596 | th = this; |
3592 | 3597 | app.request.post("/api/weshop/couponList/saveCouponList", { |
... | ... | @@ -3641,14 +3646,14 @@ Page({ |
3641 | 3646 | var unit = that.data.screenWidth / 750 * 1.35; //基础单位, |
3642 | 3647 | var path2 = that.data.data.original_img; |
3643 | 3648 | var scene = th.data.gid+""; |
3644 | - var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0; | |
3645 | - if(user_id>0){ | |
3649 | + var user_id = getApp().globalData.user_id?getApp().globalData.user_id:0; | |
3650 | + if(user_id>0) { | |
3646 | 3651 | scene+="_"+user_id; |
3647 | 3652 | } |
3648 | 3653 | //-- 如果不是会员分享过来的要分享给别人 -- |
3649 | - if(getApp().globalData.room_id && th.data.data.goods_id==getApp().globalData.room_goods_id && !getApp().globalData.room_user_share){ | |
3654 | + if(getApp().globalData.room_id && th.data.data.goods_id==getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
3650 | 3655 | //固定房间是第3个字符 |
3651 | - if(!user_id) scene+="_0"; | |
3656 | + if(!user_id) scene+="_0"; | |
3652 | 3657 | scene+="_"+getApp().globalData.room_id ; |
3653 | 3658 | } |
3654 | 3659 | ///二微码 |
... | ... | @@ -3678,7 +3683,7 @@ Page({ |
3678 | 3683 | context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); |
3679 | 3684 | |
3680 | 3685 | //-- 是自定义海报的情况下 -- |
3681 | - if(th.data.poster && parseInt(th.data.poster.style)==2){ | |
3686 | + if(th.data.poster && parseInt(th.data.poster.style)==2) { | |
3682 | 3687 | //在线上分享人的情况下 |
3683 | 3688 | if(parseInt(th.data.poster.show_headpic)){ |
3684 | 3689 | //获取坐标 |
... | ... | @@ -3697,9 +3702,13 @@ Page({ |
3697 | 3702 | context.setFontSize(16 * unit) |
3698 | 3703 | context.setLineJoin('round'); //交点设置成圆角 |
3699 | 3704 | context.setFillStyle("white") |
3700 | - context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); | |
3705 | + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); | |
3706 | + | |
3707 | + context.setFillStyle("black") | |
3708 | + context.setFontSize(24 * unit) | |
3709 | + context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | |
3701 | 3710 | } |
3702 | - }else{ | |
3711 | + } else { | |
3703 | 3712 | //--昵称--- |
3704 | 3713 | context.setFontSize(24 * unit) |
3705 | 3714 | context.setFillStyle("black") |
... | ... | @@ -3708,9 +3717,9 @@ Page({ |
3708 | 3717 | //强烈推荐 改许程 |
3709 | 3718 | var tj_path = "../../../images/share/q_tj.png"; |
3710 | 3719 | context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); |
3711 | - context.setFontSize(16 * unit) | |
3720 | + context.setFontSize(16 * unit); | |
3712 | 3721 | context.setLineJoin('round'); //交点设置成圆角 |
3713 | - context.setFillStyle("white") | |
3722 | + context.setFillStyle("white"); | |
3714 | 3723 | context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 76 * unit); |
3715 | 3724 | } |
3716 | 3725 | |
... | ... | @@ -3754,7 +3763,8 @@ Page({ |
3754 | 3763 | if(integral){text=integral+"积分"; } |
3755 | 3764 | if(pri0 && integral){ text+="+";} |
3756 | 3765 | if(pri0){ text+="¥"+pri0;} |
3757 | - | |
3766 | + | |
3767 | + if(!pri0 && !integral){ text="0积分";} | |
3758 | 3768 | context.setFillStyle("red"); |
3759 | 3769 | context.fillText(text, 38 * unit, 215 * unit); |
3760 | 3770 | |
... | ... | @@ -3805,23 +3815,33 @@ Page({ |
3805 | 3815 | } |
3806 | 3816 | |
3807 | 3817 | |
3808 | - //---画线--- | |
3809 | - context.setLineWidth(1 * unit) | |
3810 | - context.moveTo(32 * unit, 710 * unit) | |
3811 | - context.lineTo(520 * unit, 710 * unit) | |
3812 | - context.stroke(); | |
3813 | - //---文字--- | |
3814 | - context.setFillStyle("black") | |
3815 | - context.setFontSize(22 * unit) | |
3818 | + //---画线--- | |
3819 | + context.setLineWidth(1 * unit) | |
3820 | + context.moveTo(32 * unit, 710 * unit) | |
3821 | + context.lineTo(520 * unit, 710 * unit) | |
3822 | + context.stroke(); | |
3823 | + | |
3824 | + //---文字--- | |
3825 | + context.setFillStyle("black") | |
3826 | + context.setFontSize(22 * unit) | |
3816 | 3827 | |
3817 | 3828 | if(type==0){ |
3818 | 3829 | // 原来start ---> |
3830 | + | |
3819 | 3831 | context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit); |
3820 | - context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit); | |
3832 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit); | |
3833 | + // context.setFillStyle("black") | |
3834 | + // context.setFontSize(28 * unit) | |
3835 | + // context.fillText(th.data.sto_sele_name, 40 * unit, 776 * unit); | |
3821 | 3836 | }else{ |
3822 | - // 原来start ---> | |
3823 | - context.fillText("长按识别二维码", 40 * unit, 776 * unit); | |
3824 | - context.fillText("立即开始兑换", 40 * unit, 826 * unit); | |
3837 | + // 原来start ---> | |
3838 | + // context.fillText("长按识别二维码", 40 * unit, 776 * unit); | |
3839 | + // context.fillText("立即开始兑换", 40 * unit, 826 * unit); | |
3840 | + context.fillText("长按识别二维码", 40 * unit, 776 * unit); | |
3841 | + context.fillText("立即开始兑换", 40 * unit, 826 * unit); | |
3842 | + // context.setFillStyle("black") | |
3843 | + // context.setFontSize(28 * unit) | |
3844 | + // context.fillText(th.data.sto_sele_name, 40 * unit, 776 * unit); | |
3825 | 3845 | } |
3826 | 3846 | |
3827 | 3847 | //---二维吗图--- |
... | ... | @@ -4889,6 +4909,18 @@ Page({ |
4889 | 4909 | |
4890 | 4910 | addCart_inte:function(t){ |
4891 | 4911 | this.add_cart_func_inte(t); |
4892 | - } | |
4912 | + }, | |
4913 | + | |
4914 | + | |
4915 | + | |
4916 | + | |
4917 | + onShareTimeline() { | |
4918 | + return { | |
4919 | + title:this.data.data.goods_name + '-' + getApp().globalData.config.store_name, | |
4920 | + imageUrl:this.data.gallery[0].image_url, | |
4921 | + } | |
4922 | + }, | |
4923 | + | |
4924 | + | |
4893 | 4925 | |
4894 | 4926 | }); | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -177,6 +177,7 @@ |
177 | 177 | <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团 </text> |
178 | 178 | <view class="t_show"> |
179 | 179 | 剩余 |
180 | + <text wx:if="{{timer[t_ind].day}}">{{timer[t_ind].day}}天:</text> | |
180 | 181 | <text>{{timer[t_ind].hou}}</text>: |
181 | 182 | <text>{{timer[t_ind].min}}</text>: |
182 | 183 | <text>{{timer[t_ind].sec}}</text> |
... | ... | @@ -235,12 +236,13 @@ |
235 | 236 | <view class="goods-price rel"> |
236 | 237 | <!-- 价格显示 --> |
237 | 238 | <view class="co-red" style="overflow: hidden" > |
238 | - <view class="market-price" style="overflow: hidden"> | |
239 | + <view class="market-price" style="overflow: hidden; height: 66rpx;"> | |
239 | 240 | <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> |
240 | 241 | <block wx:if="{{prom_integral}}">{{prom_integral}} |
241 | 242 | <text class="rel_txt">积分</text></block> |
242 | 243 | <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> |
243 | - <text class="rel_txt" wx:if="{{prom_price}}" >{{filters.toFix(prom_price,2)}}元</text> | |
244 | + <text class="rel_txt" wx:if="{{prom_price}}" >{{filters.toFix(prom_price,2)}}元</text> | |
245 | + <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> | |
244 | 246 | <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> 零售价:¥{{data.market_price}}</text> |
245 | 247 | </view> |
246 | 248 | </view> |
... | ... | @@ -1424,14 +1426,15 @@ |
1424 | 1426 | |
1425 | 1427 | <view wx:if="{{showPoster}}" class="poster-container"> |
1426 | 1428 | <view class="poster-wrapper"> |
1427 | - <view class="poster" bindtap="previewImage"> | |
1428 | - <image src="{{shareImgPath}}" class="poster-img"></image> | |
1429 | + <view class="poster"> | |
1430 | + <!-- <view class="poster" bindtap="previewImage"> --> | |
1431 | + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | |
1429 | 1432 | <view class="btn-close" catchtap="closePoster">x</view> |
1430 | 1433 | </view> |
1431 | - <view class="btn-container"> | |
1434 | + <!-- <view class="btn-container"> | |
1432 | 1435 | <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> |
1433 | 1436 | <button class="btn-share" bindtap="savePic">保存到相册</button> |
1434 | - </view> | |
1437 | + </view> --> | |
1435 | 1438 | </view> |
1436 | 1439 | </view> |
1437 | 1440 | ... | ... |
pages/goods/search/search.js
... | ... | @@ -22,7 +22,12 @@ Page({ |
22 | 22 | tabname: "sort", //排序的字段 |
23 | 23 | adname: "asc", //升降的字段 |
24 | 24 | rq_data:null, |
25 | + | |
26 | + | |
27 | + searchRecord: [], | |
28 | + keyword: '', | |
25 | 29 | }, |
30 | + | |
26 | 31 | onLoad: function(t) { |
27 | 32 | this.data.rq_data=t; |
28 | 33 | |
... | ... | @@ -104,6 +109,9 @@ Page({ |
104 | 109 | if (0 != t.max_price && t.max_price!=undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price;} |
105 | 110 | if (url != this.data.baseUrl) return this.requestSearch(url); |
106 | 111 | this.openSearchModal(); |
112 | + | |
113 | + // 获取历史搜索记录 | |
114 | + this.getHistorySearch(); | |
107 | 115 | }, |
108 | 116 | changeTab: function(t) { |
109 | 117 | var ord = t.currentTarget.dataset.href; |
... | ... | @@ -176,18 +184,23 @@ Page({ |
176 | 184 | }); |
177 | 185 | }, |
178 | 186 | submitSearch: function(t) { |
187 | + console.log(111); | |
179 | 188 | this.search(t.detail.value.word); |
189 | + | |
190 | + | |
180 | 191 | }, |
181 | 192 | |
182 | 193 | //热搜关键字 |
183 | 194 | searchHotWord: function(t) { |
184 | - this.search(t.currentTarget.dataset.word); | |
195 | + this.historyRecord(); | |
196 | + this.search(t.currentTarget.dataset.word); | |
185 | 197 | }, |
186 | 198 | |
187 | 199 | //-----点击搜索按钮---- |
188 | 200 | search: function(t) { |
189 | 201 | if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词"); |
190 | 202 | this.data.key_str=t; |
203 | + this.historyRecord(); | |
191 | 204 | this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); |
192 | 205 | }, |
193 | 206 | |
... | ... | @@ -253,4 +266,56 @@ Page({ |
253 | 266 | func(ob); |
254 | 267 | }) |
255 | 268 | }, |
269 | + | |
270 | + | |
271 | + getInput(e) { | |
272 | + this.setData({ | |
273 | + keyword: e.detail.value | |
274 | + }); | |
275 | + }, | |
276 | + | |
277 | + historyRecord() { | |
278 | + let self = this; | |
279 | + let keyword = this.data.key_str; | |
280 | + let searchRecord = this.data.searchRecord; | |
281 | + | |
282 | + if(keyword) { | |
283 | + if(searchRecord.indexOf(keyword) > -1) { | |
284 | + // 已经存在该值 | |
285 | + return; | |
286 | + } else { | |
287 | + if(searchRecord.length >= 10) { | |
288 | + searchRecord.pop(); // 删除最早的一条记录 | |
289 | + }; | |
290 | + searchRecord.unshift(keyword); | |
291 | + | |
292 | + // // 将历史记录添加到缓存中 | |
293 | + wx.setStorage({ | |
294 | + key: 'searchRecord', | |
295 | + data: searchRecord, | |
296 | + success: function(res) { | |
297 | + self.setData({ | |
298 | + searchRecord, | |
299 | + }) | |
300 | + } | |
301 | + }) | |
302 | + }; | |
303 | + }; | |
304 | + }, | |
305 | + | |
306 | + | |
307 | + | |
308 | + | |
309 | + getHistorySearch() { | |
310 | + this.setData({ | |
311 | + searchRecord: wx.getStorageSync('searchRecord') || [] //若无存储则为空 | |
312 | + }); | |
313 | + }, | |
314 | + | |
315 | + clearSearchRecord() { | |
316 | + wx.clearStorageSync('searchRecord'); | |
317 | + this.setData({ | |
318 | + searchRecord: [] | |
319 | + }); | |
320 | + }, | |
256 | 321 | }); |
257 | 322 | \ No newline at end of file | ... | ... |
pages/goods/search/search.wxml
... | ... | @@ -162,7 +162,7 @@ |
162 | 162 | <view class="search-modal"> |
163 | 163 | <view class="search-bar"> |
164 | 164 | <form bindsubmit="submitSearch"> |
165 | - <input autoFocus class="search-input" name="word" placeholder="搜索商品"></input> | |
165 | + <input autoFocus class="search-input" name="word" placeholder="搜索商品" bindinput="getInput"></input> | |
166 | 166 | <button class="search-btn" formType="submit"> |
167 | 167 | <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image> |
168 | 168 | </button> |
... | ... | @@ -176,5 +176,17 @@ |
176 | 176 | </view> |
177 | 177 | </block> |
178 | 178 | </view> |
179 | + <view class="search-hot"> | |
180 | + <view class="hot-title flex jc_sb ai_c"> | |
181 | + <text>历史搜索</text> | |
182 | + <text class="iconfont icon-shanchu xc-ash" bindtap="clearSearchRecord" wx:if="{{searchRecord.length != 0}}"></text> | |
183 | + </view> | |
184 | + <block wx:if="{{searchRecord.length>0}}"> | |
185 | + <view class="hot-row flex flex-wrap" wx:key="{{index}}"> | |
186 | + <view class="hot-item history ellipsis-1" bindtap="searchHotWord" data-word="{{item}}" wx:for="{{searchRecord}}" wx:key="{{index}}">{{item}}</view> | |
187 | + </view> | |
188 | + </block> | |
189 | + <view wx:else class="fs24">暂无历史搜索记录</view> | |
190 | + </view> | |
179 | 191 | </view> |
180 | 192 | </view> |
181 | 193 | \ No newline at end of file | ... | ... |
pages/goods/search/search.wxss
pages/index/index/index.js
... | ... | @@ -884,7 +884,17 @@ Page({ |
884 | 884 | }, |
885 | 885 | |
886 | 886 | |
887 | - | |
887 | + onShareTimeline() { | |
888 | + // getApp().getConfig(function(t) { | |
889 | + // return { | |
890 | + // title: '首页-' + getApp().globalData.config.store_name, | |
891 | + // } | |
892 | + // }); | |
893 | + | |
894 | + return { | |
895 | + title: '首页-' + getApp().globalData.config.store_name, | |
896 | + } | |
897 | + }, | |
888 | 898 | |
889 | 899 | |
890 | 900 | }); |
891 | 901 | \ No newline at end of file | ... | ... |
pages/index/index/index.json
1 | -{ | |
2 | - | |
1 | +{ | |
3 | 2 | "usingComponents": { |
4 | 3 | "goods_recommend":"/components/goods_list/goods_list", |
5 | 4 | "nav": "/components/diy_nav/diy_nav", |
... | ... | @@ -17,6 +16,8 @@ |
17 | 16 | "assist":"/components/diy_assist/diy_assist", |
18 | 17 | "picMax": "/components/diy_picMax/diy_picMax", |
19 | 18 | "mvideo": "/components/diy_video/diy_video", |
20 | - "service": "/components/diy_service/diy_service" | |
21 | - } | |
19 | + "service": "/components/diy_service/diy_service", | |
20 | + "scan": "/components/diy_scan/diy_scan" | |
21 | + }, | |
22 | + "enablePullDownRefresh": false | |
22 | 23 | } |
23 | 24 | \ No newline at end of file | ... | ... |
pages/index/index/index.wxml
... | ... | @@ -348,6 +348,10 @@ |
348 | 348 | <!--在线上客服--> |
349 | 349 | <block wx:if="{{item.ename=='onlineService'}}"> |
350 | 350 | <service object="{{item.content}}"></service> |
351 | + </block> | |
352 | + <!--扫一扫--> | |
353 | + <block wx:if="{{item.ename=='scan'}}"> | |
354 | + <scan object="{{item.content}}"></scan> | |
351 | 355 | </block> |
352 | 356 | |
353 | 357 | </view> | ... | ... |
pages/team/team_more/team_more.wxml
... | ... | @@ -17,7 +17,9 @@ |
17 | 17 | <text class='gred' wx:else>还差{{pt_act.ct_num - item.open_num}}人成团</text> |
18 | 18 | <view> |
19 | 19 | <view class="time_show_view"> |
20 | - 剩余<text>{{item.djs.hou}}</text>: | |
20 | + 剩余 | |
21 | + <text wx:if="{{item.djs.day}}">{{item.djs.day}}天:</text> | |
22 | + <text>{{item.djs.hou}}</text>: | |
21 | 23 | <text>{{item.djs.min}}</text>: |
22 | 24 | <text>{{item.djs.sec}}</text>结束 |
23 | 25 | </view> | ... | ... |
pages/template/index.json
... | ... | @@ -18,6 +18,8 @@ |
18 | 18 | "assist":"/components/diy_assist/diy_assist", |
19 | 19 | "picMax": "/components/diy_picMax/diy_picMax", |
20 | 20 | "mvideo": "/components/diy_video/diy_video", |
21 | - "service": "/components/diy_service/diy_service" | |
22 | - } | |
21 | + "service": "/components/diy_service/diy_service", | |
22 | + "scan": "/components/diy_scan/diy_scan" | |
23 | + }, | |
24 | + "enablePullDownRefresh": false | |
23 | 25 | } |
24 | 26 | \ No newline at end of file | ... | ... |
pages/template/index.wxml
... | ... | @@ -57,6 +57,10 @@ |
57 | 57 | <block wx:if="{{item.ename=='onlineService'}}"> |
58 | 58 | <service object="{{item.content}}"></service> |
59 | 59 | </block> |
60 | + <!--扫一扫--> | |
61 | + <block wx:if="{{item.ename=='scan'}}"> | |
62 | + <scan object="{{item.content}}"></scan> | |
63 | + </block> | |
60 | 64 | </view> |
61 | 65 | </block> |
62 | 66 | </view> | ... | ... |
pages/user/assistance/assistance.js
... | ... | @@ -228,6 +228,22 @@ Page({ |
228 | 228 | var help_id = this.data.help_id; |
229 | 229 | var taskid=e.currentTarget.dataset.taskid; |
230 | 230 | getApp().goto("/pages/user/assistance/task_assistance?help_id=" + help_id+"&taskid="+taskid); |
231 | - } | |
231 | + }, | |
232 | + | |
233 | + onShareAppMessage(res) { | |
234 | + if (res.from === 'button') { | |
235 | + // 来自页面内转发按钮 | |
236 | + console.log(res.target) | |
237 | + } | |
238 | + return { | |
239 | + // title: '自定义转发标题', | |
240 | + } | |
241 | + }, | |
242 | + | |
243 | + onShareTimeline() { | |
244 | + return { | |
245 | + title: '好友助力-' + getApp().globalData.config.store_name, | |
246 | + } | |
247 | + }, | |
232 | 248 | |
233 | 249 | }) | ... | ... |
pages/user/index/index.wxml
... | ... | @@ -213,19 +213,19 @@ |
213 | 213 | </block> |
214 | 214 | <block wx:elif="{{item.name=='助力活动'}}"> |
215 | 215 | <view class="item t-c" data-url="/pages/user/assistance/assistance" bindtap="goto_nav" wx:if="{{is_assistance==1}}"> |
216 | - <image class="xc-center-img " src="{{iurl}}/miniapp/images/friendhelp/icon-zl.png"></image> | |
216 | + <image class="xc-center-img" src="{{iurl}}/miniapp/images/friendhelp/icon-zl.png"></image> | |
217 | 217 | <view class="four-level-word">助力活动</view> |
218 | 218 | </view> |
219 | 219 | </block> |
220 | 220 | <block wx:elif="{{item.name=='我的权益'}}"> |
221 | 221 | <view class="item t-c" bindtap="go_qy" wx:if="{{qy_list!=null && is_init && gradeId}}"> |
222 | - <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | |
222 | + <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> | |
223 | 223 | <view class="fs26">我的权益</view> |
224 | 224 | </view> |
225 | 225 | </block> |
226 | 226 | <block wx:else> |
227 | 227 | <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> |
228 | - <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | |
228 | + <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> | |
229 | 229 | <view class="fs26">{{item.name}}</view> |
230 | 230 | </view> |
231 | 231 | </block> | ... | ... |