Commit d2dc5dfc3c08e1e538f3ec2ca40a4025f807d695
1 parent
a7360293
1 直播分享的优化
2 预存的充值的过期显示 3 自定义组件商品分组,视频本地上传的功能,扫一扫的组件 4 秒杀列表,拼单列表的广告,礼包的广告 5. 积分0积分的时候的优化
Showing
24 changed files
with
213 additions
and
39 deletions
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/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
| ... | ... | @@ -3763,7 +3763,8 @@ Page({ |
| 3763 | 3763 | if(integral){text=integral+"积分"; } |
| 3764 | 3764 | if(pri0 && integral){ text+="+";} |
| 3765 | 3765 | if(pri0){ text+="¥"+pri0;} |
| 3766 | - | |
| 3766 | + | |
| 3767 | + if(!pri0 && !integral){ text="0积分";} | |
| 3767 | 3768 | context.setFillStyle("red"); |
| 3768 | 3769 | context.fillText(text, 38 * unit, 215 * unit); |
| 3769 | 3770 | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -235,12 +235,13 @@ |
| 235 | 235 | <view class="goods-price rel"> |
| 236 | 236 | <!-- 价格显示 --> |
| 237 | 237 | <view class="co-red" style="overflow: hidden" > |
| 238 | - <view class="market-price" style="overflow: hidden"> | |
| 238 | + <view class="market-price" style="overflow: hidden; height: 66rpx;"> | |
| 239 | 239 | <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> |
| 240 | 240 | <block wx:if="{{prom_integral}}">{{prom_integral}} |
| 241 | 241 | <text class="rel_txt">积分</text></block> |
| 242 | 242 | <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> | |
| 243 | + <text class="rel_txt" wx:if="{{prom_price}}" >{{filters.toFix(prom_price,2)}}元</text> | |
| 244 | + <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> | |
| 244 | 245 | <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> 零售价:¥{{data.market_price}}</text> |
| 245 | 246 | </view> |
| 246 | 247 | </view> | ... | ... |
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/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> | ... | ... |