Commit 661b75fc64029c8fb5011abede41b11e3400f192
1 parent
1ce60018
预售自定义模板
Showing
7 changed files
with
147 additions
and
58 deletions
components/diy_pregoods/diy_pregoods.js
| @@ -18,9 +18,18 @@ Component({ | @@ -18,9 +18,18 @@ Component({ | ||
| 18 | 18 | ||
| 19 | ready: function() { | 19 | ready: function() { |
| 20 | var g_id = this.data.object.data; | 20 | var g_id = this.data.object.data; |
| 21 | + this.data.g_id=g_id; | ||
| 21 | this.init(g_id); | 22 | this.init(g_id); |
| 22 | }, | 23 | }, |
| 23 | - | 24 | + |
| 25 | + pageLifetimes: { | ||
| 26 | + //游客登录后,只要更新卡的情况 | ||
| 27 | + show: function () { | ||
| 28 | + //--初始化卡类-- | ||
| 29 | + this.init(this.data.g_id); | ||
| 30 | + }, | ||
| 31 | + }, | ||
| 32 | + | ||
| 24 | methods: { | 33 | methods: { |
| 25 | // 这里是一个自定义方法 | 34 | // 这里是一个自定义方法 |
| 26 | init: function(g_id) { | 35 | init: function(g_id) { |
| @@ -32,17 +41,32 @@ Component({ | @@ -32,17 +41,32 @@ Component({ | ||
| 32 | goodsidlist+=val.goodsid+","; | 41 | goodsidlist+=val.goodsid+","; |
| 33 | }) | 42 | }) |
| 34 | goodsidlist=ut.sub_last(goodsidlist); | 43 | goodsidlist=ut.sub_last(goodsidlist); |
| 44 | + | ||
| 45 | + var user_id=getApp().globalData.user_id; | ||
| 46 | + var pre_data={store_id:os.stoid,is_end:0,timetype:1,isuse:1}; | ||
| 47 | + if(user_id){ | ||
| 48 | + pre_data.user_id=user_id; | ||
| 49 | + } | ||
| 50 | + | ||
| 35 | //--调用接口,读取秒杀-- | 51 | //--调用接口,读取秒杀-- |
| 36 | - app.request.promiseGet("/api/weshop/marketing/marketingPresellList/page?store_id=" | ||
| 37 | - +os.stoid+"&goodsidlist="+goodsidlist, { | ||
| 38 | - data:{is_end:0,timetype:1,isuse:1} | 52 | + app.request.promiseGet("/api/weshop/marketing/marketingPresellList/page?goodsidlist="+goodsidlist, { |
| 53 | + data:pre_data | ||
| 39 | }).then(res => { | 54 | }).then(res => { |
| 40 | - //如果数组为空的时候 | ||
| 41 | - var goodslist=res.data.data; | ||
| 42 | - //就算是添加的活动已经过期,就要用最新的进行中活动 | ||
| 43 | - if(goodslist && goodslist.length>0) { | ||
| 44 | - th.set_goods_list(g_id,goodslist); | ||
| 45 | - } | 55 | + |
| 56 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { | ||
| 57 | + //如果数组为空的时候 | ||
| 58 | + var goodslist = res.data.data.pageData; | ||
| 59 | + //就算是添加的活动已经过期,就要用最新的进行中活动 | ||
| 60 | + if (goodslist && goodslist.length > 0) { | ||
| 61 | + th.set_goods_list(g_id, goodslist); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + th.data.timer = setInterval(function () { | ||
| 65 | + th.countDown2(th); | ||
| 66 | + }, 1000); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + | ||
| 46 | }); | 70 | }); |
| 47 | }else{ | 71 | }else{ |
| 48 | th.no_gid_set(); | 72 | th.no_gid_set(); |
| @@ -51,12 +75,21 @@ Component({ | @@ -51,12 +75,21 @@ Component({ | ||
| 51 | 75 | ||
| 52 | //当是默认的情况 | 76 | //当是默认的情况 |
| 53 | no_gid_set(){ | 77 | no_gid_set(){ |
| 54 | - getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/page", | ||
| 55 | - {isShowLoading:1,data:{store_id:os.stoid,is_end:0,timetype:1,page:1,pageSize:9,isuse:1}} | 78 | + var th=this; |
| 79 | + var user_id=getApp().globalData.user_id; | ||
| 80 | + var pre_data={store_id:os.stoid,is_end:0,timetype:1,isuse:1,page:1,pageSize:9}; | ||
| 81 | + if(user_id){ | ||
| 82 | + pre_data.user_id=user_id; | ||
| 83 | + } | ||
| 84 | + getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/page",{data:pre_data} | ||
| 56 | ).then(res=>{ | 85 | ).then(res=>{ |
| 57 | if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { | 86 | if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { |
| 58 | var goodsidlist=res.data.data.pageData; | 87 | var goodsidlist=res.data.data.pageData; |
| 59 | this.set_goods_list(null,goodsidlist); | 88 | this.set_goods_list(null,goodsidlist); |
| 89 | + | ||
| 90 | + th.data.timer = setInterval(function () { | ||
| 91 | + th.countDown2(th); | ||
| 92 | + }, 1000); | ||
| 60 | } | 93 | } |
| 61 | }); | 94 | }); |
| 62 | }, | 95 | }, |
| @@ -100,8 +133,64 @@ Component({ | @@ -100,8 +133,64 @@ Component({ | ||
| 100 | wx.navigateTo({ | 133 | wx.navigateTo({ |
| 101 | url:"/packageC/pages/presell/list/list" | 134 | url:"/packageC/pages/presell/list/list" |
| 102 | }); | 135 | }); |
| 103 | - } | 136 | + }, |
| 137 | + | ||
| 138 | + //----秒杀倒计时函数----- | ||
| 139 | + countDown2: function (ob) { | ||
| 140 | + if (ob == undefined) return false; | ||
| 141 | + var ee = ob; | ||
| 142 | + // 获取当前时间,同时得到活动结束时间数组 | ||
| 143 | + var newTime = ut.gettimestamp(); | ||
| 144 | + this.setData({ newTime: newTime }); | ||
| 145 | + | ||
| 146 | + var List = ee.data.goods_array; | ||
| 147 | + if (List.length == 0) return false; | ||
| 148 | + for (var j = 0; j < List.length; j++) { | ||
| 149 | + // 对结束时间进行处理渲染到页面 | ||
| 150 | + var endTimeList = List[j]; | ||
| 151 | + for (var i = 0; i < endTimeList.length; i++) { | ||
| 152 | + var o = endTimeList[i]; | ||
| 153 | + var endTime = o.end_time; | ||
| 154 | + if (newTime < o.start_time) endTime = o.start_time; | ||
| 155 | + let obj = null; | ||
| 156 | + // 如果活动未结束,对时间进行处理 | ||
| 157 | + if (endTime - newTime > 0) { | ||
| 158 | + let time = (endTime - newTime); | ||
| 159 | + // 获取天、时、分、秒 | ||
| 160 | + let day = parseInt(time / (60 * 60 * 24)); | ||
| 161 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
| 162 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
| 163 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
| 164 | + obj = { | ||
| 165 | + day: this.timeFormat(day), | ||
| 166 | + hou: this.timeFormat(hou), | ||
| 167 | + min: this.timeFormat(min), | ||
| 168 | + sec: this.timeFormat(sec) | ||
| 169 | + } | ||
| 170 | + } else { | ||
| 171 | + //活动已结束,全部设置为'00' | ||
| 172 | + obj = { | ||
| 173 | + day: '00', | ||
| 174 | + hou: '00', | ||
| 175 | + min: '00', | ||
| 176 | + sec: '00' | ||
| 177 | + } | ||
| 178 | + } | ||
| 179 | + var txt = "goods_array[" + j + "][" + i + "].djs"; | ||
| 180 | + ee.setData({ | ||
| 181 | + [txt]: obj | ||
| 182 | + }); | ||
| 183 | + } | ||
| 184 | + } | ||
| 185 | + }, | ||
| 186 | + //---小于10的格式化函数---- | ||
| 187 | + timeFormat: function (param) { | ||
| 188 | + return param < 10 ? '0' + param : param; | ||
| 189 | + }, | ||
| 190 | + | ||
| 104 | }, | 191 | }, |
| 105 | 192 | ||
| 106 | 193 | ||
| 194 | + | ||
| 195 | + | ||
| 107 | }) | 196 | }) |
| 108 | \ No newline at end of file | 197 | \ No newline at end of file |
components/diy_pregoods/diy_pregoods.wxml
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <view class='top' bindtap="go_to_skill"> | 3 | <view class='top' bindtap="go_to_skill"> |
| 4 | <view class="flex"> | 4 | <view class="flex"> |
| 5 | <view class='t_left'></view> | 5 | <view class='t_left'></view> |
| 6 | - <view class='t_ms'>秒杀</view> | 6 | + <view class='t_ms'>预售</view> |
| 7 | </view> | 7 | </view> |
| 8 | <view class='right_k'> | 8 | <view class='right_k'> |
| 9 | <image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | 9 | <image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> |
| @@ -12,58 +12,51 @@ | @@ -12,58 +12,51 @@ | ||
| 12 | 12 | ||
| 13 | <!--商品展示--> | 13 | <!--商品展示--> |
| 14 | <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}"> | 14 | <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}"> |
| 15 | - <view class='sp' wx:if="{{object.style==1}}"> | 15 | + <view class='sp'> |
| 16 | <swiper-item class="s_it" wx:for="{{goods_array}}"> | 16 | <swiper-item class="s_it" wx:for="{{goods_array}}"> |
| 17 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 17 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
| 18 | <navigator url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" class="s1_gk_a1"> | 18 | <navigator url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" class="s1_gk_a1"> |
| 19 | <view class='one'> | 19 | <view class='one'> |
| 20 | <view class='sp_top'> | 20 | <view class='sp_top'> |
| 21 | <view class='po'></view> | 21 | <view class='po'></view> |
| 22 | - <block wx:if="{{aitem.start_time>newTime}}"> | ||
| 23 | - <view class="rob"> | ||
| 24 | - <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span> | ||
| 25 | - </view> | ||
| 26 | - </block> | ||
| 27 | - | ||
| 28 | <block wx:if="{{aitem.end_time<=newTime}}"> | 22 | <block wx:if="{{aitem.end_time<=newTime}}"> |
| 29 | <view class="rob"> | 23 | <view class="rob"> |
| 30 | <span class='s_top_kill gray'>活动已结束</span> | 24 | <span class='s_top_kill gray'>活动已结束</span> |
| 31 | </view> | 25 | </view> |
| 32 | </block> | 26 | </block> |
| 33 | <block wx:else> | 27 | <block wx:else> |
| 34 | - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | 28 | + <block wx:if="{{aitem.start_time<newTime && aitem.buy_goodnum<aitem.presell_sumqty}}"> |
| 35 | <view class="rob"> | 29 | <view class="rob"> |
| 36 | <span class='s_top_kill'>火热进行</span> | 30 | <span class='s_top_kill'>火热进行</span> |
| 37 | </view> | 31 | </view> |
| 38 | </block> | 32 | </block> |
| 39 | - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | 33 | + <block wx:if="{{aitem.buy_goodnum>=aitem.presell_sumqty}}"> |
| 40 | <view class="rob"> | 34 | <view class="rob"> |
| 41 | <span class='s_top_kill gray'>已抢光</span> | 35 | <span class='s_top_kill gray'>已抢光</span> |
| 42 | </view> | 36 | </view> |
| 43 | </block> | 37 | </block> |
| 44 | </block> | 38 | </block> |
| 45 | - | ||
| 46 | - | ||
| 47 | 39 | ||
| 48 | <view class='clear'></view> | 40 | <view class='clear'></view> |
| 49 | 41 | ||
| 50 | - <view class='s_img'> | 42 | + <view class='s_img' style="position: relative"> |
| 51 | <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | 43 | <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> |
| 52 | - </view> | ||
| 53 | 44 | ||
| 54 | - <view class='s_foot_kill'> | ||
| 55 | - <text>{{aitem.djs.day}}天</text> | ||
| 56 | - <text>{{aitem.djs.hou}}时</text> | ||
| 57 | - <text>{{aitem.djs.min}}分</text> | ||
| 58 | - <text>{{aitem.djs.sec}}秒</text> | 45 | + |
| 46 | + <view class='s_foot_kill' style="position: absolute"> | ||
| 47 | + <text>{{aitem.djs.day}}天</text> | ||
| 48 | + <text>{{aitem.djs.hou}}时</text> | ||
| 49 | + <text>{{aitem.djs.min}}分</text> | ||
| 50 | + <text>{{aitem.djs.sec}}秒</text> | ||
| 51 | + </view> | ||
| 52 | + | ||
| 59 | </view> | 53 | </view> |
| 60 | <view class='clear'></view> | 54 | <view class='clear'></view> |
| 61 | - | ||
| 62 | </view> | 55 | </view> |
| 63 | 56 | ||
| 64 | <view class='sp_wz'> | 57 | <view class='sp_wz'> |
| 65 | - <view class='sp_wzi'>{{aitem.title}}</view> | ||
| 66 | - <view class='sp_jg'>¥{{aitem.price}}</view> | 58 | + <view class='sp_wzi'>{{aitem.act_name}}</view> |
| 59 | + <view class='sp_jg'>¥{{aitem.presell_price}}</view> | ||
| 67 | <view class='sp_jgx'>¥{{aitem.market_price}}</view> | 60 | <view class='sp_jgx'>¥{{aitem.market_price}}</view> |
| 68 | </view> | 61 | </view> |
| 69 | 62 | ||
| @@ -85,7 +78,7 @@ | @@ -85,7 +78,7 @@ | ||
| 85 | </view> | 78 | </view> |
| 86 | 79 | ||
| 87 | <view class="o1_right"> | 80 | <view class="o1_right"> |
| 88 | - <view class="sp_wzi">{{aitem.title}}</view> | 81 | + <view class="sp_wzi">{{aitem.act_name}}</view> |
| 89 | <view class="o1_sj_kill"> | 82 | <view class="o1_sj_kill"> |
| 90 | <text>{{aitem.djs.day}}</text> 天 | 83 | <text>{{aitem.djs.day}}</text> 天 |
| 91 | <text>{{aitem.djs.hou}}</text> : | 84 | <text>{{aitem.djs.hou}}</text> : |
| @@ -94,28 +87,23 @@ | @@ -94,28 +87,23 @@ | ||
| 94 | 87 | ||
| 95 | </view> | 88 | </view> |
| 96 | <view class="money"> | 89 | <view class="money"> |
| 97 | - <view class='sp_jg'>¥{{aitem.price}}</view> | 90 | + <view class='sp_jg'>¥{{aitem.presell_price}}</view> |
| 98 | <view class='sp_jgx'>¥{{aitem.market_price}}</view> | 91 | <view class='sp_jgx'>¥{{aitem.market_price}}</view> |
| 99 | </view> | 92 | </view> |
| 100 | - <block wx:if="{{aitem.start_time>newTime}}"> | ||
| 101 | - <view class="rob"> | ||
| 102 | - <view class="wo" style="background-color: #adadad">正在预热</view> | ||
| 103 | - </view> | ||
| 104 | - </block> | ||
| 105 | - | 93 | + |
| 106 | <block wx:if="{{aitem.end_time<newTime}}"> | 94 | <block wx:if="{{aitem.end_time<newTime}}"> |
| 107 | <view class="rob"> | 95 | <view class="rob"> |
| 108 | <view class="wo" style="background-color: #adadad">已结束</view> | 96 | <view class="wo" style="background-color: #adadad">已结束</view> |
| 109 | </view> | 97 | </view> |
| 110 | </block> | 98 | </block> |
| 111 | <block wx:else> | 99 | <block wx:else> |
| 112 | - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | 100 | + <block wx:if="{{aitem.start_time<newTime && aitem.buy_goodnum<aitem.presell_sumqty}}"> |
| 113 | <view class="rob"> | 101 | <view class="rob"> |
| 114 | <view class="wo">我要抢</view> | 102 | <view class="wo">我要抢</view> |
| 115 | </view> | 103 | </view> |
| 116 | </block> | 104 | </block> |
| 117 | 105 | ||
| 118 | - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | 106 | + <block wx:if="{{aitem.buy_goodnum>=aitem.presell_sumqty}}"> |
| 119 | <view class="rob"> | 107 | <view class="rob"> |
| 120 | <view class="wo" style="background-color: #adadad">已抢光</view> | 108 | <view class="wo" style="background-color: #adadad">已抢光</view> |
| 121 | </view> | 109 | </view> |
components/diy_pregoods/diy_pregoods.wxss
| @@ -68,7 +68,6 @@ swiper { | @@ -68,7 +68,6 @@ swiper { | ||
| 68 | width: 210rpx; | 68 | width: 210rpx; |
| 69 | height: 100%; | 69 | height: 100%; |
| 70 | position: relative; | 70 | position: relative; |
| 71 | - top: -74rpx; | ||
| 72 | left: 0rpx; | 71 | left: 0rpx; |
| 73 | } | 72 | } |
| 74 | 73 | ||
| @@ -81,9 +80,9 @@ swiper { | @@ -81,9 +80,9 @@ swiper { | ||
| 81 | padding: 4rpx 10rpx; | 80 | padding: 4rpx 10rpx; |
| 82 | border-radius: 10rpx; | 81 | border-radius: 10rpx; |
| 83 | z-index: 999; | 82 | z-index: 999; |
| 84 | - position: relative; | ||
| 85 | - top: -6rpx; | ||
| 86 | - width: 210rpx; | 83 | + position: absolute; |
| 84 | + top: 0rpx; | ||
| 85 | + width: 130rpx; | ||
| 87 | color: #fff; | 86 | color: #fff; |
| 88 | text-align: center; | 87 | text-align: center; |
| 89 | } | 88 | } |
| @@ -95,7 +94,7 @@ swiper { | @@ -95,7 +94,7 @@ swiper { | ||
| 95 | .sp .sp_top .s_foot_kill { | 94 | .sp .sp_top .s_foot_kill { |
| 96 | font-size: 20rpx; | 95 | font-size: 20rpx; |
| 97 | position: relative; | 96 | position: relative; |
| 98 | - top: -90rpx; | 97 | + bottom: 0rpx; |
| 99 | width: 210rpx; | 98 | width: 210rpx; |
| 100 | height: 38rpx; | 99 | height: 38rpx; |
| 101 | line-height: 38rpx; | 100 | line-height: 38rpx; |
| @@ -280,7 +279,6 @@ swiper { | @@ -280,7 +279,6 @@ swiper { | ||
| 280 | } | 279 | } |
| 281 | .rob{ | 280 | .rob{ |
| 282 | display: flex; | 281 | display: flex; |
| 283 | - justify-content: flex-end; | ||
| 284 | font-size: 30rpx; | 282 | font-size: 30rpx; |
| 285 | } | 283 | } |
| 286 | .money{ | 284 | .money{ |
pages/index/index/index.json
| @@ -18,7 +18,8 @@ | @@ -18,7 +18,8 @@ | ||
| 18 | "mvideo": "/components/diy_video/diy_video", | 18 | "mvideo": "/components/diy_video/diy_video", |
| 19 | "service": "/components/diy_service/diy_service", | 19 | "service": "/components/diy_service/diy_service", |
| 20 | "scan": "/components/diy_scan/diy_scan", | 20 | "scan": "/components/diy_scan/diy_scan", |
| 21 | - "store_select": "/components/diy_store_select/diy_store_select" | 21 | + "store_select": "/components/diy_store_select/diy_store_select", |
| 22 | + "presell": "/components/diy_pregoods/diy_pregoods" | ||
| 22 | }, | 23 | }, |
| 23 | "enablePullDownRefresh": false | 24 | "enablePullDownRefresh": false |
| 24 | } | 25 | } |
| 25 | \ No newline at end of file | 26 | \ No newline at end of file |
pages/index/index/index.wxml
| @@ -435,10 +435,16 @@ | @@ -435,10 +435,16 @@ | ||
| 435 | <block wx:if="{{item.ename=='scan'}}"> | 435 | <block wx:if="{{item.ename=='scan'}}"> |
| 436 | <scan object="{{item.content}}"></scan> | 436 | <scan object="{{item.content}}"></scan> |
| 437 | </block> | 437 | </block> |
| 438 | - <!--扫一扫--> | 438 | + <!-- 门店选择 --> |
| 439 | <block wx:if="{{item.ename=='store_select' && item.content.is_top!=1}}"> | 439 | <block wx:if="{{item.ename=='store_select' && item.content.is_top!=1}}"> |
| 440 | <store_select object="{{item.content}}"></store_select> | 440 | <store_select object="{{item.content}}"></store_select> |
| 441 | - </block> | 441 | + </block> |
| 442 | + | ||
| 443 | + <!-- 预售 --> | ||
| 444 | + <block wx:if="{{item.ename=='presale'}}"> | ||
| 445 | + <presell object="{{item.content}}"></presell> | ||
| 446 | + </block> | ||
| 447 | + | ||
| 442 | </view> | 448 | </view> |
| 443 | 449 | ||
| 444 | 450 | ||
| @@ -461,9 +467,7 @@ | @@ -461,9 +467,7 @@ | ||
| 461 | <view class="img-box" style="position: relative;"> | 467 | <view class="img-box" style="position: relative;"> |
| 462 | <image mode="widthFix" class="receive" src="{{url}}{{new_image==''?'/miniapp/images/newpeople/newreceive.png':new_image}}"></image> | 468 | <image mode="widthFix" class="receive" src="{{url}}{{new_image==''?'/miniapp/images/newpeople/newreceive.png':new_image}}"></image> |
| 463 | </view> | 469 | </view> |
| 464 | - <!-- <view> --> | ||
| 465 | - | ||
| 466 | - <!-- </view> --> | 470 | + |
| 467 | </navigator> | 471 | </navigator> |
| 468 | <image class="close" src="{{url}}/miniapp/images/plus/Close.png" catchtap="close_disgraceful" mode=""/> | 472 | <image class="close" src="{{url}}/miniapp/images/plus/Close.png" catchtap="close_disgraceful" mode=""/> |
| 469 | <!-- <view class="flex-level"></view> --> | 473 | <!-- <view class="flex-level"></view> --> |
pages/template/index.json
| @@ -19,7 +19,8 @@ | @@ -19,7 +19,8 @@ | ||
| 19 | "picMax": "/components/diy_picMax/diy_picMax", | 19 | "picMax": "/components/diy_picMax/diy_picMax", |
| 20 | "mvideo": "/components/diy_video/diy_video", | 20 | "mvideo": "/components/diy_video/diy_video", |
| 21 | "service": "/components/diy_service/diy_service", | 21 | "service": "/components/diy_service/diy_service", |
| 22 | - "scan": "/components/diy_scan/diy_scan" | 22 | + "scan": "/components/diy_scan/diy_scan", |
| 23 | + "presell": "/components/diy_pregoods/diy_pregoods" | ||
| 23 | }, | 24 | }, |
| 24 | "enablePullDownRefresh": false | 25 | "enablePullDownRefresh": false |
| 25 | } | 26 | } |
| 26 | \ No newline at end of file | 27 | \ No newline at end of file |
pages/template/index.wxml
| @@ -61,6 +61,14 @@ | @@ -61,6 +61,14 @@ | ||
| 61 | <block wx:if="{{item.ename=='scan'}}"> | 61 | <block wx:if="{{item.ename=='scan'}}"> |
| 62 | <scan object="{{item.content}}"></scan> | 62 | <scan object="{{item.content}}"></scan> |
| 63 | </block> | 63 | </block> |
| 64 | + | ||
| 65 | + <!-- 预售 --> | ||
| 66 | + <block wx:if="{{item.ename=='presale'}}"> | ||
| 67 | + <presell object="{{item.content}}"></presell> | ||
| 68 | + </block> | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + | ||
| 64 | </view> | 72 | </view> |
| 65 | </block> | 73 | </block> |
| 66 | </view> | 74 | </view> |