Commit 33cd0b517782b56097420ac5d1a6a18b7cc537c6
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
11 changed files
with
618 additions
and
17 deletions
app.json
| @@ -148,11 +148,11 @@ | @@ -148,11 +148,11 @@ | ||
| 148 | "pages/luckactivity/index/index", | 148 | "pages/luckactivity/index/index", |
| 149 | "pages/user/Change_phone/Change_phone", | 149 | "pages/user/Change_phone/Change_phone", |
| 150 | "pages/zuhegou/index/index", | 150 | "pages/zuhegou/index/index", |
| 151 | + "pages/zuhegou/list/list", | ||
| 151 | "pages/user/binding_info/binding_info", | 152 | "pages/user/binding_info/binding_info", |
| 152 | "pages/user/choice_guide/choice_guide", | 153 | "pages/user/choice_guide/choice_guide", |
| 153 | "pages/video/index" | 154 | "pages/video/index" |
| 154 | - ] | ||
| 155 | - | 155 | + ] |
| 156 | }, | 156 | }, |
| 157 | { | 157 | { |
| 158 | "root": "packageC/", | 158 | "root": "packageC/", |
packageB/pages/zuhegou/index/index.js
| @@ -126,6 +126,11 @@ Page({ | @@ -126,6 +126,11 @@ Page({ | ||
| 126 | onLoad: function (options) { | 126 | onLoad: function (options) { |
| 127 | self = this; | 127 | self = this; |
| 128 | var the_id = options.id; | 128 | var the_id = options.id; |
| 129 | + if(options.title) { | ||
| 130 | + wx.setNavigationBarTitle({ | ||
| 131 | + title: options.title, | ||
| 132 | + }); | ||
| 133 | + }; | ||
| 129 | var first_leader=''; | 134 | var first_leader=''; |
| 130 | //--如果tg_id是空的话,分享回来-- | 135 | //--如果tg_id是空的话,分享回来-- |
| 131 | if (the_id == undefined || the_id == null || the_id == "") { | 136 | if (the_id == undefined || the_id == null || the_id == "") { |
packageB/pages/zuhegou/list/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | ||
| 2 | + has_char:function(url,key){ | ||
| 3 | + if(!url) return -1; | ||
| 4 | + return url.indexOf(key); | ||
| 5 | + }, | ||
| 6 | + beg_time:function(beg_date){ | ||
| 7 | + var fmt1 = beg_date.substring(0, 19); | ||
| 8 | + var reg = getRegExp("-", "g"); | ||
| 9 | + var fmt2 = fmt1.replace(reg, '/'); | ||
| 10 | + var t1 = getDate(fmt2); | ||
| 11 | + var tnow=getDate(); | ||
| 12 | + if(t1<=tnow) return 1; | ||
| 13 | + return 0; | ||
| 14 | + }, | ||
| 15 | + end_time:function(end_date){ | ||
| 16 | + var fmt1 = end_date.substring(0, 19); | ||
| 17 | + var reg = getRegExp("-", "g"); | ||
| 18 | + var fmt2 = fmt1.replace(reg, '/'); | ||
| 19 | + var t1 = getDate(fmt2); | ||
| 20 | + var tnow=getDate(); | ||
| 21 | + if(t1>=tnow) return 1; | ||
| 22 | + return 0; | ||
| 23 | + } | ||
| 24 | +} | ||
| 25 | +module.exports = { | ||
| 26 | + has_char: g_filters.has_char, | ||
| 27 | + beg_time: g_filters.beg_time, | ||
| 28 | + end_time: g_filters.end_time, | ||
| 29 | +} | ||
| 0 | \ No newline at end of file | 30 | \ No newline at end of file |
packageB/pages/zuhegou/list/list.js
0 → 100644
| 1 | +var e = getApp(), i = e.request, a = e.globalData.setting,os=a,ut = require("../../../../utils/util.js"); | ||
| 2 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | ||
| 3 | + | ||
| 4 | +Page({ | ||
| 5 | + data: { | ||
| 6 | + url: a.imghost, | ||
| 7 | + killtime: null, | ||
| 8 | + currentPage: 1, | ||
| 9 | + goodlist: null, | ||
| 10 | + type:1, | ||
| 11 | + timer:null, | ||
| 12 | + ismore:1, //是否可以加载更多 | ||
| 13 | + isshow:0, | ||
| 14 | + ad_data:null, | ||
| 15 | + max_sw_height:200, | ||
| 16 | + }, | ||
| 17 | + | ||
| 18 | + //------初始化加载---------- | ||
| 19 | + onLoad: function(t) { | ||
| 20 | + // wx.setNavigationBarTitle({ title: "商品秒杀",}) | ||
| 21 | + var first_leader = t.first_leader; | ||
| 22 | + var type=t.type; | ||
| 23 | + if(type!=undefined){ | ||
| 24 | + this.setData({type:type}); | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + var th=this; | ||
| 28 | + | ||
| 29 | + // console.log("------------"); | ||
| 30 | + console.log(first_leader); | ||
| 31 | + getApp().getConfig(); | ||
| 32 | + | ||
| 33 | + if (first_leader) { | ||
| 34 | + getApp().globalData.first_leader = first_leader; | ||
| 35 | + //调用接口判断是不是会员 | ||
| 36 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | ||
| 37 | + if (res.data.code == 0) { | ||
| 38 | + getApp().globalData.guide_id = res.data.data.id; | ||
| 39 | + } | ||
| 40 | + }) | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + | ||
| 44 | + // 广告 | ||
| 45 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=1203&store_id=" + os.stoid, { | ||
| 46 | + data: { | ||
| 47 | + enabled: 1 | ||
| 48 | + } | ||
| 49 | + }).then(res => { | ||
| 50 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | ||
| 51 | + var a = res.data.data.pageData; | ||
| 52 | + var narr=[]; | ||
| 53 | + for(var i in a){ | ||
| 54 | + var tt = { | ||
| 55 | + 'ad_code': os.imghost + a[i].ad_code, | ||
| 56 | + 'media_link': '', | ||
| 57 | + 'ad_weapplink':a[i].ad_weapplink | ||
| 58 | + }; | ||
| 59 | + narr.push(tt); | ||
| 60 | + } | ||
| 61 | + th.setData({ad_data:narr}); | ||
| 62 | + } | ||
| 63 | + }); | ||
| 64 | + | ||
| 65 | + }, | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + onShow: function(t) { | ||
| 69 | + this.data.ismore=1; | ||
| 70 | + this.data.is_timer=1; | ||
| 71 | + this.data.currentPage=1; | ||
| 72 | + var th=this;th.setData({goodlist:null,}) | ||
| 73 | + this.requestSalelist(); | ||
| 74 | + //设置全局定时器 | ||
| 75 | + // th.data.timer=setInterval(function () { | ||
| 76 | + // th.countDown(); | ||
| 77 | + // },1000); | ||
| 78 | + }, | ||
| 79 | + | ||
| 80 | + onHide:function() { | ||
| 81 | + //--清理定时器-- | ||
| 82 | + // clearInterval(this.timer); | ||
| 83 | + this.setData({isshow:0}); | ||
| 84 | + }, | ||
| 85 | + | ||
| 86 | + //---小于10的格式化函数---- | ||
| 87 | + timeFormat(param) { | ||
| 88 | + return param < 10 ? '0' + param : param; | ||
| 89 | + }, | ||
| 90 | + | ||
| 91 | + //----倒计时函数----- | ||
| 92 | + countDown() { | ||
| 93 | + if(!this.data.is_timer) return false; | ||
| 94 | + var th=this; | ||
| 95 | + // 获取当前时间,同时得到活动结束时间数组 | ||
| 96 | + let newTime =ut.gettimestamp(); | ||
| 97 | + var endTimeList = this.data.goodlist; | ||
| 98 | + if(endTimeList==null) return null | ||
| 99 | + // 对结束时间进行处理渲染到页面 | ||
| 100 | + for (var i = 0; i < endTimeList.length;i++){ | ||
| 101 | + var o = endTimeList[i]; | ||
| 102 | + var endTime = o.end_time; | ||
| 103 | + if(th.data.type==0) endTime = o.start_time; | ||
| 104 | + let obj = null; | ||
| 105 | + // 如果活动未结束,对时间进行处理 | ||
| 106 | + if (endTime - newTime > 0){ | ||
| 107 | + let time = (endTime - newTime); | ||
| 108 | + // 获取天、时、分、秒 | ||
| 109 | + let day = parseInt(time / (60 * 60 * 24)); | ||
| 110 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
| 111 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
| 112 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
| 113 | + obj = { | ||
| 114 | + day: this.timeFormat(day), hou: this.timeFormat(hou), min: this.timeFormat(min), sec: this.timeFormat(sec), hide: 1 | ||
| 115 | + } | ||
| 116 | + }else{ | ||
| 117 | + //活动已结束,全部设置为'00' | ||
| 118 | + obj = { day: '00', hou: '00', min: '00', sec: '00' } | ||
| 119 | + } | ||
| 120 | + var txt ="goodlist["+i+"].djs"; | ||
| 121 | + th.setData({ [txt]: obj}); | ||
| 122 | + } | ||
| 123 | + }, | ||
| 124 | + | ||
| 125 | + async requestSalelist() { | ||
| 126 | + //--没有更多就不调用-- | ||
| 127 | + if(!this.data.ismore) return false; | ||
| 128 | + | ||
| 129 | + var e = this,th=e, i = "/api/weshop/prom/zhbuy/page?is_end=0&timetype=1&page=" + e.data.currentPage; | ||
| 130 | + var plist=null,alllist=th.data.goodlist; | ||
| 131 | + if(!alllist) alllist=[]; | ||
| 132 | + | ||
| 133 | + await getApp().request.promiseGet(i, | ||
| 134 | + {isShowLoading:1,data:{store_id:os.stoid,user_id:getApp().globalData.user_id}} | ||
| 135 | + ).then(res=>{ | ||
| 136 | + plist=res.data.data.pageData; | ||
| 137 | + console.log("是什么即将开始",plist); | ||
| 138 | + }); | ||
| 139 | + | ||
| 140 | + if(plist.length<=0) { | ||
| 141 | + | ||
| 142 | + getApp().showWarning("没有更多数据"); | ||
| 143 | + th.data.ismore=0; | ||
| 144 | + if(e.data.currentPage==1 && this.data.type==1){ | ||
| 145 | + // setTimeout(function () { | ||
| 146 | + // th.data.ismore=1; | ||
| 147 | + // th.setData({type:0}); | ||
| 148 | + // th.requestSalelist(); | ||
| 149 | + // },1000); | ||
| 150 | + } | ||
| 151 | + return false; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + //--循环读取接口--- | ||
| 155 | + // for(var i=0;i<plist.length;i++) { | ||
| 156 | + // var prom_id = plist[i].id; | ||
| 157 | + // await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | ||
| 158 | + // os.stoid + "/1/" + prom_id, {} | ||
| 159 | + // ).then(res=>{ | ||
| 160 | + // if(res.data.code==0){ | ||
| 161 | + // plist[i].status=1; | ||
| 162 | + // if(res.data.data<=0) plist[i].status=3; | ||
| 163 | + // } | ||
| 164 | + // }) | ||
| 165 | + // alllist.push(plist[i]); | ||
| 166 | + // } | ||
| 167 | + e.data.currentPage++; | ||
| 168 | + // console.log("秒杀商品列表", alllist); | ||
| 169 | + th.setData({goodlist:plist,isshow:1}); | ||
| 170 | + | ||
| 171 | + }, | ||
| 172 | + onPullDownRefresh: function() { | ||
| 173 | + this.reloadGoodList(); | ||
| 174 | + }, | ||
| 175 | + reloadGoodList: function() { | ||
| 176 | + this.data.goodlist = null, this.data.currentPage = 1, this.requestSalelist(); | ||
| 177 | + }, | ||
| 178 | + | ||
| 179 | + onReachBottom: function() { | ||
| 180 | + this.requestSalelist(); | ||
| 181 | + }, | ||
| 182 | + | ||
| 183 | + //点击tab事件 | ||
| 184 | + tip:function(e) { | ||
| 185 | + var a=e.currentTarget.dataset.ty,th=this;th.data.ismore=1; | ||
| 186 | + this.setData({type:a,goodlist:null}); | ||
| 187 | + this.reloadGoodList(); | ||
| 188 | + }, | ||
| 189 | + | ||
| 190 | + | ||
| 191 | + //---------分享配置-------- | ||
| 192 | + onShareAppMessage: function (e) { | ||
| 193 | + var curPage=this; | ||
| 194 | + var pagePath = curPage.route; //当前页面url | ||
| 195 | + if (pagePath.indexOf('/') != 0) { | ||
| 196 | + pagePath = '/' + pagePath; | ||
| 197 | + } | ||
| 198 | + if(getApp().globalData.user_id){ | ||
| 199 | + | ||
| 200 | + if(pagePath.indexOf("?")>0){ | ||
| 201 | + pagePath+="&first_leader="+getApp().globalData.user_id; | ||
| 202 | + }else{ | ||
| 203 | + pagePath+="?first_leader="+getApp().globalData.user_id; | ||
| 204 | + } | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + // console.log("11"+pagePath); | ||
| 208 | + return { | ||
| 209 | + title: "组合购列表", | ||
| 210 | + path:pagePath, | ||
| 211 | + } | ||
| 212 | + }, | ||
| 213 | + | ||
| 214 | + //图片失败,默认图片 | ||
| 215 | + bind_bnerr2: function (e) { | ||
| 216 | + var _errImg = e.target.dataset.errorimg; | ||
| 217 | + var val = e.target.dataset.val; | ||
| 218 | + if(val==undefined || val==null || val=='null') { | ||
| 219 | + var _errObj = {}; | ||
| 220 | + _errObj[_errImg] = "/public/images/default_goods_image_240.gif"; | ||
| 221 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 222 | + } | ||
| 223 | + }, | ||
| 224 | + | ||
| 225 | + // onShareTimeline() { | ||
| 226 | + // var store_name=getApp().globalData.config?getApp().globalData.config.store_name:''; | ||
| 227 | + // if(!store_name) | ||
| 228 | + // store_name=getApp().globalData.setting.appName; | ||
| 229 | + // return { | ||
| 230 | + // title: '秒杀活动-' + store_name, | ||
| 231 | + // } | ||
| 232 | + // }, | ||
| 233 | + | ||
| 234 | + imageLoad:function(e){ | ||
| 235 | + var imgwidth = e.detail.width; | ||
| 236 | + var imgheight = e.detail.height; | ||
| 237 | + //宽高比 | ||
| 238 | + var ratio = imgwidth / imgheight; | ||
| 239 | + //计算的高度值 | ||
| 240 | + var viewHeight = 750 / ratio; | ||
| 241 | + var hei=this.data.max_sw_height; | ||
| 242 | + | ||
| 243 | + if (hei< viewHeight) { | ||
| 244 | + this.setData({ max_sw_height: viewHeight }); | ||
| 245 | + } | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | +}); |
packageB/pages/zuhegou/list/list.json
0 → 100644
packageB/pages/zuhegou/list/list.wxml
0 → 100644
| 1 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | ||
| 2 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | ||
| 3 | +<view class=" body_frame"> | ||
| 4 | + | ||
| 5 | +<block wx:if="{{ad_data}}"> | ||
| 6 | + | ||
| 7 | + <swiper class="swiper" circular="true" autoplay="true" | ||
| 8 | + indicator-dots="true" interval="2500" | ||
| 9 | + style="height:{{max_sw_height}}rpx" > | ||
| 10 | + <block wx:for="{{ad_data}}"> | ||
| 11 | + | ||
| 12 | + <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}"> | ||
| 13 | + <swiper-item> | ||
| 14 | + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/> | ||
| 15 | + </swiper-item> | ||
| 16 | + </navigator> | ||
| 17 | + | ||
| 18 | + <view data-url="{{item.ad_weapplink}}" class="s1_gk_a1" bindtap="go_url" wx:else> | ||
| 19 | + <swiper-item> | ||
| 20 | + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/> | ||
| 21 | + </swiper-item> | ||
| 22 | + </view> | ||
| 23 | + | ||
| 24 | + </block> | ||
| 25 | + </swiper> | ||
| 26 | + | ||
| 27 | + | ||
| 28 | +</block> | ||
| 29 | +<block wx:else> | ||
| 30 | + <image class="xc-top-img" src="{{url}}/miniapp/images/seckill_top_img.jpg"></image> | ||
| 31 | +</block> | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + | ||
| 35 | +<view class="kill-list"> | ||
| 36 | + <view class="kill-item" wx:for="{{goodlist}}"> | ||
| 37 | + <navigator class="kill-pic rel" url="/packageB/pages/zuhegou/index/index?id={{item.id}}&title={{item.name}}" hover-class="none"> | ||
| 38 | + <!-- <image class="abs xc-miaosha" src="{{url}}/miniapp/images/zms.png"></image> --> | ||
| 39 | + <image class="wh100" src="{{url+item.img_url}}" data-val="{{item.img_url}}" | ||
| 40 | + data-errorimg="goodlist[{{index}}].img_url" binderror="bind_bnerr2" lazy-load="true"></image> | ||
| 41 | + </navigator> | ||
| 42 | + <view class="kill-cont"> | ||
| 43 | + <navigator class="goods-name ellipsis-2" url="/packageB/pages/zuhegou/index/index?id={{item.id}}&title={{item.name}}" hover-class="none"> | ||
| 44 | + {{item.name}} | ||
| 45 | + | ||
| 46 | + <view class="goods-num"> | ||
| 47 | + <view> | ||
| 48 | + <view>组合数量: {{item.zhbuyqty}}</view> | ||
| 49 | + <view>活动时间: {{filters.format_time(item.start_time) + '至' + filters.format_time(item.end_time)}}</view> | ||
| 50 | + <!-- <view class="{{type==1?'xc-wc':'blue_c'}}"> | ||
| 51 | + <text>剩余:</text> | ||
| 52 | + <text class='tui-conutdown-box'> {{item.djs.day}}</text>天 | ||
| 53 | + <text class='tui-conutdown-box'>{{item.djs.hou}}</text>时 | ||
| 54 | + <text class='tui-conutdown-box'>{{item.djs.min}}</text>分 | ||
| 55 | + <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒 | ||
| 56 | + </view> --> | ||
| 57 | + <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" > | ||
| 58 | + <view class="fs28" style="line-height: 16px;">¥</view> | ||
| 59 | + <text>{{item.zhprice}}</text> | ||
| 60 | + <!-- <span class="underline fs20">零售价¥{{item.market_price}}</span> --> | ||
| 61 | + </view> | ||
| 62 | + | ||
| 63 | + </view> | ||
| 64 | + <!-- <view class="kill-btn "> --> | ||
| 65 | + <!-- <navigator style="background-color: #059de5;" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:if="{{type==0}}" >即将开始</navigator> --> | ||
| 66 | + <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:if="{{item.status==1 && type==1}}">马上抢</navigator> | ||
| 67 | + <navigator class="huise"url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:if="{{item.status==3 && type==1}}">已抢光</navigator> --> | ||
| 68 | + <!-- </view> --> | ||
| 69 | + </view> | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + </navigator> | ||
| 73 | + | ||
| 74 | + <!-- <view class="flex-vertical xc-strip-frame"> | ||
| 75 | + <view class="xc-strip-blank rel"> | ||
| 76 | + | ||
| 77 | + <view class="flex-vertical rel total"> | ||
| 78 | + <view class="t-c abs xc-fill"style="width:{{type==1?(100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100)>3?(100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100):'3':'100'}}%;background:{{type==1?'#e4374d':'#059de5'}};"> | ||
| 79 | + </view> | ||
| 80 | + <text class="fs20 white abs xc-fill-text" style="">剩余{{type==1?filters.toFix(100-(item.buy_num+item.virtual)/(item.goods_num+item.virtual)*100,0):'100'}}%</text> | ||
| 81 | + </view> | ||
| 82 | + | ||
| 83 | + </view> | ||
| 84 | + <view class=" ml10 fs20 " wx:if="{{type==1}}"> 已抢{{item.buy_num+item.virtual}}件</view> | ||
| 85 | + <view class=" ml10 fs20 " wx:else> 已抢0件</view> | ||
| 86 | + | ||
| 87 | + </view> --> | ||
| 88 | + | ||
| 89 | + | ||
| 90 | + <!-- <view class="goods-num"> | ||
| 91 | + <view> | ||
| 92 | + <view>组合数量: {{item.zhbuyqty}}</view> | ||
| 93 | + <view>活动时间: {{filters.format_time(item.start_time) + '至' + filters.format_time(item.end_time)}}</view> | ||
| 94 | + | ||
| 95 | + <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" > | ||
| 96 | + <view class="fs28" style="line-height: 16px;">¥</view> | ||
| 97 | + <text>{{item.zhprice}}</text> | ||
| 98 | + | ||
| 99 | + </view> | ||
| 100 | + | ||
| 101 | + </view> | ||
| 102 | + </view> --> | ||
| 103 | + </view> | ||
| 104 | + </view> | ||
| 105 | + <!-- <view style="height:120rpx"></view> --> | ||
| 106 | +</view> | ||
| 107 | + | ||
| 108 | +<!-- <view class="kill-time xc-seckill-bottom"> | ||
| 109 | + <view class="theader" > | ||
| 110 | + <view bindtap='tip' data-ty="1" class="xc-border-right flex-center timeac left {{type==1?'active':''}}"> | ||
| 111 | + <image class="xc-bottom" | ||
| 112 | + src="{{url}}{{type==1?'/miniapp/images/fire-red.png':'/miniapp/images/fire-black.png'}}"></image> | ||
| 113 | + 火热进行中</view> | ||
| 114 | + <view bindtap='tip' data-ty="0" class=" flex-center timeac right {{type==0?'active':''}}"> | ||
| 115 | + <image class="xc-bottom" | ||
| 116 | + src="{{url}}{{type==0?'/miniapp/images/clock-rad.png':'/miniapp/images/clock-black.png'}}"></image> | ||
| 117 | + 即将开始</view> | ||
| 118 | + </view> | ||
| 119 | +</view> --> | ||
| 120 | + | ||
| 121 | + | ||
| 122 | + <view class="no-more" wx:if="{{goodlist.length==0}}">没有相关内容</view> | ||
| 123 | +</view> | ||
| 124 | + | ||
| 125 | + | ||
| 126 | + | ||
| 127 | +<share_box id="share"></share_box> |
packageB/pages/zuhegou/list/list.wxss
0 → 100644
| 1 | + page{ | ||
| 2 | + background: #eee; | ||
| 3 | + color: #333; | ||
| 4 | + } | ||
| 5 | + .body_frame{ | ||
| 6 | + /* width: 100%; | ||
| 7 | + height: 100%; */ | ||
| 8 | + | ||
| 9 | + } | ||
| 10 | +.xc-top-img{ | ||
| 11 | + width: 100%; | ||
| 12 | + height: 333rpx; | ||
| 13 | + margin-top: 5rpx; | ||
| 14 | +} | ||
| 15 | +.kill-list{ | ||
| 16 | + /* height: 807rpx; */ | ||
| 17 | + /* overflow-y: scroll; */ | ||
| 18 | + padding: 10rpx 20rpx; | ||
| 19 | +} | ||
| 20 | +.seckill_list{ | ||
| 21 | +/* margin-top: -10rpx; | ||
| 22 | +left: 2%; */ | ||
| 23 | +} | ||
| 24 | +.seckill{ | ||
| 25 | + width: 95%; | ||
| 26 | +margin: auto; | ||
| 27 | + | ||
| 28 | +} | ||
| 29 | +.kill-time { | ||
| 30 | + text-align: center; | ||
| 31 | + justify-content: space-around; | ||
| 32 | + align-items: center; | ||
| 33 | + height: 101rpx; | ||
| 34 | + border-bottom: 1px solid #ddd; | ||
| 35 | + border-top: 1px solid #ddd; | ||
| 36 | + background-color: #f6f6f6; | ||
| 37 | +} | ||
| 38 | +.kill-time .theader{ | ||
| 39 | + display: flex; margin: 0 auto; align-items: center; | ||
| 40 | + height: 100rpx; | ||
| 41 | + | ||
| 42 | +} | ||
| 43 | +.kill-time .theader .timeac { | ||
| 44 | + font-size: 32rpx; height:100%; width: 50%; | ||
| 45 | + color: #333; background-color: #fff; | ||
| 46 | + | ||
| 47 | +} | ||
| 48 | +/* .kill-time .theader .timeac.left{border-top-left-radius: 86rpx; border-bottom-left-radius: 86rpx;} | ||
| 49 | +.kill-time .theader .timeac.right{border-top-right-radius: 86rpx; border-bottom-right-radius: 86rpx;} */ | ||
| 50 | +.kill-time .theader .timeac.active{color: #c4182e} | ||
| 51 | + | ||
| 52 | +.kill-item { | ||
| 53 | + display: flex; | ||
| 54 | + justify-content: space-between; | ||
| 55 | + background-color: #fff; | ||
| 56 | + padding: 20rpx; | ||
| 57 | + margin-bottom: 20rpx; | ||
| 58 | + border-radius: 10rpx; | ||
| 59 | + /* height: 249rpx; */ | ||
| 60 | + align-items: center; | ||
| 61 | +} | ||
| 62 | + | ||
| 63 | +.kill-pic { | ||
| 64 | + width: 215rpx; | ||
| 65 | + height: 215rpx; | ||
| 66 | +} | ||
| 67 | + | ||
| 68 | +.kill-cont { | ||
| 69 | + width: 465rpx; | ||
| 70 | + margin-left:20rpx; | ||
| 71 | + margin-right: 5rpx; | ||
| 72 | +} | ||
| 73 | + | ||
| 74 | +.goods-name { | ||
| 75 | + /* height: 60rpx; */ | ||
| 76 | + font-size: 27rpx; | ||
| 77 | + color: #555; | ||
| 78 | + line-height: 1.4; | ||
| 79 | + | ||
| 80 | +} | ||
| 81 | + | ||
| 82 | +.goods-num { | ||
| 83 | + padding-top: 10rpx; | ||
| 84 | + display: flex; | ||
| 85 | + justify-content: space-between; | ||
| 86 | + line-height: 42rpx; | ||
| 87 | + font-size: 24rpx; | ||
| 88 | + color: #999; | ||
| 89 | +} | ||
| 90 | + | ||
| 91 | +.goods-num .co-red { | ||
| 92 | + font-size: 30rpx; | ||
| 93 | + font-weight: bold; | ||
| 94 | +} | ||
| 95 | + | ||
| 96 | +.underline { | ||
| 97 | + text-decoration: line-through; | ||
| 98 | + color:#999999; font-size: 20rpx; | ||
| 99 | + margin-left: 10rpx; | ||
| 100 | + line-height: 30rpx; | ||
| 101 | +} | ||
| 102 | + | ||
| 103 | +.kill-btn { | ||
| 104 | + text-align: right; | ||
| 105 | + display: flex; | ||
| 106 | +height: 100%; | ||
| 107 | +align-items: flex-end; | ||
| 108 | +padding-top: 4rpx; | ||
| 109 | + | ||
| 110 | +} | ||
| 111 | + | ||
| 112 | +.kill-btn>navigator { | ||
| 113 | + padding: 0 20rpx; | ||
| 114 | + background: #e23245; | ||
| 115 | + color: #fff; | ||
| 116 | + border-radius: 20rpx; | ||
| 117 | + margin-top: 37px; | ||
| 118 | + | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | +.kill-btn .gray { | ||
| 122 | + background-color: #555; | ||
| 123 | +} | ||
| 124 | + | ||
| 125 | +.no-more { | ||
| 126 | + font-size: 30rpx; | ||
| 127 | + line-height: 2; | ||
| 128 | + text-align: center; | ||
| 129 | + color: #333; | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | +.kill-btn>navigator.huise{background-color: #999;} | ||
| 133 | +.xc-seckill-bottom { | ||
| 134 | + position: fixed; | ||
| 135 | + bottom: 0; | ||
| 136 | + width: 100%; | ||
| 137 | +} | ||
| 138 | +.xc-bottom{ | ||
| 139 | + width: 45rpx; | ||
| 140 | + height: 45rpx; | ||
| 141 | + margin-right: 13rpx; | ||
| 142 | +} | ||
| 143 | +.xc-border-right{ | ||
| 144 | + border-right: 4rpx solid #eee; | ||
| 145 | + | ||
| 146 | +} | ||
| 147 | +.ml10{ | ||
| 148 | +margin-left: 45rpx; | ||
| 149 | +} | ||
| 150 | +.total{ | ||
| 151 | + width:215rpx;height:26rpx;border-radius:20rpx; | ||
| 152 | + background: #ffe3e2; | ||
| 153 | +} | ||
| 154 | +.xc-buttom-money{ | ||
| 155 | + align-items: baseline; | ||
| 156 | + padding-top: 10rpx; | ||
| 157 | +} | ||
| 158 | + | ||
| 159 | +.xc-miaosha{ | ||
| 160 | +width: 68rpx; | ||
| 161 | +height: 40rpx; | ||
| 162 | + | ||
| 163 | +} | ||
| 164 | +.xc-strip-frame{ | ||
| 165 | + width:440rpx;margin-top: 10rpx; | ||
| 166 | +} | ||
| 167 | +.xc-strip-blank{ | ||
| 168 | + width:180rpx; | ||
| 169 | +height: 26rpx; | ||
| 170 | +} | ||
| 171 | +.xc-fill{ | ||
| 172 | +border-radius:20rpx;height:26rpx; | ||
| 173 | +} | ||
| 174 | +.xc-fill-text{ | ||
| 175 | + left:34%; | ||
| 176 | + line-height: 26rpx; | ||
| 177 | + | ||
| 178 | +} | ||
| 0 | \ No newline at end of file | 179 | \ No newline at end of file |
packageC/pages/presell/list/list.wxml
pages/goods/goodsInfo/goodsInfo.js
pages/goods/goodsList/goodsList.js
| @@ -67,11 +67,19 @@ Page({ | @@ -67,11 +67,19 @@ Page({ | ||
| 67 | 67 | ||
| 68 | if (0 != t.is_new && t.is_new != undefined) { url += "&is_new=" + t.is_new; } | 68 | if (0 != t.is_new && t.is_new != undefined) { url += "&is_new=" + t.is_new; } |
| 69 | if (0 != t.is_hot && t.is_hot != undefined) { url += "&is_hot=" + t.is_hot; } | 69 | if (0 != t.is_hot && t.is_hot != undefined) { url += "&is_hot=" + t.is_hot; } |
| 70 | + | ||
| 71 | + | ||
| 72 | + // 优惠促销列表 | ||
| 73 | + if(t.prom_goods_id) { | ||
| 74 | + url += '&prom_goods_id=' + t.prom_goods_id; | ||
| 75 | + }; | ||
| 70 | 76 | ||
| 71 | - if(getApp().globalData.userInfo){ | 77 | + |
| 78 | + if(getApp().globalData.userInfo) { | ||
| 72 | url += "&user_id=" + getApp().globalData.userInfo.user_id; | 79 | url += "&user_id=" + getApp().globalData.userInfo.user_id; |
| 73 | } | 80 | } |
| 74 | 81 | ||
| 82 | + | ||
| 75 | //优惠活动的凑单 | 83 | //优惠活动的凑单 |
| 76 | if(t.prom_type==3){ | 84 | if(t.prom_type==3){ |
| 77 | if (0 != t.prom_id && t.prom_id != undefined) { url += "&prom_id=" + t.prom_id; } | 85 | if (0 != t.prom_id && t.prom_id != undefined) { url += "&prom_id=" + t.prom_id; } |
| @@ -129,7 +137,7 @@ Page({ | @@ -129,7 +137,7 @@ Page({ | ||
| 129 | arr[i].content=content; | 137 | arr[i].content=content; |
| 130 | 138 | ||
| 131 | //--送礼包-- | 139 | //--送礼包-- |
| 132 | - if(content.is_libao) { | 140 | + if(parseInt(content.is_libao)) { |
| 133 | //-- 获取 -- | 141 | //-- 获取 -- |
| 134 | await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, { | 142 | await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, { |
| 135 | }).then(res => { | 143 | }).then(res => { |
| @@ -138,7 +146,7 @@ Page({ | @@ -138,7 +146,7 @@ Page({ | ||
| 138 | }) | 146 | }) |
| 139 | } | 147 | } |
| 140 | //--送赠品-- | 148 | //--送赠品-- |
| 141 | - if(content.is_gift) { | 149 | + if(parseInt(content.is_gift)) { |
| 142 | //-- 获取 -- | 150 | //-- 获取 -- |
| 143 | await getApp().request.promiseGet("/api/weshop/prom/gift/page?id="+content.gift+"&store_id="+oo.stoid, { | 151 | await getApp().request.promiseGet("/api/weshop/prom/gift/page?id="+content.gift+"&store_id="+oo.stoid, { |
| 144 | }).then(res => { | 152 | }).then(res => { |
| @@ -251,6 +259,8 @@ Page({ | @@ -251,6 +259,8 @@ Page({ | ||
| 251 | } | 259 | } |
| 252 | }, | 260 | }, |
| 253 | 261 | ||
| 262 | + | ||
| 263 | + | ||
| 254 | //--- 获取卡类列表 --- | 264 | //--- 获取卡类列表 --- |
| 255 | getPlusCardType: function (func) { | 265 | getPlusCardType: function (func) { |
| 256 | var storid = oo.stoid; | 266 | var storid = oo.stoid; |
pages/goods/goodsList/goodsList.wxml
| @@ -4,12 +4,12 @@ | @@ -4,12 +4,12 @@ | ||
| 4 | <block wx:for="{{prom_goods_list}}"> | 4 | <block wx:for="{{prom_goods_list}}"> |
| 5 | <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx"> | 5 | <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx"> |
| 6 | 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text> | 6 | 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text> |
| 7 | - <text space="{{true}}" wx:if="{{item.content.is_money}}">减{{item.content.money}}元 </text> | ||
| 8 | - <text space="{{true}}" wx:if="{{item.content.is_sale}}">打{{item.content.sale}}折 </text> | ||
| 9 | - <text space="{{true}}" wx:if="{{item.content.is_int}}">送{{item.content.int}}积分 </text> | ||
| 10 | - <text space="{{true}}" wx:if="{{item.content.is_coupon}}">送{{item.content.coupon}}元优惠券 </text> | ||
| 11 | - <text space="{{true}}" wx:if="{{item.content.is_gift}}">送{{item.content.gift_name}} </text> | ||
| 12 | - <text space="{{true}}" wx:if="{{item.content.is_libao}}">送{{item.content.lb_name}} </text> | 7 | + <text space="{{true}}" wx:if="{{item.content.is_money && item.content.is_money!='0'}}">减{{item.content.money}}元 </text> |
| 8 | + <text space="{{true}}" wx:if="{{item.content.is_sale && item.content.is_sale!='0'}}">打{{item.content.sale}}折 </text> | ||
| 9 | + <text space="{{true}}" wx:if="{{item.content.is_int && item.content.is_int!='0'}}">送{{item.content.int}}积分 </text> | ||
| 10 | + <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon}}元优惠券 </text> | ||
| 11 | + <text space="{{true}}" wx:if="{{item.content.is_gift && item.content.is_gift!='0'}}">送{{item.content.gift_name}} </text> | ||
| 12 | + <text space="{{true}}" wx:if="{{item.content.is_libao && item.content.is_libao!='0'}}">送{{item.content.lb_name}} </text> | ||
| 13 | </view> | 13 | </view> |
| 14 | </block> | 14 | </block> |
| 15 | </view> | 15 | </view> |