Commit 9885da4bebe0e0c8add4f709cd21fb128fa6c8f8
1 parent
3b3e94a8
oa 4单
Showing
7 changed files
with
1242 additions
and
1236 deletions
components/diy_goodsGroup/diy_goodsGroup.js
| 1 | var t = getApp(), | 1 | var t = getApp(), |
| 2 | - a = t.request, | ||
| 3 | - o = t.globalData.setting, | ||
| 4 | - os = o, | ||
| 5 | - i = require("../../utils/util.js"), | ||
| 6 | - ut = i, | ||
| 7 | - s = require("../../utils/common.js"); | 2 | + a = t.request, |
| 3 | + o = t.globalData.setting, | ||
| 4 | + os = o, | ||
| 5 | + i = require("../../utils/util.js"), | ||
| 6 | + ut = i, | ||
| 7 | + s = require("../../utils/common.js"); | ||
| 8 | var regeneratorRuntime = require('../../utils/runtime.js'); | 8 | var regeneratorRuntime = require('../../utils/runtime.js'); |
| 9 | 9 | ||
| 10 | Component({ | 10 | Component({ |
| 11 | - properties: { | ||
| 12 | - // 这里定义了innerText属性,属性值可以在组件使用时指定 | ||
| 13 | - object: { | ||
| 14 | - type: Object, | ||
| 15 | - value: null, | ||
| 16 | - }, | ||
| 17 | - | ||
| 18 | - }, | ||
| 19 | - data: { | ||
| 20 | - // 这里是一些组件内部数据 | ||
| 21 | - group: false, | ||
| 22 | - imghost: o.imghost, | ||
| 23 | - is_recommend: 0, | ||
| 24 | - is_hot: 0, | ||
| 25 | - is_new: 0, | ||
| 26 | - baseUrl: "/api/weshop/goods/page", | ||
| 27 | - resourceUrl: t.globalData.setting.resourceUrl, | ||
| 28 | - url: t.globalData.setting.imghost, | ||
| 29 | - currentPage: 1, | ||
| 30 | - requestData: null, | ||
| 31 | - requestUrl: "", | ||
| 32 | - goods_array: null, | ||
| 33 | - total: null, | ||
| 34 | - prom_id: 0, | ||
| 35 | - classstyle_id: null, | ||
| 36 | - g_id: null, | ||
| 37 | - wgroup: null, | ||
| 38 | - goods_btn: null, | ||
| 39 | - loadText: '加载更多', | ||
| 40 | - someData: {}, | ||
| 41 | - goodscount: null, | ||
| 42 | - firist_type_data: null, | ||
| 43 | - firist_type_curr: 0, | ||
| 44 | - is_nav:0, | ||
| 45 | - nav_list:null, | ||
| 46 | - title_index:0, | ||
| 47 | - swiper_hei:0, | ||
| 48 | - title_class:"", | ||
| 49 | - }, | ||
| 50 | - | ||
| 51 | - ready: function () {}, | ||
| 52 | - | ||
| 53 | - lifetimes: { | ||
| 54 | - attached: function() { | ||
| 55 | - | ||
| 56 | - | ||
| 57 | - //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法 | ||
| 58 | - var nav_item=this.data.object; | ||
| 59 | - var nav_list= this.data.object.nav_list; | ||
| 60 | - | ||
| 61 | - if(parseInt(nav_item.is_automore)){ | ||
| 62 | - if(!getApp().globalData.func_list) getApp().globalData.func_list=[]; | ||
| 63 | - getApp().globalData.func_list.push(this); | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - | ||
| 67 | - //最新的版本才有nav_list | ||
| 68 | - if(nav_list){ | ||
| 69 | - nav_item=nav_list[0]; | ||
| 70 | - //要算一下商品goodsid | ||
| 71 | - for(var ij in nav_list){ | ||
| 72 | - var item=nav_list[ij]; | ||
| 73 | - var idlist=""; | ||
| 74 | - //如果商品有手动选择的时候 | ||
| 75 | - if(item.data && item.data.length>0){ | ||
| 76 | - for(var im in item.data){ | ||
| 77 | - idlist+= item.data[im]+","; | ||
| 78 | - } | ||
| 79 | - } | ||
| 80 | - if(idlist) idlist=ut.sub_last(idlist); | ||
| 81 | - nav_list[ij].idlist=idlist; | ||
| 82 | - } | ||
| 83 | - this.setData({nav_list:nav_list,is_nav:parseInt(this.data.object.is_nav)}); | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - // 在组件实例进入页面节点树时执行 | ||
| 87 | - if(nav_item) { | ||
| 88 | - this.data.classstyle_id = nav_item.classstyle; | ||
| 89 | - this.data.wgroup =nav_item.wgroup; | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | - this.data.goodscount = this.data.object.goodscount; | ||
| 93 | - | ||
| 94 | - | ||
| 95 | - var hei=280; | ||
| 96 | - if(this.data.object.goodstit) hei+=80; | ||
| 97 | - if(this.data.object.goodsprice) hei+=80; | ||
| 98 | - if(this.data.object.goodsnum) hei+=80; | ||
| 99 | - | ||
| 100 | - if(this.data.object.title_color){ | ||
| 101 | - this.data.title_class=`color:${this.data.object.title_color};` | ||
| 102 | - } | 11 | + properties: { |
| 12 | + // 这里定义了innerText属性,属性值可以在组件使用时指定 | ||
| 13 | + object: { | ||
| 14 | + type: Object, | ||
| 15 | + value: null, | ||
| 16 | + }, | ||
| 103 | 17 | ||
| 104 | - if(this.data.object.title_font_size){ | ||
| 105 | - this.data.title_class=this.data.title_class.concat(`font-size:${this.data.object.title_font_size}px;`) | ||
| 106 | - } | ||
| 107 | - this.setData({ | ||
| 108 | - swiper_hei:hei, | ||
| 109 | - title_class:this.data.title_class, | ||
| 110 | - }); | ||
| 111 | - | ||
| 112 | - if (nav_item && nav_item.goodsclass == 1) { | ||
| 113 | - this.data.is_recommend = 1 | ||
| 114 | - } | ||
| 115 | - if (nav_item && nav_item.goodsclass == 2) { | ||
| 116 | - this.data.is_hot = 1 | ||
| 117 | - } | ||
| 118 | - if (nav_item && nav_item.goodsclass == 3) { | ||
| 119 | - this.data.is_new = 1 | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | - this.data.requestData = new Array(); | ||
| 123 | - this.data.g_id = nav_item.data; | ||
| 124 | - var arr = []; | ||
| 125 | - | ||
| 126 | - for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { | ||
| 127 | - arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); | ||
| 128 | - } | ||
| 129 | - this.data.firist_type_data = arr; | ||
| 130 | - this.init(this.data.classstyle_id, this.data.wgroup); | ||
| 131 | - }, | ||
| 132 | - detached: function() { | ||
| 133 | - // 在组件实例被从页面节点树移除时执行 | ||
| 134 | - }, | ||
| 135 | - }, | ||
| 136 | - | ||
| 137 | - pageLifetimes: { | ||
| 138 | - //游客登录后,只要更新卡的情况 | ||
| 139 | - show: function () { | ||
| 140 | - //--初始化卡类-- | ||
| 141 | - this.card_init(); | ||
| 142 | - }, | ||
| 143 | - }, | ||
| 144 | - | ||
| 145 | - methods: { | ||
| 146 | - // 这里是一个自定义方法 | ||
| 147 | - init:async function (classstyle_id, wgroup) { | ||
| 148 | - | ||
| 149 | - this.setData({classstyle_id:classstyle_id}) | ||
| 150 | - | ||
| 151 | - var th = this; | ||
| 152 | - var g_id = this.data.g_id; | ||
| 153 | - var len=this.data.firist_type_data.length; | ||
| 154 | - if (classstyle_id == 1) { | ||
| 155 | - //---手动选择的时候--- | ||
| 156 | - g_id = this.data.firist_type_data[th.data.firist_type_curr]; | ||
| 157 | - th.data.firist_type_curr++; | ||
| 158 | - } | ||
| 159 | - | ||
| 160 | - var th = this, | ||
| 161 | - app = getApp(), | ||
| 162 | - index = 0, | ||
| 163 | - gdata = []; | ||
| 164 | - | ||
| 165 | - var user_id=getApp().globalData.user_id; | ||
| 166 | - if(!user_id) user_id=0; | ||
| 167 | - | ||
| 168 | - //--初始化卡类-- | ||
| 169 | - th.card_init(); | ||
| 170 | - var os=getApp().globalData.setting; | ||
| 171 | - classstyle_id = classstyle_id + ""; | ||
| 172 | - switch (classstyle_id) { | ||
| 173 | - //---手动选择商品--- | ||
| 174 | - case "1": | ||
| 175 | - var str=""; | ||
| 176 | - for (var i = 0; i < g_id.length; i++) { | ||
| 177 | - str += g_id[i].goodsid + ","; | ||
| 178 | - } | ||
| 179 | - str=str.substring(0, str.length - 1); | ||
| 180 | - | ||
| 181 | - await app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, { | ||
| 182 | - data:{user_id:user_id}, | ||
| 183 | - isShowLoading:false, | ||
| 184 | - success: function(res) { | ||
| 185 | - th.data.loading=0; | ||
| 186 | - | ||
| 187 | - if(res.data.code==0 && res.data.data){ | ||
| 188 | - | ||
| 189 | - var goods = res.data.data; | ||
| 190 | - /*-- | ||
| 191 | - var rData = th.data.requestData; | ||
| 192 | - if (rData == null) rData=[]; | ||
| 193 | - var now=ut.gettimestamp(); | ||
| 194 | - | ||
| 195 | - var new_arr=[]; | ||
| 196 | - for (var ii in res.data.data){ | ||
| 197 | - var item=res.data.data[ii]; | ||
| 198 | - item.goods_img=th.data.imghost + item.original_img; | ||
| 199 | - if(item.e_time<now) {item.prom_type=0; item.prom_price=0;} | ||
| 200 | - if(item.warm_uptime>now) {item.prom_type=0; item.prom_price=0;} | ||
| 201 | - new_arr.push(item); | ||
| 202 | - } | ||
| 203 | - rData = rData.concat(new_arr); | ||
| 204 | - | ||
| 205 | - th.data.requestData = rData; | ||
| 206 | - | ||
| 207 | - if(th.data.object.column==5){ | ||
| 208 | - var arr = new Array(); | ||
| 209 | - //--三个三个一组--- | ||
| 210 | - for(var i=0;i< rData.length;i+=3){ | ||
| 211 | - arr.push(rData.slice(i,i+3)); | ||
| 212 | - } | ||
| 213 | - th.setData({ goods_array: arr }); | ||
| 214 | - }else{ | ||
| 215 | - th.setData({ goods_array: rData }); | ||
| 216 | - }--*/ | ||
| 217 | - | ||
| 218 | - th.set_good(goods); | ||
| 219 | - | ||
| 220 | - //---控制有没有加载更多的按钮--- | ||
| 221 | - if (th.data.firist_type_curr >= len) {th.setData({ goods_btn: [] }); } | ||
| 222 | - else th.setData({ goods_btn: [1,2]}); | 18 | + }, |
| 19 | + data: { | ||
| 20 | + // 这里是一些组件内部数据 | ||
| 21 | + group: false, | ||
| 22 | + imghost: o.imghost, | ||
| 23 | + is_recommend: 0, | ||
| 24 | + is_hot: 0, | ||
| 25 | + is_new: 0, | ||
| 26 | + baseUrl: "/api/weshop/goods/page", | ||
| 27 | + resourceUrl: t.globalData.setting.resourceUrl, | ||
| 28 | + url: t.globalData.setting.imghost, | ||
| 29 | + currentPage: 1, | ||
| 30 | + requestData: null, | ||
| 31 | + requestUrl: "", | ||
| 32 | + goods_array: null, | ||
| 33 | + total: null, | ||
| 34 | + prom_id: 0, | ||
| 35 | + classstyle_id: null, | ||
| 36 | + g_id: null, | ||
| 37 | + wgroup: null, | ||
| 38 | + goods_btn: null, | ||
| 39 | + loadText: '加载更多', | ||
| 40 | + someData: {}, | ||
| 41 | + goodscount: null, | ||
| 42 | + firist_type_data: null, | ||
| 43 | + firist_type_curr: 0, | ||
| 44 | + is_nav: 0, | ||
| 45 | + nav_list: null, | ||
| 46 | + title_index: 0, | ||
| 47 | + swiper_hei: 0, | ||
| 48 | + title_class: "", | ||
| 49 | + }, | ||
| 50 | + | ||
| 51 | + ready: function () { }, | ||
| 52 | + | ||
| 53 | + lifetimes: { | ||
| 54 | + attached: function () { | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + //要兼容性的写法,因为有些商家都还未更新商品分组的最新的效果~~3.0公众号的html页面所以不用兼容写法 | ||
| 58 | + var nav_item = this.data.object; | ||
| 59 | + var nav_list = this.data.object.nav_list; | ||
| 60 | + | ||
| 61 | + if (parseInt(nav_item.is_automore)) { | ||
| 62 | + if (!getApp().globalData.func_list) getApp().globalData.func_list = []; | ||
| 63 | + getApp().globalData.func_list.push(this); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + //最新的版本才有nav_list | ||
| 68 | + if (nav_list) { | ||
| 69 | + nav_item = nav_list[0]; | ||
| 70 | + //要算一下商品goodsid | ||
| 71 | + for (var ij in nav_list) { | ||
| 72 | + var item = nav_list[ij]; | ||
| 73 | + var idlist = ""; | ||
| 74 | + //如果商品有手动选择的时候 | ||
| 75 | + if (item.data && item.data.length > 0) { | ||
| 76 | + for (var im in item.data) { | ||
| 77 | + idlist += item.data[im] + ","; | ||
| 78 | + } | ||
| 223 | } | 79 | } |
| 80 | + if (idlist) idlist = ut.sub_last(idlist); | ||
| 81 | + nav_list[ij].idlist = idlist; | ||
| 224 | } | 82 | } |
| 225 | - | ||
| 226 | - }) | ||
| 227 | - | ||
| 228 | - break; | ||
| 229 | - case "2": | ||
| 230 | - var item = {}; | ||
| 231 | - var r_data={ | ||
| 232 | - store_id: os.stoid , | ||
| 233 | - pageSize: th.data.goodscount, | ||
| 234 | - page: th.data.currentPage, | ||
| 235 | - isonsale: 1, | ||
| 236 | - orderField: "sort", | ||
| 237 | - orderType: 'asc', | ||
| 238 | - }; | ||
| 239 | - if(th.data.is_recommend) r_data.is_recommend=th.data.is_recommend; | ||
| 240 | - if(th.data.is_hot) r_data.is_hot=th.data.is_hot; | ||
| 241 | - if(th.data.is_new) r_data.is_new=th.data.is_new; | ||
| 242 | - | ||
| 243 | - var user_id=getApp().globalData.user_id; | ||
| 244 | - if(!user_id) user_id=0; | ||
| 245 | - r_data.user_id=user_id; | ||
| 246 | - | ||
| 247 | - await app.request.promiseGet("/api/weshop/goods/page", { | ||
| 248 | - data:r_data | ||
| 249 | - }).then(res => { | ||
| 250 | - th.data.loading=0; | ||
| 251 | - //商品地址 | ||
| 252 | - var goods = res.data.data.pageData; | ||
| 253 | - th.setData({ | ||
| 254 | - goods_btn: res.data.data.pageData, | ||
| 255 | - total: res.data.data.total | ||
| 256 | - }) | ||
| 257 | - th.data.currentPage++; | ||
| 258 | - //设置商品熏染 | ||
| 259 | - th.set_good(goods); | ||
| 260 | - | ||
| 261 | - }) | ||
| 262 | - break; | ||
| 263 | - case "3": | ||
| 264 | - var item = {}; | ||
| 265 | - await app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", { | ||
| 266 | - data: { | ||
| 267 | - store_id:os.stoid , | ||
| 268 | - gpid: wgroup, | ||
| 269 | - pageSize: th.data.goodscount, | ||
| 270 | - page: th.data.currentPage, | ||
| 271 | - isonsale: 1, | ||
| 272 | - orderField: "sort", | ||
| 273 | - orderType: 'asc', | ||
| 274 | - user_id:user_id | ||
| 275 | - } | ||
| 276 | - }).then(res => { | ||
| 277 | - th.data.loading=0; | ||
| 278 | - //商品地址 | ||
| 279 | - var goods = res.data.data.pageData; | ||
| 280 | - th.setData({ | ||
| 281 | - goods_btn: res.data.data.pageData, total: res.data.data.total | ||
| 282 | - }) | ||
| 283 | - | ||
| 284 | - th.data.currentPage++; | ||
| 285 | - //设置商品熏染 | ||
| 286 | - th.set_good(goods); | ||
| 287 | - | ||
| 288 | - }) | ||
| 289 | - break; | ||
| 290 | - } | ||
| 291 | - }, | ||
| 292 | - | ||
| 293 | - setLoading: function () { | ||
| 294 | - var that = this; | ||
| 295 | - if(this.data.loading) return false; | ||
| 296 | - this.data.loading=1; | ||
| 297 | - that.init(that.data.classstyle_id, that.data.wgroup); | ||
| 298 | - }, | ||
| 299 | - | ||
| 300 | - //图片失败,默认图片 | ||
| 301 | - bind_bnerr3: function (e) { | ||
| 302 | - var _errImg = e.target.dataset.errorimg; | ||
| 303 | - var _errObj = {}; | ||
| 304 | - _errObj[_errImg] = this.data.imghost + "/public/images/default_goods_image_240.gif"; | ||
| 305 | - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 306 | - }, | ||
| 307 | - | ||
| 308 | - //---卡的初始化---- | ||
| 309 | - card_init: function() { | ||
| 310 | - var th = this,os=getApp().globalData.setting; | ||
| 311 | - if(!getApp().globalData.user_id) return false; | ||
| 312 | - getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | ||
| 313 | - isShowLoading:false, | ||
| 314 | - success: function(e) { | ||
| 315 | - getApp().globalData.userInfo = e.data.data; | ||
| 316 | - getApp().getConfig2(function(e) { | ||
| 317 | - var swithc_list = e.switch_list; | ||
| 318 | - var sw_arr = JSON.parse(swithc_list); | ||
| 319 | - //---如果后台又开等级卡的开关--- | ||
| 320 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
| 321 | - th.setData({ | ||
| 322 | - rank_switch: true | ||
| 323 | - }); | ||
| 324 | - //---回调卡的列表--- | ||
| 325 | - th.getPlusCardType(function(ob) { | ||
| 326 | - th.setData({ | ||
| 327 | - card_list: ob.card_list | ||
| 328 | - }); | ||
| 329 | - var ti = setInterval(function() { | ||
| 330 | - var user = getApp().globalData.userInfo; | ||
| 331 | - if (!user) return false; | ||
| 332 | - clearInterval(ti); | ||
| 333 | - | ||
| 334 | - if (user.card_field && user['card_expiredate']) { | ||
| 335 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 336 | - var end = new Date(str); | ||
| 337 | - end = Date.parse(end) / 1000; | ||
| 338 | - var now = ut.gettimestamp(); | ||
| 339 | - | ||
| 340 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
| 341 | - if (user.card_field && now < end) { | ||
| 342 | - var card_name = ob.name_map.get(user.card_field); | ||
| 343 | - if (card_name.length > 4) card_name = card_name.substring(0, 4); | ||
| 344 | - th.setData({ | ||
| 345 | - card_field: user.card_field, | ||
| 346 | - card_name: card_name, | ||
| 347 | - card_list: ob.card_list | ||
| 348 | - }); | ||
| 349 | - } | ||
| 350 | - | ||
| 351 | - } | ||
| 352 | - | ||
| 353 | - }, 500) | ||
| 354 | - }) | ||
| 355 | - | ||
| 356 | - } | ||
| 357 | - }) | ||
| 358 | - } | ||
| 359 | - }) | ||
| 360 | - | ||
| 361 | - }, | ||
| 362 | - | ||
| 363 | - //--- 获取卡类列表 --- | ||
| 364 | - getPlusCardType: function(func) { | ||
| 365 | - var storid = o.stoid; | ||
| 366 | - var th = this; | ||
| 367 | - getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
| 368 | - var plusCard = res.data.data; | ||
| 369 | - var arr = [1219, 2089, 3031]; | ||
| 370 | - var new_arr = new Array(); | ||
| 371 | - var card_name_map = new Map(); | ||
| 372 | - | ||
| 373 | - var user = getApp().globalData.userInfo; | ||
| 374 | - | ||
| 375 | - if(plusCard) { | ||
| 376 | - | ||
| 377 | - for (var i = 0; i < plusCard.length; i++) { | ||
| 378 | - if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) { | ||
| 379 | - continue; | ||
| 380 | - } | ||
| 381 | - | ||
| 382 | - var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | ||
| 383 | - card_name_map.set(name, plusCard[i].CardName); | ||
| 384 | - new_arr.push(plusCard[i]); | 83 | + this.setData({ nav_list: nav_list, is_nav: parseInt(this.data.object.is_nav) }); |
| 385 | } | 84 | } |
| 386 | - } | ||
| 387 | - | ||
| 388 | - var ob = { | ||
| 389 | - "card_list": new_arr, | ||
| 390 | - "name_map": card_name_map | ||
| 391 | - }; | ||
| 392 | - func(ob); | ||
| 393 | - }) | 85 | + |
| 86 | + // 在组件实例进入页面节点树时执行 | ||
| 87 | + if (nav_item) { | ||
| 88 | + this.data.classstyle_id = nav_item.classstyle; | ||
| 89 | + this.data.wgroup = nav_item.wgroup; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + this.data.goodscount = this.data.object.goodscount; | ||
| 93 | + | ||
| 94 | + | ||
| 95 | + var hei = 280; | ||
| 96 | + if (this.data.object.goodstit) hei += 80; | ||
| 97 | + if (this.data.object.goodsprice) hei += 80; | ||
| 98 | + if (this.data.object.goodsnum) hei += 80; | ||
| 99 | + | ||
| 100 | + if (this.data.object.title_color) { | ||
| 101 | + this.data.title_class = `color:${this.data.object.title_color};` | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + if (this.data.object.title_font_size) { | ||
| 105 | + this.data.title_class = this.data.title_class.concat(`font-size:${this.data.object.title_font_size}px;`) | ||
| 106 | + } | ||
| 107 | + if (this.data.object.bg_color) { | ||
| 108 | + this.setData({ | ||
| 109 | + bg_color:this.data.object.bg_color, | ||
| 110 | + }) | ||
| 111 | + } | ||
| 112 | + this.setData({ | ||
| 113 | + swiper_hei: hei, | ||
| 114 | + title_class: this.data.title_class, | ||
| 115 | + }); | ||
| 116 | + | ||
| 117 | + if (nav_item && nav_item.goodsclass == 1) { | ||
| 118 | + this.data.is_recommend = 1 | ||
| 119 | + } | ||
| 120 | + if (nav_item && nav_item.goodsclass == 2) { | ||
| 121 | + this.data.is_hot = 1 | ||
| 122 | + } | ||
| 123 | + if (nav_item && nav_item.goodsclass == 3) { | ||
| 124 | + this.data.is_new = 1 | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + this.data.requestData = new Array(); | ||
| 128 | + this.data.g_id = nav_item.data; | ||
| 129 | + var arr = []; | ||
| 130 | + | ||
| 131 | + for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { | ||
| 132 | + arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); | ||
| 133 | + } | ||
| 134 | + this.data.firist_type_data = arr; | ||
| 135 | + this.init(this.data.classstyle_id, this.data.wgroup); | ||
| 136 | + }, | ||
| 137 | + detached: function () { | ||
| 138 | + // 在组件实例被从页面节点树移除时执行 | ||
| 139 | + }, | ||
| 394 | }, | 140 | }, |
| 395 | - | ||
| 396 | - //--- 点击tab的事件 --- | ||
| 397 | - gr_set_nav:function(e){ | ||
| 398 | - | ||
| 399 | - var title_idx=e.currentTarget.dataset.index; | ||
| 400 | - if(title_idx==this.data.title_index) return false; | ||
| 401 | - wx.showLoading(); | ||
| 402 | - | ||
| 403 | - var nav_item=this.data.object.nav_list[title_idx]; | ||
| 404 | - this.data.g_id =[]; | ||
| 405 | - if(this.data.object.nav_list && this.data.object.nav_list[title_idx] && this.data.object.nav_list[title_idx].data) | ||
| 406 | - this.data.g_id=this.data.object.nav_list[title_idx].data; | ||
| 407 | - var arr = []; | ||
| 408 | - for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { | ||
| 409 | - arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); | ||
| 410 | - } | ||
| 411 | - this.data.firist_type_data = arr; | ||
| 412 | - this.data.firist_type_curr=0; | ||
| 413 | - this.data.requestData=[]; | ||
| 414 | - | ||
| 415 | - // 在组件实例进入页面节点树时执行 | ||
| 416 | - if(nav_item){ | ||
| 417 | - this.data.classstyle_id = nav_item.classstyle; | ||
| 418 | - this.data.wgroup =nav_item.wgroup; | ||
| 419 | - } | ||
| 420 | - | ||
| 421 | - | ||
| 422 | - this.data.is_recommend = this.data.is_hot=this.data.is_new=0; | ||
| 423 | - //推荐,热卖,新品 | ||
| 424 | - if (nav_item && nav_item.goodsclass == 1) { | ||
| 425 | - this.data.is_recommend = 1 | ||
| 426 | - } | ||
| 427 | - if (nav_item && nav_item.goodsclass == 2) { | ||
| 428 | - this.data.is_hot = 1 | ||
| 429 | - } | ||
| 430 | - if (nav_item && nav_item.goodsclass == 3) { | ||
| 431 | - this.data.is_new = 1 | ||
| 432 | - } | ||
| 433 | - | ||
| 434 | - | ||
| 435 | - this.data.currentPage=1; | ||
| 436 | - this.setData({goods_array:null,total:null,title_index:title_idx}); | ||
| 437 | - //初始化 | ||
| 438 | - this.init(this.data.classstyle_id, this.data.wgroup); | ||
| 439 | - setTimeout(function(){ wx.hideLoading();},1000) | 141 | + |
| 142 | + pageLifetimes: { | ||
| 143 | + //游客登录后,只要更新卡的情况 | ||
| 144 | + show: function () { | ||
| 145 | + //--初始化卡类-- | ||
| 146 | + this.card_init(); | ||
| 147 | + }, | ||
| 440 | }, | 148 | }, |
| 441 | 149 | ||
| 442 | - //--- 设置 --- | ||
| 443 | - set_good:async function(goods){ | ||
| 444 | - var now=ut.gettimestamp(); | ||
| 445 | - var th=this; | ||
| 446 | - if(!goods || goods.length==0) return false; | ||
| 447 | - var user_id=getApp().globalData.userInfo.user_id; | ||
| 448 | - if(!user_id) user_id=0; | ||
| 449 | - for(var i in goods){ | ||
| 450 | - var val=goods[i]; | ||
| 451 | - var item = {}; | ||
| 452 | - var prom_id = null; | ||
| 453 | - //app.request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + val.goods_id, {}).then(res => { | ||
| 454 | - | ||
| 455 | - var url="/api/weshop/activitylist/getGoodActInfo"; | ||
| 456 | - var req_data={ | ||
| 457 | - store_id:os.stoid,goodsidlist:val.goods_id,is_detail:1,user_id:user_id | ||
| 458 | - }; | ||
| 459 | - | ||
| 460 | - //获取商品的实际活动 | ||
| 461 | - await getApp().request.promiseGet(url, {data:req_data}).then(res=>{ | ||
| 462 | - if(res.data.code==0 && res.data.data && res.data.data.length==1){ | ||
| 463 | - item.prom_type=res.data.data[0].prom_type; | ||
| 464 | - item.prom_id=res.data.data[0].act_id; | ||
| 465 | - } | ||
| 466 | - }) | ||
| 467 | - | ||
| 468 | - item.goods_name = val.goods_name; | ||
| 469 | - item.goods_img = th.data.imghost + val.original_img; | ||
| 470 | - item.market_price = val.market_price; | ||
| 471 | - item.shop_price = val.shop_price; | ||
| 472 | - item.sales_sum = val.sales_sum; | ||
| 473 | - item.goods_id = val.goods_id; | ||
| 474 | - | ||
| 475 | - item.cardprice1 = val.cardprice1; | ||
| 476 | - item.cardprice2 = val.cardprice2; | ||
| 477 | - item.cardprice3 = val.cardprice3; | ||
| 478 | - item.prom_type = val.prom_type; | ||
| 479 | - item.prom_id = val.prom_id; | ||
| 480 | - | ||
| 481 | - if(val.prom_price) item.prom_price = val.prom_price; | ||
| 482 | - if(val.prom_integral) item.prom_integral = val.prom_integral; | ||
| 483 | - | ||
| 484 | - prom_id = val.prom_id; | ||
| 485 | - | ||
| 486 | - var prom_type = val.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购 | ||
| 487 | - | ||
| 488 | - var url = ""; | ||
| 489 | - | ||
| 490 | - switch (prom_type){ | ||
| 491 | - case 1: | ||
| 492 | - var user_id=getApp().globalData.user_id; | ||
| 493 | - if(!user_id) user_id=0; | ||
| 494 | - url = "/api/ms/flash_sale/getNew/" +os.stoid + "/" +user_id+"/"+ prom_id; | ||
| 495 | - break; | ||
| 496 | - case 2: | ||
| 497 | - url ="/api/weshop/goods/groupBuy/getActInfo/" +os.stoid + "/" +val.goods_id+"/"+ prom_id | ||
| 498 | - break; | ||
| 499 | - case 4: | ||
| 500 | - url ="/api/weshop/integralbuy/get/"+os.stoid +"/"+prom_id; | ||
| 501 | - break; | ||
| 502 | - case 6: | ||
| 503 | - url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; | ||
| 504 | - break; | ||
| 505 | - case 8: | ||
| 506 | - var presell_id = prom_id; | ||
| 507 | - var url1 = "/api/weshop/marketing/marketingPresellList/list"; | ||
| 508 | - var rd= { | ||
| 509 | - store_id: os.stoid, | ||
| 510 | - presell_id: presell_id, | ||
| 511 | - goods_id: val.goods_id | ||
| 512 | - } | ||
| 513 | - //------获取预售从表---------- | ||
| 514 | - await getApp().request.promiseGet(url1, { | ||
| 515 | - data: rd | ||
| 516 | - }).then(res => { | ||
| 517 | - if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
| 518 | - var arr = res.data.data[0]; | ||
| 519 | - item.prom_price = arr.luck_goods_price; | ||
| 520 | - item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0); | ||
| 521 | - } | ||
| 522 | - }) | ||
| 523 | - break; | ||
| 524 | - default: | ||
| 525 | - break | ||
| 526 | - } | ||
| 527 | - | ||
| 528 | - if(url!=null && url!=''){ | ||
| 529 | - await getApp().request.promiseGet(url, {}).then(res => { | ||
| 530 | - var prom =null; | ||
| 531 | - if(res && res.data) prom=res.data.data; | ||
| 532 | - if (prom != null && prom.is_end==0 && prom.end_time>now && (prom.start_time<now || (prom.show_time && prom.show_time<now)) ) { | ||
| 533 | - item.prom_price = res.data.data.price; | ||
| 534 | - if(res.data.data.user_price) item.prom_price=res.data.data.user_price; | ||
| 535 | - var vNum=res.data.data.virtual_num?res.data.data.virtual_num:0; | ||
| 536 | - var vNum1=res.data.data.virtualNum?res.data.data.virtualNum:0; | ||
| 537 | - var vNum2=res.data.data.virtual?res.data.data.virtual:0; | ||
| 538 | - item.sales_sum=res.data.data.buy_num+(vNum+vNum1+vNum2); | ||
| 539 | - }else{ | ||
| 540 | - item.prom_type=0; | ||
| 541 | - item.prom_id=0; | ||
| 542 | - item.prom_price=null; | 150 | + methods: { |
| 151 | + // 这里是一个自定义方法 | ||
| 152 | + init: async function (classstyle_id, wgroup) { | ||
| 153 | + | ||
| 154 | + this.setData({ classstyle_id: classstyle_id }) | ||
| 155 | + | ||
| 156 | + var th = this; | ||
| 157 | + var g_id = this.data.g_id; | ||
| 158 | + var len = this.data.firist_type_data.length; | ||
| 159 | + if (classstyle_id == 1) { | ||
| 160 | + //---手动选择的时候--- | ||
| 161 | + g_id = this.data.firist_type_data[th.data.firist_type_curr]; | ||
| 162 | + th.data.firist_type_curr++; | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + var th = this, | ||
| 166 | + app = getApp(), | ||
| 167 | + index = 0, | ||
| 168 | + gdata = []; | ||
| 169 | + | ||
| 170 | + var user_id = getApp().globalData.user_id; | ||
| 171 | + if (!user_id) user_id = 0; | ||
| 172 | + | ||
| 173 | + //--初始化卡类-- | ||
| 174 | + th.card_init(); | ||
| 175 | + var os = getApp().globalData.setting; | ||
| 176 | + classstyle_id = classstyle_id + ""; | ||
| 177 | + switch (classstyle_id) { | ||
| 178 | + //---手动选择商品--- | ||
| 179 | + case "1": | ||
| 180 | + var str = ""; | ||
| 181 | + for (var i = 0; i < g_id.length; i++) { | ||
| 182 | + str += g_id[i].goodsid + ","; | ||
| 183 | + } | ||
| 184 | + str = str.substring(0, str.length - 1); | ||
| 185 | + | ||
| 186 | + await app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, { | ||
| 187 | + data: { user_id: user_id }, | ||
| 188 | + isShowLoading: false, | ||
| 189 | + success: function (res) { | ||
| 190 | + th.data.loading = 0; | ||
| 191 | + | ||
| 192 | + if (res.data.code == 0 && res.data.data) { | ||
| 193 | + | ||
| 194 | + var goods = res.data.data; | ||
| 195 | + /*-- | ||
| 196 | + var rData = th.data.requestData; | ||
| 197 | + if (rData == null) rData=[]; | ||
| 198 | + var now=ut.gettimestamp(); | ||
| 199 | + | ||
| 200 | + var new_arr=[]; | ||
| 201 | + for (var ii in res.data.data){ | ||
| 202 | + var item=res.data.data[ii]; | ||
| 203 | + item.goods_img=th.data.imghost + item.original_img; | ||
| 204 | + if(item.e_time<now) {item.prom_type=0; item.prom_price=0;} | ||
| 205 | + if(item.warm_uptime>now) {item.prom_type=0; item.prom_price=0;} | ||
| 206 | + new_arr.push(item); | ||
| 207 | + } | ||
| 208 | + rData = rData.concat(new_arr); | ||
| 209 | + | ||
| 210 | + th.data.requestData = rData; | ||
| 211 | + | ||
| 212 | + if(th.data.object.column==5){ | ||
| 213 | + var arr = new Array(); | ||
| 214 | + //--三个三个一组--- | ||
| 215 | + for(var i=0;i< rData.length;i+=3){ | ||
| 216 | + arr.push(rData.slice(i,i+3)); | ||
| 217 | + } | ||
| 218 | + th.setData({ goods_array: arr }); | ||
| 219 | + }else{ | ||
| 220 | + th.setData({ goods_array: rData }); | ||
| 221 | + }--*/ | ||
| 222 | + | ||
| 223 | + th.set_good(goods); | ||
| 224 | + | ||
| 225 | + //---控制有没有加载更多的按钮--- | ||
| 226 | + if (th.data.firist_type_curr >= len) { th.setData({ goods_btn: [] }); } | ||
| 227 | + else th.setData({ goods_btn: [1, 2] }); | ||
| 228 | + } | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + }) | ||
| 232 | + | ||
| 233 | + break; | ||
| 234 | + case "2": | ||
| 235 | + var item = {}; | ||
| 236 | + var r_data = { | ||
| 237 | + store_id: os.stoid, | ||
| 238 | + pageSize: th.data.goodscount, | ||
| 239 | + page: th.data.currentPage, | ||
| 240 | + isonsale: 1, | ||
| 241 | + orderField: "sort", | ||
| 242 | + orderType: 'asc', | ||
| 243 | + }; | ||
| 244 | + if (th.data.is_recommend) r_data.is_recommend = th.data.is_recommend; | ||
| 245 | + if (th.data.is_hot) r_data.is_hot = th.data.is_hot; | ||
| 246 | + if (th.data.is_new) r_data.is_new = th.data.is_new; | ||
| 247 | + | ||
| 248 | + var user_id = getApp().globalData.user_id; | ||
| 249 | + if (!user_id) user_id = 0; | ||
| 250 | + r_data.user_id = user_id; | ||
| 251 | + | ||
| 252 | + await app.request.promiseGet("/api/weshop/goods/page", { | ||
| 253 | + data: r_data | ||
| 254 | + }).then(res => { | ||
| 255 | + th.data.loading = 0; | ||
| 256 | + //商品地址 | ||
| 257 | + var goods = res.data.data.pageData; | ||
| 258 | + th.setData({ | ||
| 259 | + goods_btn: res.data.data.pageData, | ||
| 260 | + total: res.data.data.total | ||
| 261 | + }) | ||
| 262 | + th.data.currentPage++; | ||
| 263 | + //设置商品熏染 | ||
| 264 | + th.set_good(goods); | ||
| 265 | + | ||
| 266 | + }) | ||
| 267 | + break; | ||
| 268 | + case "3": | ||
| 269 | + var item = {}; | ||
| 270 | + await app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", { | ||
| 271 | + data: { | ||
| 272 | + store_id: os.stoid, | ||
| 273 | + gpid: wgroup, | ||
| 274 | + pageSize: th.data.goodscount, | ||
| 275 | + page: th.data.currentPage, | ||
| 276 | + isonsale: 1, | ||
| 277 | + orderField: "sort", | ||
| 278 | + orderType: 'asc', | ||
| 279 | + user_id: user_id | ||
| 280 | + } | ||
| 281 | + }).then(res => { | ||
| 282 | + th.data.loading = 0; | ||
| 283 | + //商品地址 | ||
| 284 | + var goods = res.data.data.pageData; | ||
| 285 | + th.setData({ | ||
| 286 | + goods_btn: res.data.data.pageData, total: res.data.data.total | ||
| 287 | + }) | ||
| 288 | + | ||
| 289 | + th.data.currentPage++; | ||
| 290 | + //设置商品熏染 | ||
| 291 | + th.set_good(goods); | ||
| 292 | + | ||
| 293 | + }) | ||
| 294 | + break; | ||
| 295 | + } | ||
| 296 | + }, | ||
| 297 | + | ||
| 298 | + setLoading: function () { | ||
| 299 | + var that = this; | ||
| 300 | + if (this.data.loading) return false; | ||
| 301 | + this.data.loading = 1; | ||
| 302 | + that.init(that.data.classstyle_id, that.data.wgroup); | ||
| 303 | + }, | ||
| 304 | + | ||
| 305 | + //图片失败,默认图片 | ||
| 306 | + bind_bnerr3: function (e) { | ||
| 307 | + var _errImg = e.target.dataset.errorimg; | ||
| 308 | + var _errObj = {}; | ||
| 309 | + _errObj[_errImg] = this.data.imghost + "/public/images/default_goods_image_240.gif"; | ||
| 310 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 311 | + }, | ||
| 312 | + | ||
| 313 | + //---卡的初始化---- | ||
| 314 | + card_init: function () { | ||
| 315 | + var th = this, os = getApp().globalData.setting; | ||
| 316 | + if (!getApp().globalData.user_id) return false; | ||
| 317 | + getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | ||
| 318 | + isShowLoading: false, | ||
| 319 | + success: function (e) { | ||
| 320 | + getApp().globalData.userInfo = e.data.data; | ||
| 321 | + getApp().getConfig2(function (e) { | ||
| 322 | + var swithc_list = e.switch_list; | ||
| 323 | + var sw_arr = JSON.parse(swithc_list); | ||
| 324 | + //---如果后台又开等级卡的开关--- | ||
| 325 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
| 326 | + th.setData({ | ||
| 327 | + rank_switch: true | ||
| 328 | + }); | ||
| 329 | + //---回调卡的列表--- | ||
| 330 | + th.getPlusCardType(function (ob) { | ||
| 331 | + th.setData({ | ||
| 332 | + card_list: ob.card_list | ||
| 333 | + }); | ||
| 334 | + var ti = setInterval(function () { | ||
| 335 | + var user = getApp().globalData.userInfo; | ||
| 336 | + if (!user) return false; | ||
| 337 | + clearInterval(ti); | ||
| 338 | + | ||
| 339 | + if (user.card_field && user['card_expiredate']) { | ||
| 340 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 341 | + var end = new Date(str); | ||
| 342 | + end = Date.parse(end) / 1000; | ||
| 343 | + var now = ut.gettimestamp(); | ||
| 344 | + | ||
| 345 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 346 | + if (user.card_field && now < end) { | ||
| 347 | + var card_name = ob.name_map.get(user.card_field); | ||
| 348 | + if (card_name.length > 4) card_name = card_name.substring(0, 4); | ||
| 349 | + th.setData({ | ||
| 350 | + card_field: user.card_field, | ||
| 351 | + card_name: card_name, | ||
| 352 | + card_list: ob.card_list | ||
| 353 | + }); | ||
| 354 | + } | ||
| 355 | + | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + }, 500) | ||
| 359 | + }) | ||
| 360 | + | ||
| 361 | + } | ||
| 362 | + }) | ||
| 543 | } | 363 | } |
| 364 | + }) | ||
| 365 | + | ||
| 366 | + }, | ||
| 544 | 367 | ||
| 545 | - th.data.requestData.push(item); | ||
| 546 | - }) | ||
| 547 | - }else{ | ||
| 548 | - th.data.requestData.push(item); | 368 | + //--- 获取卡类列表 --- |
| 369 | + getPlusCardType: function (func) { | ||
| 370 | + var storid = o.stoid; | ||
| 371 | + var th = this; | ||
| 372 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
| 373 | + var plusCard = res.data.data; | ||
| 374 | + var arr = [1219, 2089, 3031]; | ||
| 375 | + var new_arr = new Array(); | ||
| 376 | + var card_name_map = new Map(); | ||
| 377 | + | ||
| 378 | + var user = getApp().globalData.userInfo; | ||
| 379 | + | ||
| 380 | + if (plusCard) { | ||
| 381 | + | ||
| 382 | + for (var i = 0; i < plusCard.length; i++) { | ||
| 383 | + if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) { | ||
| 384 | + continue; | ||
| 385 | + } | ||
| 386 | + | ||
| 387 | + var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | ||
| 388 | + card_name_map.set(name, plusCard[i].CardName); | ||
| 389 | + new_arr.push(plusCard[i]); | ||
| 390 | + } | ||
| 391 | + } | ||
| 392 | + | ||
| 393 | + var ob = { | ||
| 394 | + "card_list": new_arr, | ||
| 395 | + "name_map": card_name_map | ||
| 396 | + }; | ||
| 397 | + func(ob); | ||
| 398 | + }) | ||
| 399 | + }, | ||
| 400 | + | ||
| 401 | + //--- 点击tab的事件 --- | ||
| 402 | + gr_set_nav: function (e) { | ||
| 403 | + | ||
| 404 | + var title_idx = e.currentTarget.dataset.index; | ||
| 405 | + if (title_idx == this.data.title_index) return false; | ||
| 406 | + wx.showLoading(); | ||
| 407 | + | ||
| 408 | + var nav_item = this.data.object.nav_list[title_idx]; | ||
| 409 | + this.data.g_id = []; | ||
| 410 | + if (this.data.object.nav_list && this.data.object.nav_list[title_idx] && this.data.object.nav_list[title_idx].data) | ||
| 411 | + this.data.g_id = this.data.object.nav_list[title_idx].data; | ||
| 412 | + var arr = []; | ||
| 413 | + for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { | ||
| 414 | + arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); | ||
| 415 | + } | ||
| 416 | + this.data.firist_type_data = arr; | ||
| 417 | + this.data.firist_type_curr = 0; | ||
| 418 | + this.data.requestData = []; | ||
| 419 | + | ||
| 420 | + // 在组件实例进入页面节点树时执行 | ||
| 421 | + if (nav_item) { | ||
| 422 | + this.data.classstyle_id = nav_item.classstyle; | ||
| 423 | + this.data.wgroup = nav_item.wgroup; | ||
| 424 | + } | ||
| 425 | + | ||
| 426 | + | ||
| 427 | + this.data.is_recommend = this.data.is_hot = this.data.is_new = 0; | ||
| 428 | + //推荐,热卖,新品 | ||
| 429 | + if (nav_item && nav_item.goodsclass == 1) { | ||
| 430 | + this.data.is_recommend = 1 | ||
| 431 | + } | ||
| 432 | + if (nav_item && nav_item.goodsclass == 2) { | ||
| 433 | + this.data.is_hot = 1 | ||
| 434 | + } | ||
| 435 | + if (nav_item && nav_item.goodsclass == 3) { | ||
| 436 | + this.data.is_new = 1 | ||
| 437 | + } | ||
| 438 | + | ||
| 439 | + | ||
| 440 | + this.data.currentPage = 1; | ||
| 441 | + this.setData({ goods_array: null, total: null, title_index: title_idx }); | ||
| 442 | + //初始化 | ||
| 443 | + this.init(this.data.classstyle_id, this.data.wgroup); | ||
| 444 | + setTimeout(function () { wx.hideLoading(); }, 1000) | ||
| 445 | + }, | ||
| 446 | + | ||
| 447 | + //--- 设置 --- | ||
| 448 | + set_good: async function (goods) { | ||
| 449 | + var now = ut.gettimestamp(); | ||
| 450 | + var th = this; | ||
| 451 | + if (!goods || goods.length == 0) return false; | ||
| 452 | + var user_id = getApp().globalData.userInfo.user_id; | ||
| 453 | + if (!user_id) user_id = 0; | ||
| 454 | + for (var i in goods) { | ||
| 455 | + var val = goods[i]; | ||
| 456 | + var item = {}; | ||
| 457 | + var prom_id = null; | ||
| 458 | + //app.request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + val.goods_id, {}).then(res => { | ||
| 459 | + | ||
| 460 | + var url = "/api/weshop/activitylist/getGoodActInfo"; | ||
| 461 | + var req_data = { | ||
| 462 | + store_id: os.stoid, goodsidlist: val.goods_id, is_detail: 1, user_id: user_id | ||
| 463 | + }; | ||
| 464 | + | ||
| 465 | + //获取商品的实际活动 | ||
| 466 | + await getApp().request.promiseGet(url, { data: req_data }).then(res => { | ||
| 467 | + if (res.data.code == 0 && res.data.data && res.data.data.length == 1) { | ||
| 468 | + item.prom_type = res.data.data[0].prom_type; | ||
| 469 | + item.prom_id = res.data.data[0].act_id; | ||
| 470 | + } | ||
| 471 | + }) | ||
| 472 | + | ||
| 473 | + item.goods_name = val.goods_name; | ||
| 474 | + item.goods_img = th.data.imghost + val.original_img; | ||
| 475 | + item.market_price = val.market_price; | ||
| 476 | + item.shop_price = val.shop_price; | ||
| 477 | + item.sales_sum = val.sales_sum; | ||
| 478 | + item.goods_id = val.goods_id; | ||
| 479 | + | ||
| 480 | + item.cardprice1 = val.cardprice1; | ||
| 481 | + item.cardprice2 = val.cardprice2; | ||
| 482 | + item.cardprice3 = val.cardprice3; | ||
| 483 | + item.prom_type = val.prom_type; | ||
| 484 | + item.prom_id = val.prom_id; | ||
| 485 | + | ||
| 486 | + if (val.prom_price) item.prom_price = val.prom_price; | ||
| 487 | + if (val.prom_integral) item.prom_integral = val.prom_integral; | ||
| 488 | + | ||
| 489 | + prom_id = val.prom_id; | ||
| 490 | + | ||
| 491 | + var prom_type = val.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购 | ||
| 492 | + | ||
| 493 | + var url = ""; | ||
| 494 | + | ||
| 495 | + switch (prom_type) { | ||
| 496 | + case 1: | ||
| 497 | + var user_id = getApp().globalData.user_id; | ||
| 498 | + if (!user_id) user_id = 0; | ||
| 499 | + url = "/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id; | ||
| 500 | + break; | ||
| 501 | + case 2: | ||
| 502 | + url = "/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + val.goods_id + "/" + prom_id | ||
| 503 | + break; | ||
| 504 | + case 4: | ||
| 505 | + url = "/api/weshop/integralbuy/get/" + os.stoid + "/" + prom_id; | ||
| 506 | + break; | ||
| 507 | + case 6: | ||
| 508 | + url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; | ||
| 509 | + break; | ||
| 510 | + case 8: | ||
| 511 | + var presell_id = prom_id; | ||
| 512 | + var url1 = "/api/weshop/marketing/marketingPresellList/list"; | ||
| 513 | + var rd = { | ||
| 514 | + store_id: os.stoid, | ||
| 515 | + presell_id: presell_id, | ||
| 516 | + goods_id: val.goods_id | ||
| 517 | + } | ||
| 518 | + //------获取预售从表---------- | ||
| 519 | + await getApp().request.promiseGet(url1, { | ||
| 520 | + data: rd | ||
| 521 | + }).then(res => { | ||
| 522 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | ||
| 523 | + var arr = res.data.data[0]; | ||
| 524 | + item.prom_price = arr.luck_goods_price; | ||
| 525 | + item.sales_sum = arr.buy_goodnum + (arr.virtual_qty ? arr.virtual_qty : 0); | ||
| 526 | + } | ||
| 527 | + }) | ||
| 528 | + break; | ||
| 529 | + default: | ||
| 530 | + break | ||
| 531 | + } | ||
| 532 | + | ||
| 533 | + if (url != null && url != '') { | ||
| 534 | + await getApp().request.promiseGet(url, {}).then(res => { | ||
| 535 | + var prom = null; | ||
| 536 | + if (res && res.data) prom = res.data.data; | ||
| 537 | + if (prom != null && prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom.show_time && prom.show_time < now))) { | ||
| 538 | + item.prom_price = res.data.data.price; | ||
| 539 | + if (res.data.data.user_price) item.prom_price = res.data.data.user_price; | ||
| 540 | + var vNum = res.data.data.virtual_num ? res.data.data.virtual_num : 0; | ||
| 541 | + var vNum1 = res.data.data.virtualNum ? res.data.data.virtualNum : 0; | ||
| 542 | + var vNum2 = res.data.data.virtual ? res.data.data.virtual : 0; | ||
| 543 | + item.sales_sum = res.data.data.buy_num + (vNum + vNum1 + vNum2); | ||
| 544 | + } else { | ||
| 545 | + item.prom_type = 0; | ||
| 546 | + item.prom_id = 0; | ||
| 547 | + item.prom_price = null; | ||
| 548 | + } | ||
| 549 | + | ||
| 550 | + th.data.requestData.push(item); | ||
| 551 | + }) | ||
| 552 | + } else { | ||
| 553 | + th.data.requestData.push(item); | ||
| 554 | + } | ||
| 555 | + } | ||
| 556 | + | ||
| 557 | + if (th.data.object.column == 5) { | ||
| 558 | + var arr = new Array(); | ||
| 559 | + var rData = th.data.requestData; | ||
| 560 | + //--三个三个一组--- | ||
| 561 | + for (var i = 0; i < rData.length; i += 3) { | ||
| 562 | + arr.push(rData.slice(i, i + 3)); | ||
| 563 | + } | ||
| 564 | + th.setData({ goods_array: arr, page: th.data.currentPage - 1, }); | ||
| 565 | + } else { | ||
| 566 | + th.setData({ | ||
| 567 | + goods_array: th.data.requestData, | ||
| 568 | + page: th.data.currentPage - 1, | ||
| 569 | + }); | ||
| 570 | + } | ||
| 571 | + | ||
| 572 | + }, | ||
| 573 | + | ||
| 574 | + re_show: function () { | ||
| 575 | + if (this.data.object.goodscount * this.data.page < this.data.total) { | ||
| 576 | + this.setLoading() | ||
| 549 | } | 577 | } |
| 550 | } | 578 | } |
| 551 | - | ||
| 552 | - if(th.data.object.column==5){ | ||
| 553 | - var arr = new Array(); | ||
| 554 | - var rData=th.data.requestData; | ||
| 555 | - //--三个三个一组--- | ||
| 556 | - for(var i=0;i< rData.length;i+=3){ | ||
| 557 | - arr.push(rData.slice(i,i+3)); | ||
| 558 | - } | ||
| 559 | - th.setData({ goods_array: arr,page: th.data.currentPage - 1, }); | ||
| 560 | - }else{ | ||
| 561 | - th.setData({ | ||
| 562 | - goods_array: th.data.requestData, | ||
| 563 | - page: th.data.currentPage - 1, | ||
| 564 | - }); | ||
| 565 | - } | ||
| 566 | - | ||
| 567 | - }, | ||
| 568 | 579 | ||
| 569 | - re_show:function () { | ||
| 570 | - if(this.data.object.goodscount *this.data.page <this.data.total ){ | ||
| 571 | - this.setLoading() | ||
| 572 | - } | ||
| 573 | - } | ||
| 574 | 580 | ||
| 575 | 581 | ||
| 576 | 582 | ||
| 577 | - | ||
| 578 | - } | 583 | + } |
| 579 | }) | 584 | }) |
| 580 | \ No newline at end of file | 585 | \ No newline at end of file |
components/diy_goodsGroup/diy_goodsGroup.wxml
| @@ -4,33 +4,32 @@ | @@ -4,33 +4,32 @@ | ||
| 4 | 4 | ||
| 5 | <!-- 要不要顶部标题 --> | 5 | <!-- 要不要顶部标题 --> |
| 6 | <block wx:if="{{is_nav}}"> | 6 | <block wx:if="{{is_nav}}"> |
| 7 | - <view class="flex gr_title_list" style="overflow-x: auto;"> | ||
| 8 | - <view class="gr_title_item" wx:for="{{nav_list}}" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}" > | ||
| 9 | - <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text> | ||
| 10 | - </view> | ||
| 11 | - </view> | 7 | + <view class="flex gr_title_list" style="overflow-x: auto;"> |
| 8 | + <view class="gr_title_item" wx:for="{{nav_list}}" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}"> | ||
| 9 | + <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text> | ||
| 10 | + </view> | ||
| 11 | + </view> | ||
| 12 | </block> | 12 | </block> |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | -<!--1个列表的时候--> | ||
| 17 | -<view class="zs_goods_wai" wx:if='{{object.column==1}}'> | ||
| 18 | - <block wx:for="{{goods_array}}" > | 16 | +<view style="background-color: {{bg_color}};"> |
| 17 | + <!--1个列表的时候--> | ||
| 18 | + <view class="zs_goods_wai" wx:if='{{object.column==1}}'> | ||
| 19 | + <block wx:for="{{goods_array}}"> | ||
| 19 | <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'> | 20 | <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'> |
| 20 | - <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> | ||
| 21 | - <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.prom_id}}&&prom_type={{item.prom_type}}" class="s1_gk_a1"> --> | 21 | + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> |
| 22 | + <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.prom_id}}&&prom_type={{item.prom_type}}" class="s1_gk_a1"> --> | ||
| 22 | <view class='zs_top rel'> | 23 | <view class='zs_top rel'> |
| 23 | 24 | ||
| 24 | <block wx:if="{{object.big_order_type==3}}"> | 25 | <block wx:if="{{object.big_order_type==3}}"> |
| 25 | <view style="position: relative; width: 100%; height: 100%"> | 26 | <view style="position: relative; width: 100%; height: 100%"> |
| 26 | - <image class='zs_t_img' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" | ||
| 27 | - binderror="bind_bnerr3"></image> | ||
| 28 | - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | 27 | + <image class='zs_t_img' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image> |
| 28 | + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 29 | </view> | 29 | </view> |
| 30 | </block> | 30 | </block> |
| 31 | <block wx:else> | 31 | <block wx:else> |
| 32 | - <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | ||
| 33 | - binderror="bind_bnerr3" lazy-load="true" ></image> | 32 | + <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" binderror="bind_bnerr3" lazy-load="true"></image> |
| 34 | </block> | 33 | </block> |
| 35 | 34 | ||
| 36 | <block wx:if="{{object.goodicon==3}}"> | 35 | <block wx:if="{{object.goodicon==3}}"> |
| @@ -40,206 +39,500 @@ | @@ -40,206 +39,500 @@ | ||
| 40 | <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | 39 | <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> |
| 41 | </block> | 40 | </block> |
| 42 | <block wx:if="{{object.goodicon==2}}"> | 41 | <block wx:if="{{object.goodicon==2}}"> |
| 43 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | ||
| 44 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 45 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2}}" | ||
| 46 | - src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 47 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | ||
| 48 | - src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 49 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4}}" | ||
| 50 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | 42 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" src='{{imghost}}/miniapp/images/Recommend.png'></image> |
| 43 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2}}" src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 44 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 45 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4}}" src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 51 | </block> | 46 | </block> |
| 52 | </view> | 47 | </view> |
| 53 | <view class='zs_center'> | 48 | <view class='zs_center'> |
| 54 | <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | 49 | <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> |
| 55 | <!--如果有显示价格 --> | 50 | <!--如果有显示价格 --> |
| 56 | <view class='zs_wz2' wx:if="{{object.goodsprice}}"> | 51 | <view class='zs_wz2' wx:if="{{object.goodsprice}}"> |
| 57 | - <block wx:if="{{item.prom_price || item.prom_integral}}"> | ||
| 58 | - <view class='wz_red'> | ||
| 59 | - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 60 | - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 61 | - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 62 | - </view> | ||
| 63 | - <view class='del'>¥{{item.market_price}}</view> | ||
| 64 | - </block> | ||
| 65 | - <block wx:else> | ||
| 66 | - | ||
| 67 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | ||
| 68 | - <!-- 当会员是等级卡的时候 --> | ||
| 69 | - <block wx:if="{{card_field}}"> | ||
| 70 | - <!-- 等级价>0 --> | ||
| 71 | - <block wx:if="{{item[card_field]>0}}"> | ||
| 72 | - <view class="money flex ai_and"> | ||
| 73 | - <!-- 办卡价 --> | ||
| 74 | - <view class="flex xc-wc ai_and"> | ||
| 75 | - <view class="fs24 wz_red">¥</view> | ||
| 76 | - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> | ||
| 77 | - <view class="card_bg ellipsis-1"> | ||
| 78 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 79 | - <text class="card_name">{{card_name}}</text> | ||
| 80 | - </view> | ||
| 81 | - </view> | ||
| 82 | - </view> | ||
| 83 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 84 | - <!-- 原价 --> | ||
| 85 | - <view class="price flex xc-ash line_th"> | ||
| 86 | - <view class="fs22">¥</view> | ||
| 87 | - <view class="fs22">{{item.market_price}}</view> | ||
| 88 | - </view> | ||
| 89 | - </view> | ||
| 90 | - </block> | ||
| 91 | - <blocK wx:else> | ||
| 92 | - <view class="money flex" > | ||
| 93 | - <!-- 办卡价 --> | ||
| 94 | - <view class="flex xc-wc"> | ||
| 95 | - <view class="fs24 wz_red">¥</view> | ||
| 96 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 97 | - </view> | ||
| 98 | - </view> | ||
| 99 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 100 | - <!-- 原价 --> | ||
| 101 | - <view class="price flex xc-ash line_th"> | ||
| 102 | - <view class="fs22">¥</view> | ||
| 103 | - <view class="fs22">{{item.market_price}}</view> | ||
| 104 | - </view> | ||
| 105 | - </view> | ||
| 106 | - </blocK> | ||
| 107 | - </block> | ||
| 108 | - <block wx:else> | ||
| 109 | - <!-- 如果商品有设置等级价大于0的 --> | ||
| 110 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 111 | - <view class="money flex" > | ||
| 112 | - <!-- 办卡价 --> | ||
| 113 | - <view class="flex xc-wc"> | ||
| 114 | - <view class="fs24 wz_red">¥</view> | ||
| 115 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 116 | - </view> | ||
| 117 | - <!-- 原价 --> | ||
| 118 | - <view class="price flex xc-ash line_th"> | ||
| 119 | - <view class="fs22">¥</view> | ||
| 120 | - <view class="fs22">{{item.market_price}}</view> | ||
| 121 | - </view> | ||
| 122 | - | ||
| 123 | - </view> | ||
| 124 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 125 | - <!-- 等级价 --> | ||
| 126 | - <view class="price flex ai_and"> | ||
| 127 | - <view class="fs22">¥</view> | ||
| 128 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | ||
| 129 | - <view class="card_bg ellipsis-1"> | ||
| 130 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 131 | - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | ||
| 132 | - </view> | ||
| 133 | - </view> | ||
| 134 | - </view> | ||
| 135 | - </block> | ||
| 136 | - <block wx:else> | ||
| 137 | - <view class="money flex" > | ||
| 138 | - <!-- 办卡价 --> | ||
| 139 | - <view class="flex xc-wc"> | ||
| 140 | - <view class="fs24 wz_red">¥</view> | ||
| 141 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 142 | - </view> | ||
| 143 | - </view> | ||
| 144 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 145 | - <!-- 原价 --> | ||
| 146 | - <view class="price flex xc-ash line_th"> | ||
| 147 | - <view class="fs22">¥</view> | ||
| 148 | - <view class="fs22">{{item.market_price}}</view> | ||
| 149 | - </view> | ||
| 150 | - </view> | ||
| 151 | - </block> | ||
| 152 | - </block> | ||
| 153 | - </block> | ||
| 154 | - | ||
| 155 | - <block wx:else> | 52 | + <block wx:if="{{item.prom_price || item.prom_integral}}"> |
| 53 | + <view class='wz_red'> | ||
| 54 | + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 55 | + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 56 | + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 57 | + </view> | ||
| 58 | + <view class='del'>¥{{item.market_price}}</view> | ||
| 59 | + </block> | ||
| 60 | + <block wx:else> | ||
| 61 | + | ||
| 62 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | ||
| 63 | + <!-- 当会员是等级卡的时候 --> | ||
| 64 | + <block wx:if="{{card_field}}"> | ||
| 65 | + <!-- 等级价>0 --> | ||
| 66 | + <block wx:if="{{item[card_field]>0}}"> | ||
| 67 | + <view class="money flex ai_and"> | ||
| 68 | + <!-- 办卡价 --> | ||
| 69 | + <view class="flex xc-wc ai_and"> | ||
| 70 | + <view class="fs24 wz_red">¥</view> | ||
| 71 | + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> | ||
| 72 | + <view class="card_bg ellipsis-1"> | ||
| 73 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 74 | + <text class="card_name">{{card_name}}</text> | ||
| 75 | + </view> | ||
| 76 | + </view> | ||
| 77 | + </view> | ||
| 78 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 79 | + <!-- 原价 --> | ||
| 80 | + <view class="price flex xc-ash line_th"> | ||
| 81 | + <view class="fs22">¥</view> | ||
| 82 | + <view class="fs22">{{item.market_price}}</view> | ||
| 83 | + </view> | ||
| 84 | + </view> | ||
| 85 | + </block> | ||
| 86 | + <blocK wx:else> | ||
| 87 | + <view class="money flex"> | ||
| 88 | + <!-- 办卡价 --> | ||
| 89 | + <view class="flex xc-wc"> | ||
| 90 | + <view class="fs24 wz_red">¥</view> | ||
| 91 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 92 | + </view> | ||
| 93 | + </view> | ||
| 94 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 95 | + <!-- 原价 --> | ||
| 96 | + <view class="price flex xc-ash line_th"> | ||
| 97 | + <view class="fs22">¥</view> | ||
| 98 | + <view class="fs22">{{item.market_price}}</view> | ||
| 99 | + </view> | ||
| 100 | + </view> | ||
| 101 | + </blocK> | ||
| 102 | + </block> | ||
| 103 | + <block wx:else> | ||
| 104 | + <!-- 如果商品有设置等级价大于0的 --> | ||
| 105 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 106 | + <view class="money flex"> | ||
| 107 | + <!-- 办卡价 --> | ||
| 108 | + <view class="flex xc-wc"> | ||
| 109 | + <view class="fs24 wz_red">¥</view> | ||
| 110 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 111 | + </view> | ||
| 112 | + <!-- 原价 --> | ||
| 113 | + <view class="price flex xc-ash line_th"> | ||
| 114 | + <view class="fs22">¥</view> | ||
| 115 | + <view class="fs22">{{item.market_price}}</view> | ||
| 116 | + </view> | ||
| 117 | + | ||
| 118 | + </view> | ||
| 119 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 120 | + <!-- 等级价 --> | ||
| 121 | + <view class="price flex ai_and"> | ||
| 122 | + <view class="fs22">¥</view> | ||
| 123 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | ||
| 124 | + <view class="card_bg ellipsis-1"> | ||
| 125 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 126 | + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | ||
| 127 | + </view> | ||
| 128 | + </view> | ||
| 129 | + </view> | ||
| 130 | + </block> | ||
| 131 | + <block wx:else> | ||
| 132 | + <view class="money flex"> | ||
| 133 | + <!-- 办卡价 --> | ||
| 134 | + <view class="flex xc-wc"> | ||
| 135 | + <view class="fs24 wz_red">¥</view> | ||
| 136 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 137 | + </view> | ||
| 138 | + </view> | ||
| 139 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 140 | + <!-- 原价 --> | ||
| 141 | + <view class="price flex xc-ash line_th"> | ||
| 142 | + <view class="fs22">¥</view> | ||
| 143 | + <view class="fs22">{{item.market_price}}</view> | ||
| 144 | + </view> | ||
| 145 | + </view> | ||
| 146 | + </block> | ||
| 147 | + </block> | ||
| 148 | + </block> | ||
| 149 | + | ||
| 150 | + <block wx:else> | ||
| 156 | <view class='wz_red'>¥{{item.shop_price}}</view> | 151 | <view class='wz_red'>¥{{item.shop_price}}</view> |
| 157 | <view class='del'>¥{{item.market_price}}</view> | 152 | <view class='del'>¥{{item.market_price}}</view> |
| 158 | - </block> | 153 | + </block> |
| 159 | 154 | ||
| 160 | - </block> | 155 | + </block> |
| 161 | 156 | ||
| 162 | </view> | 157 | </view> |
| 163 | <view class='zs_wz5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | 158 | <view class='zs_wz5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> |
| 164 | - <view style="height: 10rpx;"></view> | 159 | + <view style="height: 10rpx;"></view> |
| 165 | </view> | 160 | </view> |
| 166 | </navigator> | 161 | </navigator> |
| 167 | - </view> | ||
| 168 | - <view style="height:20rpx"></view> | 162 | + </view> |
| 163 | + <view style="height:20rpx"></view> | ||
| 164 | + </block> | ||
| 165 | + | ||
| 166 | + </view> | ||
| 167 | + <!--2个一列--> | ||
| 168 | + <block wx:if="{{object.column==2}}"> | ||
| 169 | + <block wx:for="{{goods_array}}"> | ||
| 170 | + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> | ||
| 171 | + <view class="zs_goods_wai_ban {{g_filter.get_border_type(object.big_order_type)}}"> | ||
| 172 | + <view class="zs_goods_ban"> | ||
| 173 | + <view class='zs_goods_2l'> | ||
| 174 | + <view class='zs_top_2l rel'> | ||
| 175 | + | ||
| 176 | + <block wx:if="{{object.big_order_type==3}}"> | ||
| 177 | + <view style="position: relative; width: 100%; height: 100%"> | ||
| 178 | + <image class='zs_t_img_2l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 179 | + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 180 | + </view> | ||
| 181 | + </block> | ||
| 182 | + <block wx:else> | ||
| 183 | + <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 184 | + </block> | ||
| 185 | + | ||
| 186 | + <block wx:if="{{object.goodicon==3}}"> | ||
| 187 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image> | ||
| 188 | + </block> | ||
| 189 | + <block wx:if="{{object.goodicon==1}}"> | ||
| 190 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | ||
| 191 | + </block> | ||
| 192 | + <block wx:if="{{object.goodicon==2}}"> | ||
| 193 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 194 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 195 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 196 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 197 | + </block> | ||
| 198 | + </view> | ||
| 199 | + | ||
| 200 | + <view class='zs_center_2l'> | ||
| 201 | + <view class='zs_wz1_2l ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | ||
| 202 | + <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}"> | ||
| 203 | + | ||
| 204 | + <block wx:if="{{item.prom_price || item.prom_integral}}"> | ||
| 205 | + <view class='wz_red'> | ||
| 206 | + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 207 | + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 208 | + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 209 | + </view> | ||
| 210 | + <view class='del'>¥{{item.market_price}}</view> | ||
| 211 | + </block> | ||
| 212 | + <block wx:else> | ||
| 213 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | ||
| 214 | + <!-- 当会员是等级卡的时候 --> | ||
| 215 | + <block wx:if="{{card_field}}"> | ||
| 216 | + <!-- 等级价>0 --> | ||
| 217 | + <block wx:if="{{item[card_field]>0}}"> | ||
| 218 | + <view class="money flex"> | ||
| 219 | + <!-- 办卡价 --> | ||
| 220 | + <view class="flex xc-wc ai_and"> | ||
| 221 | + <view class="fs24 wz_red">¥</view> | ||
| 222 | + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> | ||
| 223 | + <view class="card_bg ellipsis-1"> | ||
| 224 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 225 | + <view class="card_name">{{card_name}}</view> | ||
| 226 | + </view> | ||
| 227 | + </view> | ||
| 228 | + </view> | ||
| 229 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 230 | + <!-- 原价 --> | ||
| 231 | + <view class="price flex xc-ash line_th"> | ||
| 232 | + <view class="fs22">¥</view> | ||
| 233 | + <view class="fs22">{{item.market_price}}</view> | ||
| 234 | + </view> | ||
| 235 | + </view> | ||
| 236 | + </block> | ||
| 237 | + <blocK wx:else> | ||
| 238 | + <view class="money flex"> | ||
| 239 | + <!-- 办卡价 --> | ||
| 240 | + <view class="flex xc-wc"> | ||
| 241 | + <view class="fs24 wz_red">¥</view> | ||
| 242 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 243 | + </view> | ||
| 244 | + </view> | ||
| 245 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 246 | + <!-- 原价 --> | ||
| 247 | + <view class="price flex xc-ash line_th"> | ||
| 248 | + <view class="fs22">¥</view> | ||
| 249 | + <view class="fs22">{{item.market_price}}</view> | ||
| 250 | + </view> | ||
| 251 | + </view> | ||
| 252 | + </blocK> | ||
| 253 | + </block> | ||
| 254 | + <block wx:else> | ||
| 255 | + <!-- 如果商品有设置等级价大于0的 --> | ||
| 256 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 257 | + <view class="money flex"> | ||
| 258 | + <!-- 办卡价 --> | ||
| 259 | + <view class="flex xc-wc"> | ||
| 260 | + <view class="fs24 wz_red">¥</view> | ||
| 261 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 262 | + </view> | ||
| 263 | + <!-- 原价 --> | ||
| 264 | + <view class="price flex xc-ash line_th"> | ||
| 265 | + <view class="fs22">¥</view> | ||
| 266 | + <view class="fs22">{{item.market_price}}</view> | ||
| 267 | + </view> | ||
| 268 | + | ||
| 269 | + </view> | ||
| 270 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 271 | + <!-- 等级价 --> | ||
| 272 | + <view class="price flex ai_and"> | ||
| 273 | + <view class="fs22">¥</view> | ||
| 274 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | ||
| 275 | + <view class="card_bg ellipsis-1"> | ||
| 276 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 277 | + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | ||
| 278 | + </view> | ||
| 279 | + </view> | ||
| 280 | + </view> | ||
| 281 | + </block> | ||
| 282 | + <block wx:else> | ||
| 283 | + <view class="money flex"> | ||
| 284 | + <!-- 办卡价 --> | ||
| 285 | + <view class="flex xc-wc"> | ||
| 286 | + <view class="fs24 wz_red">¥</view> | ||
| 287 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 288 | + </view> | ||
| 289 | + </view> | ||
| 290 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 291 | + <!-- 原价 --> | ||
| 292 | + <view class="price flex xc-ash line_th"> | ||
| 293 | + <view class="fs22">¥</view> | ||
| 294 | + <view class="fs22">{{item.market_price}}</view> | ||
| 295 | + </view> | ||
| 296 | + </view> | ||
| 297 | + </block> | ||
| 298 | + </block> | ||
| 299 | + </block> | ||
| 300 | + <block wx:else> | ||
| 301 | + <view class='wz_red'>¥{{item.shop_price}}</view> | ||
| 302 | + <view class='del'>¥{{item.market_price}}</view> | ||
| 303 | + </block> | ||
| 304 | + </block> | ||
| 305 | + </view> | ||
| 306 | + <view class='zs_wz5_2l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | ||
| 307 | + <view style="height: 10rpx;"></view> | ||
| 308 | + </view> | ||
| 309 | + </view> | ||
| 310 | + </view> | ||
| 311 | + | ||
| 312 | + </view> | ||
| 313 | + </navigator> | ||
| 169 | </block> | 314 | </block> |
| 170 | - | ||
| 171 | -</view> | ||
| 172 | -<!--2个一列--> | ||
| 173 | -<block wx:if="{{object.column==2}}"> | ||
| 174 | - <block wx:for="{{goods_array}}" > | ||
| 175 | - <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> | ||
| 176 | - <view class="zs_goods_wai_ban {{g_filter.get_border_type(object.big_order_type)}}"> | ||
| 177 | - <view class="zs_goods_ban"> | ||
| 178 | - <view class='zs_goods_2l'> | ||
| 179 | - <view class='zs_top_2l rel'> | 315 | + <view class="clear"></view> |
| 316 | + </block> | ||
| 317 | + <!--3个一列--> | ||
| 318 | + <block wx:if='{{object.column==3}}'> | ||
| 319 | + <view class="zwp_3 flex wrap jc-ar"> | ||
| 320 | + <block wx:for="{{goods_array}}"> | ||
| 321 | + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> | ||
| 322 | + <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}"> | ||
| 323 | + <view class="zs_goods_san"> | ||
| 324 | + <view class='zs_goods_3l'> | ||
| 325 | + <view class='zs_top_3l rel'> | ||
| 326 | + <block wx:if="{{object.big_order_type==3}}"> | ||
| 327 | + <view style="position: relative; width: 100%; height: 100%"> | ||
| 328 | + <image class='zs_t_img_3l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 329 | + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 330 | + </view> | ||
| 331 | + </block> | ||
| 332 | + <block wx:else> | ||
| 333 | + <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 334 | + </block> | ||
| 335 | + | ||
| 336 | + <block wx:if="{{object.goodicon==3}}"> | ||
| 337 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image> | ||
| 338 | + </block> | ||
| 339 | + <block wx:if="{{object.goodicon==1}}"> | ||
| 340 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | ||
| 341 | + </block> | ||
| 342 | + <block wx:if="{{object.goodicon==2}}"> | ||
| 343 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 344 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 345 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 346 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 347 | + </block> | ||
| 348 | + </view> | ||
| 349 | + <view class='zs_center_3l'> | ||
| 180 | 350 | ||
| 351 | + | ||
| 352 | + <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | ||
| 353 | + <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> | ||
| 354 | + <block wx:if="{{item.prom_price || item.prom_integral}}"> | ||
| 355 | + <view class='wz_red'> | ||
| 356 | + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 357 | + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 358 | + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 359 | + </view> | ||
| 360 | + <view class='del'>¥{{item.market_price}}</view> | ||
| 361 | + </block> | ||
| 362 | + <block wx:else> | ||
| 363 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | ||
| 364 | + <!-- 当会员是等级卡的时候 --> | ||
| 365 | + <block wx:if="{{card_field}}"> | ||
| 366 | + <!-- 等级价>0 --> | ||
| 367 | + <block wx:if="{{item[card_field]>0}}"> | ||
| 368 | + <view class="money flex"> | ||
| 369 | + <!-- 办卡价 --> | ||
| 370 | + <view class="flex xc-wc ai_and"> | ||
| 371 | + <view class="fs24 wz_red">¥</view> | ||
| 372 | + <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> | ||
| 373 | + <view class="card_bg ellipsis-1"> | ||
| 374 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 375 | + <text class="card_name">{{card_name}}</text> | ||
| 376 | + </view> | ||
| 377 | + </view> | ||
| 378 | + </view> | ||
| 379 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 380 | + <!-- 原价 --> | ||
| 381 | + <view class="price flex xc-ash line_th"> | ||
| 382 | + <view class="fs22">¥</view> | ||
| 383 | + <view class="fs22">{{item.market_price}}</view> | ||
| 384 | + </view> | ||
| 385 | + </view> | ||
| 386 | + </block> | ||
| 387 | + <blocK wx:else> | ||
| 388 | + <view class="money flex"> | ||
| 389 | + <!-- 办卡价 --> | ||
| 390 | + <view class="flex xc-wc"> | ||
| 391 | + <view class="fs24 wz_red">¥</view> | ||
| 392 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 393 | + </view> | ||
| 394 | + </view> | ||
| 395 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 396 | + <!-- 原价 --> | ||
| 397 | + <view class="price flex xc-ash line_th"> | ||
| 398 | + <view class="fs22">¥</view> | ||
| 399 | + <view class="fs22">{{item.market_price}}</view> | ||
| 400 | + </view> | ||
| 401 | + </view> | ||
| 402 | + </blocK> | ||
| 403 | + </block> | ||
| 404 | + <block wx:else> | ||
| 405 | + <!-- 如果商品有设置等级价大于0的 --> | ||
| 406 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 407 | + <view class="money flex"> | ||
| 408 | + <!-- 办卡价 --> | ||
| 409 | + <view class="flex xc-wc"> | ||
| 410 | + <view class="fs24 wz_red">¥</view> | ||
| 411 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 412 | + </view> | ||
| 413 | + <!-- 原价 --> | ||
| 414 | + <view class="price flex xc-ash line_th"> | ||
| 415 | + <view class="fs22">¥</view> | ||
| 416 | + <view class="fs22">{{item.market_price}}</view> | ||
| 417 | + </view> | ||
| 418 | + | ||
| 419 | + </view> | ||
| 420 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 421 | + <!-- 等级价 --> | ||
| 422 | + <view class="price flex ai_and"> | ||
| 423 | + <view class="fs22">¥</view> | ||
| 424 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | ||
| 425 | + <view class="card_bg ellipsis-1"> | ||
| 426 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 427 | + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | ||
| 428 | + </view> | ||
| 429 | + </view> | ||
| 430 | + </view> | ||
| 431 | + </block> | ||
| 432 | + <block wx:else> | ||
| 433 | + <view class="money flex"> | ||
| 434 | + <!-- 办卡价 --> | ||
| 435 | + <view class="flex xc-wc"> | ||
| 436 | + <view class="fs24 wz_red">¥</view> | ||
| 437 | + <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 438 | + </view> | ||
| 439 | + </view> | ||
| 440 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 441 | + <!-- 原价 --> | ||
| 442 | + <view class="price flex xc-ash line_th"> | ||
| 443 | + <view class="fs22">¥</view> | ||
| 444 | + <view class="fs22">{{item.market_price}}</view> | ||
| 445 | + </view> | ||
| 446 | + </view> | ||
| 447 | + </block> | ||
| 448 | + </block> | ||
| 449 | + </block> | ||
| 450 | + <block wx:else> | ||
| 451 | + <view class='wz_red'>¥{{item.shop_price}}</view> | ||
| 452 | + <view class='del'>¥{{item.market_price}}</view> | ||
| 453 | + </block> | ||
| 454 | + </block> | ||
| 455 | + </view> | ||
| 456 | + <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | ||
| 457 | + <view style="height: 10rpx;"></view> | ||
| 458 | + </view> | ||
| 459 | + </view> | ||
| 460 | + </view> | ||
| 461 | + </view> | ||
| 462 | + </navigator> | ||
| 463 | + </block> | ||
| 464 | + </view> | ||
| 465 | + <view class="clear"></view> | ||
| 466 | + </block> | ||
| 467 | + <!-- 列表显示 --> | ||
| 468 | + <view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'> | ||
| 469 | + <block wx:for="{{goods_array}}"> | ||
| 470 | + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> | ||
| 471 | + <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}"> | ||
| 472 | + <view class='zs_top_x'> | ||
| 181 | <block wx:if="{{object.big_order_type==3}}"> | 473 | <block wx:if="{{object.big_order_type==3}}"> |
| 182 | <view style="position: relative; width: 100%; height: 100%"> | 474 | <view style="position: relative; width: 100%; height: 100%"> |
| 183 | - <image class='zs_t_img_2l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" | ||
| 184 | - binderror="bind_bnerr3"></image> | ||
| 185 | - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 186 | - binderror="bind_bnerr3"></image> | 475 | + <image class='zs_t_img_x' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image> |
| 476 | + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 187 | </view> | 477 | </view> |
| 188 | </block> | 478 | </block> |
| 479 | + | ||
| 189 | <block wx:else> | 480 | <block wx:else> |
| 190 | - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 191 | - binderror="bind_bnerr3"></image> | 481 | + <!-- 原来的 --> |
| 482 | + <!-- <image class="zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}" | ||
| 483 | + src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 484 | + binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> --> | ||
| 485 | + | ||
| 486 | + <!-- 2021.11.27修改 --> | ||
| 487 | + <image class="block zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 192 | </block> | 488 | </block> |
| 193 | 489 | ||
| 194 | <block wx:if="{{object.goodicon==3}}"> | 490 | <block wx:if="{{object.goodicon==3}}"> |
| 195 | - <image class='{{g_filter.get_class(object.column,object.position)}}' | ||
| 196 | - src='{{object.customicon}}'></image> | 491 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image> |
| 197 | </block> | 492 | </block> |
| 198 | <block wx:if="{{object.goodicon==1}}"> | 493 | <block wx:if="{{object.goodicon==1}}"> |
| 199 | <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | 494 | <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> |
| 200 | </block> | 495 | </block> |
| 201 | <block wx:if="{{object.goodicon==2}}"> | 496 | <block wx:if="{{object.goodicon==2}}"> |
| 202 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | ||
| 203 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 204 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" | ||
| 205 | - src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 206 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | ||
| 207 | - src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 208 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" | ||
| 209 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | 497 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" src='{{imghost}}/miniapp/images/Recommend.png'></image> |
| 498 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 499 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 500 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 210 | </block> | 501 | </block> |
| 211 | </view> | 502 | </view> |
| 212 | 503 | ||
| 213 | - <view class='zs_center_2l'> | ||
| 214 | - <view class='zs_wz1_2l ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | ||
| 215 | - <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}"> | 504 | + <view class='zs_center_x'> |
| 505 | + <view class='zs_wz1_x ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | ||
| 506 | + <view class='zs_wz2_x' wx:if="{{object.goodsprice}}"> | ||
| 216 | 507 | ||
| 217 | <block wx:if="{{item.prom_price || item.prom_integral}}"> | 508 | <block wx:if="{{item.prom_price || item.prom_integral}}"> |
| 218 | <view class='wz_red'> | 509 | <view class='wz_red'> |
| 219 | - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 220 | - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 221 | - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 222 | - </view> | 510 | + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> |
| 511 | + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 512 | + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 513 | + </view> | ||
| 223 | <view class='del'>¥{{item.market_price}}</view> | 514 | <view class='del'>¥{{item.market_price}}</view> |
| 224 | </block> | 515 | </block> |
| 516 | + <!-- 不是活动的情况 --> | ||
| 225 | <block wx:else> | 517 | <block wx:else> |
| 226 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | 518 | + |
| 519 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | ||
| 227 | <!-- 当会员是等级卡的时候 --> | 520 | <!-- 当会员是等级卡的时候 --> |
| 228 | <block wx:if="{{card_field}}"> | 521 | <block wx:if="{{card_field}}"> |
| 229 | <!-- 等级价>0 --> | 522 | <!-- 等级价>0 --> |
| 230 | <block wx:if="{{item[card_field]>0}}"> | 523 | <block wx:if="{{item[card_field]>0}}"> |
| 231 | - <view class="money flex" > | 524 | + <view class="money flex"> |
| 232 | <!-- 办卡价 --> | 525 | <!-- 办卡价 --> |
| 233 | <view class="flex xc-wc ai_and"> | 526 | <view class="flex xc-wc ai_and"> |
| 234 | <view class="fs24 wz_red">¥</view> | 527 | <view class="fs24 wz_red">¥</view> |
| 235 | <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> | 528 | <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> |
| 236 | <view class="card_bg ellipsis-1"> | 529 | <view class="card_bg ellipsis-1"> |
| 237 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 238 | - <view class="card_name">{{card_name}}</view> | ||
| 239 | - </view> | 530 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
| 531 | + <text class="card_name">{{card_name}}</text> | ||
| 532 | + </view> | ||
| 240 | </view> | 533 | </view> |
| 241 | </view> | 534 | </view> |
| 242 | - <view class="flex" style="line-height: 28rpx;" > | 535 | + <view class="flex" style="line-height: 28rpx;"> |
| 243 | <!-- 原价 --> | 536 | <!-- 原价 --> |
| 244 | <view class="price flex xc-ash line_th"> | 537 | <view class="price flex xc-ash line_th"> |
| 245 | <view class="fs22">¥</view> | 538 | <view class="fs22">¥</view> |
| @@ -248,14 +541,14 @@ | @@ -248,14 +541,14 @@ | ||
| 248 | </view> | 541 | </view> |
| 249 | </block> | 542 | </block> |
| 250 | <blocK wx:else> | 543 | <blocK wx:else> |
| 251 | - <view class="money flex" > | 544 | + <view class="money flex"> |
| 252 | <!-- 办卡价 --> | 545 | <!-- 办卡价 --> |
| 253 | <view class="flex xc-wc"> | 546 | <view class="flex xc-wc"> |
| 254 | - <view class="fs24 wz_red">¥</view> | ||
| 255 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | 547 | + <view class="fs24">¥</view> |
| 548 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 256 | </view> | 549 | </view> |
| 257 | </view> | 550 | </view> |
| 258 | - <view class="flex" style="line-height: 28rpx;" > | 551 | + <view class="flex" style="line-height: 28rpx;"> |
| 259 | <!-- 原价 --> | 552 | <!-- 原价 --> |
| 260 | <view class="price flex xc-ash line_th"> | 553 | <view class="price flex xc-ash line_th"> |
| 261 | <view class="fs22">¥</view> | 554 | <view class="fs22">¥</view> |
| @@ -267,11 +560,11 @@ | @@ -267,11 +560,11 @@ | ||
| 267 | <block wx:else> | 560 | <block wx:else> |
| 268 | <!-- 如果商品有设置等级价大于0的 --> | 561 | <!-- 如果商品有设置等级价大于0的 --> |
| 269 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | 562 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
| 270 | - <view class="money flex" > | 563 | + <view class="money flex"> |
| 271 | <!-- 办卡价 --> | 564 | <!-- 办卡价 --> |
| 272 | <view class="flex xc-wc"> | 565 | <view class="flex xc-wc"> |
| 273 | - <view class="fs24 wz_red">¥</view> | ||
| 274 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | 566 | + <view class="fs24">¥</view> |
| 567 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 275 | </view> | 568 | </view> |
| 276 | <!-- 原价 --> | 569 | <!-- 原价 --> |
| 277 | <view class="price flex xc-ash line_th"> | 570 | <view class="price flex xc-ash line_th"> |
| @@ -280,27 +573,26 @@ | @@ -280,27 +573,26 @@ | ||
| 280 | </view> | 573 | </view> |
| 281 | 574 | ||
| 282 | </view> | 575 | </view> |
| 283 | - <view class="flex" style="line-height: 28rpx;" > | 576 | + <view class="flex" style="line-height: 28rpx;"> |
| 284 | <!-- 等级价 --> | 577 | <!-- 等级价 --> |
| 285 | <view class="price flex ai_and"> | 578 | <view class="price flex ai_and"> |
| 286 | <view class="fs22">¥</view> | 579 | <view class="fs22">¥</view> |
| 287 | <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | 580 | <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> |
| 288 | - <view class="card_bg ellipsis-1"> | ||
| 289 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 290 | - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | ||
| 291 | - </view> | 581 | + <view class="card_bg"> |
| 582 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}} | ||
| 583 | + </view> | ||
| 292 | </view> | 584 | </view> |
| 293 | </view> | 585 | </view> |
| 294 | </block> | 586 | </block> |
| 295 | <block wx:else> | 587 | <block wx:else> |
| 296 | - <view class="money flex" > | 588 | + <view class="money flex"> |
| 297 | <!-- 办卡价 --> | 589 | <!-- 办卡价 --> |
| 298 | <view class="flex xc-wc"> | 590 | <view class="flex xc-wc"> |
| 299 | <view class="fs24 wz_red">¥</view> | 591 | <view class="fs24 wz_red">¥</view> |
| 300 | <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | 592 | <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> |
| 301 | </view> | 593 | </view> |
| 302 | </view> | 594 | </view> |
| 303 | - <view class="flex" style="line-height: 28rpx;" > | 595 | + <view class="flex" style="line-height: 28rpx;"> |
| 304 | <!-- 原价 --> | 596 | <!-- 原价 --> |
| 305 | <view class="price flex xc-ash line_th"> | 597 | <view class="price flex xc-ash line_th"> |
| 306 | <view class="fs22">¥</view> | 598 | <view class="fs22">¥</view> |
| @@ -310,521 +602,197 @@ | @@ -310,521 +602,197 @@ | ||
| 310 | </block> | 602 | </block> |
| 311 | </block> | 603 | </block> |
| 312 | </block> | 604 | </block> |
| 605 | + | ||
| 313 | <block wx:else> | 606 | <block wx:else> |
| 314 | - <view class='wz_red'>¥{{item.shop_price}}</view> | ||
| 315 | - <view class='del'>¥{{item.market_price}}</view> | 607 | + <view class='wz_red'>¥{{item.shop_price}}</view> |
| 608 | + <view class='del'>¥{{item.market_price}}</view> | ||
| 316 | </block> | 609 | </block> |
| 610 | + | ||
| 317 | </block> | 611 | </block> |
| 318 | </view> | 612 | </view> |
| 319 | - <view class='zs_wz5_2l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | ||
| 320 | - <view style="height: 10rpx;"></view> | 613 | + <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> |
| 321 | </view> | 614 | </view> |
| 615 | + | ||
| 322 | </view> | 616 | </view> |
| 617 | + </navigator> | ||
| 618 | + </block> | ||
| 619 | + <view class="clear"></view> | ||
| 620 | + </view> | ||
| 621 | + | ||
| 622 | + | ||
| 623 | + <!-- 商品的显示不是左右 --> | ||
| 624 | + <block wx:if="{{object.column!=5}}"> | ||
| 625 | + <block wx:if="{{classstyle_id=='1' }}"> | ||
| 626 | + <view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none"> | ||
| 627 | + <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> | ||
| 628 | + {{loadText}} | ||
| 629 | + </button> | ||
| 323 | </view> | 630 | </view> |
| 631 | + </block> | ||
| 632 | + <block wx:if="{{classstyle_id!='1' }}"> | ||
| 633 | + <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> | ||
| 634 | + <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">{{loadText}}</button> | ||
| 635 | + </view> | ||
| 636 | + <view class="fs28" wx:if="{{object.goodscount * page >=total }}" style="color:{{object.nomore_color}};text-align: center; padding: 20rpx 0">-- 没有更多 -- </view> | ||
| 324 | 637 | ||
| 325 | - </view> | ||
| 326 | - </navigator> | ||
| 327 | -</block> | ||
| 328 | - <view class="clear"></view> | ||
| 329 | -</block> | ||
| 330 | -<!--3个一列--> | ||
| 331 | -<block wx:if='{{object.column==3}}'> | ||
| 332 | - <view class="zwp_3 flex wrap jc-ar"> | ||
| 333 | - <block wx:for="{{goods_array}}" > | ||
| 334 | - <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> | ||
| 335 | - <view class="zs_goods_wai_san {{g_filter.get_border_type(object.big_order_type)}}" > | ||
| 336 | - <view class="zs_goods_san"> | ||
| 337 | - <view class='zs_goods_3l'> | ||
| 338 | - <view class='zs_top_3l rel'> | ||
| 339 | - <block wx:if="{{object.big_order_type==3}}"> | ||
| 340 | - <view style="position: relative; width: 100%; height: 100%"> | ||
| 341 | - <image class='zs_t_img_3l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" | ||
| 342 | - binderror="bind_bnerr3"></image> | ||
| 343 | - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 344 | - binderror="bind_bnerr3"></image> | ||
| 345 | - </view> | ||
| 346 | - </block> | ||
| 347 | - <block wx:else> | ||
| 348 | - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 349 | - binderror="bind_bnerr3"></image> | ||
| 350 | - </block> | 638 | + </block> |
| 639 | + </block> | ||
| 351 | 640 | ||
| 352 | - <block wx:if="{{object.goodicon==3}}"> | ||
| 353 | - <image class='{{g_filter.get_class(object.column,object.position)}}' | ||
| 354 | - src='{{object.customicon}}'></image> | ||
| 355 | - </block> | ||
| 356 | - <block wx:if="{{object.goodicon==1}}"> | ||
| 357 | - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | ||
| 358 | - </block> | ||
| 359 | - <block wx:if="{{object.goodicon==2}}"> | ||
| 360 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | ||
| 361 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 362 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" | ||
| 363 | - src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 364 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | ||
| 365 | - src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 366 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" | ||
| 367 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 368 | - </block> | ||
| 369 | - </view> | ||
| 370 | - <view class='zs_center_3l'> | ||
| 371 | 641 | ||
| 642 | + <!--商品展示--> | ||
| 643 | + <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;"> | ||
| 644 | + <view class="sp"> | ||
| 645 | + <swiper-item class="s_it" wx:for="{{goods_array}}"> | ||
| 646 | + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | ||
| 647 | + <navigator url="{{g_filter.get_url_by_type(aitem)}}" style="width: 32%"> | ||
| 648 | + <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}} " style="margin-left: 10rpx"> | ||
| 649 | + <view class='sp_top'> | ||
| 650 | + <view class='s_img' style="position: relative; width: 100%"> | ||
| 372 | 651 | ||
| 373 | - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | ||
| 374 | - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> | ||
| 375 | - <block wx:if="{{item.prom_price || item.prom_integral}}"> | ||
| 376 | - <view class='wz_red'> | ||
| 377 | - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 378 | - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 379 | - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 380 | - </view> | ||
| 381 | - <view class='del'>¥{{item.market_price}}</view> | ||
| 382 | - </block> | ||
| 383 | - <block wx:else> | ||
| 384 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | ||
| 385 | - <!-- 当会员是等级卡的时候 --> | ||
| 386 | - <block wx:if="{{card_field}}"> | ||
| 387 | - <!-- 等级价>0 --> | ||
| 388 | - <block wx:if="{{item[card_field]>0}}"> | ||
| 389 | - <view class="money flex" > | ||
| 390 | - <!-- 办卡价 --> | ||
| 391 | - <view class="flex xc-wc ai_and"> | ||
| 392 | - <view class="fs24 wz_red">¥</view> | ||
| 393 | - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> | ||
| 394 | - <view class="card_bg ellipsis-1"> | ||
| 395 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 396 | - <text class="card_name">{{card_name}}</text> | ||
| 397 | - </view> | ||
| 398 | - </view> | ||
| 399 | - </view> | ||
| 400 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 401 | - <!-- 原价 --> | ||
| 402 | - <view class="price flex xc-ash line_th"> | ||
| 403 | - <view class="fs22">¥</view> | ||
| 404 | - <view class="fs22">{{item.market_price}}</view> | ||
| 405 | - </view> | ||
| 406 | - </view> | ||
| 407 | - </block> | ||
| 408 | - <blocK wx:else> | ||
| 409 | - <view class="money flex" > | ||
| 410 | - <!-- 办卡价 --> | ||
| 411 | - <view class="flex xc-wc"> | ||
| 412 | - <view class="fs24 wz_red">¥</view> | ||
| 413 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 414 | - </view> | ||
| 415 | - </view> | ||
| 416 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 417 | - <!-- 原价 --> | ||
| 418 | - <view class="price flex xc-ash line_th"> | ||
| 419 | - <view class="fs22">¥</view> | ||
| 420 | - <view class="fs22">{{item.market_price}}</view> | 652 | + <block wx:if="{{object.big_order_type==3}}"> |
| 653 | + <view style="position: relative; width: 100%; height: 100%"> | ||
| 654 | + <image src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 655 | + | ||
| 656 | + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 657 | + </view> | ||
| 658 | + </block> | ||
| 659 | + | ||
| 660 | + <block wx:else> | ||
| 661 | + <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img" binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image> | ||
| 662 | + </block> | ||
| 663 | + | ||
| 664 | + | ||
| 665 | + <block wx:if="{{object.goodicon==3}}"> | ||
| 666 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image> | ||
| 667 | + </block> | ||
| 668 | + <block wx:if="{{object.goodicon==1}}"> | ||
| 669 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | ||
| 670 | + </block> | ||
| 671 | + <block wx:if="{{object.goodicon==2}}"> | ||
| 672 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 673 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 674 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 675 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 676 | + </block> | ||
| 677 | + | ||
| 678 | + </view> | ||
| 679 | + <view class='clear'></view> | ||
| 680 | + </view> | ||
| 681 | + | ||
| 682 | + <view class='sp_wz'> | ||
| 683 | + <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{aitem.goods_name}}</view> | ||
| 684 | + <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> | ||
| 685 | + <block wx:if="{{aitem.prom_price || aitem.prom_integral }}"> | ||
| 686 | + <view class='wz_red'> | ||
| 687 | + <text wx:if="{{aitem.prom_integral}}">{{aitem.prom_integral}}</text> | ||
| 688 | + <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text> | ||
| 689 | + <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text> | ||
| 690 | + </view> | ||
| 691 | + <view class='del'>¥{{aitem.market_price}}</view> | ||
| 692 | + </block> | ||
| 693 | + <block wx:else> | ||
| 694 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}"> | ||
| 695 | + <!-- 当会员是等级卡的时候 --> | ||
| 696 | + <block wx:if="{{card_field}}"> | ||
| 697 | + <!-- 等级价>0 --> | ||
| 698 | + <block wx:if="{{aitem[card_field]>0}}"> | ||
| 699 | + <view class="money flex"> | ||
| 700 | + <!-- 办卡价 --> | ||
| 701 | + <view class="flex xc-wc ai_and"> | ||
| 702 | + <view class="fs24 wz_red">¥</view> | ||
| 703 | + <view class="fs35 wz_red">{{filter.toFix(aitem[card_field],2)}}</view> | ||
| 704 | + <view class="card_bg ellipsis-1"> | ||
| 705 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 706 | + <text class="card_name">{{card_name}}</text> | ||
| 707 | + </view> | ||
| 708 | + </view> | ||
| 421 | </view> | 709 | </view> |
| 422 | - </view> | ||
| 423 | - </blocK> | ||
| 424 | - </block> | ||
| 425 | - <block wx:else> | ||
| 426 | - <!-- 如果商品有设置等级价大于0的 --> | ||
| 427 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 428 | - <view class="money flex" > | ||
| 429 | - <!-- 办卡价 --> | ||
| 430 | - <view class="flex xc-wc"> | ||
| 431 | - <view class="fs24 wz_red">¥</view> | ||
| 432 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | 710 | + <view class="flex" style="line-height: 28rpx;"> |
| 711 | + <!-- 原价 --> | ||
| 712 | + <view class="price flex xc-ash line_th"> | ||
| 713 | + <view class="fs22">¥</view> | ||
| 714 | + <view class="fs22">{{aitem.market_price}}</view> | ||
| 715 | + </view> | ||
| 433 | </view> | 716 | </view> |
| 434 | - <!-- 原价 --> | ||
| 435 | - <view class="price flex xc-ash line_th"> | ||
| 436 | - <view class="fs22">¥</view> | ||
| 437 | - <view class="fs22">{{item.market_price}}</view> | 717 | + </block> |
| 718 | + <blocK wx:else> | ||
| 719 | + <view class="money flex"> | ||
| 720 | + <!-- 办卡价 --> | ||
| 721 | + <view class="flex xc-wc"> | ||
| 722 | + <view class="fs24 wz_red">¥</view> | ||
| 723 | + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> | ||
| 724 | + </view> | ||
| 438 | </view> | 725 | </view> |
| 439 | - | ||
| 440 | - </view> | ||
| 441 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 442 | - <!-- 等级价 --> | ||
| 443 | - <view class="price flex ai_and"> | ||
| 444 | - <view class="fs22">¥</view> | ||
| 445 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | ||
| 446 | - <view class="card_bg ellipsis-1"> | ||
| 447 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 448 | - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | ||
| 449 | - </view> | 726 | + <view class="flex" style="line-height: 28rpx;"> |
| 727 | + <!-- 原价 --> | ||
| 728 | + <view class="price flex xc-ash line_th"> | ||
| 729 | + <view class="fs22">¥</view> | ||
| 730 | + <view class="fs22">{{aitem.market_price}}</view> | ||
| 731 | + </view> | ||
| 450 | </view> | 732 | </view> |
| 451 | - </view> | 733 | + </blocK> |
| 452 | </block> | 734 | </block> |
| 453 | <block wx:else> | 735 | <block wx:else> |
| 454 | - <view class="money flex" > | ||
| 455 | - <!-- 办卡价 --> | ||
| 456 | - <view class="flex xc-wc"> | ||
| 457 | - <view class="fs24 wz_red">¥</view> | ||
| 458 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | 736 | + <!-- 如果商品有设置等级价大于0的 --> |
| 737 | + <block wx:if="{{g_filter.get_card_price(aitem,card_list,0)}}"> | ||
| 738 | + <view class="money flex"> | ||
| 739 | + <!-- 办卡价 --> | ||
| 740 | + <view class="flex xc-wc"> | ||
| 741 | + <view class="fs24 wz_red">¥</view> | ||
| 742 | + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> | ||
| 743 | + </view> | ||
| 744 | + <!-- 原价 --> | ||
| 745 | + <view class="price flex xc-ash line_th"> | ||
| 746 | + <view class="fs22">¥</view> | ||
| 747 | + <view class="fs22">{{aitem.market_price}}</view> | ||
| 748 | + </view> | ||
| 749 | + | ||
| 459 | </view> | 750 | </view> |
| 460 | - </view> | ||
| 461 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 462 | - <!-- 原价 --> | ||
| 463 | - <view class="price flex xc-ash line_th"> | ||
| 464 | - <view class="fs22">¥</view> | ||
| 465 | - <view class="fs22">{{item.market_price}}</view> | 751 | + <view class="flex" style="line-height: 28rpx;"> |
| 752 | + <!-- 等级价 --> | ||
| 753 | + <view class="price flex ai_and"> | ||
| 754 | + <view class="fs22">¥</view> | ||
| 755 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(aitem,card_list,0),2)}}</view> | ||
| 756 | + <view class="card_bg ellipsis-1"> | ||
| 757 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 758 | + <text class="card_name">{{g_filter.get_card_price(aitem,card_list,1)}}</text> | ||
| 759 | + </view> | ||
| 760 | + </view> | ||
| 466 | </view> | 761 | </view> |
| 467 | - </view> | 762 | + </block> |
| 763 | + <block wx:else> | ||
| 764 | + <view class="money flex"> | ||
| 765 | + <!-- 办卡价 --> | ||
| 766 | + <view class="flex xc-wc"> | ||
| 767 | + <view class="fs24 wz_red">¥</view> | ||
| 768 | + <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> | ||
| 769 | + </view> | ||
| 770 | + </view> | ||
| 771 | + <view class="flex" style="line-height: 28rpx;"> | ||
| 772 | + <!-- 原价 --> | ||
| 773 | + <view class="price flex xc-ash line_th"> | ||
| 774 | + <view class="fs22">¥</view> | ||
| 775 | + <view class="fs22">{{aitem.market_price}}</view> | ||
| 776 | + </view> | ||
| 777 | + </view> | ||
| 778 | + </block> | ||
| 468 | </block> | 779 | </block> |
| 469 | </block> | 780 | </block> |
| 781 | + <block wx:else> | ||
| 782 | + <view class='wz_red'>¥{{aitem.shop_price}}</view> | ||
| 783 | + <view class='del'>¥{{aitem.market_price}}</view> | ||
| 784 | + </block> | ||
| 470 | </block> | 785 | </block> |
| 471 | - <block wx:else> | ||
| 472 | - <view class='wz_red'>¥{{item.shop_price}}</view> | ||
| 473 | - <view class='del'>¥{{item.market_price}}</view> | ||
| 474 | - </block> | ||
| 475 | - </block> | 786 | + </view> |
| 787 | + <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{aitem.sales_sum}}件</view> | ||
| 788 | + <view style="height: 10rpx;"></view> | ||
| 476 | </view> | 789 | </view> |
| 477 | - <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | ||
| 478 | - <view style="height: 10rpx;"></view> | ||
| 479 | - </view> | ||
| 480 | - </view> | ||
| 481 | - </view> | ||
| 482 | - </view> | ||
| 483 | - </navigator> | ||
| 484 | - </block> | ||
| 485 | -</view> | ||
| 486 | - <view class="clear"></view> | ||
| 487 | -</block> | ||
| 488 | -<!-- 列表显示 --> | ||
| 489 | -<view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'> | ||
| 490 | - <block wx:for="{{goods_array}}" > | ||
| 491 | - <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1"> | ||
| 492 | - <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > | ||
| 493 | - <view class='zs_top_x'> | ||
| 494 | - <block wx:if="{{object.big_order_type==3}}"> | ||
| 495 | - <view style="position: relative; width: 100%; height: 100%"> | ||
| 496 | - <image class='zs_t_img_x' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" | ||
| 497 | - binderror="bind_bnerr3"></image> | ||
| 498 | - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 499 | - binderror="bind_bnerr3"></image> | ||
| 500 | - </view> | ||
| 501 | - </block> | ||
| 502 | - | ||
| 503 | - <block wx:else> | ||
| 504 | - <!-- 原来的 --> | ||
| 505 | - <!-- <image class="zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}" | ||
| 506 | - src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 507 | - binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> --> | ||
| 508 | - | ||
| 509 | - <!-- 2021.11.27修改 --> | ||
| 510 | - <image class="block zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}" | ||
| 511 | - src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" | ||
| 512 | - binderror="bind_bnerr3"></image> | ||
| 513 | - </block> | ||
| 514 | - | ||
| 515 | - <block wx:if="{{object.goodicon==3}}"> | ||
| 516 | - <image class='{{g_filter.get_class(object.column,object.position)}}' | ||
| 517 | - src='{{object.customicon}}'></image> | ||
| 518 | - </block> | ||
| 519 | - <block wx:if="{{object.goodicon==1}}"> | ||
| 520 | - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | ||
| 521 | - </block> | ||
| 522 | - <block wx:if="{{object.goodicon==2}}"> | ||
| 523 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | ||
| 524 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 525 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" | ||
| 526 | - src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 527 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | ||
| 528 | - src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 529 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" | ||
| 530 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 531 | - </block> | ||
| 532 | - </view> | ||
| 533 | - | ||
| 534 | - <view class='zs_center_x'> | ||
| 535 | - <view class='zs_wz1_x ellipsis-2' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | ||
| 536 | - <view class='zs_wz2_x' wx:if="{{object.goodsprice}}"> | ||
| 537 | - | ||
| 538 | - <block wx:if="{{item.prom_price || item.prom_integral}}"> | ||
| 539 | - <view class='wz_red'> | ||
| 540 | - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 541 | - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 542 | - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | ||
| 543 | - </view> | ||
| 544 | - <view class='del'>¥{{item.market_price}}</view> | ||
| 545 | - </block> | ||
| 546 | - <!-- 不是活动的情况 --> | ||
| 547 | - <block wx:else> | ||
| 548 | - | ||
| 549 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | ||
| 550 | - <!-- 当会员是等级卡的时候 --> | ||
| 551 | - <block wx:if="{{card_field}}"> | ||
| 552 | - <!-- 等级价>0 --> | ||
| 553 | - <block wx:if="{{item[card_field]>0}}"> | ||
| 554 | - <view class="money flex" > | ||
| 555 | - <!-- 办卡价 --> | ||
| 556 | - <view class="flex xc-wc ai_and"> | ||
| 557 | - <view class="fs24 wz_red">¥</view> | ||
| 558 | - <view class="fs35 wz_red">{{filter.toFix(item[card_field],2)}}</view> | ||
| 559 | - <view class="card_bg ellipsis-1"> | ||
| 560 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 561 | - <text class="card_name">{{card_name}}</text> | ||
| 562 | - </view> | ||
| 563 | - </view> | ||
| 564 | - </view> | ||
| 565 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 566 | - <!-- 原价 --> | ||
| 567 | - <view class="price flex xc-ash line_th"> | ||
| 568 | - <view class="fs22">¥</view> | ||
| 569 | - <view class="fs22">{{item.market_price}}</view> | ||
| 570 | - </view> | ||
| 571 | - </view> | ||
| 572 | - </block> | ||
| 573 | - <blocK wx:else> | ||
| 574 | - <view class="money flex" > | ||
| 575 | - <!-- 办卡价 --> | ||
| 576 | - <view class="flex xc-wc"> | ||
| 577 | - <view class="fs24">¥</view> | ||
| 578 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 579 | - </view> | ||
| 580 | - </view> | ||
| 581 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 582 | - <!-- 原价 --> | ||
| 583 | - <view class="price flex xc-ash line_th"> | ||
| 584 | - <view class="fs22">¥</view> | ||
| 585 | - <view class="fs22">{{item.market_price}}</view> | ||
| 586 | - </view> | ||
| 587 | - </view> | ||
| 588 | - </blocK> | ||
| 589 | - </block> | ||
| 590 | - <block wx:else> | ||
| 591 | - <!-- 如果商品有设置等级价大于0的 --> | ||
| 592 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 593 | - <view class="money flex" > | ||
| 594 | - <!-- 办卡价 --> | ||
| 595 | - <view class="flex xc-wc"> | ||
| 596 | - <view class="fs24">¥</view> | ||
| 597 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 598 | - </view> | ||
| 599 | - <!-- 原价 --> | ||
| 600 | - <view class="price flex xc-ash line_th"> | ||
| 601 | - <view class="fs22">¥</view> | ||
| 602 | - <view class="fs22">{{item.market_price}}</view> | ||
| 603 | - </view> | ||
| 604 | - | ||
| 605 | - </view> | ||
| 606 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 607 | - <!-- 等级价 --> | ||
| 608 | - <view class="price flex ai_and"> | ||
| 609 | - <view class="fs22">¥</view> | ||
| 610 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | ||
| 611 | - <view class="card_bg"> | ||
| 612 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view> | ||
| 613 | - </view> | ||
| 614 | - </view> | ||
| 615 | - </block> | ||
| 616 | - <block wx:else> | ||
| 617 | - <view class="money flex" > | ||
| 618 | - <!-- 办卡价 --> | ||
| 619 | - <view class="flex xc-wc"> | ||
| 620 | - <view class="fs24 wz_red">¥</view> | ||
| 621 | - <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 622 | - </view> | ||
| 623 | - </view> | ||
| 624 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 625 | - <!-- 原价 --> | ||
| 626 | - <view class="price flex xc-ash line_th"> | ||
| 627 | - <view class="fs22">¥</view> | ||
| 628 | - <view class="fs22">{{item.market_price}}</view> | ||
| 629 | - </view> | ||
| 630 | - </view> | ||
| 631 | - </block> | ||
| 632 | - </block> | ||
| 633 | - </block> | ||
| 634 | - | ||
| 635 | - <block wx:else> | ||
| 636 | - <view class='wz_red'>¥{{item.shop_price}}</view> | ||
| 637 | - <view class='del'>¥{{item.market_price}}</view> | ||
| 638 | - </block> | ||
| 639 | - | ||
| 640 | - </block> | ||
| 641 | - </view> | ||
| 642 | - <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | ||
| 643 | - </view> | ||
| 644 | - | ||
| 645 | - </view> | ||
| 646 | - </navigator> | ||
| 647 | - </block> | ||
| 648 | - <view class="clear"></view> | ||
| 649 | -</view> | ||
| 650 | - | ||
| 651 | - | ||
| 652 | -<!-- 商品的显示不是左右 --> | ||
| 653 | -<block wx:if="{{object.column!=5}}"> | ||
| 654 | -<block wx:if="{{classstyle_id=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none"> | ||
| 655 | - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> | ||
| 656 | - {{loadText}} | ||
| 657 | - </button> | ||
| 658 | -</view></block> | ||
| 659 | -<block wx:if="{{classstyle_id!='1' }}"> | ||
| 660 | - <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> | ||
| 661 | - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">{{loadText}}</button> | ||
| 662 | - </view> | ||
| 663 | - <view class="fs28" wx:if="{{object.goodscount * page >=total }}" style="color:{{object.nomore_color}};text-align: center; padding: 20rpx 0">-- 没有更多 -- </view> | ||
| 664 | - | ||
| 665 | -</block> | ||
| 666 | -</block> | ||
| 667 | - | ||
| 668 | - | ||
| 669 | -<!--商品展示--> | ||
| 670 | -<swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;"> | ||
| 671 | - <view class="sp"> | ||
| 672 | - <swiper-item class="s_it" wx:for="{{goods_array}}"> | ||
| 673 | - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | ||
| 674 | - <navigator url="{{g_filter.get_url_by_type(aitem)}}" style="width: 32%" > | ||
| 675 | - <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}} " style="margin-left: 10rpx"> | ||
| 676 | - <view class='sp_top'> | ||
| 677 | - <view class='s_img' style="position: relative; width: 100%"> | ||
| 678 | 790 | ||
| 679 | - <block wx:if="{{object.big_order_type==3}}"> | ||
| 680 | - <view style="position: relative; width: 100%; height: 100%"> | ||
| 681 | - <image src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true" | ||
| 682 | - binderror="bind_bnerr3"></image> | ||
| 683 | - | ||
| 684 | - <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image> | ||
| 685 | </view> | 791 | </view> |
| 686 | - </block> | ||
| 687 | - | ||
| 688 | - <block wx:else> | ||
| 689 | - <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img" | ||
| 690 | - binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image> | ||
| 691 | - </block> | ||
| 692 | - | ||
| 693 | - | ||
| 694 | - <block wx:if="{{object.goodicon==3}}"> | ||
| 695 | - <image class='{{g_filter.get_class(object.column,object.position)}}' | ||
| 696 | - src='{{object.customicon}}'></image> | ||
| 697 | - </block> | ||
| 698 | - <block wx:if="{{object.goodicon==1}}"> | ||
| 699 | - <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | ||
| 700 | - </block> | ||
| 701 | - <block wx:if="{{object.goodicon==2}}"> | ||
| 702 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | ||
| 703 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | ||
| 704 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" | ||
| 705 | - src='{{imghost}}/miniapp/images/hot.png'></image> | ||
| 706 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | ||
| 707 | - src='{{imghost}}/miniapp/images/new.png'></image> | ||
| 708 | - <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" | ||
| 709 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | ||
| 710 | - </block> | ||
| 711 | - | ||
| 712 | - </view> | ||
| 713 | - <view class='clear'></view> | ||
| 714 | - </view> | ||
| 715 | - | ||
| 716 | - <view class='sp_wz'> | ||
| 717 | - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{aitem.goods_name}}</view> | ||
| 718 | - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> | ||
| 719 | - <block wx:if="{{aitem.prom_price || aitem.prom_integral }}"> | ||
| 720 | - <view class='wz_red'> | ||
| 721 | - <text wx:if="{{aitem.prom_integral}}">{{aitem.prom_integral}}</text> | ||
| 722 | - <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text> | ||
| 723 | - <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text> | ||
| 724 | - </view> | ||
| 725 | - <view class='del'>¥{{aitem.market_price}}</view> | ||
| 726 | - </block> | ||
| 727 | - <block wx:else> | ||
| 728 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}" > | ||
| 729 | - <!-- 当会员是等级卡的时候 --> | ||
| 730 | - <block wx:if="{{card_field}}"> | ||
| 731 | - <!-- 等级价>0 --> | ||
| 732 | - <block wx:if="{{aitem[card_field]>0}}"> | ||
| 733 | - <view class="money flex" > | ||
| 734 | - <!-- 办卡价 --> | ||
| 735 | - <view class="flex xc-wc ai_and"> | ||
| 736 | - <view class="fs24 wz_red">¥</view> | ||
| 737 | - <view class="fs35 wz_red">{{filter.toFix(aitem[card_field],2)}}</view> | ||
| 738 | - <view class="card_bg ellipsis-1"> | ||
| 739 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 740 | - <text class="card_name">{{card_name}}</text> | ||
| 741 | - </view> | ||
| 742 | - </view> | ||
| 743 | - </view> | ||
| 744 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 745 | - <!-- 原价 --> | ||
| 746 | - <view class="price flex xc-ash line_th"> | ||
| 747 | - <view class="fs22">¥</view> | ||
| 748 | - <view class="fs22">{{aitem.market_price}}</view> | ||
| 749 | - </view> | ||
| 750 | - </view> | ||
| 751 | - </block> | ||
| 752 | - <blocK wx:else> | ||
| 753 | - <view class="money flex" > | ||
| 754 | - <!-- 办卡价 --> | ||
| 755 | - <view class="flex xc-wc"> | ||
| 756 | - <view class="fs24 wz_red">¥</view> | ||
| 757 | - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> | ||
| 758 | - </view> | ||
| 759 | - </view> | ||
| 760 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 761 | - <!-- 原价 --> | ||
| 762 | - <view class="price flex xc-ash line_th"> | ||
| 763 | - <view class="fs22">¥</view> | ||
| 764 | - <view class="fs22">{{aitem.market_price}}</view> | ||
| 765 | - </view> | ||
| 766 | - </view> | ||
| 767 | - </blocK> | ||
| 768 | - </block> | ||
| 769 | - <block wx:else> | ||
| 770 | - <!-- 如果商品有设置等级价大于0的 --> | ||
| 771 | - <block wx:if="{{g_filter.get_card_price(aitem,card_list,0)}}"> | ||
| 772 | - <view class="money flex" > | ||
| 773 | - <!-- 办卡价 --> | ||
| 774 | - <view class="flex xc-wc"> | ||
| 775 | - <view class="fs24 wz_red">¥</view> | ||
| 776 | - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> | ||
| 777 | - </view> | ||
| 778 | - <!-- 原价 --> | ||
| 779 | - <view class="price flex xc-ash line_th"> | ||
| 780 | - <view class="fs22">¥</view> | ||
| 781 | - <view class="fs22">{{aitem.market_price}}</view> | ||
| 782 | - </view> | ||
| 783 | - | ||
| 784 | - </view> | ||
| 785 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 786 | - <!-- 等级价 --> | ||
| 787 | - <view class="price flex ai_and"> | ||
| 788 | - <view class="fs22">¥</view> | ||
| 789 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(aitem,card_list,0),2)}}</view> | ||
| 790 | - <view class="card_bg ellipsis-1"> | ||
| 791 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 792 | - <text class="card_name">{{g_filter.get_card_price(aitem,card_list,1)}}</text> | ||
| 793 | - </view> | ||
| 794 | - </view> | ||
| 795 | - </view> | ||
| 796 | - </block> | ||
| 797 | - <block wx:else> | ||
| 798 | - <view class="money flex" > | ||
| 799 | - <!-- 办卡价 --> | ||
| 800 | - <view class="flex xc-wc"> | ||
| 801 | - <view class="fs24 wz_red">¥</view> | ||
| 802 | - <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> | ||
| 803 | - </view> | ||
| 804 | - </view> | ||
| 805 | - <view class="flex" style="line-height: 28rpx;" > | ||
| 806 | - <!-- 原价 --> | ||
| 807 | - <view class="price flex xc-ash line_th"> | ||
| 808 | - <view class="fs22">¥</view> | ||
| 809 | - <view class="fs22">{{aitem.market_price}}</view> | ||
| 810 | - </view> | ||
| 811 | - </view> | ||
| 812 | - </block> | ||
| 813 | - </block> | ||
| 814 | - </block> | ||
| 815 | - <block wx:else> | ||
| 816 | - <view class='wz_red'>¥{{aitem.shop_price}}</view> | ||
| 817 | - <view class='del'>¥{{aitem.market_price}}</view> | ||
| 818 | - </block> | ||
| 819 | - </block> | ||
| 820 | - </view> | ||
| 821 | - <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{aitem.sales_sum}}件</view> | ||
| 822 | - <view style="height: 10rpx;"></view> | ||
| 823 | - </view> | 792 | + </navigator> |
| 793 | + </block> | ||
| 794 | + </swiper-item> | ||
| 795 | + </view> | ||
| 796 | + </swiper> | ||
| 824 | 797 | ||
| 825 | - </view> | ||
| 826 | - </navigator> | ||
| 827 | - </block> | ||
| 828 | - </swiper-item> | ||
| 829 | - </view> | ||
| 830 | - </swiper> | ||
| 831 | \ No newline at end of file | 798 | \ No newline at end of file |
| 799 | +</view> | ||
| 832 | \ No newline at end of file | 800 | \ No newline at end of file |
packageA/pages/jfbuy/jfbuy.wxss
pages/goods/goodsInfo/goodsInfo.js
| @@ -4322,8 +4322,33 @@ Page({ | @@ -4322,8 +4322,33 @@ Page({ | ||
| 4322 | if (quan_list) { | 4322 | if (quan_list) { |
| 4323 | for (var ind in quan_list) { | 4323 | for (var ind in quan_list) { |
| 4324 | var ep = quan_list[ind]; | 4324 | var ep = quan_list[ind]; |
| 4325 | - var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | ||
| 4326 | - var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | 4325 | + var start=""; |
| 4326 | + var end=""; | ||
| 4327 | + if( ep.starttype == 0 ){ | ||
| 4328 | + if(ep.use_start_time){ | ||
| 4329 | + start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | ||
| 4330 | + }else{ | ||
| 4331 | + start=ut.formatTime("","yyyy-MM-dd"); | ||
| 4332 | + } | ||
| 4333 | + }else{ | ||
| 4334 | + if(ep.startdays){ | ||
| 4335 | + // start=ut.gettimestamp() + 3600*24*ep.startdays; | ||
| 4336 | + start=ut.formatTime(ut.gettimestamp() + 3600*24*ep.days,"yyyy-MM-dd"); | ||
| 4337 | + }else{ | ||
| 4338 | + start=ut.formatTime("","yyyy-MM-dd"); | ||
| 4339 | + // start=ut.gettimestamp(); | ||
| 4340 | + } | ||
| 4341 | + } | ||
| 4342 | + if( ep.endtype == 0){ | ||
| 4343 | + end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | ||
| 4344 | + }else{ | ||
| 4345 | + if(ep.days){ | ||
| 4346 | + end=ut.formatTime(ut.gettimestamp() + 3600*24*ep.days,"yyyy-MM-dd"); | ||
| 4347 | + }else{ | ||
| 4348 | + end=""; | ||
| 4349 | + // end=ut.gettimestamp(); | ||
| 4350 | + } | ||
| 4351 | + } | ||
| 4327 | start = start.replace("00:00:00", ""); | 4352 | start = start.replace("00:00:00", ""); |
| 4328 | end = end.replace("00:00:00", ""); | 4353 | end = end.replace("00:00:00", ""); |
| 4329 | quan_list[ind].start = start; | 4354 | quan_list[ind].start = start; |
pages/goods/goodsInfo/goodsInfo.wxml
| @@ -1457,7 +1457,7 @@ | @@ -1457,7 +1457,7 @@ | ||
| 1457 | <view class="xc-detail-coupon"> | 1457 | <view class="xc-detail-coupon"> |
| 1458 | <view class="four-level-word">{{item.name}}</view> | 1458 | <view class="four-level-word">{{item.name}}</view> |
| 1459 | <view class="four-level-word xc-below"> | 1459 | <view class="four-level-word xc-below"> |
| 1460 | - {{filters.replace_time2(item.start)}} 至 {{filters.replace_time2(item.end)}} | 1460 | + {{filters.replace_time2(item.start)}} 至 {{filters.replace_time2(item.end)?filters.replace_time2(item.end):'不限'}} |
| 1461 | </view> | 1461 | </view> |
| 1462 | </view> | 1462 | </view> |
| 1463 | <view class="flex-vertical"> | 1463 | <view class="flex-vertical"> |
pages/goods/goodsList/goodsList.wxml
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | <view wx:if="{{jieti_prom}}" class="fs30 ellipsis-1" style="padding: 20rpx">阶梯促销:{{jieti_prom}}</view> | 16 | <view wx:if="{{jieti_prom}}" class="fs30 ellipsis-1" style="padding: 20rpx">阶梯促销:{{jieti_prom}}</view> |
| 17 | 17 | ||
| 18 | </view> | 18 | </view> |
| 19 | - <view class="pd20 flex ai-center jc_sb"> | 19 | + <view class="pd20 flex ai-center jc_sb search_fixed"> |
| 20 | <!-- 搜索框 --> | 20 | <!-- 搜索框 --> |
| 21 | <view class="search-box f1"> | 21 | <view class="search-box f1"> |
| 22 | <navigator hover-class="none" url="/pages/goods/search/search?ladder_id={{ladder_id}}"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</navigator> | 22 | <navigator hover-class="none" url="/pages/goods/search/search?ladder_id={{ladder_id}}"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</navigator> |
pages/goods/goodsList/goodsList.wxss
| @@ -40,6 +40,14 @@ page { | @@ -40,6 +40,14 @@ page { | ||
| 40 | line-height: 0; | 40 | line-height: 0; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | +.search_fixed { | ||
| 44 | + position: fixed; | ||
| 45 | + top: 0; | ||
| 46 | + width: 95%; | ||
| 47 | + background-color: #f0f0f0; | ||
| 48 | + z-index: 999; | ||
| 49 | +} | ||
| 50 | + | ||
| 43 | .ico-dir { | 51 | .ico-dir { |
| 44 | width: 16rpx; | 52 | width: 16rpx; |
| 45 | height: 22rpx; | 53 | height: 22rpx; |