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,12 +446,12 @@ background: #ffe3e2; | ||
| 446 | /* 图标字体(ty) */ | 446 | /* 图标字体(ty) */ |
| 447 | @font-face { | 447 | @font-face { |
| 448 | font-family: 'iconfont'; /* project id 2054717 */ | 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 | .iconfont { | 457 | .iconfont { |
| @@ -462,6 +462,10 @@ background: #ffe3e2; | @@ -462,6 +462,10 @@ background: #ffe3e2; | ||
| 462 | -moz-osx-font-smoothing: grayscale; | 462 | -moz-osx-font-smoothing: grayscale; |
| 463 | } | 463 | } |
| 464 | 464 | ||
| 465 | +.icon-shanchu:before { | ||
| 466 | + content: "\e61b"; | ||
| 467 | +} | ||
| 468 | + | ||
| 465 | .icon-buqian:before { | 469 | .icon-buqian:before { |
| 466 | content: "\e65f"; | 470 | content: "\e65f"; |
| 467 | } | 471 | } |
components/diy_goodsGroup/diy_goodsGroup.js
| @@ -121,9 +121,13 @@ Component({ | @@ -121,9 +121,13 @@ Component({ | ||
| 121 | 121 | ||
| 122 | methods: { | 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 | var th = this; | 128 | var th = this; |
| 126 | var g_id = this.data.g_id; | 129 | var g_id = this.data.g_id; |
| 130 | + var len=this.data.firist_type_data.length; | ||
| 127 | if (classstyle_id == 1) { | 131 | if (classstyle_id == 1) { |
| 128 | //---手动选择的时候--- | 132 | //---手动选择的时候--- |
| 129 | g_id = this.data.firist_type_data[th.data.firist_type_curr]; | 133 | g_id = this.data.firist_type_data[th.data.firist_type_curr]; |
| @@ -147,7 +151,7 @@ Component({ | @@ -147,7 +151,7 @@ Component({ | ||
| 147 | str += g_id[i].goodsid + ","; | 151 | str += g_id[i].goodsid + ","; |
| 148 | } | 152 | } |
| 149 | str=str.substring(0, str.length - 1); | 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 | isShowLoading:false, | 155 | isShowLoading:false, |
| 152 | success: function(res) { | 156 | success: function(res) { |
| 153 | 157 | ||
| @@ -179,8 +183,8 @@ Component({ | @@ -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,7 +203,7 @@ Component({ | ||
| 199 | if(th.data.is_hot) r_data.is_hot=th.data.is_hot; | 203 | if(th.data.is_hot) r_data.is_hot=th.data.is_hot; |
| 200 | if(th.data.is_new) r_data.is_new=th.data.is_new; | 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 | data:r_data | 207 | data:r_data |
| 204 | }).then(res => { | 208 | }).then(res => { |
| 205 | //商品地址 | 209 | //商品地址 |
| @@ -216,7 +220,7 @@ Component({ | @@ -216,7 +220,7 @@ Component({ | ||
| 216 | break; | 220 | break; |
| 217 | case "3": | 221 | case "3": |
| 218 | var item = {}; | 222 | var item = {}; |
| 219 | - app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", { | 223 | + await app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", { |
| 220 | data: { | 224 | data: { |
| 221 | store_id:os.stoid , | 225 | store_id:os.stoid , |
| 222 | gpid: wgroup, | 226 | gpid: wgroup, |
components/diy_goodsGroup/diy_goodsGroup.wxml
| @@ -602,14 +602,16 @@ | @@ -602,14 +602,16 @@ | ||
| 602 | </block> | 602 | </block> |
| 603 | <view class="clear"></view> | 603 | <view class="clear"></view> |
| 604 | </view> | 604 | </view> |
| 605 | + | ||
| 606 | + | ||
| 605 | <!-- 商品的显示不是左右 --> | 607 | <!-- 商品的显示不是左右 --> |
| 606 | <block wx:if="{{object.column!=5}}"> | 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 | <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> | 610 | <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> |
| 609 | {{loadText}} | 611 | {{loadText}} |
| 610 | </button> | 612 | </button> |
| 611 | </view></block> | 613 | </view></block> |
| 612 | -<block wx:if="{{object.classstyle!='1' }}"> | 614 | +<block wx:if="{{classstyle_id!='1' }}"> |
| 613 | <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> | 615 | <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> |
| 614 | <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">{{loadText}}</button> | 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 | </view> | 617 | </view> |
components/diy_video/diy_video.js
| 1 | +var t = getApp(), | ||
| 2 | + a = t.request, | ||
| 3 | + os = t.globalData.setting; | ||
| 4 | + | ||
| 1 | Component({ | 5 | Component({ |
| 2 | properties: { | 6 | properties: { |
| 3 | object: { | 7 | object: { |
| @@ -11,10 +15,17 @@ Component({ | @@ -11,10 +15,17 @@ Component({ | ||
| 11 | // 这里是一些组件内部数据 | 15 | // 这里是一些组件内部数据 |
| 12 | someData: {}, | 16 | someData: {}, |
| 13 | videoUrl: "", | 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 | methods: { | 30 | methods: { |
| 20 | // 这里是一个自定义方法 | 31 | // 这里是一个自定义方法 |
components/diy_video/diy_video.wxml
packageA/pages/chongzhi/chongzhi.wxml
| @@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
| 36 | <view class="bottom" wx:if="{{currentIndex == 0}}" > | 36 | <view class="bottom" wx:if="{{currentIndex == 0}}" > |
| 37 | <text wx:if="{{g_filter.is_acting(item.EndDate)}}" | 37 | <text wx:if="{{g_filter.is_acting(item.EndDate)}}" |
| 38 | catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text> | 38 | catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text> |
| 39 | + <text wx:else class="btn" style="background-color: #ccc;">已过期</text> | ||
| 39 | <text data-index="{{index}}" class="btn details" >详情</text> | 40 | <text data-index="{{index}}" class="btn details" >详情</text> |
| 40 | </view> | 41 | </view> |
| 41 | <view class="bottom" wx:if="{{currentIndex == 1}}" > | 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,13 +399,18 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
| 399 | this.getSystemInfo(); | 399 | this.getSystemInfo(); |
| 400 | 400 | ||
| 401 | var first_leader=options.first_leader; | 401 | var first_leader=options.first_leader; |
| 402 | + var staffId=options.staffId; | ||
| 403 | + var storageId=options.storageId; | ||
| 404 | + | ||
| 402 | if(first_leader){ | 405 | if(first_leader){ |
| 403 | //-- user_id代过来免登陆 -- | 406 | //-- user_id代过来免登陆 -- |
| 404 | getApp().globalData.first_leader=first_leader; | 407 | getApp().globalData.first_leader=first_leader; |
| 405 | //调用接口判断是不是会员 | 408 | //调用接口判断是不是会员 |
| 406 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{ | 409 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{ |
| 407 | if(res.data.code==0){ | 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,6 +425,22 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
| 420 | that.setData({ | 425 | that.setData({ |
| 421 | details: obj | 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,12 +14,14 @@ Page({ | ||
| 14 | timer:null, | 14 | timer:null, |
| 15 | ismore:1, | 15 | ismore:1, |
| 16 | isshow:0, | 16 | isshow:0, |
| 17 | - iurl: os.imghost, | 17 | + iurl: os.imghost, |
| 18 | + ad_data:null, | ||
| 18 | }, | 19 | }, |
| 19 | 20 | ||
| 20 | //------初始化加载---------- | 21 | //------初始化加载---------- |
| 21 | onLoad: function(t) { | 22 | onLoad: function(t) { |
| 22 | var first_leader = t.first_leader; | 23 | var first_leader = t.first_leader; |
| 24 | + var th=this; | ||
| 23 | 25 | ||
| 24 | console.log("------------"); | 26 | console.log("------------"); |
| 25 | console.log(first_leader); | 27 | console.log(first_leader); |
| @@ -33,6 +35,22 @@ Page({ | @@ -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 | onShow: function(t) { | 56 | onShow: function(t) { |
pages/activity/pind_list/pind_list.wxml
| @@ -2,8 +2,13 @@ | @@ -2,8 +2,13 @@ | ||
| 2 | 2 | ||
| 3 | <view class=" body_frame"> | 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 | <view class="kill-list"> | 13 | <view class="kill-list"> |
| 9 | <view class="kill-item" wx:for="{{goodlist}}" wx:if="{{item.djs.hide==1}}"> | 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 +11,13 @@ Page({ | ||
| 11 | timer:null, | 11 | timer:null, |
| 12 | ismore:1, //是否可以加载更多 | 12 | ismore:1, //是否可以加载更多 |
| 13 | isshow:0, | 13 | isshow:0, |
| 14 | + ad_data:null, | ||
| 14 | }, | 15 | }, |
| 15 | 16 | ||
| 16 | //------初始化加载---------- | 17 | //------初始化加载---------- |
| 17 | onLoad: function(t) { | 18 | onLoad: function(t) { |
| 18 | var first_leader = t.first_leader; | 19 | var first_leader = t.first_leader; |
| 20 | + var th=this; | ||
| 19 | 21 | ||
| 20 | console.log("------------"); | 22 | console.log("------------"); |
| 21 | console.log(first_leader); | 23 | console.log(first_leader); |
| @@ -29,6 +31,23 @@ Page({ | @@ -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,8 +2,12 @@ | ||
| 2 | <block wx:if="{{isshow}}"> | 2 | <block wx:if="{{isshow}}"> |
| 3 | <view class=" body_frame"> | 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 | <view class="kill-list abs seckill_list"> | 13 | <view class="kill-list abs seckill_list"> |
pages/giftpack/buygiftpack/giftpackbuy.js
| @@ -25,6 +25,7 @@ Page({ | @@ -25,6 +25,7 @@ Page({ | ||
| 25 | curpage: 1, //当前分页数 | 25 | curpage: 1, //当前分页数 |
| 26 | pageSize: 10, //页大小 | 26 | pageSize: 10, //页大小 |
| 27 | total: 0, //总数量 | 27 | total: 0, //总数量 |
| 28 | + ad_data:null, | ||
| 28 | }, | 29 | }, |
| 29 | onLoad: function(options) { | 30 | onLoad: function(options) { |
| 30 | 31 | ||
| @@ -35,6 +36,25 @@ Page({ | @@ -35,6 +36,25 @@ Page({ | ||
| 35 | getStorageID: a.stoid, | 36 | getStorageID: a.stoid, |
| 36 | getUserID: d.user_id | 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 | onShow: function() { | 60 | onShow: function() { |
| @@ -73,6 +93,13 @@ Page({ | @@ -73,6 +93,13 @@ Page({ | ||
| 73 | "userId": that.getUserID, //用户ID | 93 | "userId": that.getUserID, //用户ID |
| 74 | "buyFrom": 2 | 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 | var data = JSON.stringify(json); | 103 | var data = JSON.stringify(json); |
| 77 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; | 104 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
| 78 | getApp().request.json_post(url, json, | 105 | getApp().request.json_post(url, json, |
| @@ -134,6 +161,13 @@ Page({ | @@ -134,6 +161,13 @@ Page({ | ||
| 134 | "userId": that.getUserID, //用户ID | 161 | "userId": that.getUserID, //用户ID |
| 135 | "buyFrom": 2 | 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 | var data = JSON.stringify(json); | 171 | var data = JSON.stringify(json); |
| 138 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; | 172 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
| 139 | getApp().request.json_post(url, json, | 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 | <view class="top_title"> | 14 | <view class="top_title"> |
| 6 | <view class="top_title_box"> | 15 | <view class="top_title_box"> |
| 7 | <text class="top_title_redtext">礼包列表</text> | 16 | <text class="top_title_redtext">礼包列表</text> |
pages/giftpack/buygiftpack/giftpackbuy.wxss
pages/giftpack/giftpacklist/giftpacklist.js
| @@ -141,10 +141,8 @@ Page({ | @@ -141,10 +141,8 @@ Page({ | ||
| 141 | 141 | ||
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | - | ||
| 145 | ) | 144 | ) |
| 146 | 145 | ||
| 147 | - | ||
| 148 | }, | 146 | }, |
| 149 | GetBuyIntegral: function(e) { | 147 | GetBuyIntegral: function(e) { |
| 150 | var that = this.data; | 148 | var that = this.data; |
| @@ -175,6 +173,13 @@ Page({ | @@ -175,6 +173,13 @@ Page({ | ||
| 175 | "userId": d.user_id, //用户ID | 173 | "userId": d.user_id, //用户ID |
| 176 | "buyFrom":2 | 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 | var data = JSON.stringify(json); | 183 | var data = JSON.stringify(json); |
| 179 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; | 184 | var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; |
| 180 | getApp().request.json_post(url, json, | 185 | getApp().request.json_post(url, json, |
pages/giftpack/mygiftpack/mygiftpack.js
| @@ -25,6 +25,7 @@ Page({ | @@ -25,6 +25,7 @@ Page({ | ||
| 25 | curpage: 1, //当前分页数 | 25 | curpage: 1, //当前分页数 |
| 26 | pageSize: 10, //页大小 | 26 | pageSize: 10, //页大小 |
| 27 | total: 0, //总数量 | 27 | total: 0, //总数量 |
| 28 | + ad_data:null, | ||
| 28 | }, | 29 | }, |
| 29 | 30 | ||
| 30 | onLoad: function(options) { | 31 | onLoad: function(options) { |
| @@ -36,6 +37,23 @@ Page({ | @@ -36,6 +37,23 @@ Page({ | ||
| 36 | loadingType: 0, | 37 | loadingType: 0, |
| 37 | getDate: i.formatTime(new Date().getTime()) | 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 | onShow: function() { | 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 | <view class="top_title"> | 15 | <view class="top_title"> |
| 7 | <view class="top_title_box"> | 16 | <view class="top_title_box"> |
| 8 | <text class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">礼包列表</text> | 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,7 +819,7 @@ Page({ | ||
| 819 | // }, | 819 | // }, |
| 820 | // 左侧更新 | 820 | // 左侧更新 |
| 821 | scrollLower: function (data) { | 821 | scrollLower: function (data) { |
| 822 | - //console.log("上拉加载更多", JSON.stringify(data)) | 822 | + if(this.data.is_no_more) return false; |
| 823 | var that = this; | 823 | var that = this; |
| 824 | clearInterval(that.data.timer); | 824 | clearInterval(that.data.timer); |
| 825 | that.setData({ | 825 | that.setData({ |
| @@ -843,18 +843,17 @@ Page({ | @@ -843,18 +843,17 @@ Page({ | ||
| 843 | }); | 843 | }); |
| 844 | if (e.data.data.pageData.length > 0) { | 844 | if (e.data.data.pageData.length > 0) { |
| 845 | s.setData({ | 845 | s.setData({ |
| 846 | - msgStatus: false, | 846 | + msgStatus: false,is_no_more:0 |
| 847 | }); | 847 | }); |
| 848 | //如果有数据 判断分页为第一页的时候直接渲染数据 | 848 | //如果有数据 判断分页为第一页的时候直接渲染数据 |
| 849 | if (page > 1) { | 849 | if (page > 1) { |
| 850 | //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面 | 850 | //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面 |
| 851 | var arr = s.data.requestData | 851 | var arr = s.data.requestData |
| 852 | - console.log("arr:=" + JSON.stringify(arr)) | ||
| 853 | - | 852 | + |
| 854 | for (var i = 0; i < e.data.data.pageData.length;i++){ | 853 | for (var i = 0; i < e.data.data.pageData.length;i++){ |
| 855 | arr.push(e.data.data.pageData[i]); | 854 | arr.push(e.data.data.pageData[i]); |
| 856 | } | 855 | } |
| 857 | - console.log(arr) | 856 | + |
| 858 | s.setData({ | 857 | s.setData({ |
| 859 | requestData: arr | 858 | requestData: arr |
| 860 | }); | 859 | }); |
| @@ -875,19 +874,28 @@ Page({ | @@ -875,19 +874,28 @@ Page({ | ||
| 875 | if (page != 1) { | 874 | if (page != 1) { |
| 876 | var dataArray = s.data.one_level_classify | 875 | var dataArray = s.data.one_level_classify |
| 877 | var index = s.data.index | 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 | }else{ | 899 | }else{ |
| 892 | //没有数据而且是第一页的时候 | 900 | //没有数据而且是第一页的时候 |
| 893 | s.setData({ | 901 | s.setData({ |
| @@ -897,7 +905,8 @@ Page({ | @@ -897,7 +905,8 @@ Page({ | ||
| 897 | s.setData({ | 905 | s.setData({ |
| 898 | msgStatus: true, | 906 | msgStatus: true, |
| 899 | countDownNum: countDownNum, | 907 | countDownNum: countDownNum, |
| 900 | - requestData: [] | 908 | + requestData: [], |
| 909 | + is_no_more:0, | ||
| 901 | }); | 910 | }); |
| 902 | s.data.timer=setInterval(function () { | 911 | s.data.timer=setInterval(function () { |
| 903 | if (countDownNum == 0) { | 912 | if (countDownNum == 0) { |
| @@ -1012,6 +1021,12 @@ Page({ | @@ -1012,6 +1021,12 @@ Page({ | ||
| 1012 | if(!url || url=='') return; | 1021 | if(!url || url=='') return; |
| 1013 | if(url[0]!='/') url='/'+url; | 1022 | if(url[0]!='/') url='/'+url; |
| 1014 | getApp().goto(url); | 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 | \ No newline at end of file | 1033 | \ No newline at end of file |
pages/goods/categoryList/categoryList.wxml
| @@ -493,6 +493,9 @@ | @@ -493,6 +493,9 @@ | ||
| 493 | </block> | 493 | </block> |
| 494 | </view> | 494 | </view> |
| 495 | </navigator> | 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 | </view> | 499 | </view> |
| 497 | <view class="no-data" wx:if="{{msgStatus == true}}"> | 500 | <view class="no-data" wx:if="{{msgStatus == true}}"> |
| 498 | <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> | 501 | <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> |
| @@ -500,8 +503,9 @@ | @@ -500,8 +503,9 @@ | ||
| 500 | <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px"> | 503 | <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px"> |
| 501 | <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view><view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> </view> | 504 | <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view><view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> </view> |
| 502 | <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view> | 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 | </view> | 507 | </view> |
| 508 | + | ||
| 505 | 509 | ||
| 506 | </scroll-view> | 510 | </scroll-view> |
| 507 | <!-- /goodslist --> | 511 | <!-- /goodslist --> |
pages/goods/goodsInfo/buy_integral.wxml
| @@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
| 11 | <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> | 11 | <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> |
| 12 | <text wx:if="{{prom_integral && prom_price}}">+</text> | 12 | <text wx:if="{{prom_integral && prom_price}}">+</text> |
| 13 | <text wx:if="{{prom_price}}">{{prom_price}}元</text> | 13 | <text wx:if="{{prom_price}}">{{prom_price}}元</text> |
| 14 | + <text wx:if="{{!prom_integral && !prom_price}}">0积分</text> | ||
| 14 | </view> | 15 | </view> |
| 15 | </view> | 16 | </view> |
| 16 | 17 |
pages/goods/goodsInfo/goodsInfo.js
| @@ -261,10 +261,10 @@ Page({ | @@ -261,10 +261,10 @@ Page({ | ||
| 261 | room_user_share=t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id | 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 | }).then(res=>{ | 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 | var poster_data=res.data.data.pageData[0]; | 269 | var poster_data=res.data.data.pageData[0]; |
| 270 | var json_str=poster_data.jsonStr; | 270 | var json_str=poster_data.jsonStr; |
| @@ -314,7 +314,6 @@ Page({ | @@ -314,7 +314,6 @@ Page({ | ||
| 314 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ | 314 | getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ |
| 315 | if(res.data.code==0){ | 315 | if(res.data.code==0){ |
| 316 | getApp().globalData.guide_id=res.data.data.id; | 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,6 +3586,12 @@ Page({ | ||
| 3587 | 'store_id': os.stoid, | 3586 | 'store_id': os.stoid, |
| 3588 | 'type': 5 | 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 | var app = getApp(), | 3595 | var app = getApp(), |
| 3591 | th = this; | 3596 | th = this; |
| 3592 | app.request.post("/api/weshop/couponList/saveCouponList", { | 3597 | app.request.post("/api/weshop/couponList/saveCouponList", { |
| @@ -3641,14 +3646,14 @@ Page({ | @@ -3641,14 +3646,14 @@ Page({ | ||
| 3641 | var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | 3646 | var unit = that.data.screenWidth / 750 * 1.35; //基础单位, |
| 3642 | var path2 = that.data.data.original_img; | 3647 | var path2 = that.data.data.original_img; |
| 3643 | var scene = th.data.gid+""; | 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 | scene+="_"+user_id; | 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 | //固定房间是第3个字符 | 3655 | //固定房间是第3个字符 |
| 3651 | - if(!user_id) scene+="_0"; | 3656 | + if(!user_id) scene+="_0"; |
| 3652 | scene+="_"+getApp().globalData.room_id ; | 3657 | scene+="_"+getApp().globalData.room_id ; |
| 3653 | } | 3658 | } |
| 3654 | ///二微码 | 3659 | ///二微码 |
| @@ -3678,7 +3683,7 @@ Page({ | @@ -3678,7 +3683,7 @@ Page({ | ||
| 3678 | context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | 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 | if(parseInt(th.data.poster.show_headpic)){ | 3688 | if(parseInt(th.data.poster.show_headpic)){ |
| 3684 | //获取坐标 | 3689 | //获取坐标 |
| @@ -3697,9 +3702,13 @@ Page({ | @@ -3697,9 +3702,13 @@ Page({ | ||
| 3697 | context.setFontSize(16 * unit) | 3702 | context.setFontSize(16 * unit) |
| 3698 | context.setLineJoin('round'); //交点设置成圆角 | 3703 | context.setLineJoin('round'); //交点设置成圆角 |
| 3699 | context.setFillStyle("white") | 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 | context.setFontSize(24 * unit) | 3713 | context.setFontSize(24 * unit) |
| 3705 | context.setFillStyle("black") | 3714 | context.setFillStyle("black") |
| @@ -3708,9 +3717,9 @@ Page({ | @@ -3708,9 +3717,9 @@ Page({ | ||
| 3708 | //强烈推荐 改许程 | 3717 | //强烈推荐 改许程 |
| 3709 | var tj_path = "../../../images/share/q_tj.png"; | 3718 | var tj_path = "../../../images/share/q_tj.png"; |
| 3710 | context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); | 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 | context.setLineJoin('round'); //交点设置成圆角 | 3721 | context.setLineJoin('round'); //交点设置成圆角 |
| 3713 | - context.setFillStyle("white") | 3722 | + context.setFillStyle("white"); |
| 3714 | context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 76 * unit); | 3723 | context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 76 * unit); |
| 3715 | } | 3724 | } |
| 3716 | 3725 | ||
| @@ -3754,7 +3763,8 @@ Page({ | @@ -3754,7 +3763,8 @@ Page({ | ||
| 3754 | if(integral){text=integral+"积分"; } | 3763 | if(integral){text=integral+"积分"; } |
| 3755 | if(pri0 && integral){ text+="+";} | 3764 | if(pri0 && integral){ text+="+";} |
| 3756 | if(pri0){ text+="¥"+pri0;} | 3765 | if(pri0){ text+="¥"+pri0;} |
| 3757 | - | 3766 | + |
| 3767 | + if(!pri0 && !integral){ text="0积分";} | ||
| 3758 | context.setFillStyle("red"); | 3768 | context.setFillStyle("red"); |
| 3759 | context.fillText(text, 38 * unit, 215 * unit); | 3769 | context.fillText(text, 38 * unit, 215 * unit); |
| 3760 | 3770 | ||
| @@ -3805,23 +3815,33 @@ Page({ | @@ -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 | if(type==0){ | 3828 | if(type==0){ |
| 3818 | // 原来start ---> | 3829 | // 原来start ---> |
| 3830 | + | ||
| 3819 | context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit); | 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 | }else{ | 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,6 +4909,18 @@ Page({ | ||
| 4889 | 4909 | ||
| 4890 | addCart_inte:function(t){ | 4910 | addCart_inte:function(t){ |
| 4891 | this.add_cart_func_inte(t); | 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,6 +177,7 @@ | ||
| 177 | <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团 </text> | 177 | <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团 </text> |
| 178 | <view class="t_show"> | 178 | <view class="t_show"> |
| 179 | 剩余 | 179 | 剩余 |
| 180 | + <text wx:if="{{timer[t_ind].day}}">{{timer[t_ind].day}}天:</text> | ||
| 180 | <text>{{timer[t_ind].hou}}</text>: | 181 | <text>{{timer[t_ind].hou}}</text>: |
| 181 | <text>{{timer[t_ind].min}}</text>: | 182 | <text>{{timer[t_ind].min}}</text>: |
| 182 | <text>{{timer[t_ind].sec}}</text> | 183 | <text>{{timer[t_ind].sec}}</text> |
| @@ -235,12 +236,13 @@ | @@ -235,12 +236,13 @@ | ||
| 235 | <view class="goods-price rel"> | 236 | <view class="goods-price rel"> |
| 236 | <!-- 价格显示 --> | 237 | <!-- 价格显示 --> |
| 237 | <view class="co-red" style="overflow: hidden" > | 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 | <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> | 240 | <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> |
| 240 | <block wx:if="{{prom_integral}}">{{prom_integral}} | 241 | <block wx:if="{{prom_integral}}">{{prom_integral}} |
| 241 | <text class="rel_txt">积分</text></block> | 242 | <text class="rel_txt">积分</text></block> |
| 242 | <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> | 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 | <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> 零售价:¥{{data.market_price}}</text> | 246 | <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> 零售价:¥{{data.market_price}}</text> |
| 245 | </view> | 247 | </view> |
| 246 | </view> | 248 | </view> |
| @@ -1424,14 +1426,15 @@ | @@ -1424,14 +1426,15 @@ | ||
| 1424 | 1426 | ||
| 1425 | <view wx:if="{{showPoster}}" class="poster-container"> | 1427 | <view wx:if="{{showPoster}}" class="poster-container"> |
| 1426 | <view class="poster-wrapper"> | 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 | <view class="btn-close" catchtap="closePoster">x</view> | 1432 | <view class="btn-close" catchtap="closePoster">x</view> |
| 1430 | </view> | 1433 | </view> |
| 1431 | - <view class="btn-container"> | 1434 | + <!-- <view class="btn-container"> |
| 1432 | <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> | 1435 | <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> |
| 1433 | <button class="btn-share" bindtap="savePic">保存到相册</button> | 1436 | <button class="btn-share" bindtap="savePic">保存到相册</button> |
| 1434 | - </view> | 1437 | + </view> --> |
| 1435 | </view> | 1438 | </view> |
| 1436 | </view> | 1439 | </view> |
| 1437 | 1440 |
pages/goods/search/search.js
| @@ -22,7 +22,12 @@ Page({ | @@ -22,7 +22,12 @@ Page({ | ||
| 22 | tabname: "sort", //排序的字段 | 22 | tabname: "sort", //排序的字段 |
| 23 | adname: "asc", //升降的字段 | 23 | adname: "asc", //升降的字段 |
| 24 | rq_data:null, | 24 | rq_data:null, |
| 25 | + | ||
| 26 | + | ||
| 27 | + searchRecord: [], | ||
| 28 | + keyword: '', | ||
| 25 | }, | 29 | }, |
| 30 | + | ||
| 26 | onLoad: function(t) { | 31 | onLoad: function(t) { |
| 27 | this.data.rq_data=t; | 32 | this.data.rq_data=t; |
| 28 | 33 | ||
| @@ -104,6 +109,9 @@ Page({ | @@ -104,6 +109,9 @@ Page({ | ||
| 104 | if (0 != t.max_price && t.max_price!=undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price;} | 109 | if (0 != t.max_price && t.max_price!=undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price;} |
| 105 | if (url != this.data.baseUrl) return this.requestSearch(url); | 110 | if (url != this.data.baseUrl) return this.requestSearch(url); |
| 106 | this.openSearchModal(); | 111 | this.openSearchModal(); |
| 112 | + | ||
| 113 | + // 获取历史搜索记录 | ||
| 114 | + this.getHistorySearch(); | ||
| 107 | }, | 115 | }, |
| 108 | changeTab: function(t) { | 116 | changeTab: function(t) { |
| 109 | var ord = t.currentTarget.dataset.href; | 117 | var ord = t.currentTarget.dataset.href; |
| @@ -176,18 +184,23 @@ Page({ | @@ -176,18 +184,23 @@ Page({ | ||
| 176 | }); | 184 | }); |
| 177 | }, | 185 | }, |
| 178 | submitSearch: function(t) { | 186 | submitSearch: function(t) { |
| 187 | + console.log(111); | ||
| 179 | this.search(t.detail.value.word); | 188 | this.search(t.detail.value.word); |
| 189 | + | ||
| 190 | + | ||
| 180 | }, | 191 | }, |
| 181 | 192 | ||
| 182 | //热搜关键字 | 193 | //热搜关键字 |
| 183 | searchHotWord: function(t) { | 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 | search: function(t) { | 200 | search: function(t) { |
| 189 | if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词"); | 201 | if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词"); |
| 190 | this.data.key_str=t; | 202 | this.data.key_str=t; |
| 203 | + this.historyRecord(); | ||
| 191 | this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); | 204 | this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); |
| 192 | }, | 205 | }, |
| 193 | 206 | ||
| @@ -253,4 +266,56 @@ Page({ | @@ -253,4 +266,56 @@ Page({ | ||
| 253 | func(ob); | 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 | \ No newline at end of file | 322 | \ No newline at end of file |
pages/goods/search/search.wxml
| @@ -162,7 +162,7 @@ | @@ -162,7 +162,7 @@ | ||
| 162 | <view class="search-modal"> | 162 | <view class="search-modal"> |
| 163 | <view class="search-bar"> | 163 | <view class="search-bar"> |
| 164 | <form bindsubmit="submitSearch"> | 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 | <button class="search-btn" formType="submit"> | 166 | <button class="search-btn" formType="submit"> |
| 167 | <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image> | 167 | <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image> |
| 168 | </button> | 168 | </button> |
| @@ -176,5 +176,17 @@ | @@ -176,5 +176,17 @@ | ||
| 176 | </view> | 176 | </view> |
| 177 | </block> | 177 | </block> |
| 178 | </view> | 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 | </view> | 191 | </view> |
| 180 | </view> | 192 | </view> |
| 181 | \ No newline at end of file | 193 | \ No newline at end of file |
pages/goods/search/search.wxss
| @@ -298,3 +298,14 @@ | @@ -298,3 +298,14 @@ | ||
| 298 | /* line-height: 38rpx; */ | 298 | /* line-height: 38rpx; */ |
| 299 | flex-grow: 1; | 299 | flex-grow: 1; |
| 300 | } | 300 | } |
| 301 | + | ||
| 302 | +.history { | ||
| 303 | + background-color: #f0f0f0; | ||
| 304 | + color: #7b7b7b; | ||
| 305 | + border: none; | ||
| 306 | + margin-bottom: 8rpx; | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | +.history:first-of-type { | ||
| 310 | + margin-left: 0; | ||
| 311 | +} |
pages/index/index/index.js
| @@ -884,7 +884,17 @@ Page({ | @@ -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 | \ No newline at end of file | 901 | \ No newline at end of file |
pages/index/index/index.json
| 1 | -{ | ||
| 2 | - | 1 | +{ |
| 3 | "usingComponents": { | 2 | "usingComponents": { |
| 4 | "goods_recommend":"/components/goods_list/goods_list", | 3 | "goods_recommend":"/components/goods_list/goods_list", |
| 5 | "nav": "/components/diy_nav/diy_nav", | 4 | "nav": "/components/diy_nav/diy_nav", |
| @@ -17,6 +16,8 @@ | @@ -17,6 +16,8 @@ | ||
| 17 | "assist":"/components/diy_assist/diy_assist", | 16 | "assist":"/components/diy_assist/diy_assist", |
| 18 | "picMax": "/components/diy_picMax/diy_picMax", | 17 | "picMax": "/components/diy_picMax/diy_picMax", |
| 19 | "mvideo": "/components/diy_video/diy_video", | 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 | \ No newline at end of file | 24 | \ No newline at end of file |
pages/index/index/index.wxml
| @@ -348,6 +348,10 @@ | @@ -348,6 +348,10 @@ | ||
| 348 | <!--在线上客服--> | 348 | <!--在线上客服--> |
| 349 | <block wx:if="{{item.ename=='onlineService'}}"> | 349 | <block wx:if="{{item.ename=='onlineService'}}"> |
| 350 | <service object="{{item.content}}"></service> | 350 | <service object="{{item.content}}"></service> |
| 351 | + </block> | ||
| 352 | + <!--扫一扫--> | ||
| 353 | + <block wx:if="{{item.ename=='scan'}}"> | ||
| 354 | + <scan object="{{item.content}}"></scan> | ||
| 351 | </block> | 355 | </block> |
| 352 | 356 | ||
| 353 | </view> | 357 | </view> |
pages/team/team_more/team_more.wxml
| @@ -17,7 +17,9 @@ | @@ -17,7 +17,9 @@ | ||
| 17 | <text class='gred' wx:else>还差{{pt_act.ct_num - item.open_num}}人成团</text> | 17 | <text class='gred' wx:else>还差{{pt_act.ct_num - item.open_num}}人成团</text> |
| 18 | <view> | 18 | <view> |
| 19 | <view class="time_show_view"> | 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 | <text>{{item.djs.min}}</text>: | 23 | <text>{{item.djs.min}}</text>: |
| 22 | <text>{{item.djs.sec}}</text>结束 | 24 | <text>{{item.djs.sec}}</text>结束 |
| 23 | </view> | 25 | </view> |
pages/template/index.json
| @@ -18,6 +18,8 @@ | @@ -18,6 +18,8 @@ | ||
| 18 | "assist":"/components/diy_assist/diy_assist", | 18 | "assist":"/components/diy_assist/diy_assist", |
| 19 | "picMax": "/components/diy_picMax/diy_picMax", | 19 | "picMax": "/components/diy_picMax/diy_picMax", |
| 20 | "mvideo": "/components/diy_video/diy_video", | 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 | \ No newline at end of file | 26 | \ No newline at end of file |
pages/template/index.wxml
| @@ -57,6 +57,10 @@ | @@ -57,6 +57,10 @@ | ||
| 57 | <block wx:if="{{item.ename=='onlineService'}}"> | 57 | <block wx:if="{{item.ename=='onlineService'}}"> |
| 58 | <service object="{{item.content}}"></service> | 58 | <service object="{{item.content}}"></service> |
| 59 | </block> | 59 | </block> |
| 60 | + <!--扫一扫--> | ||
| 61 | + <block wx:if="{{item.ename=='scan'}}"> | ||
| 62 | + <scan object="{{item.content}}"></scan> | ||
| 63 | + </block> | ||
| 60 | </view> | 64 | </view> |
| 61 | </block> | 65 | </block> |
| 62 | </view> | 66 | </view> |
pages/user/assistance/assistance.js
| @@ -228,6 +228,22 @@ Page({ | @@ -228,6 +228,22 @@ Page({ | ||
| 228 | var help_id = this.data.help_id; | 228 | var help_id = this.data.help_id; |
| 229 | var taskid=e.currentTarget.dataset.taskid; | 229 | var taskid=e.currentTarget.dataset.taskid; |
| 230 | getApp().goto("/pages/user/assistance/task_assistance?help_id=" + help_id+"&taskid="+taskid); | 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,19 +213,19 @@ | ||
| 213 | </block> | 213 | </block> |
| 214 | <block wx:elif="{{item.name=='助力活动'}}"> | 214 | <block wx:elif="{{item.name=='助力活动'}}"> |
| 215 | <view class="item t-c" data-url="/pages/user/assistance/assistance" bindtap="goto_nav" wx:if="{{is_assistance==1}}"> | 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 | <view class="four-level-word">助力活动</view> | 217 | <view class="four-level-word">助力活动</view> |
| 218 | </view> | 218 | </view> |
| 219 | </block> | 219 | </block> |
| 220 | <block wx:elif="{{item.name=='我的权益'}}"> | 220 | <block wx:elif="{{item.name=='我的权益'}}"> |
| 221 | <view class="item t-c" bindtap="go_qy" wx:if="{{qy_list!=null && is_init && gradeId}}"> | 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 | <view class="fs26">我的权益</view> | 223 | <view class="fs26">我的权益</view> |
| 224 | </view> | 224 | </view> |
| 225 | </block> | 225 | </block> |
| 226 | <block wx:else> | 226 | <block wx:else> |
| 227 | <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> | 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 | <view class="fs26">{{item.name}}</view> | 229 | <view class="fs26">{{item.name}}</view> |
| 230 | </view> | 230 | </view> |
| 231 | </block> | 231 | </block> |