Commit 652fcbca90556b8304f6eff73c438813a8bf40e8
Merge branch 'dev' into 'test'
Dev See merge request !601
Showing
52 changed files
with
2556 additions
and
279 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_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'); | |
| 449 | + src: url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.eot'); | |
| 450 | + src: url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.eot?#iefix') format('embedded-opentype'), | |
| 451 | + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.woff2') format('woff2'), | |
| 452 | + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.woff') format('woff'), | |
| 453 | + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.ttf') format('truetype'), | |
| 454 | + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.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-riqi:before { | |
| 466 | + content: "\e64c"; | |
| 467 | +} | |
| 468 | + | |
| 465 | 469 | .icon-shanchu:before { |
| 466 | 470 | content: "\e61b"; |
| 467 | 471 | } | ... | ... |
components/diy_advertising/diy_advertising.wxml
| ... | ... | @@ -401,7 +401,7 @@ |
| 401 | 401 | <block wx:if='{{object.style==4}}'> |
| 402 | 402 | |
| 403 | 403 | |
| 404 | - <swiper class="swiper" autoplay="{{autoplay}}" current="{{object.sw_index}}" | |
| 404 | + <swiper class="swiper" circular="true" autoplay="{{autoplay}}" current="{{object.sw_index}}" | |
| 405 | 405 | indicator-dots="true" |
| 406 | 406 | indicator-color="{{object.dot_color}}" |
| 407 | 407 | indicator-active-color="{{object.dot_color_act}}" | ... | ... |
components/diy_advertising/diy_advertising.wxss
components/diy_pingd_buy/diy_pingd_buy.js
| ... | ... | @@ -37,6 +37,20 @@ Component({ |
| 37 | 37 | timer: null, |
| 38 | 38 | iurl:o.imghost, |
| 39 | 39 | }, |
| 40 | + | |
| 41 | + pageLifetimes:{ | |
| 42 | + //要处理一下,游客登录后的界面的变化,主要还该是改变会员 | |
| 43 | + show: function () { | |
| 44 | + var th=this; | |
| 45 | + if(this.data.goods_array.length>0){ | |
| 46 | + th.data.timer = setInterval(function() { | |
| 47 | + th.countDown2(th); | |
| 48 | + }, 1000); | |
| 49 | + } | |
| 50 | + } | |
| 51 | + }, | |
| 52 | + | |
| 53 | + | |
| 40 | 54 | ready: function() { |
| 41 | 55 | console.log("ready"); |
| 42 | 56 | var g_id = this.data.object.data; |
| ... | ... | @@ -55,50 +69,83 @@ Component({ |
| 55 | 69 | app = getApp(), all_array = [], |
| 56 | 70 | index = 0, |
| 57 | 71 | goodsidlist=""; |
| 72 | + | |
| 73 | + //-- 当是默认的调用的时候 -- | |
| 74 | + if(!g_id || g_id.length<=0 ){ | |
| 75 | + th.no_gid_set(); | |
| 76 | + }else{ | |
| 77 | + //--先把商品ID串起来-- | |
| 78 | + g_id.forEach(function(val, ind) { | |
| 79 | + var item = {}; | |
| 80 | + goodsidlist+=val.goodsid+","; | |
| 81 | + }) | |
| 82 | + goodsidlist= goodsidlist.substr(0,goodsidlist.length-1); | |
| 58 | 83 | |
| 59 | - //--先把商品ID串起来-- | |
| 60 | - g_id.forEach(function(val, ind) { | |
| 61 | - var item = {}; | |
| 62 | - goodsidlist+=val.goodsid+","; | |
| 63 | - }) | |
| 64 | - goodsidlist= goodsidlist.substr(0,goodsidlist.length-1); | |
| 65 | - | |
| 66 | - //--调用接口,读取拼单-- | |
| 67 | - app.request.promiseGet("/api/weshop/teamlist/getGoodsList?store_id=" | |
| 68 | - +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => { | |
| 69 | - | |
| 70 | - //如果拼单的数组为空的时候 | |
| 71 | - var goodslist=res.data.data; | |
| 72 | - if(!goodslist || goodslist.length==0) return false; | |
| 73 | - | |
| 74 | - /*--商品队列按照添加的顺序排列--*/ | |
| 75 | - g_id.forEach(function(val, ind) { | |
| 76 | - goodslist.forEach(function (vy,indy) { | |
| 77 | - if(val.goodsid==vy.goods_id){ | |
| 78 | - all_array.push(vy); | |
| 79 | - } | |
| 80 | - }) | |
| 81 | - }) | |
| 82 | - if(all_array.length==0){ | |
| 83 | - all_array=goodslist; | |
| 84 | - } | |
| 85 | - | |
| 86 | - var arr = new Array(); | |
| 87 | - //--三个三个一组--- | |
| 88 | - for(var i=0;i< all_array.length;i+=3){ | |
| 89 | - arr.push(all_array.slice(i,i+3)); | |
| 90 | - } | |
| 91 | - /*--熏染到前台--*/ | |
| 92 | - th.setData({goods_array:arr}); | |
| 93 | - var newTime = ut.gettimestamp(); | |
| 94 | - th.setData({ newTime: newTime }); | |
| 95 | - | |
| 96 | - th.data.timer = setInterval(function() { | |
| 97 | - th.countDown2(th); | |
| 98 | - }, 1000); | |
| 99 | - }); | |
| 84 | + //--调用接口,读取拼单-- | |
| 85 | + app.request.promiseGet("/api/weshop/teamlist/getGoodsList?store_id=" | |
| 86 | + +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => { | |
| 87 | + //如果拼单的数组为空的时候 | |
| 88 | + var goodslist=res.data.data; | |
| 89 | + if(goodslist && goodslist.length>0){ | |
| 90 | + th.set_goods_list(g_id,goodslist); | |
| 91 | + } | |
| 92 | + | |
| 93 | + }); | |
| 94 | + } | |
| 100 | 95 | }, |
| 101 | - //---小于10的格式化函数---- | |
| 96 | + | |
| 97 | + no_gid_set(){ | |
| 98 | + var th=this; | |
| 99 | + var url= "/api/weshop/teamlist/pageteam/2?page=1&pageSize=9"; | |
| 100 | + getApp().request.promiseGet(url, { | |
| 101 | + data: { | |
| 102 | + store_id: os.stoid,is_end: 0,is_show: 1, | |
| 103 | + } | |
| 104 | + }).then(res => { | |
| 105 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 106 | + var goodslist=res.data.data.pageData; | |
| 107 | + th.set_goods_list(null,goodslist); | |
| 108 | + } | |
| 109 | + }) | |
| 110 | + }, | |
| 111 | + | |
| 112 | + //设置商品列表 | |
| 113 | + set_goods_list:function(g_id,goodslist){ | |
| 114 | + var th=this,all_array=[]; | |
| 115 | + if(g_id){ | |
| 116 | + /*--商品队列按照添加的顺序排列--*/ | |
| 117 | + g_id.forEach(function(val, ind) { | |
| 118 | + goodslist.forEach(function (vy,indy) { | |
| 119 | + if(val.goodsid==vy.goods_id){ | |
| 120 | + all_array.push(vy); | |
| 121 | + //th.setData({goods_array:arr}); | |
| 122 | + } | |
| 123 | + }) | |
| 124 | + }) | |
| 125 | + }else{ | |
| 126 | + all_array=goodslist; | |
| 127 | + } | |
| 128 | + | |
| 129 | + if(all_array.length==0){ | |
| 130 | + all_array=goodslist; | |
| 131 | + } | |
| 132 | + | |
| 133 | + var arr = new Array(); | |
| 134 | + //--三个三个一组--- | |
| 135 | + for(var i=0;i< all_array.length;i+=3){ | |
| 136 | + arr.push(all_array.slice(i,i+3)); | |
| 137 | + } | |
| 138 | + /*--熏染到前台--*/ | |
| 139 | + th.setData({goods_array:arr}); | |
| 140 | + var newTime = ut.gettimestamp(); | |
| 141 | + th.setData({ newTime: newTime }); | |
| 142 | + | |
| 143 | + th.data.timer = setInterval(function() { | |
| 144 | + th.countDown2(th); | |
| 145 | + }, 1000); | |
| 146 | + }, | |
| 147 | + | |
| 148 | + //---小于10的格式化函数---- | |
| 102 | 149 | timeFormat: function(param) { |
| 103 | 150 | return param < 10 ? '0' + param : param; |
| 104 | 151 | }, |
| ... | ... | @@ -108,6 +155,8 @@ Component({ |
| 108 | 155 | var ee = ob; |
| 109 | 156 | // 获取当前时间,同时得到活动结束时间数组 |
| 110 | 157 | var newTime = ut.gettimestamp(); |
| 158 | + this.setData({newTime:newTime}); | |
| 159 | + | |
| 111 | 160 | var List = ee.data.goods_array; |
| 112 | 161 | if (List.length == 0) return false; |
| 113 | 162 | for (var j = 0; j < List.length; j++) { | ... | ... |
components/diy_pingd_buy/diy_pingd_buy.wxml
| 1 | 1 | <!--pages/wp/wp.wxml--> |
| 2 | -<block wx:if="goods_array.length>0"> | |
| 2 | +<block wx:if="{{goods_array.length>0}}"> | |
| 3 | 3 | <!--拼单--> |
| 4 | 4 | <view class='top_p' bindtap="go_to_pindlist"> |
| 5 | 5 | <view class="top"> |
| ... | ... | @@ -21,11 +21,10 @@ |
| 21 | 21 | |
| 22 | 22 | <block wx:if="{{aitem.start_time>newTime}}"> |
| 23 | 23 | <span class='s_top_p' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span> |
| 24 | - </block> | |
| 25 | - <block wx:if="{{aitem.start_time<newTime}}"> | |
| 24 | + </block> | |
| 25 | + <block wx:if="{{aitem.start_time<newTime && aitem.end_time>newTime}}"> | |
| 26 | 26 | <span class='s_top_p'>火热进行</span> |
| 27 | 27 | </block> |
| 28 | - | |
| 29 | 28 | <!-- <span class='s_top_p'>火热进行</span> --> |
| 30 | 29 | |
| 31 | 30 | <view class='s_img_p'> |
| ... | ... | @@ -50,12 +49,17 @@ |
| 50 | 49 | <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>--> |
| 51 | 50 | |
| 52 | 51 | <view class="tuan_set_num"> |
| 53 | - <view class="co-red2">{{aitem.ct_num}}人团</view> | |
| 54 | - | |
| 55 | - <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去参团</view> | |
| 56 | - <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view> | |
| 57 | - <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view> | |
| 58 | - <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="cantuan huise">已抢光</view> | |
| 52 | + <view class="co-red2">{{aitem.ct_num}}人团</view> | |
| 53 | + <!-- 判断有没有过期 --> | |
| 54 | + <block wx:if="{{aitem.end_time<=newTime}}"> | |
| 55 | + <view class="cantuan huise">已结束</view> | |
| 56 | + </block> | |
| 57 | + <block wx:else> | |
| 58 | + <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去参团</view> | |
| 59 | + <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view> | |
| 60 | + <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view> | |
| 61 | + <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="cantuan huise">已抢光</view> | |
| 62 | + </block> | |
| 59 | 63 | </view> |
| 60 | 64 | </view> |
| 61 | 65 | </view> |
| ... | ... | @@ -89,16 +93,21 @@ |
| 89 | 93 | <view class='sp_jg_p'>¥{{aitem.price}}</view> |
| 90 | 94 | <view class='sp_jgx_p'>¥{{aitem.market_price}}</view> |
| 91 | 95 | </view> |
| 92 | - <view class="o1_sj_p"> | |
| 96 | + <view class="o1_sj_p" wx:if="{{aitem.end_time>newTime}}"> | |
| 93 | 97 | <image class="time_img" src="/public/static/images/model/time.png"></image> |
| 94 | - <block wx:if="aitem.djs.day>0">{{aitem.djs.day}}天</block>{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒 | |
| 98 | + <block wx:if="{{aitem.djs.day>0 }}">{{aitem.djs.day}}天</block>{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒 | |
| 95 | 99 | </view> |
| 96 | - | |
| 97 | - <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view> | |
| 98 | - <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去开团</view> | |
| 99 | - <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view> | |
| 100 | - <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="wo_p huise">已抢光</view> | |
| 101 | - | |
| 100 | + | |
| 101 | + <!-- 判断有没有过期 --> | |
| 102 | + <block wx:if="{{aitem.end_time<=newTime}}"> | |
| 103 | + <view class="wo_p huise">已结束</view> | |
| 104 | + </block> | |
| 105 | + <block wx:else> | |
| 106 | + <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view> | |
| 107 | + <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去开团</view> | |
| 108 | + <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view> | |
| 109 | + <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="wo_p huise">已抢光</view> | |
| 110 | + </block> | |
| 102 | 111 | </view> |
| 103 | 112 | </view> |
| 104 | 113 | </navigator> | ... | ... |
components/diy_pingd_buy/diy_pingd_buy.wxss
components/diy_seckill/diy_seckill.js
| ... | ... | @@ -36,6 +36,19 @@ Component({ |
| 36 | 36 | imghost: os.imghost, |
| 37 | 37 | timer: null, |
| 38 | 38 | }, |
| 39 | + | |
| 40 | + pageLifetimes:{ | |
| 41 | + //要处理一下,游客登录后的界面的变化,主要还该是改变会员 | |
| 42 | + show: function () { | |
| 43 | + var th=this; | |
| 44 | + if(this.data.goods_array.length>0){ | |
| 45 | + th.data.timer = setInterval(function() { | |
| 46 | + th.countDown2(th); | |
| 47 | + }, 1000); | |
| 48 | + } | |
| 49 | + } | |
| 50 | + }, | |
| 51 | + | |
| 39 | 52 | ready: function() { |
| 40 | 53 | console.log("ready"); |
| 41 | 54 | var g_id = this.data.object.data; |
| ... | ... | @@ -50,66 +63,82 @@ Component({ |
| 50 | 63 | // 这里是一个自定义方法 |
| 51 | 64 | customMethod: function() {}, |
| 52 | 65 | init: function(g_id) { |
| 53 | - var th = this, app = getApp(),all_array = [], goodsidlist=""; | |
| 54 | - | |
| 55 | - //--先把商品ID串起来-- | |
| 56 | - g_id.forEach(function(val, ind) { | |
| 57 | - var item = {}; | |
| 58 | - goodsidlist+=val.goodsid+","; | |
| 59 | - }) | |
| 60 | - goodsidlist=ut.sub_last(goodsidlist); | |
| 61 | - | |
| 62 | - //--调用接口,读取秒杀-- | |
| 63 | - app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id=" | |
| 64 | - +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => { | |
| 65 | - //如果秒杀的数组为空的时候 | |
| 66 | - | |
| 67 | - var goodslist=res.data.data; | |
| 68 | - if(!goodslist || goodslist.length==0) return false; | |
| 69 | - | |
| 70 | - // 判断火热,预热 | |
| 71 | - var newTime = ut.gettimestamp(); | |
| 72 | - th.setData({newTime:newTime}); | |
| 73 | - // for(var a=0;a< goodslist.length;a++){ | |
| 74 | - // var starTime=goodslist[a].start_time; | |
| 75 | - // var msStr=[]; | |
| 76 | - // console.log(2222222222) | |
| 77 | - // console.log(starTime+":"+newTime) | |
| 78 | - // if (starTime>newTime){ | |
| 79 | - // msStr.push() | |
| 80 | - // //th.setData({msText:'即将开始'}); | |
| 81 | - // } | |
| 82 | - // if (starTime<newTime){ | |
| 83 | - // th.setData({msText:'火热进行'}); | |
| 84 | - // } | |
| 85 | - // } | |
| 86 | - /*--商品队列按照添加的顺序排列--*/ | |
| 87 | - g_id.forEach(function(val, ind) { | |
| 88 | - goodslist.forEach(function (vy,indy) { | |
| 89 | - if(val.goodsid==vy.goods_id){ | |
| 90 | - all_array.push(vy); | |
| 91 | - th.setData({goods_array:arr}); | |
| 92 | - } | |
| 93 | - }) | |
| 94 | - }) | |
| 95 | - if(all_array.length==0){ | |
| 96 | - all_array=goodslist; | |
| 97 | - } | |
| 98 | - | |
| 99 | - var arr = new Array(); | |
| 100 | - //--三个三个一组--- | |
| 101 | - for(var i=0;i< all_array.length;i+=3){ | |
| 102 | - arr.push(all_array.slice(i,i+3)); | |
| 103 | - } | |
| 104 | - /*--熏染到前台--*/ | |
| 105 | - | |
| 106 | - th.setData({goods_array:arr}); | |
| 107 | - | |
| 108 | - th.data.timer = setInterval(function() { | |
| 109 | - th.countDown2(th); | |
| 110 | - }, 1000); | |
| 111 | - }); | |
| 66 | + var th = this, app = getApp(), goodsidlist=""; | |
| 67 | + if(g_id && g_id.length>0){ | |
| 68 | + //--先把商品ID串起来-- | |
| 69 | + g_id.forEach(function(val, ind) { | |
| 70 | + var item = {}; | |
| 71 | + goodsidlist+=val.goodsid+","; | |
| 72 | + }) | |
| 73 | + goodsidlist=ut.sub_last(goodsidlist); | |
| 74 | + | |
| 75 | + //--调用接口,读取秒杀-- | |
| 76 | + app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id=" | |
| 77 | + +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => { | |
| 78 | + //如果秒杀的数组为空的时候 | |
| 79 | + var goodslist=res.data.data; | |
| 80 | + //就算是添加的活动已经过期,就要用最新的进行中活动 | |
| 81 | + if(goodslist && goodslist.length>0) { | |
| 82 | + th.set_goods_list(g_id,goodslist); | |
| 83 | + } | |
| 84 | + }); | |
| 85 | + }else{ | |
| 86 | + th.no_gid_set(); | |
| 87 | + } | |
| 112 | 88 | }, |
| 89 | + | |
| 90 | + //当是默认的情况 | |
| 91 | + no_gid_set(){ | |
| 92 | + getApp().request.promiseGet("/api/ms/flash_sale/spikepage?page=1&pageSize=9", | |
| 93 | + {isShowLoading:1,data:{store_id:os.stoid,is_end:0,is_show:1}} | |
| 94 | + ).then(res=>{ | |
| 95 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { | |
| 96 | + goodsidlist=res.data.data.pageData; | |
| 97 | + th.set_goods_list(null,goodslist); | |
| 98 | + } | |
| 99 | + }); | |
| 100 | + }, | |
| 101 | + | |
| 102 | + //就算是添加的活动已经过期,就要用最新的活动 | |
| 103 | + set_goods_list(g_id,goodslist){ | |
| 104 | + // 判断火热,预热 | |
| 105 | + var newTime = ut.gettimestamp(),all_array = [],th=this; | |
| 106 | + th.setData({newTime:newTime}); | |
| 107 | + if(g_id){ | |
| 108 | + /*--商品队列按照添加的顺序排列--*/ | |
| 109 | + g_id.forEach(function(val, ind) { | |
| 110 | + goodslist.forEach(function (vy,indy) { | |
| 111 | + if(val.goodsid==vy.goods_id){ | |
| 112 | + all_array.push(vy); | |
| 113 | + //th.setData({goods_array:arr}); | |
| 114 | + } | |
| 115 | + }) | |
| 116 | + }) | |
| 117 | + }else{ | |
| 118 | + all_array=goodslist; | |
| 119 | + } | |
| 120 | + | |
| 121 | + | |
| 122 | + if(all_array.length==0){ | |
| 123 | + all_array=goodslist; | |
| 124 | + } | |
| 125 | + | |
| 126 | + var arr = new Array(); | |
| 127 | + //--三个三个一组--- | |
| 128 | + for(var i=0;i< all_array.length;i+=3){ | |
| 129 | + arr.push(all_array.slice(i,i+3)); | |
| 130 | + } | |
| 131 | + /*--熏染到前台--*/ | |
| 132 | + | |
| 133 | + th.setData({goods_array:arr}); | |
| 134 | + | |
| 135 | + th.data.timer = setInterval(function() { | |
| 136 | + th.countDown2(th); | |
| 137 | + }, 1000); | |
| 138 | + }, | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 113 | 142 | //---小于10的格式化函数---- |
| 114 | 143 | timeFormat: function(param) { |
| 115 | 144 | return param < 10 ? '0' + param : param; |
| ... | ... | @@ -120,6 +149,8 @@ Component({ |
| 120 | 149 | var ee = ob; |
| 121 | 150 | // 获取当前时间,同时得到活动结束时间数组 |
| 122 | 151 | var newTime = ut.gettimestamp(); |
| 152 | + this.setData({newTime:newTime}); | |
| 153 | + | |
| 123 | 154 | var List = ee.data.goods_array; |
| 124 | 155 | if (List.length == 0) return false; |
| 125 | 156 | for (var j = 0; j < List.length; j++) { | ... | ... |
components/diy_seckill/diy_seckill.wxml
| 1 | -<block wx:if="goods_array.length>0"> | |
| 1 | +<block wx:if="{{goods_array.length>0}}"> | |
| 2 | 2 | <!--秒杀--> |
| 3 | 3 | <view class='top' bindtap="go_to_skill"> |
| 4 | 4 | <view class="flex"> |
| ... | ... | @@ -24,16 +24,26 @@ |
| 24 | 24 | <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span> |
| 25 | 25 | </view> |
| 26 | 26 | </block> |
| 27 | - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | |
| 28 | - <view class="rob"> | |
| 29 | - <span class='s_top_kill'>火热进行</span> | |
| 30 | - </view> | |
| 31 | - </block> | |
| 32 | - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | |
| 33 | - <view class="rob"> | |
| 34 | - <span class='s_top_kill gray'>已抢光</span> | |
| 35 | - </view> | |
| 36 | - </block> | |
| 27 | + | |
| 28 | + <block wx:if="{{aitem.end_time<=newTime}}"> | |
| 29 | + <view class="rob"> | |
| 30 | + <span class='s_top_kill gray'>活动已结束</span> | |
| 31 | + </view> | |
| 32 | + </block> | |
| 33 | + <block wx:else> | |
| 34 | + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | |
| 35 | + <view class="rob"> | |
| 36 | + <span class='s_top_kill'>火热进行</span> | |
| 37 | + </view> | |
| 38 | + </block> | |
| 39 | + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | |
| 40 | + <view class="rob"> | |
| 41 | + <span class='s_top_kill gray'>已抢光</span> | |
| 42 | + </view> | |
| 43 | + </block> | |
| 44 | + </block> | |
| 45 | + | |
| 46 | + | |
| 37 | 47 | |
| 38 | 48 | <view class='clear'></view> |
| 39 | 49 | |
| ... | ... | @@ -92,17 +102,25 @@ |
| 92 | 102 | <view class="wo" style="background-color: #adadad">正在预热</view> |
| 93 | 103 | </view> |
| 94 | 104 | </block> |
| 95 | - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | |
| 96 | - <view class="rob"> | |
| 97 | - <view class="wo">我要抢</view> | |
| 98 | - </view> | |
| 99 | - </block> | |
| 100 | - | |
| 101 | - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | |
| 102 | - <view class="rob"> | |
| 103 | - <view class="wo" style="background-color: #adadad">已抢光</view> | |
| 104 | - </view> | |
| 105 | - </block> | |
| 105 | + | |
| 106 | + <block wx:if="{{aitem.end_time<newTime}}"> | |
| 107 | + <view class="rob"> | |
| 108 | + <view class="wo" style="background-color: #adadad">已结束</view> | |
| 109 | + </view> | |
| 110 | + </block> | |
| 111 | + <block wx:else> | |
| 112 | + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | |
| 113 | + <view class="rob"> | |
| 114 | + <view class="wo">我要抢</view> | |
| 115 | + </view> | |
| 116 | + </block> | |
| 117 | + | |
| 118 | + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | |
| 119 | + <view class="rob"> | |
| 120 | + <view class="wo" style="background-color: #adadad">已抢光</view> | |
| 121 | + </view> | |
| 122 | + </block> | |
| 123 | + </block> | |
| 106 | 124 | |
| 107 | 125 | |
| 108 | 126 | </view> | ... | ... |
components/diy_shopname/diy_shopname.wxml
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | <view style="position: relative; height: 150rpx;"> |
| 11 | 11 | <view class="big_border" > |
| 12 | 12 | <view class="circle"> |
| 13 | - <view class="border"> | |
| 13 | + <view class="border" style="width: 100%; height: 100%;"> | |
| 14 | 14 | <image class="wxd_ww" src='{{sto}}' bindtap="go_user"></image> |
| 15 | 15 | </view> |
| 16 | 16 | </view> | ... | ... |
components/diy_shopname/diy_shopname.wxss
components/full_screen/filter.wxs
0 → 100644
components/full_screen/full_screen.js
0 → 100644
| 1 | +// components/userqy_pop_up/userqy_pop_up.js | |
| 2 | +var o = getApp().globalData.setting | |
| 3 | +Component({ | |
| 4 | + /** | |
| 5 | + * 页面的初始数据 | |
| 6 | + */ | |
| 7 | + data: { | |
| 8 | + control: 1, | |
| 9 | + is_full_screen_show:0, //全屏显示 | |
| 10 | + sec_show:3, //倒计时的秒数 | |
| 11 | + full_ad:null, //全屏广告 | |
| 12 | + url:o.imghost, | |
| 13 | + full_screen:0, | |
| 14 | + is_full_screen_men:1, | |
| 15 | + }, | |
| 16 | + | |
| 17 | + pageLifetimes:{ | |
| 18 | + hide: function() { | |
| 19 | + // 页面被隐藏 | |
| 20 | + clearInterval(this.data.full_screen); | |
| 21 | + }, | |
| 22 | + }, | |
| 23 | + | |
| 24 | + properties: {}, | |
| 25 | + methods: { | |
| 26 | + close_full_screen(){ | |
| 27 | + this.setData({is_full_screen_show:0,sec_show:0,is_full_screen_men:0}); | |
| 28 | + }, | |
| 29 | + //-- 跳转到满屏广告的链接 -- | |
| 30 | + go_full_ad(){ | |
| 31 | + if(!this.data.full_ad) return false; | |
| 32 | + if(!this.data.full_ad.ad_weapplink) return false; | |
| 33 | + getApp().goto(this.data.full_ad.ad_weapplink); | |
| 34 | + this.setData({is_full_screen_show:0,is_full_screen_men:0}); | |
| 35 | + }, | |
| 36 | + get_the_full_screen(){ | |
| 37 | + if(this.data.full_ad) return false; | |
| 38 | + var th=this; | |
| 39 | + //获取全屏的广告 | |
| 40 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=1001&store_id=" + o.stoid,{ | |
| 41 | + data: { enabled: 1 } | |
| 42 | + }).then(res=>{ | |
| 43 | + //判断是不是有全屏广告 | |
| 44 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 45 | + th.setData({ | |
| 46 | + is_full_screen_show:1, | |
| 47 | + full_ad:res.data.data.pageData[0], | |
| 48 | + }) | |
| 49 | + | |
| 50 | + //--定时关闭-- | |
| 51 | + th.data.full_screen=setInterval(function(){ | |
| 52 | + if(!th.data.sec_show) { | |
| 53 | + clearInterval(th.data.full_screen); | |
| 54 | + th.close_full_screen(); | |
| 55 | + return false; | |
| 56 | + } | |
| 57 | + th.data.sec_show--; | |
| 58 | + th.setData({sec_show:th.data.sec_show}); | |
| 59 | + },1000) | |
| 60 | + | |
| 61 | + | |
| 62 | + setTimeout(function(){ | |
| 63 | + th.setData({is_full_screen_men:0}); | |
| 64 | + },1000) | |
| 65 | + }else{ | |
| 66 | + th.setData({ | |
| 67 | + is_full_screen_men:0 | |
| 68 | + }) | |
| 69 | + } | |
| 70 | + }) | |
| 71 | + } | |
| 72 | + }, | |
| 73 | + | |
| 74 | +}) | |
| 0 | 75 | \ No newline at end of file | ... | ... |
components/full_screen/full_screen.json
0 → 100644
components/full_screen/full_screen.wxml
0 → 100644
| 1 | +<!-- 全屏控制 --> | |
| 2 | +<view hidden="{{!is_full_screen_men}}" class="full_screen" style="background-color: #fff;"></view> | |
| 3 | +<view wx:if="{{is_full_screen_show}}" class="full_screen" bindtap="go_full_ad" style="background-image: url('{{url+full_ad.ad_code}}');"> | |
| 4 | + <view catchtap="close_full_screen" class="skip_box">跳过 <text>{{sec_show}}</text></view> | |
| 5 | +</view> | |
| 6 | + | |
| 7 | + | |
| 8 | + | ... | ... |
components/full_screen/full_screen.wxss
0 → 100644
| 1 | +.full_screen{ | |
| 2 | + position: fixed;left: 0;top: 0; | |
| 3 | + z-index: 1000000000000; | |
| 4 | + background-color: rgba(0,0,0,0.4); | |
| 5 | + width: 100%; | |
| 6 | + height: 100%; | |
| 7 | + background-position: center; | |
| 8 | + background-size: 100% 100%; | |
| 9 | + background-repeat: no-repeat; | |
| 10 | +} | |
| 11 | + | |
| 12 | + | |
| 13 | +.skip_box{ | |
| 14 | + float: right; margin-top: 10rpx; margin-right: 10rpx; | |
| 15 | + background-color: gainsboro; width: 120rpx; | |
| 16 | + height: 48rpx; font-size: 28rpx; line-height: 48rpx; | |
| 17 | + text-align: center; border-radius: 20rpx; | |
| 18 | + } | |
| 0 | 19 | \ No newline at end of file | ... | ... |
packageA/pages/checkin/checkin.js
| 1 | 1 | // packageA//pages/checkin/checkin.js |
| 2 | 2 | const app = getApp(); |
| 3 | - | |
| 3 | +let self; | |
| 4 | 4 | Page({ |
| 5 | 5 | |
| 6 | 6 | /** |
| ... | ... | @@ -25,12 +25,12 @@ Page({ |
| 25 | 25 | checkInNums: 0, //补签次数 |
| 26 | 26 | isCheckInDay: '', |
| 27 | 27 | |
| 28 | - | |
| 29 | 28 | flag: true, |
| 29 | + isLogin: false, | |
| 30 | + | |
| 30 | 31 | }, |
| 31 | 32 | |
| 32 | 33 | loadQd(callback) { |
| 33 | - let self = this; | |
| 34 | 34 | app.request.get('/api/weshop/qdrecord/getUser/'+ app.globalData.setting.stoid + '/' + app.globalData.user_id, { |
| 35 | 35 | success: function (res) { |
| 36 | 36 | if(callback) callback(); |
| ... | ... | @@ -46,17 +46,62 @@ Page({ |
| 46 | 46 | * 生命周期函数--监听页面加载 |
| 47 | 47 | */ |
| 48 | 48 | onLoad: function(options) { |
| 49 | - let self = this; | |
| 49 | + console.log('执行onload'); | |
| 50 | + self = this; | |
| 50 | 51 | this.getDate(); |
| 51 | 52 | this.setDate(); |
| 52 | 53 | var res = wx.getSystemInfoSync(); |
| 53 | 54 | this.setData({ |
| 54 | 55 | param: res.windowHeight / 12, |
| 56 | + | |
| 55 | 57 | }) |
| 58 | + | |
| 59 | + | |
| 60 | + // 判断会员是否授权登录, | |
| 61 | + // 没有登录则跳转到登录页, | |
| 62 | + // 已登录则设置已登录状态,请求加载签到数据 | |
| 63 | + this.isLogin().then(function() { | |
| 64 | + console.log('loginnnn',app.globalData.userInfo); | |
| 65 | + self.setData({ | |
| 66 | + isLogin: true | |
| 67 | + }); | |
| 68 | + self.loadQd(); | |
| 69 | + }); | |
| 56 | 70 | |
| 57 | - this.loadQd(); | |
| 58 | 71 | |
| 59 | 72 | }, |
| 73 | + | |
| 74 | + onShow() { | |
| 75 | + if(app.globalData.userInfo instanceof Object) { | |
| 76 | + if(this.data.isLogin) { | |
| 77 | + return; | |
| 78 | + } else { | |
| 79 | + this.setData({ | |
| 80 | + isLogin: true | |
| 81 | + }); | |
| 82 | + this.loadQd(); | |
| 83 | + }; | |
| 84 | + } | |
| 85 | + }, | |
| 86 | + | |
| 87 | + onHide() { | |
| 88 | + console.log('执行onHide'); | |
| 89 | + }, | |
| 90 | + | |
| 91 | + // 是否登录 | |
| 92 | + isLogin() { | |
| 93 | + return new Promise(function(resolve, reject) { | |
| 94 | + let user_info = getApp().globalData.userInfo; | |
| 95 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 96 | + wx.navigateTo({ | |
| 97 | + url: '/pages/togoin/togoin', | |
| 98 | + }) | |
| 99 | + return false; | |
| 100 | + } else { | |
| 101 | + resolve(); | |
| 102 | + }; | |
| 103 | + }); | |
| 104 | + }, | |
| 60 | 105 | |
| 61 | 106 | |
| 62 | 107 | // 点击"我的积分"和"去购物"进行跳转 |
| ... | ... | @@ -219,73 +264,7 @@ Page({ |
| 219 | 264 | } |
| 220 | 265 | this.setData({ |
| 221 | 266 | dateArr: this.data.dateArr, |
| 222 | - // firstDay: this.data.firstDay | |
| 223 | 267 | }); |
| 224 | 268 | }, |
| 225 | 269 | |
| 226 | - // prevMonth: function() { //上一月 | |
| 227 | - // var months = ""; | |
| 228 | - // var years = ""; | |
| 229 | - // if (this.data.month == 1) { | |
| 230 | - // years = this.data.year - 1 | |
| 231 | - // this.data.month = 12; | |
| 232 | - // months = this.data.month; | |
| 233 | - // } else { | |
| 234 | - // years = this.data.year; | |
| 235 | - // months = this.data.month - 1; | |
| 236 | - // } | |
| 237 | - | |
| 238 | - // var first = new Date(years, months - 1, 1); | |
| 239 | - // this.data.firstDay = first.getDay(); | |
| 240 | - // var last = new Date(years, months, 0); | |
| 241 | - // this.data.lastDay = last.getDate(); | |
| 242 | - | |
| 243 | - // this.setData({ | |
| 244 | - // month: months, | |
| 245 | - // year: years, | |
| 246 | - // firstDay: this.data.firstDay, | |
| 247 | - // lastDay: this.data.lastDay | |
| 248 | - // }) | |
| 249 | - | |
| 250 | - // this.data.dateArr = []; | |
| 251 | - // for (var i = 1; i < this.data.lastDay + 1; i++) { | |
| 252 | - // this.data.dateArr.push(i); | |
| 253 | - // } | |
| 254 | - // this.setData({ | |
| 255 | - // dateArr: this.data.dateArr | |
| 256 | - // }) | |
| 257 | - // }, | |
| 258 | - | |
| 259 | - // nextMonth: function() { //下一月 | |
| 260 | - // var months = ""; | |
| 261 | - // var years = ""; | |
| 262 | - // if (this.data.month == 12) { | |
| 263 | - // this.data.month = 0; | |
| 264 | - // months = this.data.month; | |
| 265 | - // years = this.data.year + 1; | |
| 266 | - // } else { | |
| 267 | - // months = this.data.month + 1; | |
| 268 | - // years = this.data.year; | |
| 269 | - // } | |
| 270 | - // var months = this.data.month + 1; | |
| 271 | - // var first = new Date(years, months - 1, 1); | |
| 272 | - // this.data.firstDay = first.getDay(); | |
| 273 | - // var last = new Date(years, months, 0); | |
| 274 | - // this.data.lastDay = last.getDate(); | |
| 275 | - // this.setData({ | |
| 276 | - // month: months, | |
| 277 | - // year: years, | |
| 278 | - // firstDay: this.data.firstDay, | |
| 279 | - // lastDay: this.data.lastDay | |
| 280 | - // }) | |
| 281 | - | |
| 282 | - // this.data.dateArr = []; | |
| 283 | - // for (var i = 1; i < this.data.lastDay + 1; i++) { | |
| 284 | - // this.data.dateArr.push(i); | |
| 285 | - // } | |
| 286 | - // this.setData({ | |
| 287 | - // dateArr: this.data.dateArr | |
| 288 | - // }) | |
| 289 | - // }, | |
| 290 | - | |
| 291 | 270 | }) | ... | ... |
packageA/pages/checkin/checkin.wxml
| ... | ... | @@ -38,9 +38,12 @@ |
| 38 | 38 | </view> |
| 39 | 39 | |
| 40 | 40 | <view class="btn-container"> |
| 41 | - <view class="btn" bindtap="checkInToday"> | |
| 41 | + <view class="btn" bindtap="checkInToday" wx:if="{{isLogin}}"> | |
| 42 | 42 | <text class="iconfont icon-rili"></text>{{!dateArr[day-1].isCheckIn ? '立即签到':'今日已签到'}} |
| 43 | 43 | </view> |
| 44 | + <view class="btn" bindtap="isLogin" wx:else> | |
| 45 | + <text class="iconfont icon-rili"></text>签到请登录 | |
| 46 | + </view> | |
| 44 | 47 | <view class="btn" wx:if="{{res.curbqdaynum}}" bindtap="reCheckIn"><text class="iconfont icon-buqian"></text>补签(-10分)</view> |
| 45 | 48 | </view> |
| 46 | 49 | |
| ... | ... | @@ -103,7 +106,7 @@ |
| 103 | 106 | <view class="popup-wrapper"> |
| 104 | 107 | <view class="popup"> |
| 105 | 108 | <view class="popup-title">签到规则</view> |
| 106 | - <view class="popup-content">1.每日签到领积分</view> | |
| 109 | + <view class="popup-content">{{res.qdrules}}</view> | |
| 107 | 110 | </view> |
| 108 | 111 | <view class="popup-close"> |
| 109 | 112 | <text class="btn-close" bindtap="showRules">X</text> | ... | ... |
packageA/pages/hongBao/hongBao.js
0 → 100644
| 1 | +// packageA//pages/hongBao/hongBao.js | |
| 2 | +const app = getApp(); | |
| 3 | +let self = null; | |
| 4 | + | |
| 5 | +let ut = require("../../../utils/util.js") | |
| 6 | + | |
| 7 | +Page({ | |
| 8 | + | |
| 9 | + /** | |
| 10 | + * 页面的初始数据 | |
| 11 | + */ | |
| 12 | + data: { | |
| 13 | + url: app.globalData.setting.imghost, | |
| 14 | + qiangHongBao: false, | |
| 15 | + qianging: false, | |
| 16 | + time: null, | |
| 17 | + | |
| 18 | + // hongBaoData: null, //保存抢红包活动的相关时间等信息 | |
| 19 | + isStart: 0, //记录抢红包活动是否开始 | |
| 20 | + result: null, //保存抢红包的结果 | |
| 21 | + }, | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 生命周期函数--监听页面加载 | |
| 25 | + */ | |
| 26 | + onLoad: function (options) { | |
| 27 | + console.log('onload'); | |
| 28 | + self = this; | |
| 29 | + | |
| 30 | + this.isLogin() | |
| 31 | + .then(function(data) { | |
| 32 | + | |
| 33 | + self.requestData('/api/weshop/redmoney/redConfig/get/'+app.globalData.setting.stoid, {}) | |
| 34 | + .then(function(data) { | |
| 35 | + self.data.hongBaoData = data.data.data; | |
| 36 | + self.countDown(); | |
| 37 | + self.setData({ | |
| 38 | + storeName: app.globalData.config.store_name | |
| 39 | + }); | |
| 40 | + }); | |
| 41 | + | |
| 42 | + }); | |
| 43 | + }, | |
| 44 | + | |
| 45 | + // 判断是否授权登录 | |
| 46 | + isLogin() { | |
| 47 | + return new Promise((resolve, reject) => { | |
| 48 | + let user_info = app.globalData.userInfo; | |
| 49 | + if(user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 50 | + wx.navigateTo({ | |
| 51 | + url: '/pages/togoin/togoin', | |
| 52 | + }) | |
| 53 | + } else { | |
| 54 | + resolve(); | |
| 55 | + }; | |
| 56 | + }); | |
| 57 | + }, | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 生命周期函数--监听页面初次渲染完成 | |
| 61 | + */ | |
| 62 | + onReady: function () { | |
| 63 | + console.log('onready'); | |
| 64 | + | |
| 65 | + | |
| 66 | + }, | |
| 67 | + | |
| 68 | + /** | |
| 69 | + * 生命周期函数--监听页面显示 | |
| 70 | + */ | |
| 71 | + onShow: function () { | |
| 72 | + console.log('onshow'); | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + }, | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * 生命周期函数--监听页面隐藏 | |
| 81 | + */ | |
| 82 | + onHide: function () { | |
| 83 | + console.log('onhide'); | |
| 84 | + }, | |
| 85 | + | |
| 86 | + /** | |
| 87 | + * 生命周期函数--监听页面卸载 | |
| 88 | + */ | |
| 89 | + onUnload: function () { | |
| 90 | + | |
| 91 | + }, | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 95 | + */ | |
| 96 | + onPullDownRefresh: function () { | |
| 97 | + | |
| 98 | + }, | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 页面上拉触底事件的处理函数 | |
| 102 | + */ | |
| 103 | + onReachBottom: function () { | |
| 104 | + | |
| 105 | + }, | |
| 106 | + | |
| 107 | + /** | |
| 108 | + * 用户点击右上角分享 | |
| 109 | + */ | |
| 110 | + onShareAppMessage: function () { | |
| 111 | + | |
| 112 | + }, | |
| 113 | + | |
| 114 | + // 请求数据 | |
| 115 | + requestData(url, data) { | |
| 116 | + return new Promise((resolve, reject) => { | |
| 117 | + app.request.promiseGet(url, {data: data}) | |
| 118 | + .then(res => { | |
| 119 | + if(res.data.code == 0) { | |
| 120 | + console.log('resolve', res); | |
| 121 | + resolve(res); | |
| 122 | + } else { | |
| 123 | + reject(res); | |
| 124 | + }; | |
| 125 | + }) | |
| 126 | + }); | |
| 127 | + }, | |
| 128 | + | |
| 129 | + //秒杀倒计时 | |
| 130 | + //---小于10的格式化函数---- | |
| 131 | + timeFormat(param) { | |
| 132 | + return param < 10 ? '0' + param : param; | |
| 133 | + }, | |
| 134 | + | |
| 135 | + handleTime(time) { | |
| 136 | + var day = parseInt(time / (60 * 60 * 24)); | |
| 137 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 138 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 139 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 140 | + return { | |
| 141 | + day: this.timeFormat(day), | |
| 142 | + hou: this.timeFormat(hou), | |
| 143 | + min: this.timeFormat(min), | |
| 144 | + sec: this.timeFormat(sec), | |
| 145 | + }; | |
| 146 | + }, | |
| 147 | + | |
| 148 | + //----秒杀倒计时函数----- | |
| 149 | + countDown() { | |
| 150 | + // if (!this.data.is_timer) return false; | |
| 151 | + var time; | |
| 152 | + // 获取当前时间,同时得到活动结束时间数组 | |
| 153 | + var newTime = ut.gettimestamp(); | |
| 154 | + // var List = this.data.saleGoods; | |
| 155 | + // for (var j = 0; j < List.length; j++) { | |
| 156 | + // var endTimeList = List[j]; | |
| 157 | + // 对结束时间进行处理渲染到页面 | |
| 158 | + // for (var i = 0; i < endTimeList.length; i++) { | |
| 159 | + // var o = endTimeList[i]; | |
| 160 | + var startTime = this.data.hongBaoData.start_time; | |
| 161 | + // var startTime = 1600; | |
| 162 | + var endTime = this.data.hongBaoData.end_time; | |
| 163 | + // if (o.status == 0) endTime = o.start_time | |
| 164 | + var obj = null; | |
| 165 | + | |
| 166 | + if(startTime - newTime > 0) { //活动还没开始 | |
| 167 | + this.setData({ | |
| 168 | + isStart: 0, | |
| 169 | + }); | |
| 170 | + time = startTime - newTime; | |
| 171 | + // var day = parseInt(time / (60 * 60 * 24)); | |
| 172 | + // var hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 173 | + // var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 174 | + // var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 175 | + // obj = { | |
| 176 | + // day: this.timeFormat(day), | |
| 177 | + // hou: this.timeFormat(hou), | |
| 178 | + // min: this.timeFormat(min), | |
| 179 | + // sec: this.timeFormat(sec), | |
| 180 | + // }; | |
| 181 | + | |
| 182 | + obj = this.handleTime(time); | |
| 183 | + } | |
| 184 | + // 如果活动未结束,对时间进行处理 | |
| 185 | + if (endTime - newTime > 0) { //活动还没结束 | |
| 186 | + this.setData({ | |
| 187 | + isStart: 1, | |
| 188 | + }); | |
| 189 | + time = endTime - newTime; | |
| 190 | + // 获取天、时、分、秒 | |
| 191 | + // var day = parseInt(time / (60 * 60 * 24)); | |
| 192 | + // var hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 193 | + // var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 194 | + // var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 195 | + // obj = { | |
| 196 | + // day: this.timeFormat(day), | |
| 197 | + // hou: this.timeFormat(hou), | |
| 198 | + // min: this.timeFormat(min), | |
| 199 | + // sec: this.timeFormat(sec), | |
| 200 | + // }; | |
| 201 | + | |
| 202 | + obj = this.handleTime(time); | |
| 203 | + | |
| 204 | + } else { //活动已经结束 | |
| 205 | + //活动已结束,全部设置为'00' | |
| 206 | + this.setData({ | |
| 207 | + isStart: 2, | |
| 208 | + }); | |
| 209 | + obj = { | |
| 210 | + day: '00', | |
| 211 | + hou: '00', | |
| 212 | + min: '00', | |
| 213 | + sec: '00' | |
| 214 | + } | |
| 215 | + } | |
| 216 | + // var txt = "saleGoods[" + j + "][" + i + "].djs"; | |
| 217 | + self.setData({ | |
| 218 | + time: obj, | |
| 219 | + }); | |
| 220 | + // } | |
| 221 | + | |
| 222 | + // } | |
| 223 | + setTimeout(self.countDown, 1000); | |
| 224 | + }, | |
| 225 | + | |
| 226 | + qiangHongBao() { | |
| 227 | + if(!this.data.qianging) { | |
| 228 | + this.data.qianging = true; | |
| 229 | + app.request.promisePost('/api/weshop/redmoney/redRecord/saveRecord', { | |
| 230 | + data: { | |
| 231 | + store_id: app.globalData.setting.stoid, | |
| 232 | + user_id: app.globalData.user_id, | |
| 233 | + redid: this.data.hongBaoData.id, | |
| 234 | + } | |
| 235 | + }) | |
| 236 | + .then(res => { | |
| 237 | + // if(res.data.code == 0){ | |
| 238 | + // // wx.hideLoading(); | |
| 239 | + // // wx.showToast({ | |
| 240 | + // // title: '领取成功', | |
| 241 | + // // icon: 'success', | |
| 242 | + // // duration: 2000 | |
| 243 | + // // }); | |
| 244 | + // console.log('请求提交成功',res.data); | |
| 245 | + | |
| 246 | + // // if(callback) { | |
| 247 | + // // callback(res.data.data); | |
| 248 | + // // } | |
| 249 | + // } else if(res.data.code === -1) { | |
| 250 | + // // wx.hideLoading(); | |
| 251 | + // // wx.showToast({ | |
| 252 | + // // title: '领取失败:' + res.data.msg, | |
| 253 | + // // icon: 'none', | |
| 254 | + // // duration: 2000 | |
| 255 | + // // }); | |
| 256 | + // // self.setData({ | |
| 257 | + // // result: res.data | |
| 258 | + // // }); | |
| 259 | + | |
| 260 | + // }; | |
| 261 | + self.setData({ | |
| 262 | + result: res.data, | |
| 263 | + qiangHongBao: true, | |
| 264 | + }); | |
| 265 | + }) | |
| 266 | + } | |
| 267 | + | |
| 268 | + | |
| 269 | + }, | |
| 270 | + | |
| 271 | + receive() { | |
| 272 | + // app.postData('/api/wemd/stafftask/saveGuideTaskListGive', { | |
| 273 | + // store_id: app.globalData.userInfo.store_id, | |
| 274 | + // StaffId: _this.data.StaffId, | |
| 275 | + // Id: _this.data.details.Id, | |
| 276 | + // TaskType: _this.data.details.TaskType, | |
| 277 | + // }); | |
| 278 | + | |
| 279 | + // postData(url, data, callback) { | |
| 280 | + wx.showLoading({ | |
| 281 | + title: '奖励领取中' | |
| 282 | + }); | |
| 283 | + app.request.promisePost('/api/wemd/stafftask/saveGuideTaskListGive', { | |
| 284 | + data: { | |
| 285 | + store_id: app.globalData.userInfo.store_id, | |
| 286 | + StaffId: _this.data.StaffId, | |
| 287 | + Id: _this.data.details.Id, | |
| 288 | + TaskType: _this.data.details.TaskType, | |
| 289 | + } | |
| 290 | + }) | |
| 291 | + .then(res => { | |
| 292 | + if(res.data.code == 0){ | |
| 293 | + wx.hideLoading(); | |
| 294 | + wx.showToast({ | |
| 295 | + title: '领取成功', | |
| 296 | + icon: 'success', | |
| 297 | + duration: 2000 | |
| 298 | + }); | |
| 299 | + // console.log('请求提交成功',res.data.data); | |
| 300 | + // if(callback) { | |
| 301 | + // callback(res.data.data); | |
| 302 | + // } | |
| 303 | + } else if(res.data.code === -1) { | |
| 304 | + wx.hideLoading(); | |
| 305 | + wx.showToast({ | |
| 306 | + title: '领取失败:' + res.data.msg, | |
| 307 | + icon: 'none', | |
| 308 | + duration: 2000 | |
| 309 | + }); | |
| 310 | + }; | |
| 311 | + }) | |
| 312 | + // }, | |
| 313 | + }, | |
| 314 | + | |
| 315 | + | |
| 316 | + closePopup() { | |
| 317 | + this.setData({ | |
| 318 | + qiangHongBao: false, | |
| 319 | + qianging: false, | |
| 320 | + }); | |
| 321 | + }, | |
| 322 | + | |
| 323 | + | |
| 324 | + gotoDetails() { | |
| 325 | + // this.data.qiangHongBao = false; | |
| 326 | + this.setData({ | |
| 327 | + qiangHongBao: false | |
| 328 | + }); | |
| 329 | + app.goto('/packageA/pages/hongBaoDetails/hongBaoDetails?redid=' + this.data.hongBaoData.id); | |
| 330 | + }, | |
| 331 | + | |
| 332 | + | |
| 333 | +}) | |
| 0 | 334 | \ No newline at end of file | ... | ... |
packageA/pages/hongBao/hongBao.json
0 → 100644
packageA/pages/hongBao/hongBao.wxml
0 → 100644
| 1 | +<!--packageA//pages/hongBao/hongBao.wxml--> | |
| 2 | +<view class="hongBao-container"> | |
| 3 | + <view class="white fs26">由{{storeName}}发起抢红包</view> | |
| 4 | + <view class="btn-container"> | |
| 5 | + <image src="{{url + 'miniapp/images/redmoney/redbag_btn.png'}}" class="btn" mode="aspectFit" bindtap="qiangHongBao"></image> | |
| 6 | + </view> | |
| 7 | + <view class="countdown-container"> | |
| 8 | + <view class="countdown-txt">{{isStart == 0 ? '距离活动开始还有':(isStart == 1 ? '距离活动结束还有':'活动已经结束')}}</view> | |
| 9 | + <view class="countdown"> | |
| 10 | + <view class="countdown-item">{{time.day}}天</view> | |
| 11 | + <view class="countdown-item">{{time.hou}}时</view> | |
| 12 | + <view class="countdown-item">{{time.min}}分</view> | |
| 13 | + <view class="countdown-item">{{time.sec}}秒</view> | |
| 14 | + </view> | |
| 15 | + </view> | |
| 16 | +</view> | |
| 17 | + | |
| 18 | +<!-- 弹窗 --> | |
| 19 | +<view class="popup-container" wx:if="{{qiangHongBao}}" bindtap="closePopup"> | |
| 20 | + <view class="popup"> | |
| 21 | + <block wx:if="{{result.code == 0}}"> | |
| 22 | + <image src="{{url + 'miniapp/images/redmoney/hbtit.png'}}" mode="aspectFit"></image> | |
| 23 | + <view class="amount-container"> | |
| 24 | + <view class="amount">¥{{result.data.redmoney}}</view> | |
| 25 | + <view class="btn-receive" catchtap="gotoDetails" data-redid="{{hongBaoData.id}}"> | |
| 26 | + <image src="{{url + 'miniapp/images/redmoney/srhb.png'}}" class="btn-img"></image> | |
| 27 | + </view> | |
| 28 | + </view> | |
| 29 | + </block> | |
| 30 | + | |
| 31 | + <block wx:if="{{result.code == -1}}"> | |
| 32 | + <image src="{{url + 'miniapp/images/redmoney/hbtit2.png'}}" mode="aspectFit"></image> | |
| 33 | + <!-- <view class="none">来晚了,红包已抢空~</view> --> | |
| 34 | + <view class="none">{{result.msg}}</view> | |
| 35 | + <view class="see" catchtap="gotoDetails" data-redid="{{hongBaoData.id}}">看看大家的手气 ></view> | |
| 36 | + </block> | |
| 37 | + </view> | |
| 38 | +</view> | |
| 39 | + | |
| 40 | +<!-- 弹窗 --> | |
| 41 | +<!-- <view class="popup-container"> | |
| 42 | + <view class="popup"> | |
| 43 | + <image src="{{url + 'miniapp/images/redmoney/hbtit2.png'}}" mode="aspectFit"></image> | |
| 44 | + <view class="none">来晚了,红包已抢空~</view> | |
| 45 | + <view class="see">看看大家的手气 ></view> | |
| 46 | + </view> | |
| 47 | +</view> --> | ... | ... |
packageA/pages/hongBao/hongBao.wxss
0 → 100644
| 1 | +/* packageA//pages/hongBao/hongBao.wxss */ | |
| 2 | +page { | |
| 3 | + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/hongbao_bg.jpg') center top; | |
| 4 | + background-size: 100% auto; | |
| 5 | +} | |
| 6 | + | |
| 7 | +.hongBao-container { | |
| 8 | + padding: 20rpx; | |
| 9 | +} | |
| 10 | + | |
| 11 | +.btn-container { | |
| 12 | + padding-top: 60rpx; | |
| 13 | + padding-bottom: 60rpx; | |
| 14 | + -webkit-animation: free_download 600ms linear alternate infinite; | |
| 15 | + animation: free_download 600ms linear alternate infinite; | |
| 16 | +} | |
| 17 | + | |
| 18 | +@-webkit-keyframes free_download{ | |
| 19 | + 0% {-webkit-transform:scale(0.9);} | |
| 20 | + 100% {-webkit-transform:scale(1.1);} | |
| 21 | +} | |
| 22 | + | |
| 23 | +@keyframes free_download{ | |
| 24 | + 0% {transform:scale(0.9);} | |
| 25 | + 100% {transform:scale(1.1);} | |
| 26 | +} | |
| 27 | + | |
| 28 | +.countdown-container { | |
| 29 | + position: fixed; | |
| 30 | + left: 0; | |
| 31 | + bottom: 0; | |
| 32 | + width: 100%; | |
| 33 | + height: 688rpx; | |
| 34 | + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/indexbot.png') no-repeat left bottom; | |
| 35 | + background-size: 100% auto; | |
| 36 | + text-align: center; | |
| 37 | +} | |
| 38 | + | |
| 39 | +.countdown { | |
| 40 | + display: flex; | |
| 41 | + justify-content: space-around; | |
| 42 | + padding: 200rpx 160rpx 0; | |
| 43 | +} | |
| 44 | + | |
| 45 | +.countdown-item { | |
| 46 | + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/timebox.png') no-repeat; | |
| 47 | + background-size: 100% 100%; | |
| 48 | + width: 90rpx; | |
| 49 | + height: 100rpx; | |
| 50 | + line-height: 120rpx; | |
| 51 | + color: white; | |
| 52 | +} | |
| 53 | + | |
| 54 | +.btn { | |
| 55 | + width: 100%; | |
| 56 | + height: 400rpx; | |
| 57 | +} | |
| 58 | + | |
| 59 | +.countdown-txt { | |
| 60 | + color: #ff6768; | |
| 61 | + text-align: center; | |
| 62 | + padding-top: 120rpx; | |
| 63 | + font-size: 36rpx; | |
| 64 | + font-weight: bold; | |
| 65 | +} | |
| 66 | + | |
| 67 | +.popup-container { | |
| 68 | + position: fixed; | |
| 69 | + width: 100%; | |
| 70 | + height: 100%; | |
| 71 | + top: 0; | |
| 72 | + background-color: rgba(0,0,0,.7); | |
| 73 | +} | |
| 74 | + | |
| 75 | +.popup { | |
| 76 | + position: relative; | |
| 77 | + top: 50%; | |
| 78 | + left: 50%; | |
| 79 | + transform: translate(-50%, -50%); | |
| 80 | + text-align: center; | |
| 81 | +} | |
| 82 | + | |
| 83 | + | |
| 84 | +.btn-img { | |
| 85 | + width: 200rpx; | |
| 86 | + height: 50rpx; | |
| 87 | +} | |
| 88 | + | |
| 89 | +.amount-container { | |
| 90 | + position: absolute; | |
| 91 | + left: 50%; | |
| 92 | + top: 50%; | |
| 93 | + transform: translateX(-55%); | |
| 94 | +} | |
| 95 | + | |
| 96 | +.amount { | |
| 97 | + color: #fff005; | |
| 98 | + font-size: 68rpx; | |
| 99 | + text-align: center; | |
| 100 | + padding-top: 10rpx; | |
| 101 | + padding-bottom: 20rpx; | |
| 102 | +} | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | +.none, | |
| 107 | +.see { | |
| 108 | + position: absolute; | |
| 109 | + font-size: 26rpx; | |
| 110 | + color: white; | |
| 111 | + left: 50%; | |
| 112 | + transform: translateX(-60%); | |
| 113 | +} | |
| 114 | + | |
| 115 | +.none { | |
| 116 | + font-size: 20rpx; | |
| 117 | + top: 36%; | |
| 118 | + margin-left: 55rpx; | |
| 119 | +} | |
| 120 | + | |
| 121 | +.see { | |
| 122 | + top: 82%; | |
| 123 | + left: 50%; | |
| 124 | + transform: translateX(-58%); | |
| 125 | +} | |
| 126 | + | |
| 127 | +.late { | |
| 128 | + font-size: 38; | |
| 129 | + color: #fff005; | |
| 130 | + padding-top: 40rpx; | |
| 131 | +} | |
| 0 | 132 | \ No newline at end of file | ... | ... |
packageA/pages/hongBaoDetails/hongBaoDetails.js
0 → 100644
| 1 | +// packageA//pages/hongBao/hongBao.js | |
| 2 | +const app = getApp(); | |
| 3 | +let reqData = {}; | |
| 4 | +let _this = null; | |
| 5 | + | |
| 6 | +Page({ | |
| 7 | + | |
| 8 | + /** | |
| 9 | + * 页面的初始数据 | |
| 10 | + */ | |
| 11 | + data: { | |
| 12 | + url: app.globalData.setting.imghost, | |
| 13 | + list: null, | |
| 14 | + isLoading: false, // 检测是否已经发送请求,防止重复发送请求 | |
| 15 | + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 | |
| 16 | + pageNum: 1, // 当前页数 | |
| 17 | + }, | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * 生命周期函数--监听页面加载 | |
| 21 | + */ | |
| 22 | + onLoad: function (options) { | |
| 23 | + _this = this; | |
| 24 | + console.log('options', options); | |
| 25 | + | |
| 26 | + this.isLogin() | |
| 27 | + .then(function(data) { | |
| 28 | + | |
| 29 | + _this.data.options = options; | |
| 30 | + reqData.url = '/api/weshop/redmoney/redRecord/page', | |
| 31 | + reqData.data = { | |
| 32 | + store_id: app.globalData.setting.stoid, | |
| 33 | + redid: _this.data.options.redid, | |
| 34 | + }; | |
| 35 | + reqData.data2 = { | |
| 36 | + store_id: app.globalData.setting.stoid, | |
| 37 | + user_id: app.globalData.user_id, | |
| 38 | + redid: _this.data.options.redid, | |
| 39 | + pageSize: 1, | |
| 40 | + page: 1, | |
| 41 | + }; | |
| 42 | + _this.getData(true, reqData.url, reqData.data); | |
| 43 | + _this.requestData(reqData.url, reqData.data2) | |
| 44 | + .then(function(data) { | |
| 45 | + _this.setData({ | |
| 46 | + myRed: data.data.data.pageData[0] | |
| 47 | + }); | |
| 48 | + // console.log('123', data.data.data.pageData[0]); | |
| 49 | + }); | |
| 50 | + | |
| 51 | + }); | |
| 52 | + | |
| 53 | + | |
| 54 | + }, | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 生命周期函数--监听页面初次渲染完成 | |
| 58 | + */ | |
| 59 | + onReady: function () { | |
| 60 | + | |
| 61 | + }, | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 生命周期函数--监听页面显示 | |
| 65 | + */ | |
| 66 | + onShow: function () { | |
| 67 | + | |
| 68 | + }, | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 生命周期函数--监听页面隐藏 | |
| 72 | + */ | |
| 73 | + onHide: function () { | |
| 74 | + | |
| 75 | + }, | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 生命周期函数--监听页面卸载 | |
| 79 | + */ | |
| 80 | + onUnload: function () { | |
| 81 | + | |
| 82 | + }, | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 86 | + */ | |
| 87 | + onPullDownRefresh: function () { | |
| 88 | + | |
| 89 | + }, | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 页面上拉触底事件的处理函数 | |
| 93 | + */ | |
| 94 | + onReachBottom: function () { | |
| 95 | + this.scrollToLower(reqData.url, reqData.data); | |
| 96 | + }, | |
| 97 | + | |
| 98 | + /** | |
| 99 | + * 用户点击右上角分享 | |
| 100 | + */ | |
| 101 | + onShareAppMessage: function () { | |
| 102 | + | |
| 103 | + }, | |
| 104 | + | |
| 105 | + // 判断是否授权登录 | |
| 106 | + isLogin() { | |
| 107 | + return new Promise((resolve, reject) => { | |
| 108 | + let user_info = app.globalData.userInfo; | |
| 109 | + if(user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 110 | + wx.navigateTo({ | |
| 111 | + url: '/pages/togoin/togoin', | |
| 112 | + }) | |
| 113 | + } else { | |
| 114 | + resolve(); | |
| 115 | + }; | |
| 116 | + }); | |
| 117 | + }, | |
| 118 | + | |
| 119 | + // 请求数据 | |
| 120 | + requestData(url, data) { | |
| 121 | + return new Promise((resolve, reject) => { | |
| 122 | + app.request.promiseGet(url, {data: data}) | |
| 123 | + .then(res => { | |
| 124 | + if(res.data.code == 0) { | |
| 125 | + console.log('resolve', res); | |
| 126 | + resolve(res); | |
| 127 | + } else { | |
| 128 | + reject(res); | |
| 129 | + }; | |
| 130 | + }) | |
| 131 | + }); | |
| 132 | + }, | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + // 上拉加载请求数据 | |
| 137 | + getData: function(isInit, url, data) { | |
| 138 | + wx.showLoading({ | |
| 139 | + title: '加载中', | |
| 140 | + }) | |
| 141 | + this.requestData(url, data) | |
| 142 | + .then(function(res) { | |
| 143 | + wx.hideLoading(); | |
| 144 | + console.log('res--->', res); | |
| 145 | + _this.setData({ | |
| 146 | + isLoading: false | |
| 147 | + }); | |
| 148 | + | |
| 149 | + if(isInit) {// 第一次加载 | |
| 150 | + _this.setData({ | |
| 151 | + list: res.data.data | |
| 152 | + }); | |
| 153 | + } else { | |
| 154 | + | |
| 155 | + _this.setData({ | |
| 156 | + 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData) | |
| 157 | + }); | |
| 158 | + }; | |
| 159 | + | |
| 160 | + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { | |
| 161 | + _this.setData({ | |
| 162 | + noMore: true | |
| 163 | + }); | |
| 164 | + }; | |
| 165 | + | |
| 166 | + }) | |
| 167 | + .catch(function(reason) { | |
| 168 | + wx.hideLoading(); | |
| 169 | + wx.showToast({ | |
| 170 | + title: reason.data.msg, | |
| 171 | + icon: 'none', | |
| 172 | + duration: 2000 | |
| 173 | + }) | |
| 174 | + _this.setData({ | |
| 175 | + 'list.pageData': [] | |
| 176 | + }); | |
| 177 | + }); | |
| 178 | + }, | |
| 179 | + | |
| 180 | + | |
| 181 | + // 上拉加载 | |
| 182 | + scrollToLower(url, requestData, callback) { | |
| 183 | + // 页面数据 | |
| 184 | + // let pageData = this.data.list.pageData; | |
| 185 | + // 数据总量 | |
| 186 | + let total = this.data.list.total; | |
| 187 | + // 单页最大数据量 | |
| 188 | + let pageSize = this.data.list.pageSize; | |
| 189 | + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’ | |
| 190 | + if((total != 0)&&(total <= pageSize)) { | |
| 191 | + this.setData({ | |
| 192 | + noMore: true | |
| 193 | + }); | |
| 194 | + }; | |
| 195 | + | |
| 196 | + if(!this.data.isLoading && !this.data.noMore) { | |
| 197 | + this.setData({ | |
| 198 | + isLoading: true, | |
| 199 | + pageNum: this.data.pageNum + 1 | |
| 200 | + }); | |
| 201 | + requestData.page = this.data.pageNum; | |
| 202 | + this.getData(false, url, requestData); | |
| 203 | + }; | |
| 204 | + }, | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | +}) | |
| 0 | 209 | \ No newline at end of file | ... | ... |
packageA/pages/hongBaoDetails/hongBaoDetails.json
0 → 100644
packageA/pages/hongBaoDetails/hongBaoDetails.wxml
0 → 100644
| 1 | +<!--packageA//pages/hongBao/hongBao.wxml--> | |
| 2 | +<wxs module="filter" src="../../../utils/filter.wxs"></wxs> | |
| 3 | +<view class="hongBao-container"> | |
| 4 | + <!-- <view class="white fs26">由美得得美妆商城发起抢红包</view> --> | |
| 5 | + <view class="btn-container"> | |
| 6 | + <image src="{{url + 'miniapp/images/redmoney/redbag_pro.png'}}" class="btn" mode="aspectFit"></image> | |
| 7 | + <view class="amount">¥{{filter.show_default(myRed.redmoney, '0.00')}}</view> | |
| 8 | + </view> | |
| 9 | + <view class="list-container"> | |
| 10 | + <!-- <view class="countdown-txt">获奖名单</view> --> | |
| 11 | + <image src="{{url + 'miniapp/images/redmoney/listit.png'}}" class="list-img" mode=""></image> | |
| 12 | + <view class="list"> | |
| 13 | + <view class="list-item" wx:for="{{list.pageData}}"> | |
| 14 | + <view class="flex ai-center"> | |
| 15 | + <view class="avatar-container"> | |
| 16 | + <image src="{{item.userimg}}" class="avatar"></image> | |
| 17 | + </view> | |
| 18 | + <view> | |
| 19 | + <view>{{item.vipname}}</view> | |
| 20 | + <view class="xc-ash fs24 pdt20">{{filter.format_time(item.addtime, 1)}}</view> | |
| 21 | + </view> | |
| 22 | + </view> | |
| 23 | + <view class="co-red">¥{{item.redmoney}}</view> | |
| 24 | + </view> | |
| 25 | + <nodata nodataContainer="txt-center" wx:if="{{list.pageData.length == 0}}"></nodata> | |
| 26 | + <!-- <view class="list-item"> | |
| 27 | + <view class="flex ai-center"> | |
| 28 | + <view class="avatar-container"> | |
| 29 | + <image src="../../images/wx2.png" class="avatar"></image> | |
| 30 | + </view> | |
| 31 | + <view> | |
| 32 | + <view>good</view> | |
| 33 | + <view class="xc-ash fs24 pdt20">2020-12-12 18:00:00</view> | |
| 34 | + </view> | |
| 35 | + </view> | |
| 36 | + <view class="co-red">¥100.00</view> | |
| 37 | + </view> --> | |
| 38 | + <!-- <view class="countdown-item">50天</view> | |
| 39 | + <view class="countdown-item">9时</view> | |
| 40 | + <view class="countdown-item">23分</view> | |
| 41 | + <view class="countdown-item">43秒</view> --> | |
| 42 | + </view> | |
| 43 | + </view> | |
| 44 | + <view class="nodata" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 没有更多了 -</view> | |
| 45 | + <!-- <view class="no-more txt-center" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 没有更多了 -</view> --> | |
| 46 | +</view> | |
| 47 | + | |
| 48 | +<nav_box></nav_box> | |
| 49 | + | |
| 50 | +<!-- 弹窗 --> | |
| 51 | +<!-- <view class="popup-container"> | |
| 52 | + <view class="popup"> | |
| 53 | + <image src="{{url + 'miniapp/images/redmoney/hbtit.png'}}" mode="aspectFit"></image> | |
| 54 | + <view class="amount-container"> | |
| 55 | + <view class="amount">0.53</view> | |
| 56 | + <view class="btn-receive"> | |
| 57 | + <image src="{{url + 'miniapp/images/redmoney/srhb.png'}}" class="btn-img"></image> | |
| 58 | + </view> | |
| 59 | + </view> | |
| 60 | + </view> | |
| 61 | +</view> --> | |
| 62 | + | |
| 63 | +<!-- 弹窗 --> | |
| 64 | +<!-- <view class="popup-container"> | |
| 65 | + <view class="popup"> | |
| 66 | + <image src="{{url + 'miniapp/images/redmoney/hbtit2.png'}}" mode="aspectFit"></image> | |
| 67 | + <view class="none">来晚了,红包已抢空~</view> | |
| 68 | + <view class="see">看看大家的手气 ></view> | |
| 69 | + </view> | |
| 70 | +</view> --> | ... | ... |
packageA/pages/hongBaoDetails/hongBaoDetails.wxss
0 → 100644
| 1 | +/* packageA//pages/hongBao/hongBao.wxss */ | |
| 2 | +page { | |
| 3 | + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/hongbao_bg.jpg') center top; | |
| 4 | + background-size: 100% auto; | |
| 5 | +} | |
| 6 | + | |
| 7 | +.hongBao-container { | |
| 8 | + padding: 20rpx; | |
| 9 | +} | |
| 10 | + | |
| 11 | +.btn-container { | |
| 12 | + padding-top: 60rpx; | |
| 13 | + /* padding-bottom: 60rpx; */ | |
| 14 | + /* transform:scale(1.2); */ | |
| 15 | + position: relative; | |
| 16 | + /* -webkit-animation: free_download 600ms linear alternate infinite; | |
| 17 | + animation: free_download 600ms linear alternate infinite; */ | |
| 18 | +} | |
| 19 | + | |
| 20 | +/* @-webkit-keyframes free_download{ | |
| 21 | + 0% {-webkit-transform:scale(0.9);} | |
| 22 | + 100% {-webkit-transform:scale(1.1);} | |
| 23 | +} | |
| 24 | + | |
| 25 | +@keyframes free_download{ | |
| 26 | + 0% {transform:scale(0.9);} | |
| 27 | + 100% {transform:scale(1.1);} | |
| 28 | +} */ | |
| 29 | + | |
| 30 | +.countdown-container { | |
| 31 | + /* position: fixed; | |
| 32 | + left: 0; | |
| 33 | + bottom: 0; | |
| 34 | + width: 100%; | |
| 35 | + height: 688rpx; | |
| 36 | + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/indexbot.png') no-repeat left bottom; | |
| 37 | + background-size: 100% auto; | |
| 38 | + text-align: center; */ | |
| 39 | +} | |
| 40 | + | |
| 41 | +.countdown { | |
| 42 | + /* display: flex; | |
| 43 | + justify-content: space-around; | |
| 44 | + padding: 200rpx 160rpx 0; */ | |
| 45 | +} | |
| 46 | + | |
| 47 | +.countdown-item { | |
| 48 | + /* background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/timebox.png') no-repeat; | |
| 49 | + background-size: 100% 100%; | |
| 50 | + width: 90rpx; | |
| 51 | + height: 100rpx; | |
| 52 | + line-height: 120rpx; | |
| 53 | + color: white; */ | |
| 54 | +} | |
| 55 | + | |
| 56 | +.btn { | |
| 57 | + width: 100%; | |
| 58 | + height: 400rpx; | |
| 59 | + transform: scale(1.1); | |
| 60 | +} | |
| 61 | + | |
| 62 | +.countdown-txt { | |
| 63 | + /* color: #ff6768; | |
| 64 | + text-align: center; | |
| 65 | + padding-top: 120rpx; | |
| 66 | + font-size: 36rpx; | |
| 67 | + font-weight: bold; */ | |
| 68 | +} | |
| 69 | + | |
| 70 | +.popup-container { | |
| 71 | + position: fixed; | |
| 72 | + width: 100%; | |
| 73 | + height: 100%; | |
| 74 | + top: 0; | |
| 75 | + background-color: rgba(0,0,0,.7); | |
| 76 | +} | |
| 77 | + | |
| 78 | +.popup { | |
| 79 | + position: relative; | |
| 80 | + top: 50%; | |
| 81 | + left: 50%; | |
| 82 | + transform: translate(-50%, -50%); | |
| 83 | + text-align: center; | |
| 84 | +} | |
| 85 | + | |
| 86 | + | |
| 87 | +.btn-img { | |
| 88 | + /* width: 200rpx; | |
| 89 | + height: 50rpx; */ | |
| 90 | +} | |
| 91 | + | |
| 92 | +.amount-container { | |
| 93 | + /* position: absolute; | |
| 94 | + left: 50%; | |
| 95 | + top: 50%; | |
| 96 | + transform: translateX(-55%); */ | |
| 97 | +} | |
| 98 | + | |
| 99 | +.amount { | |
| 100 | + color: #fff005; | |
| 101 | + font-size: 60rpx; | |
| 102 | + text-align: center; | |
| 103 | + position: absolute; | |
| 104 | + left: 49%; | |
| 105 | + top: 50%; | |
| 106 | + transform: translate(-50%); | |
| 107 | + padding-top: 30rpx; | |
| 108 | + /* padding-top: 10rpx; | |
| 109 | + padding-bottom: 20rpx; */ | |
| 110 | +} | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | +/* .none, | |
| 115 | +.see { | |
| 116 | + position: absolute; | |
| 117 | + font-size: 26rpx; | |
| 118 | + color: white; | |
| 119 | + left: 50%; | |
| 120 | + transform: translateX(-60%); | |
| 121 | +} | |
| 122 | + | |
| 123 | +.none { | |
| 124 | + font-size: 20rpx; | |
| 125 | + top: 36%; | |
| 126 | + margin-left: 55rpx; | |
| 127 | +} | |
| 128 | + | |
| 129 | +.see { | |
| 130 | + top: 82%; | |
| 131 | + left: 50%; | |
| 132 | + transform: translateX(-58%); | |
| 133 | +} */ | |
| 134 | + | |
| 135 | + | |
| 136 | +/* .list-container { | |
| 137 | + /* background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/timebox.png') no-repeat; | |
| 138 | +} */ | |
| 139 | + | |
| 140 | +.list-container { | |
| 141 | + border-radius: 12rpx; | |
| 142 | + overflow: hidden; | |
| 143 | +} | |
| 144 | + | |
| 145 | +.list { | |
| 146 | + /* position: relative; */ | |
| 147 | + margin-top: -8rpx; | |
| 148 | +} | |
| 149 | + | |
| 150 | +.list-img { | |
| 151 | + width: 100%; | |
| 152 | + height: 326rpx; | |
| 153 | +} | |
| 154 | + | |
| 155 | +.list-item { | |
| 156 | + display: flex; | |
| 157 | + justify-content: space-between; | |
| 158 | + align-items: center; | |
| 159 | + background-color: white; | |
| 160 | + padding: 30rpx 20rpx; | |
| 161 | + border-bottom: 2rpx solid #f8f8f8; | |
| 162 | +} | |
| 163 | + | |
| 164 | +.list-item:last-child { | |
| 165 | + border-bottom: none; | |
| 166 | +} | |
| 167 | + | |
| 168 | +.avatar-container { | |
| 169 | + width: 100rpx; | |
| 170 | + height: 100rpx; | |
| 171 | + border-radius: 50%; | |
| 172 | + overflow: hidden; | |
| 173 | + margin-right: 20rpx; | |
| 174 | +} | |
| 175 | + | |
| 176 | +.avatar { | |
| 177 | + display: block; | |
| 178 | + width: 100%; | |
| 179 | + height: 100%; | |
| 180 | +} | |
| 181 | + | |
| 182 | +.nodata { | |
| 183 | + color: white; | |
| 184 | + font-size: 24rpx; | |
| 185 | + text-align: center; | |
| 186 | + padding-top: 20rpx; | |
| 187 | +} | ... | ... |
packageA/pages/jfbuy/jfbuy.wxml
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | data-errorimg="list2[{{index}}].original_img"></image> |
| 44 | 44 | </view> |
| 45 | 45 | <view class="details"> |
| 46 | - <view class="ellipsis-2 fs30 name">{{item.goods_name}}</view> | |
| 46 | + <view class="ellipsis-2 fs30 name">{{item.name}}</view> | |
| 47 | 47 | <view> |
| 48 | 48 | <view class="red"> |
| 49 | 49 | <text>{{item.integral}}积分 + ¥{{item.addmoney}}</text> | ... | ... |
packageA/pages/quan/quan.js
packageA/pages/quan/quan.wxml
| ... | ... | @@ -29,7 +29,8 @@ |
| 29 | 29 | <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}至</text> <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days)}}</text><text wx:else>不限</text> |
| 30 | 30 | </view> |
| 31 | 31 | </view> |
| 32 | - <view class="price">¥<text class="fs40">{{filters.toFix(item.money,2)}}</text></view> | |
| 32 | + <view class="price">¥<text class="fs40">{{filters.toFix(item.money,2)}}</text> <image src="{{imghost}}miniapp/images/coupon_img/sharelinke.png" class="sharelink"></image></view> | |
| 33 | + | |
| 33 | 34 | </view> |
| 34 | 35 | <view class="flex ai-center jc_sb pdt20"> |
| 35 | 36 | <view wx:if="{{item.useobjecttype==0}}" class="coupon-ft ellipsis-2 fs28">全场任意产品通用</view> | ... | ... |
packageA/pages/quan/quan.wxss
packageA/pages/quan_list/quan_list.js
| ... | ... | @@ -52,7 +52,7 @@ Page({ |
| 52 | 52 | th.data.loading=1; |
| 53 | 53 | var user_id=getApp().globalData.user_id; |
| 54 | 54 | getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { |
| 55 | - data:{store_id:os.stoid,type:1,pageSize:10,page:th.data.curpage,user_id:user_id} | |
| 55 | + data:{store_id:os.stoid,type:1,pageSize:10,page:th.data.curpage,user_id:user_id,is_share:0} | |
| 56 | 56 | }).then(res => { |
| 57 | 57 | th.data.loading=0; |
| 58 | 58 | if(res.data.code==0){ | ... | ... |
packageA/pages/service_record/service_record.js
0 → 100644
| 1 | +const app = getApp(); | |
| 2 | +let _this = null; | |
| 3 | +let reqData = {}; | |
| 4 | + | |
| 5 | +Page({ | |
| 6 | + | |
| 7 | + data: { | |
| 8 | + list: null, | |
| 9 | + isLoading: false, // 检测是否已经发送请求,防止重复发送请求 | |
| 10 | + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 | |
| 11 | + pageNum: 1, // 当前页数 | |
| 12 | + | |
| 13 | + startDate: '开始日期', | |
| 14 | + endDate: '结束日期', | |
| 15 | + }, | |
| 16 | + | |
| 17 | + onLoad: function(t) { | |
| 18 | + _this = this; | |
| 19 | + | |
| 20 | + this.setData({ | |
| 21 | + currentDate: this.currentDate(), | |
| 22 | + }); | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + }, | |
| 28 | + | |
| 29 | + onShow: function() { | |
| 30 | + this.isLogin() | |
| 31 | + .then(function(data) { | |
| 32 | + reqData.url = '/api/weshop/marketing/servicewrite/page'; | |
| 33 | + reqData.data = { | |
| 34 | + storeId: app.globalData.setting.stoid, | |
| 35 | + userId: app.globalData.user_id, | |
| 36 | + }; | |
| 37 | + _this.getData(true, reqData.url, reqData.data); | |
| 38 | + }); | |
| 39 | + }, | |
| 40 | + | |
| 41 | + | |
| 42 | + onReachBottom: function() { | |
| 43 | + this.scrollToLower(reqData.url, reqData.data); | |
| 44 | + }, | |
| 45 | + | |
| 46 | + // 判断是否授权登录 | |
| 47 | + isLogin() { | |
| 48 | + return new Promise((resolve, reject) => { | |
| 49 | + let user_info = app.globalData.userInfo; | |
| 50 | + if(user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 51 | + wx.navigateTo({ | |
| 52 | + url: '/pages/togoin/togoin', | |
| 53 | + }) | |
| 54 | + } else { | |
| 55 | + resolve(); | |
| 56 | + }; | |
| 57 | + }); | |
| 58 | + }, | |
| 59 | + | |
| 60 | + | |
| 61 | + bindDateChange1: function(e) { | |
| 62 | + console.log('picker发送选择改变,携带值为', e.detail.value) | |
| 63 | + this.setData({ | |
| 64 | + startDate: e.detail.value | |
| 65 | + }) | |
| 66 | + }, | |
| 67 | + | |
| 68 | + bindDateChange2: function(e) { | |
| 69 | + console.log('picker发送选择改变,携带值为', e.detail.value) | |
| 70 | + this.setData({ | |
| 71 | + endDate: e.detail.value | |
| 72 | + }) | |
| 73 | + }, | |
| 74 | + | |
| 75 | + searchOffline() { | |
| 76 | + console.log('执行查询'); | |
| 77 | + | |
| 78 | + let startDate = this.data.startDate; | |
| 79 | + let endDate = this.data.endDate; | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + if(startDate == '开始日期' || endDate == '结束日期') { | |
| 84 | + wx.showToast({ | |
| 85 | + title: '请选择完整的查询日期!', | |
| 86 | + icon: 'none', | |
| 87 | + }) | |
| 88 | + } else if(new Date(startDate) > new Date(endDate)) { | |
| 89 | + wx.showToast({ | |
| 90 | + title: '出错了,开始日期不能晚于结束日期!', | |
| 91 | + icon: 'none', | |
| 92 | + }) | |
| 93 | + return; | |
| 94 | + } else { | |
| 95 | + this.setData({ | |
| 96 | + list: null, | |
| 97 | + isLoading: false, // 检测是否已经发送请求,防止重复发送请求 | |
| 98 | + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 | |
| 99 | + pageNum: 1, // 当前页数 | |
| 100 | + }); | |
| 101 | + | |
| 102 | + reqData.data.BeginDate = startDate; | |
| 103 | + reqData.data.EndDate = endDate; | |
| 104 | + reqData.data.page = 1; | |
| 105 | + this.getData(true, reqData.url, reqData.data); | |
| 106 | + }; | |
| 107 | + | |
| 108 | + | |
| 109 | + }, | |
| 110 | + | |
| 111 | + currentDate() { | |
| 112 | + var now = new Date(); | |
| 113 | + var year = now.getFullYear(); //年 | |
| 114 | + var month = now.getMonth() + 1; //月 | |
| 115 | + var day = now.getDate(); //日 | |
| 116 | + | |
| 117 | + var clock = year + "-"; | |
| 118 | + | |
| 119 | + if(month < 10) month += "0"; | |
| 120 | + clock += month + "-"; | |
| 121 | + | |
| 122 | + if(day < 10) day += "0"; | |
| 123 | + clock += day; | |
| 124 | + | |
| 125 | + // if(hh < 10) | |
| 126 | + // clock += "0"; | |
| 127 | + | |
| 128 | + // clock += hh + ":"; | |
| 129 | + // if (mm < 10) clock += '0'; | |
| 130 | + // clock += mm + ":"; | |
| 131 | + | |
| 132 | + // if (ss < 10) clock += '0'; | |
| 133 | + // clock += ss; | |
| 134 | + return clock; | |
| 135 | + }, | |
| 136 | + | |
| 137 | + | |
| 138 | + // 请求数据 | |
| 139 | + requestData(url, data) { | |
| 140 | + return new Promise((resolve, reject) => { | |
| 141 | + app.request.promiseGet(url, {data: data}) | |
| 142 | + .then(res => { | |
| 143 | + if(res.data.code == 0) { | |
| 144 | + console.log('resolve', res); | |
| 145 | + resolve(res); | |
| 146 | + } else { | |
| 147 | + reject(res); | |
| 148 | + }; | |
| 149 | + }) | |
| 150 | + }); | |
| 151 | + }, | |
| 152 | + | |
| 153 | + | |
| 154 | + // 上拉加载请求数据 | |
| 155 | + getData: function(isInit, url, data) { | |
| 156 | + | |
| 157 | + wx.showLoading({ | |
| 158 | + title: '加载中', | |
| 159 | + }); | |
| 160 | + this.requestData(url, data).then(function(res) { | |
| 161 | + | |
| 162 | + wx.hideLoading(); | |
| 163 | + console.log('res--->', res); | |
| 164 | + _this.setData({ | |
| 165 | + isLoading: false | |
| 166 | + }); | |
| 167 | + | |
| 168 | + if(isInit) {// 第一次加载 | |
| 169 | + _this.setData({ | |
| 170 | + list: res.data.data | |
| 171 | + }); | |
| 172 | + | |
| 173 | + } else { | |
| 174 | + _this.setData({ | |
| 175 | + 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData) | |
| 176 | + }); | |
| 177 | + }; | |
| 178 | + | |
| 179 | + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { | |
| 180 | + _this.setData({ | |
| 181 | + noMore: true | |
| 182 | + }); | |
| 183 | + }; | |
| 184 | + | |
| 185 | + }).catch(function() { | |
| 186 | + wx.hideLoading(); | |
| 187 | + _this.setData({ | |
| 188 | + 'list.pageData': [] | |
| 189 | + }); | |
| 190 | + }); | |
| 191 | + // .catch(function(reason) { | |
| 192 | + // wx.hideLoading(); | |
| 193 | + // wx.showToast({ | |
| 194 | + // title: reason.data.msg, | |
| 195 | + // icon: 'none', | |
| 196 | + // duration: 2000 | |
| 197 | + // }) | |
| 198 | + // _this.setData({ | |
| 199 | + // 'list.pageData': [] | |
| 200 | + // }); | |
| 201 | + // }) | |
| 202 | + // ; | |
| 203 | + | |
| 204 | + }, | |
| 205 | + | |
| 206 | + | |
| 207 | + // 上拉加载 | |
| 208 | + scrollToLower(url, requestData, callback) { | |
| 209 | + // 页面数据 | |
| 210 | + // let pageData = this.data.list.pageData; | |
| 211 | + // 数据总量 | |
| 212 | + let total = this.data.list.total; | |
| 213 | + // 单页最大数据量 | |
| 214 | + let pageSize = this.data.list.pageSize; | |
| 215 | + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’ | |
| 216 | + if((total != 0)&&(total <= pageSize)) { | |
| 217 | + this.setData({ | |
| 218 | + noMore: true | |
| 219 | + }); | |
| 220 | + }; | |
| 221 | + | |
| 222 | + if(!this.data.isLoading && !this.data.noMore) { | |
| 223 | + this.setData({ | |
| 224 | + isLoading: true, | |
| 225 | + pageNum: this.data.pageNum + 1 | |
| 226 | + }); | |
| 227 | + requestData.page = this.data.pageNum; | |
| 228 | + this.getData(false, url, requestData); | |
| 229 | + }; | |
| 230 | + }, | |
| 231 | + | |
| 232 | + | |
| 233 | +}); | |
| 0 | 234 | \ No newline at end of file | ... | ... |
packageA/pages/service_record/service_record.json
0 → 100644
packageA/pages/service_record/service_record.wxml
0 → 100644
| 1 | +<!--packageA//pages/service_record/service_record.wxml--> | |
| 2 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
| 3 | +<view class="container"> | |
| 4 | + <view class="search-container"> | |
| 5 | + <view class="flex jc_sb"> | |
| 6 | + <view class="picker-container flex f1"> | |
| 7 | + <picker class="picker-date" mode="date" start="2015-01-01" end="{{currentDate}}" bindchange="bindDateChange1"> | |
| 8 | + <view class="picker">{{startDate}}</view> | |
| 9 | + </picker> | |
| 10 | + <view class="fs28 pdh10">至</view> | |
| 11 | + <picker class="picker-date" mode="date" start="2015-01-01" end="{{currentDate}}" bindchange="bindDateChange2"> | |
| 12 | + <view class="picker">{{endDate}}</view> | |
| 13 | + </picker> | |
| 14 | + </view> | |
| 15 | + <view class="search-btn search-btn2" bindtap="searchOffline">查询</view> | |
| 16 | + </view> | |
| 17 | + </view> | |
| 18 | +</view> | |
| 19 | + | |
| 20 | +<view class="offline-container"> | |
| 21 | + <view class="offline-list"> | |
| 22 | + <view class="item" wx:for="{{list.pageData}}"> | |
| 23 | + <view class="subtitle">服务时间:{{item.EffectiveDay}}</view> | |
| 24 | + <view> | |
| 25 | + <view class="flex"> | |
| 26 | + <view class="subitem"> | |
| 27 | + <view class="key">项目名称</view> | |
| 28 | + <view class="val">{{item.ProjectName}}</view> | |
| 29 | + </view> | |
| 30 | + <view class="subitem"> | |
| 31 | + <view class="key">服务门店</view> | |
| 32 | + <view class="val">{{item.StorageName}}</view> | |
| 33 | + </view> | |
| 34 | + <view class="subitem"> | |
| 35 | + <view class="key">剩余次数</view> | |
| 36 | + <view class="val">{{item.EndQty}}</view> | |
| 37 | + </view> | |
| 38 | + </view> | |
| 39 | + </view> | |
| 40 | + </view> | |
| 41 | + <!-- 暂无数据 --> | |
| 42 | + <nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata> | |
| 43 | + <!-- 没有更多了 --> | |
| 44 | + <view class="no-more t-c" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 没有更多了 -</view> | |
| 45 | + </view> | |
| 46 | +</view> | |
| 47 | + | |
| 48 | + | |
| 49 | + | ... | ... |
packageA/pages/service_record/service_record.wxss
0 → 100644
| 1 | +/* 背景色相关 */ | |
| 2 | +bg-white { | |
| 3 | + background-color: white; | |
| 4 | +} | |
| 5 | + | |
| 6 | +/* 外边距相关 */ | |
| 7 | +mgt12 { | |
| 8 | + margin-top: 12rpx; | |
| 9 | +} | |
| 10 | + | |
| 11 | +/* 边框相关 */ | |
| 12 | +.bdt { | |
| 13 | + border-top: 2rpx solid #F6F6F6; | |
| 14 | +} | |
| 15 | + | |
| 16 | +/* 颜色相关 */ | |
| 17 | +.c-a9{ | |
| 18 | + color: #A9A9A9; | |
| 19 | +} | |
| 20 | +.c-9 { | |
| 21 | + color: #999; | |
| 22 | +} | |
| 23 | + | |
| 24 | +.c-tb { | |
| 25 | + color: #ff5000; | |
| 26 | +} | |
| 27 | + | |
| 28 | +.c-r { | |
| 29 | + color: #FF3B3D; | |
| 30 | +} | |
| 31 | + | |
| 32 | +/* 内边距 */ | |
| 33 | +.pdt20 { | |
| 34 | + padding-top: 20rpx; | |
| 35 | +} | |
| 36 | + | |
| 37 | +.bold { | |
| 38 | + font-weight: bold; | |
| 39 | +} | |
| 40 | + | |
| 41 | +.f1 { | |
| 42 | + flex: 1; | |
| 43 | +} | |
| 44 | + | |
| 45 | +.pdh10 { | |
| 46 | + padding-left: 10rpx; | |
| 47 | + padding-right: 10rpx; | |
| 48 | +} | |
| 49 | + | |
| 50 | + | |
| 51 | +page { | |
| 52 | + font-family: microsoft yahei; | |
| 53 | + background-color: #F5F5F5; | |
| 54 | + height: 100%; | |
| 55 | +} | |
| 56 | + | |
| 57 | +.type-navbar { | |
| 58 | + white-space: nowrap; | |
| 59 | + display: flex; | |
| 60 | + height: 88rpx; | |
| 61 | + background-color: #fff; | |
| 62 | + justify-content: space-between; | |
| 63 | + /* border-top: 2rpx solid #f6f6f6; */ | |
| 64 | +} | |
| 65 | + | |
| 66 | +.type-box { | |
| 67 | + box-sizing: border-box; | |
| 68 | + width: 20%; | |
| 69 | + line-height: 88rpx; | |
| 70 | + text-align: center; | |
| 71 | + display: inline-block; | |
| 72 | + overflow: hidden; | |
| 73 | +} | |
| 74 | + | |
| 75 | +.type-navbar-item { | |
| 76 | + /* border-bottom: 4rpx solid #fff; */ | |
| 77 | +} | |
| 78 | + | |
| 79 | +.type-item-on { | |
| 80 | + /* background-color: #FF3B3D; */ | |
| 81 | + color: #FF3B3D; | |
| 82 | + font-weight: bold; | |
| 83 | + /* border-bottom: 4rpx solid #ED3036; */ | |
| 84 | + position: relative; | |
| 85 | +} | |
| 86 | +.type-item-on:after { | |
| 87 | + content: ''; | |
| 88 | + position: absolute; | |
| 89 | + left: 0; | |
| 90 | + right: 0; | |
| 91 | + bottom: 0; | |
| 92 | + width: 40%; | |
| 93 | + height: 4rpx; | |
| 94 | + background-color: #FF3B3D; | |
| 95 | + margin: 0 auto; | |
| 96 | +} | |
| 97 | + | |
| 98 | +.container { | |
| 99 | + position: fixed; | |
| 100 | + width: 100%; | |
| 101 | + top: 0; | |
| 102 | + z-index: 4; | |
| 103 | + /* position: -webkit-sticky; | |
| 104 | + position:sticky; | |
| 105 | + top: 0; */ | |
| 106 | +} | |
| 107 | + | |
| 108 | +.list-container { | |
| 109 | + padding-left: 20rpx; | |
| 110 | + padding-right: 20rpx; | |
| 111 | + overflow: hidden; | |
| 112 | + /* height: calc(100% - 282rpx); */ | |
| 113 | + padding-top: 282rpx; | |
| 114 | +} | |
| 115 | + | |
| 116 | +.stay_evaluate { | |
| 117 | + background-color: white; | |
| 118 | + margin-top: 20rpx; | |
| 119 | + border-radius: 8rpx; | |
| 120 | +} | |
| 121 | + | |
| 122 | +/* 原 */ | |
| 123 | + | |
| 124 | +.goods-container { | |
| 125 | + display: flex; | |
| 126 | + justify-content: space-between; | |
| 127 | + flex-wrap: wrap; | |
| 128 | + box-sizing: content-box; | |
| 129 | + padding: 20rpx 0; | |
| 130 | +} | |
| 131 | + | |
| 132 | +.goods-box { | |
| 133 | + width: 100%; | |
| 134 | + background-color: #fff; | |
| 135 | + padding: 0 25rpx; | |
| 136 | + margin-bottom: 20rpx; | |
| 137 | + font-size: 28rpx; | |
| 138 | + border-bottom: 1rpx solid #eee; | |
| 139 | + padding-bottom: 25rpx; | |
| 140 | +} | |
| 141 | + | |
| 142 | +.goods-title { | |
| 143 | + display: flex; | |
| 144 | + justify-content: space-between; | |
| 145 | + align-items: center; | |
| 146 | + height: 100rpx; | |
| 147 | +} | |
| 148 | + | |
| 149 | +.order-number { | |
| 150 | + font-size: 32rpx; | |
| 151 | + color: #666; | |
| 152 | +} | |
| 153 | + | |
| 154 | +.pay-status { | |
| 155 | + color: #f23030; | |
| 156 | +} | |
| 157 | + | |
| 158 | +.goods-cont { | |
| 159 | + padding: 20rpx 0; | |
| 160 | + display: flex; | |
| 161 | + justify-content: space-between; | |
| 162 | + position: relative; | |
| 163 | +} | |
| 164 | + | |
| 165 | +.img-box { | |
| 166 | + width: 180rpx; | |
| 167 | + height: 180rpx; | |
| 168 | +} | |
| 169 | + | |
| 170 | +.goods-mes { | |
| 171 | + width: 490rpx; | |
| 172 | +} | |
| 173 | + | |
| 174 | +.goods-name { | |
| 175 | + height: 30rpx; | |
| 176 | + margin-bottom: 16rpx; | |
| 177 | + overflow: hidden; | |
| 178 | + line-height: 30rpx; | |
| 179 | + color: #333; | |
| 180 | + word-break: keep-all; | |
| 181 | + white-space: nowrap; | |
| 182 | + text-overflow: ellipsis; | |
| 183 | + font-size: 30rpx; | |
| 184 | +} | |
| 185 | + | |
| 186 | +.goods-price { | |
| 187 | + color: #f23030; | |
| 188 | + padding-bottom: 20rpx; | |
| 189 | + font-size: 30rpx; | |
| 190 | +} | |
| 191 | + | |
| 192 | +.goods-num { | |
| 193 | + color: #999; | |
| 194 | + font-size: 30rpx; | |
| 195 | +} | |
| 196 | + | |
| 197 | +.goods-tips { | |
| 198 | + height: 60rpx; | |
| 199 | + padding: 10rpx 0; | |
| 200 | + display: flex; | |
| 201 | + justify-content: space-between; | |
| 202 | + align-items: center; | |
| 203 | +} | |
| 204 | + | |
| 205 | +.order-total { | |
| 206 | + display: flex; | |
| 207 | + justify-content: flex-end; | |
| 208 | + padding-top: 24rpx; | |
| 209 | + padding-bottom: 24rpx; | |
| 210 | +} | |
| 211 | + | |
| 212 | +.goods-total { | |
| 213 | + margin-right: 20rpx; | |
| 214 | +} | |
| 215 | + | |
| 216 | +.order-btn { | |
| 217 | + width: 150rpx; | |
| 218 | + height: 50rpx; | |
| 219 | + line-height: 50rpx; | |
| 220 | + text-align: center; | |
| 221 | + /* border: 1px solid #eee; */ | |
| 222 | + margin-left: 10rpx; | |
| 223 | + /* float: right; */ | |
| 224 | + border-radius: 6rpx; | |
| 225 | + overflow: hidden; | |
| 226 | + background-color: #FF3B3D; | |
| 227 | +} | |
| 228 | + | |
| 229 | +.order-btn-pay { | |
| 230 | + color: #fff; | |
| 231 | + background-color: #f23030; | |
| 232 | + border-color: #f23030; | |
| 233 | +} | |
| 234 | + | |
| 235 | +.return-btn.co-red { | |
| 236 | + color: #e02e24; | |
| 237 | +} | |
| 238 | + | |
| 239 | +.check-btn { | |
| 240 | + margin-bottom: 20rpx; | |
| 241 | +} | |
| 242 | + | |
| 243 | +/* 新 */ | |
| 244 | + | |
| 245 | + | |
| 246 | +.Commodity_number { | |
| 247 | + height: 80rpx; | |
| 248 | + color: #696969; | |
| 249 | + /* border-top: 13rpx solid rgb(245, 245, 245); */ | |
| 250 | +} | |
| 251 | + | |
| 252 | +.Commodity_number .lin { | |
| 253 | + border-right: 1rpx solid #C4182E; | |
| 254 | + margin: 0rpx 11rpx; width: 2rpx; | |
| 255 | + height: 31rpx; | |
| 256 | +} | |
| 257 | + | |
| 258 | +.Commodity_number image { | |
| 259 | + width: 30rpx; | |
| 260 | + height: 30rpx; | |
| 261 | +} | |
| 262 | + | |
| 263 | +.padding { | |
| 264 | + padding: 0 18rpx; | |
| 265 | +} | |
| 266 | + | |
| 267 | +/* 文字基线对齐 */ | |
| 268 | + | |
| 269 | +.baseline { | |
| 270 | + align-items: baseline; | |
| 271 | +} | |
| 272 | + | |
| 273 | +.border_bottom { | |
| 274 | + border-bottom: 2rpx solid rgb(245, 245, 245); | |
| 275 | +} | |
| 276 | + | |
| 277 | +/* 单个商品框架 */ | |
| 278 | + | |
| 279 | +.detail_commodity { | |
| 280 | + height: 231rpx; | |
| 281 | +} | |
| 282 | + | |
| 283 | +.detail_commodity image { | |
| 284 | + display: block; | |
| 285 | + /* width: 186rpx; | |
| 286 | + height: 186rpx; */ | |
| 287 | + width: 100%; | |
| 288 | + height: 100%; | |
| 289 | +} | |
| 290 | + | |
| 291 | +.detail_commodity .goods_name { | |
| 292 | + width: 485rpx; | |
| 293 | + /* height: 75rpx; */ | |
| 294 | + line-height: 37rpx; | |
| 295 | + text-align: justify; | |
| 296 | +} | |
| 297 | + | |
| 298 | +.Commodity_content { | |
| 299 | + height: 185rpx; | |
| 300 | + margin-left: 21rpx; | |
| 301 | +} | |
| 302 | + | |
| 303 | +.Commodity_content .Commodity_goods { | |
| 304 | + height: 150rpx; | |
| 305 | +} | |
| 306 | + | |
| 307 | +.Commodity_content .Commodity_money { | |
| 308 | + font-size: 16rpx; | |
| 309 | + letter-spacing: 1rpx; | |
| 310 | +} | |
| 311 | + | |
| 312 | +/* 商品评价按钮框架 */ | |
| 313 | + | |
| 314 | +.commodity_evaluate { | |
| 315 | + /* padding-top: 15rpx; | |
| 316 | + padding-bottom: 15rpx; */ | |
| 317 | + /* border-bottom: 4rpx solid rgb(245, 245, 245); */ | |
| 318 | +} | |
| 319 | + | |
| 320 | +.commodity_evaluate .commodity_smy .commodity_money { | |
| 321 | + margin-left: 29rpx; | |
| 322 | + letter-spacing: 1rpx; | |
| 323 | + /* font-weight: bold; */ | |
| 324 | + | |
| 325 | +} | |
| 326 | + | |
| 327 | +.commodity_evaluate .links { | |
| 328 | + /* height: 92rpx; */ | |
| 329 | + /* height: auto; */ | |
| 330 | + padding-top: 20rpx; | |
| 331 | + padding-bottom: 20rpx; | |
| 332 | + border-top: 2rpx solid #F6F6F6; | |
| 333 | + display: flex; | |
| 334 | + align-items: center; | |
| 335 | +} | |
| 336 | + | |
| 337 | +.commodity_evaluate .commodity_To_evaluate { | |
| 338 | + width: 155rpx; | |
| 339 | + height: 48rpx; | |
| 340 | + border-radius: 6rpx; | |
| 341 | + line-height: 48rpx; | |
| 342 | + /* margin-bottom: 10rpx; */ | |
| 343 | +} | |
| 344 | + | |
| 345 | +.commodity_evaluate .commodity_To_evaluate view { | |
| 346 | + height: 39rpx; | |
| 347 | + line-height: 39rpx; | |
| 348 | +} | |
| 349 | + | |
| 350 | +.commodity_evaluate .comment_go { | |
| 351 | + /* background-color: rgb(211, 28, 52); */ | |
| 352 | + background-color: #FF3B3D; | |
| 353 | + color: white; | |
| 354 | + margin-left: 18rpx; | |
| 355 | + width: 155rpx; | |
| 356 | + height: 48rpx; | |
| 357 | + line-height: 48rpx; | |
| 358 | +} | |
| 359 | + | |
| 360 | +.Commodity_spec { | |
| 361 | + height: 37rpx; | |
| 362 | + line-height: 37rpx; | |
| 363 | + max-width: 160rpx; | |
| 364 | + background-color: rgb(236, 236, 236); | |
| 365 | + border-radius: 6rpx; | |
| 366 | + font-size: 22rpx; | |
| 367 | + margin-top: 10rpx; | |
| 368 | + padding:0rpx 10rpx; | |
| 369 | +} | |
| 370 | + | |
| 371 | +.Commodity_evaluation .Comment_content { | |
| 372 | + color: rgb(153, 153, 153); | |
| 373 | + letter-spacing: 1rpx; | |
| 374 | +} | |
| 375 | + | |
| 376 | +.Commodity_evaluation .starss { | |
| 377 | + height: 58rpx; | |
| 378 | + /* // line-height: 58rpx; */ | |
| 379 | + align-items: center; | |
| 380 | +} | |
| 381 | + | |
| 382 | +.Commodity_evaluation .commen { | |
| 383 | + height: 58rpx; | |
| 384 | + line-height: 58rpx; | |
| 385 | +} | |
| 386 | + | |
| 387 | +.Commodity_evaluation .starss .stars { | |
| 388 | + line-height: 58rpx; | |
| 389 | +} | |
| 390 | + | |
| 391 | +.Commodity_evaluation .starss .stars image { | |
| 392 | + width: 29rpx; | |
| 393 | + height: 26rpx; | |
| 394 | + margin-right: 5rpx; | |
| 395 | +} | |
| 396 | + | |
| 397 | +.Commodity_evaluation .Comment_images image { | |
| 398 | + width: 100rpx; | |
| 399 | + height: 100rpx; | |
| 400 | + margin-right: 8rpx; | |
| 401 | + margin-top: 18rpx; | |
| 402 | + border-radius: 6rpx; | |
| 403 | + border: 3rpx solid rgb(245, 245, 245); | |
| 404 | +} | |
| 405 | + | |
| 406 | +.commodity_evaluate .View_evaluation { | |
| 407 | + border: 1px solid #E5E5E5; | |
| 408 | + color: rgb(0, 0, 0); | |
| 409 | + background-color: rgb(255, 255, 255); | |
| 410 | + margin-left: 18rpx; | |
| 411 | +} | |
| 412 | + | |
| 413 | +.comment_addtime { | |
| 414 | + height: 50rpx; | |
| 415 | +} | |
| 416 | + | |
| 417 | +.title_width { | |
| 418 | + width: 146rpx; | |
| 419 | + text-align: center; | |
| 420 | +} | |
| 421 | + | |
| 422 | +.After_all { | |
| 423 | + height: 80rpx; | |
| 424 | + background-color: rgb(245, 245, 245); | |
| 425 | +} | |
| 426 | + | |
| 427 | +.After_all .Line { | |
| 428 | + border-top: 1rpx solid rgb(0, 0, 0); | |
| 429 | + width: 130rpx; | |
| 430 | +} | |
| 431 | + | |
| 432 | +.After_all .end { | |
| 433 | + margin: 0rpx 15rpx; | |
| 434 | + color: #ccc; | |
| 435 | +} | |
| 436 | + | |
| 437 | +/* 无订单 */ | |
| 438 | + | |
| 439 | +.empty_order image { | |
| 440 | + width: 292rpx; | |
| 441 | + height: 268rpx; | |
| 442 | + margin-top: 202rpx; | |
| 443 | +} | |
| 444 | + | |
| 445 | +.empty_order .xc-ash { | |
| 446 | + margin-top: 10rpx; | |
| 447 | + font-weight: 600px; | |
| 448 | +} | |
| 449 | + | |
| 450 | +.empty_order navigator { | |
| 451 | + margin-top: 60rpx; | |
| 452 | + border-radius: 40rpx; | |
| 453 | +} | |
| 454 | + | |
| 455 | +.empty_order navigator view { | |
| 456 | + width: 247rpx; | |
| 457 | + height: 60rpx; | |
| 458 | + line-height: 60rpx; | |
| 459 | + background-color: rgb(255, 72, 72); | |
| 460 | + border-radius: 8rpx; | |
| 461 | +} | |
| 462 | + | |
| 463 | +.rel { | |
| 464 | + box-sizing: border-box; | |
| 465 | + width: 180rpx; | |
| 466 | + height: 180rpx; | |
| 467 | + overflow: hidden; | |
| 468 | + /* border: 2rpx solid rgb(236, 236, 236); */ | |
| 469 | +} | |
| 470 | + | |
| 471 | +.abs { | |
| 472 | + top: 15rpx; | |
| 473 | + left: -39rpx; | |
| 474 | + width: 154rpx; | |
| 475 | + height: 40rpx; | |
| 476 | + background-color: rgb(214, 1, 33); | |
| 477 | + transform: rotate(320deg); | |
| 478 | + color: rgb(255, 255, 255); | |
| 479 | + line-height: 40rpx; | |
| 480 | +} | |
| 481 | +.code{ | |
| 482 | + width: 44rpx; | |
| 483 | + height: 44rpx; | |
| 484 | +} | |
| 485 | +.refund{ | |
| 486 | + margin-top: 20rpx; | |
| 487 | +} | |
| 488 | + | |
| 489 | +.tab-container { | |
| 490 | + display: flex; | |
| 491 | + justify-content: space-between; | |
| 492 | + text-align: center; | |
| 493 | + font-size: 28rpx; | |
| 494 | + border-bottom: 2rpx solid #f2f2f2; | |
| 495 | +} | |
| 496 | +.tab-container .iconfont { | |
| 497 | + margin-right: 10rpx; | |
| 498 | +} | |
| 499 | +.tab { | |
| 500 | + flex: 1; | |
| 501 | + line-height: 80rpx; | |
| 502 | + background-color: white; | |
| 503 | + position: relative; | |
| 504 | +} | |
| 505 | +.tab.active { | |
| 506 | + color: #FF3B3D; | |
| 507 | + font-weight: bold; | |
| 508 | +} | |
| 509 | +.tab.active::after { | |
| 510 | + content: ''; | |
| 511 | + position: absolute; | |
| 512 | + left: 0; | |
| 513 | + right: 0; | |
| 514 | + bottom: 0; | |
| 515 | + width: 50%; | |
| 516 | + height: 2px; | |
| 517 | + margin: 0 auto; | |
| 518 | + background-color: #FF3B3D; | |
| 519 | +} | |
| 520 | +.search-container { | |
| 521 | + /* display: flex; */ | |
| 522 | + padding: 10px; | |
| 523 | + background-color: white; | |
| 524 | +} | |
| 525 | +.search-input { | |
| 526 | + background-color: #f2f2f2; | |
| 527 | + flex: 1; | |
| 528 | + border-radius: 4px 0 0 4px; | |
| 529 | + height: 70rpx; | |
| 530 | + line-height: 70rpx; | |
| 531 | + font-size: 14px; | |
| 532 | + padding: 0 10px; | |
| 533 | +} | |
| 534 | +.search-btn { | |
| 535 | + color: white; | |
| 536 | + font-size: 14px; | |
| 537 | + background-color: #FF3B3D; | |
| 538 | + padding: 8px 20px; | |
| 539 | + border-radius: 0 4px 4px 0; | |
| 540 | +} | |
| 541 | +.picker-container { | |
| 542 | + padding-right: 10rpx; | |
| 543 | + align-items: center; | |
| 544 | + | |
| 545 | +} | |
| 546 | +.picker-date { | |
| 547 | + background-color: #f5f5f5; | |
| 548 | + flex: 1; | |
| 549 | + border-radius: 10rpx; | |
| 550 | +} | |
| 551 | +/* .picker-date:before { | |
| 552 | + font-family: iconfont; | |
| 553 | + content: '\e64c'; | |
| 554 | +} */ | |
| 555 | +.picker { | |
| 556 | + color: #ccc; | |
| 557 | + line-height: 70rpx; | |
| 558 | + font-size: 26rpx; | |
| 559 | + position: relative; | |
| 560 | + padding-left: 70rpx; | |
| 561 | +} | |
| 562 | + | |
| 563 | +.picker:before { | |
| 564 | + position: absolute; | |
| 565 | + font-family: iconfont; | |
| 566 | + content: '\e64c'; | |
| 567 | + left: 30rpx; | |
| 568 | +} | |
| 569 | + | |
| 570 | +.list2 { | |
| 571 | + padding-left: 18rpx; | |
| 572 | + padding-right: 18rpx; | |
| 573 | +} | |
| 574 | +.title { | |
| 575 | + padding: 20rpx; | |
| 576 | + font-size: 26rpx; | |
| 577 | + display: flex; | |
| 578 | + align-items: center; | |
| 579 | +} | |
| 580 | +.icon-order { | |
| 581 | + font-size: 26rpx; | |
| 582 | + color: #FF3B3D; | |
| 583 | + margin-right: 10rpx; | |
| 584 | +} | |
| 585 | +.subtitle { | |
| 586 | + display: flex; | |
| 587 | + font-size: 24rpx; | |
| 588 | + justify-content: space-between; | |
| 589 | + background-color: #f0f0f0; | |
| 590 | + line-height: 60rpx; | |
| 591 | + padding: 0 20rpx; | |
| 592 | + color: #999; | |
| 593 | +} | |
| 594 | +.item { | |
| 595 | + background-color: white; | |
| 596 | + border-radius: 16rpx; | |
| 597 | + margin-top: 20rpx; | |
| 598 | + overflow: hidden; | |
| 599 | +} | |
| 600 | +.subitem { | |
| 601 | + width: calc(100% / 3); | |
| 602 | + text-align: center; | |
| 603 | + font-size: 26rpx; | |
| 604 | +} | |
| 605 | +.name { | |
| 606 | + padding: 0 20rpx; | |
| 607 | + margin: 20rpx 0; | |
| 608 | + font-size: 26rpx; | |
| 609 | + word-break: break-all; | |
| 610 | + text-align: justify; | |
| 611 | +} | |
| 612 | +.key { | |
| 613 | + padding: 20rpx 0; | |
| 614 | + color: #999; | |
| 615 | +} | |
| 616 | +.val { | |
| 617 | + padding-bottom: 20rpx; | |
| 618 | + color: red; | |
| 619 | +} | |
| 620 | + | |
| 621 | +.offline-container { | |
| 622 | + padding: 106rpx 20rpx 20rpx; | |
| 623 | +} | |
| 624 | + | |
| 625 | +.search-btn2 { | |
| 626 | + border-top-left-radius: 8rpx; | |
| 627 | + border-bottom-left-radius: 8rpx; | |
| 628 | +} | |
| 629 | + | |
| 630 | + | |
| 631 | +.no-more { | |
| 632 | + font-size: 28rpx; | |
| 633 | + line-height: 3; | |
| 634 | + color: #909090; | |
| 635 | +} | |
| 636 | + | |
| 637 | + | |
| 638 | + | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.js
| ... | ... | @@ -249,7 +249,7 @@ Page({ |
| 249 | 249 | bind_bnerr2: function(e) { |
| 250 | 250 | var _errImg = e.target.dataset.errorimg; |
| 251 | 251 | var _errObj = {}; |
| 252 | - _errObj[_errImg] = "/public/images/empty.jpg"; | |
| 252 | + _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | |
| 253 | 253 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 254 | 254 | }, |
| 255 | 255 | goto: function(e) { | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.wxml
| ... | ... | @@ -24,7 +24,10 @@ |
| 24 | 24 | <view class="content_box"> |
| 25 | 25 | <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''"> |
| 26 | 26 | <view class="content_box_img"> |
| 27 | - <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
| 27 | + <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}" | |
| 28 | + data-errorimg="wareCard[{{index}}].cover_img"></image> | |
| 29 | + <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else | |
| 30 | + data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
| 28 | 31 | </view> |
| 29 | 32 | <view class="content_box_title"> |
| 30 | 33 | <view class="content_ware_title"> | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.wxss
pages/giftpack/mygiftpack/mygiftpack.js
| ... | ... | @@ -129,7 +129,7 @@ Page({ |
| 129 | 129 | bind_bnerr2: function(e) { |
| 130 | 130 | var _errImg = e.target.dataset.errorimg; |
| 131 | 131 | var _errObj = {}; |
| 132 | - _errObj[_errImg] = "/public/images/empty.jpg"; | |
| 132 | + _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | |
| 133 | 133 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 134 | 134 | |
| 135 | 135 | }, | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxml
| ... | ... | @@ -26,7 +26,9 @@ |
| 26 | 26 | <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> |
| 27 | 27 | <view class="content_box_img"> |
| 28 | 28 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> |
| 29 | - <image src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
| 29 | + <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image> | |
| 30 | + <image wx:else src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> | |
| 31 | + | |
| 30 | 32 | <block wx:if="{{item.actType!=0}}"> |
| 31 | 33 | <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}"> |
| 32 | 34 | <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image> | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxss
pages/goods/goodsInfo/buy_integral.wxml
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | <!-- 选择门店模块 --> |
| 27 | 27 | <view class="flex-space-between address ai_end xc-width "> |
| 28 | 28 | |
| 29 | - <view class="flex ai_end" wx:if="{{def_pick_store}}"> | |
| 29 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 30 | 30 | <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> |
| 31 | 31 | <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> |
| 32 | 32 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} |
| ... | ... | @@ -53,7 +53,7 @@ |
| 53 | 53 | </block> |
| 54 | 54 | </block> |
| 55 | 55 | |
| 56 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 56 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | <!--商品的属性项目--> | ... | ... |
pages/goods/goodsInfo/buy_integral_normal.wxml
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <!-- 选择门店模块 --> |
| 29 | 29 | <view class="flex-space-between address ai_end xc-width "> |
| 30 | 30 | |
| 31 | - <view class="flex ai_end" wx:if="{{def_pick_store}}"> | |
| 31 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 32 | 32 | <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> |
| 33 | 33 | <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> |
| 34 | 34 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} |
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | <view wx:if="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> |
| 55 | 55 | </block> |
| 56 | 56 | </block> |
| 57 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 57 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | <!--商品的属性项目--> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -492,9 +492,8 @@ Page({ |
| 492 | 492 | }) |
| 493 | 493 | } |
| 494 | 494 | } |
| 495 | - | |
| 496 | 495 | }, 500) |
| 497 | - },1500) | |
| 496 | + },700) | |
| 498 | 497 | |
| 499 | 498 | }); |
| 500 | 499 | |
| ... | ... | @@ -2075,8 +2074,9 @@ Page({ |
| 2075 | 2074 | |
| 2076 | 2075 | var timer_get = setInterval(function() { |
| 2077 | 2076 | if (th.data.is_get_local_ok == 0) return false; |
| 2078 | - var dd = null, | |
| 2079 | - i = getApp().request; | |
| 2077 | + var dd = null,i = getApp().request; | |
| 2078 | + if (!th.data.sele_g) return false; | |
| 2079 | + | |
| 2080 | 2080 | var g_distr_type = th.data.sele_g.distr_type; |
| 2081 | 2081 | if (g_distr_type != 0) { |
| 2082 | 2082 | dd = { |
| ... | ... | @@ -2163,6 +2163,8 @@ Page({ |
| 2163 | 2163 | //------------处理门店--------------- |
| 2164 | 2164 | deal_pickup(e){ |
| 2165 | 2165 | var th=this; |
| 2166 | + if(!th.data.sele_g) return false | |
| 2167 | + | |
| 2166 | 2168 | var g_distr_type=th.data.sele_g.distr_type; |
| 2167 | 2169 | wx.hideLoading(); |
| 2168 | 2170 | |
| ... | ... | @@ -2323,6 +2325,8 @@ Page({ |
| 2323 | 2325 | //------------处理线下门店库存-------- |
| 2324 | 2326 | deal_pickup_dline(e){ |
| 2325 | 2327 | var pkno=[],th=this; |
| 2328 | + if(!th.data.sele_g) return false; | |
| 2329 | + | |
| 2326 | 2330 | if(this.data.def_pick_store){ |
| 2327 | 2331 | pkno.push(this.data.def_pick_store.pickup_no); |
| 2328 | 2332 | } |
| ... | ... | @@ -2698,6 +2702,7 @@ Page({ |
| 2698 | 2702 | }else{ |
| 2699 | 2703 | ee.setData({prom_type: 0, isshow: 1,}); |
| 2700 | 2704 | ee.get_sku(os.stoid, ee.data.data.sku, gid); |
| 2705 | + ee.get_sto(); | |
| 2701 | 2706 | return false; |
| 2702 | 2707 | } |
| 2703 | 2708 | }) | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -433,7 +433,7 @@ |
| 433 | 433 | </view> |
| 434 | 434 | </view> |
| 435 | 435 | |
| 436 | - <view wx:if="{{def_pick_store}}"> | |
| 436 | + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 437 | 437 | <view class="flex-space-between address ai_end "> |
| 438 | 438 | <view> |
| 439 | 439 | <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> |
| ... | ... | @@ -1031,7 +1031,7 @@ |
| 1031 | 1031 | <!-- 选择门店模块 --> |
| 1032 | 1032 | <view class="flex-space-between address ai_end xc-width "> |
| 1033 | 1033 | |
| 1034 | - <view class="flex ai_end" wx:if="{{def_pick_store}}"> | |
| 1034 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 1035 | 1035 | <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> |
| 1036 | 1036 | <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> |
| 1037 | 1037 | 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} |
| ... | ... | @@ -1058,7 +1058,7 @@ |
| 1058 | 1058 | </block> |
| 1059 | 1059 | </block> |
| 1060 | 1060 | |
| 1061 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 1061 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 1062 | 1062 | </view> |
| 1063 | 1063 | |
| 1064 | 1064 | <!--商品的属性项目--> | ... | ... |
pages/index/index/index.js
| ... | ... | @@ -75,6 +75,8 @@ Page({ |
| 75 | 75 | new_nav: "", //新人页面跳转地址 |
| 76 | 76 | w_holiday_pop:0, |
| 77 | 77 | |
| 78 | + showHongbao: true, | |
| 79 | + showHongbaoSmall: false, | |
| 78 | 80 | }, |
| 79 | 81 | |
| 80 | 82 | onLoad: async function(tt) { |
| ... | ... | @@ -94,7 +96,27 @@ Page({ |
| 94 | 96 | } |
| 95 | 97 | }) |
| 96 | 98 | } |
| 97 | - | |
| 99 | + | |
| 100 | + // 判断是否有红包活动 | |
| 101 | + getApp().request.promiseGet('/api/weshop/redmoney/redConfig/get/'+getApp().globalData.setting.stoid, { | |
| 102 | + data: {} | |
| 103 | + }).then(function(data) { | |
| 104 | + // console.log('909090909090----->', data.data.code); | |
| 105 | + let code = data.data.code; | |
| 106 | + if(code == 0) { | |
| 107 | + | |
| 108 | + th.setData({ | |
| 109 | + showHongbao: true, | |
| 110 | + }); | |
| 111 | + } else if(code == -1) { | |
| 112 | + th.setData({ | |
| 113 | + showHongbao: false, | |
| 114 | + }); | |
| 115 | + }; | |
| 116 | + }); | |
| 117 | + | |
| 118 | + | |
| 119 | + // console.log(9090909); | |
| 98 | 120 | |
| 99 | 121 | |
| 100 | 122 | //看一下商家是否开通了权益 |
| ... | ... | @@ -184,8 +206,7 @@ Page({ |
| 184 | 206 | } |
| 185 | 207 | }) |
| 186 | 208 | |
| 187 | - | |
| 188 | - | |
| 209 | + | |
| 189 | 210 | }, |
| 190 | 211 | //关闭新用户领取广告 |
| 191 | 212 | close_disgraceful: function() { |
| ... | ... | @@ -205,7 +226,15 @@ Page({ |
| 205 | 226 | getApp().requestCardNum(this); |
| 206 | 227 | } |
| 207 | 228 | |
| 208 | - var th = this | |
| 229 | + var th = this | |
| 230 | + var show=getApp().globalData.isLoad_ad; | |
| 231 | + if(show){ | |
| 232 | + var full_screen = this.selectComponent("#full_screen"); //组件的id | |
| 233 | + full_screen.get_the_full_screen(); | |
| 234 | + }else{ | |
| 235 | + getApp().globalData.isLoad_ad=1; | |
| 236 | + } | |
| 237 | + | |
| 209 | 238 | }, |
| 210 | 239 | //当隐藏的时候就关闭计时器 |
| 211 | 240 | onHide: function() { |
| ... | ... | @@ -251,6 +280,7 @@ Page({ |
| 251 | 280 | } |
| 252 | 281 | }) |
| 253 | 282 | |
| 283 | + | |
| 254 | 284 | |
| 255 | 285 | //--首页的问题-- |
| 256 | 286 | if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { |
| ... | ... | @@ -261,7 +291,10 @@ Page({ |
| 261 | 291 | wx.setNavigationBarTitle({ |
| 262 | 292 | title: getApp().globalData.setting.appName, |
| 263 | 293 | }); |
| 264 | - } | |
| 294 | + }; | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 265 | 298 | }, |
| 266 | 299 | //---读取数据内容--- |
| 267 | 300 | async init_fir() { |
| ... | ... | @@ -273,21 +306,24 @@ Page({ |
| 273 | 306 | enabled: 1 |
| 274 | 307 | } |
| 275 | 308 | }).then(res => { |
| 276 | - var a = res.data.data.pageData; | |
| 277 | - var arr = new Array(); | |
| 278 | - for (var i = 0; i < a.length; i++) { | |
| 279 | - var tt = { | |
| 280 | - 'ad_code': o.imghost + a[i].ad_code, | |
| 281 | - 'media_link': '', | |
| 282 | - 'ad_weapplink':a[i].ad_weapplink | |
| 283 | - }; | |
| 284 | - arr.push(tt); | |
| 285 | - } | |
| 286 | - if (arr.length > 0) e.setData({ | |
| 287 | - banner: arr, | |
| 288 | - }); | |
| 309 | + | |
| 310 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 311 | + var a = res.data.data.pageData; | |
| 312 | + var arr = new Array(); | |
| 313 | + for (var i = 0; i < a.length; i++) { | |
| 314 | + var tt = { | |
| 315 | + 'ad_code': o.imghost + a[i].ad_code, | |
| 316 | + 'media_link': '', | |
| 317 | + 'ad_weapplink':a[i].ad_weapplink | |
| 318 | + }; | |
| 319 | + arr.push(tt); | |
| 320 | + } | |
| 321 | + if (arr.length > 0) e.setData({ | |
| 322 | + banner: arr, | |
| 323 | + }); | |
| 289 | 324 | |
| 290 | - wx.stopPullDownRefresh(); | |
| 325 | + wx.stopPullDownRefresh(); | |
| 326 | + } | |
| 291 | 327 | }) |
| 292 | 328 | |
| 293 | 329 | //-----秒杀----- |
| ... | ... | @@ -875,10 +911,16 @@ Page({ |
| 875 | 911 | |
| 876 | 912 | //导航跳转 |
| 877 | 913 | nav_goto:function(e){ |
| 878 | - var url=e.currentTarget.dataset.url; | |
| 879 | - if(!url || url=='') return; | |
| 880 | - if(url[0]!='/') url='/'+url; | |
| 881 | - getApp().goto(url); | |
| 914 | + var url=e.currentTarget.dataset.url; | |
| 915 | + if(!url || url=='') return; | |
| 916 | + if(url[0]!='/') url='/'+url; | |
| 917 | + getApp().goto(url); | |
| 918 | + if(this.data.showHongbao) { | |
| 919 | + this.setData({ | |
| 920 | + showHongbao: false, | |
| 921 | + showHongbaoSmall: true, //显示抢红包小图标 | |
| 922 | + }); | |
| 923 | + } | |
| 882 | 924 | }, |
| 883 | 925 | |
| 884 | 926 | //----跳转到搭配购买---- |
| ... | ... | @@ -898,6 +940,14 @@ Page({ |
| 898 | 940 | title: '首页-' + getApp().globalData.config.store_name, |
| 899 | 941 | } |
| 900 | 942 | }, |
| 901 | - | |
| 943 | + | |
| 944 | + | |
| 945 | + // 关闭首页抢红包主弹窗,显示侧边栏抢红包小图标 | |
| 946 | + closeHongbao() { | |
| 947 | + this.setData({ | |
| 948 | + showHongbao: false, //关闭抢红包主弹窗 | |
| 949 | + showHongbaoSmall: true, //显示抢红包小图标 | |
| 950 | + }); | |
| 951 | + }, | |
| 902 | 952 | |
| 903 | 953 | }); |
| 904 | 954 | \ No newline at end of file | ... | ... |
pages/index/index/index.json
| ... | ... | @@ -17,7 +17,8 @@ |
| 17 | 17 | "picMax": "/components/diy_picMax/diy_picMax", |
| 18 | 18 | "mvideo": "/components/diy_video/diy_video", |
| 19 | 19 | "service": "/components/diy_service/diy_service", |
| 20 | - "scan": "/components/diy_scan/diy_scan" | |
| 20 | + "scan": "/components/diy_scan/diy_scan", | |
| 21 | + "full_screen": "/components/full_screen/full_screen" | |
| 21 | 22 | }, |
| 22 | 23 | "enablePullDownRefresh": false |
| 23 | 24 | } |
| 24 | 25 | \ No newline at end of file | ... | ... |
pages/index/index/index.wxml
| ... | ... | @@ -287,8 +287,11 @@ |
| 287 | 287 | <!-- 商品列表 --> |
| 288 | 288 | |
| 289 | 289 | </view> |
| 290 | + | |
| 291 | + | |
| 290 | 292 | |
| 291 | 293 | </view> |
| 294 | + | |
| 292 | 295 | <!--是否是自定义--> |
| 293 | 296 | <view class="container" wx:if="{{isTemplate}}" style="background-color:{{bgcolor_t}}"> |
| 294 | 297 | <block wx:for="{{template_arr}}" wx:key="{{index}}"> |
| ... | ... | @@ -377,6 +380,27 @@ |
| 377 | 380 | </view> |
| 378 | 381 | </block> |
| 379 | 382 | |
| 383 | +<!-- 抢红包 --> | |
| 384 | +<block wx:if="{{showHongbao}}"> | |
| 385 | + <view class="hongbao-container"> | |
| 386 | + <view class="hongbao"> | |
| 387 | + <image src="{{url + 'miniapp/images/redmoney/hongBao.png'}}" class="hongbao-img" bindtap="nav_goto" data-url="/packageA/pages/hongBao/hongBao"/> | |
| 388 | + <image src="{{url + 'miniapp/images/redmoney/xlose.png'}}" class="close" bindtap="closeHongbao"/> | |
| 389 | + </view> | |
| 390 | + </view> | |
| 391 | +</block> | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | +<block wx:if="{{showHongbaoSmall}}"> | |
| 396 | + <view> | |
| 397 | + <image src="{{url + 'miniapp/images/redmoney/hongbao_sm.gif'}}" class="hongbao_sm-img" bindtap="nav_goto" data-url="/packageA/pages/hongBao/hongBao"/> | |
| 398 | + </view> | |
| 399 | +</block> | |
| 400 | + | |
| 401 | +<!-- <hongbao id="hongbao" bind:closeHongbao="closeHongbao" wx:if="{{showHongbao}}" url="{{url}}"></hongbao> --> | |
| 402 | + <full_screen id="full_screen"></full_screen> | |
| 403 | + | |
| 380 | 404 | |
| 381 | 405 | |
| 382 | 406 | ... | ... |
pages/index/index/index.wxss
| ... | ... | @@ -925,4 +925,43 @@ page { |
| 925 | 925 | overflow-x: hidden; |
| 926 | 926 | padding-bottom: 120rpx; |
| 927 | 927 | } |
| 928 | -.container{ overflow: hidden;} | |
| 929 | 928 | \ No newline at end of file |
| 929 | +.container{ overflow: hidden;} | |
| 930 | + | |
| 931 | + | |
| 932 | +.hongbao-container { | |
| 933 | + position: fixed; | |
| 934 | + width: 100%; | |
| 935 | + height: 100%; | |
| 936 | + top: 0; | |
| 937 | + left: 0; | |
| 938 | + background-color: rgba(0,0,0,.5); | |
| 939 | + z-index: 999; | |
| 940 | +} | |
| 941 | + | |
| 942 | +.hongbao { | |
| 943 | + position: absolute; | |
| 944 | + top: 50%; | |
| 945 | + left: 50%; | |
| 946 | + transform: translate(-50%, -50%); | |
| 947 | +} | |
| 948 | + | |
| 949 | +.hongbao-img { | |
| 950 | + width: 440rpx; | |
| 951 | + height: 640rpx; | |
| 952 | +} | |
| 953 | + | |
| 954 | +.close { | |
| 955 | + position: absolute; | |
| 956 | + top: 0; | |
| 957 | + right: 0; | |
| 958 | +} | |
| 959 | + | |
| 960 | +.hongbao_sm-img { | |
| 961 | + width: 124rpx; | |
| 962 | + height: 170rpx; | |
| 963 | + position: fixed; | |
| 964 | + top: 50%; | |
| 965 | + right: 0; | |
| 966 | + /* transform: translateY(-50%); */ | |
| 967 | + z-index: 10000; | |
| 968 | +} | |
| 930 | 969 | \ No newline at end of file | ... | ... |
pages/user/coupons/coupons.wxml
| ... | ... | @@ -63,7 +63,7 @@ |
| 63 | 63 | <view wx:else> |
| 64 | 64 | <view class="text">有效期:不限</view> |
| 65 | 65 | </view> |
| 66 | - <view wx:if="{{detail.Remark}}" class="textss">{{detail.Remark}}</view> | |
| 66 | + <view wx:if="{{detail.Remark1}}" class="textss"> {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark1}}</view> | |
| 67 | 67 | <view wx:else class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} |
| 68 | 68 | </view> |
| 69 | 69 | ... | ... |
pages/user/coupons/query/index.wxml
| ... | ... | @@ -102,7 +102,8 @@ |
| 102 | 102 | <view wx:else> |
| 103 | 103 | <view class="text">有效期: 不限</view> |
| 104 | 104 | </view> |
| 105 | - <view class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{detail.UseObjectID==null || detail.UseObjectID==''?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} | |
| 105 | + <view wx:if="{{detail.Remark1}}" class="textss"> {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}}</view> | |
| 106 | + <view wx:else class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} | |
| 106 | 107 | </view> |
| 107 | 108 | </view> |
| 108 | 109 | </view> | ... | ... |
pages/user/coupons/query/index.wxss
utils/filter.wxs
| ... | ... | @@ -29,7 +29,7 @@ var filters = { |
| 29 | 29 | var fm = [d.getFullYear(), d.getMonth() + 1, d.getDate()].join('-'); |
| 30 | 30 | var md = (d.getMonth() + 1) + '月' + d.getDate() + '日'; |
| 31 | 31 | if (isFull == 1) |
| 32 | - fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':'); | |
| 32 | + fm = fm + ' ' + [appendZero(d.getHours()), appendZero(d.getMinutes()), appendZero(d.getSeconds())].join(':'); | |
| 33 | 33 | if (isFull == 2) { |
| 34 | 34 | fm = md + ' ' + [appendZero(d.getHours()), appendZero(d.getMinutes())].join(':'); |
| 35 | 35 | } |
| ... | ... | @@ -55,7 +55,30 @@ var filters = { |
| 55 | 55 | return spec + "/" + color; |
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | - } | |
| 58 | + }, | |
| 59 | + | |
| 60 | + | |
| 61 | + show_default: function (value, placeholder, multiple) { | |
| 62 | + if(typeof value === 'number') { | |
| 63 | + if(isNaN(value) || value === 0) { | |
| 64 | + return placeholder || '0'; | |
| 65 | + } else { | |
| 66 | + if(multiple) { | |
| 67 | + return value / multiple; | |
| 68 | + } else { | |
| 69 | + return value; | |
| 70 | + } | |
| 71 | + }; | |
| 72 | + } else if(value === '' || value === undefined || value === null) { | |
| 73 | + return placeholder || '-'; | |
| 74 | + } else { | |
| 75 | + return value; | |
| 76 | + } | |
| 77 | + }, | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 59 | 82 | }; |
| 60 | 83 | |
| 61 | 84 | module.exports = { |
| ... | ... | @@ -65,4 +88,5 @@ module.exports = { |
| 65 | 88 | format_time: filters.format_time, |
| 66 | 89 | pInt: filters.pInt, |
| 67 | 90 | show_gui_ge: filters.show_gui_ge, |
| 91 | + show_default: filters.show_default, | |
| 68 | 92 | } |
| 69 | 93 | \ No newline at end of file | ... | ... |