Commit e7b45782570ee9553e441f39a6276766f29e0596
Merge branch 'dev_20191219' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev_20191219
Showing
9 changed files
with
1409 additions
and
1511 deletions
components/diy_goodsGroup/diy_goodsGroup.js
| ... | ... | @@ -25,6 +25,7 @@ Component({ |
| 25 | 25 | is_new: 0, |
| 26 | 26 | baseUrl: "/api/weshop/goods/page", |
| 27 | 27 | resourceUrl: t.globalData.setting.resourceUrl, |
| 28 | + url: t.globalData.setting.imghost, | |
| 28 | 29 | currentPage: 1, |
| 29 | 30 | requestData: null, |
| 30 | 31 | requestUrl: "", |
| ... | ... | @@ -43,37 +44,80 @@ Component({ |
| 43 | 44 | }, |
| 44 | 45 | |
| 45 | 46 | ready: function () { |
| 46 | - console.log("ready"); | |
| 47 | - this.data.classstyle_id = this.data.object.classstyle; | |
| 48 | - this.data.goodscount = this.data.object.goodscount; | |
| 49 | - console.log(this.data.classstyle_id); | |
| 50 | - this.data.wgroup = this.data.object.wgroup; | |
| 51 | - console.log(this.data.wgroup); | |
| 52 | - this.setData({ | |
| 53 | - classstyle_id: this.data.object.classstyle | |
| 54 | - }) | |
| 55 | - if (this.data.object.goodsclass == 1) { | |
| 56 | - this.data.is_recommend = 1 | |
| 57 | - } | |
| 58 | - if (this.data.object.goodsclass == 2) { | |
| 59 | - this.data.is_hot = 1 | |
| 60 | - } | |
| 61 | - if (this.data.object.goodsclass == 3) { | |
| 62 | - this.data.is_new = 1 | |
| 63 | - } | |
| 64 | - this.data.requestData = new Array(); | |
| 65 | - this.data.g_id = this.data.object.data; | |
| 66 | - var arr = []; | |
| 67 | - | |
| 68 | - for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { | |
| 69 | - arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); | |
| 70 | - } | |
| 71 | - this.data.firist_type_data = arr; | |
| 72 | - console.log("firist_type_data"); | |
| 73 | - console.log(this.data.firist_type_data); | |
| 74 | - this.init(this.data.classstyle_id, this.data.wgroup); | |
| 75 | 47 | |
| 76 | 48 | }, |
| 49 | + | |
| 50 | + | |
| 51 | + lifetimes: { | |
| 52 | + attached: function() { | |
| 53 | + // 在组件实例进入页面节点树时执行 | |
| 54 | + this.data.classstyle_id = this.data.object.classstyle; | |
| 55 | + this.data.goodscount = this.data.object.goodscount; | |
| 56 | + this.data.wgroup = this.data.object.wgroup; | |
| 57 | + | |
| 58 | + this.setData({ | |
| 59 | + classstyle_id: this.data.object.classstyle | |
| 60 | + }) | |
| 61 | + if (this.data.object.goodsclass == 1) { | |
| 62 | + this.data.is_recommend = 1 | |
| 63 | + } | |
| 64 | + if (this.data.object.goodsclass == 2) { | |
| 65 | + this.data.is_hot = 1 | |
| 66 | + } | |
| 67 | + if (this.data.object.goodsclass == 3) { | |
| 68 | + this.data.is_new = 1 | |
| 69 | + } | |
| 70 | + this.data.requestData = new Array(); | |
| 71 | + this.data.g_id = this.data.object.data; | |
| 72 | + var arr = []; | |
| 73 | + | |
| 74 | + for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { | |
| 75 | + arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); | |
| 76 | + } | |
| 77 | + this.data.firist_type_data = arr; | |
| 78 | + this.init(this.data.classstyle_id, this.data.wgroup); | |
| 79 | + }, | |
| 80 | + detached: function() { | |
| 81 | + // 在组件实例被从页面节点树移除时执行 | |
| 82 | + }, | |
| 83 | + }, | |
| 84 | + | |
| 85 | + pageLifetimes: { | |
| 86 | + show: function () { | |
| 87 | + this.data.firist_type_curr=1, | |
| 88 | + this.data.currentPage=1, | |
| 89 | + this.setData({ goods_array: null}) | |
| 90 | + | |
| 91 | + // 页面被展示 | |
| 92 | + // 在组件实例进入页面节点树时执行 | |
| 93 | + this.data.classstyle_id = this.data.object.classstyle; | |
| 94 | + this.data.goodscount = this.data.object.goodscount; | |
| 95 | + this.data.wgroup = this.data.object.wgroup; | |
| 96 | + | |
| 97 | + this.setData({ | |
| 98 | + classstyle_id: this.data.object.classstyle | |
| 99 | + }) | |
| 100 | + if (this.data.object.goodsclass == 1) { | |
| 101 | + this.data.is_recommend = 1 | |
| 102 | + } | |
| 103 | + if (this.data.object.goodsclass == 2) { | |
| 104 | + this.data.is_hot = 1 | |
| 105 | + } | |
| 106 | + if (this.data.object.goodsclass == 3) { | |
| 107 | + this.data.is_new = 1 | |
| 108 | + } | |
| 109 | + this.data.requestData = new Array(); | |
| 110 | + this.data.g_id = this.data.object.data; | |
| 111 | + var arr = []; | |
| 112 | + | |
| 113 | + for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { | |
| 114 | + arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); | |
| 115 | + } | |
| 116 | + this.data.firist_type_data = arr; | |
| 117 | + this.init(this.data.classstyle_id, this.data.wgroup); | |
| 118 | + }, | |
| 119 | + }, | |
| 120 | + | |
| 77 | 121 | methods: { |
| 78 | 122 | // 这里是一个自定义方法 |
| 79 | 123 | init: function (classstyle_id, wgroup) { |
| ... | ... | @@ -90,6 +134,11 @@ Component({ |
| 90 | 134 | index = 0, |
| 91 | 135 | gdata = []; |
| 92 | 136 | |
| 137 | + //--初始化卡类-- | |
| 138 | + th.card_init(); | |
| 139 | + | |
| 140 | + var os=getApp().globalData.setting; | |
| 141 | + | |
| 93 | 142 | classstyle_id = classstyle_id + ""; |
| 94 | 143 | switch (classstyle_id) { |
| 95 | 144 | case "1": |
| ... | ... | @@ -110,14 +159,18 @@ Component({ |
| 110 | 159 | item.shop_price = goods.shop_price; |
| 111 | 160 | item.sales_sum = goods.sales_sum; |
| 112 | 161 | item.goods_id = goods.goods_id; |
| 162 | + item.cardprice1 = val.cardprice1; | |
| 163 | + item.cardprice2 = val.cardprice2; | |
| 164 | + item.cardprice3 = val.cardprice3; | |
| 165 | + | |
| 113 | 166 | prom_id = res.data.data.prom_id; |
| 114 | 167 | |
| 115 | 168 | var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单 |
| 116 | 169 | |
| 117 | 170 | var url = ""; |
| 118 | - if (prom_type == 1) { | |
| 171 | + if (prom_type == 6) { | |
| 119 | 172 | url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; |
| 120 | - } else if (prom_type == 6) { | |
| 173 | + } else if (prom_type == 1) { | |
| 121 | 174 | url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; |
| 122 | 175 | } |
| 123 | 176 | if(url==""){ |
| ... | ... | @@ -130,12 +183,12 @@ Component({ |
| 130 | 183 | return app.request.promiseGet(url, {}) |
| 131 | 184 | } |
| 132 | 185 | |
| 133 | - | |
| 134 | 186 | }).then(res => { |
| 135 | 187 | index++; |
| 136 | 188 | var prom = res.data.data; |
| 137 | - if (prom != null) { | |
| 138 | - item.shop_price = res.data.data.price; | |
| 189 | + var now=ut.gettimestamp(); | |
| 190 | + if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { | |
| 191 | + item.prom_price = res.data.data.price; | |
| 139 | 192 | } |
| 140 | 193 | th.data.requestData.push(item); |
| 141 | 194 | th.setData({ |
| ... | ... | @@ -170,8 +223,9 @@ Component({ |
| 170 | 223 | total: res.data.data.total |
| 171 | 224 | }) |
| 172 | 225 | th.data.currentPage++; |
| 226 | + var now=ut.gettimestamp(); | |
| 173 | 227 | |
| 174 | - goods.forEach(function (val, ind) { | |
| 228 | + goods.forEach(async function (val, ind) { | |
| 175 | 229 | var item = {}; |
| 176 | 230 | var prom_id = null; |
| 177 | 231 | console.log(val.goodsid); |
| ... | ... | @@ -185,21 +239,26 @@ Component({ |
| 185 | 239 | item.shop_price = val.shop_price; |
| 186 | 240 | item.sales_sum = val.sales_sum; |
| 187 | 241 | item.goods_id = val.goods_id; |
| 242 | + | |
| 243 | + item.cardprice1 = val.cardprice1; | |
| 244 | + item.cardprice2 = val.cardprice2; | |
| 245 | + item.cardprice3 = val.cardprice3; | |
| 246 | + | |
| 188 | 247 | prom_id = val.prom_id; |
| 189 | 248 | |
| 190 | - var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单 | |
| 249 | + var prom_type = val.prom_type; //0普通商品 1秒杀 6拼单 | |
| 191 | 250 | |
| 192 | 251 | var url = ""; |
| 193 | - if (prom_type == 1) { | |
| 252 | + if (prom_type == 6) { | |
| 194 | 253 | url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; |
| 195 | - } else if (prom_type == 6) { | |
| 254 | + } else if (prom_type == 1) { | |
| 196 | 255 | url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; |
| 197 | 256 | } |
| 198 | 257 | if(url!="") { |
| 199 | - app.request.promiseGet(url, {}).then(res => { | |
| 258 | + await app.request.promiseGet(url, {}).then(res => { | |
| 200 | 259 | var prom = res.data.data; |
| 201 | - if (prom != null) { | |
| 202 | - item.shop_price = res.data.data.price; | |
| 260 | + if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { | |
| 261 | + item.prom_price = res.data.data.price; | |
| 203 | 262 | } |
| 204 | 263 | th.data.requestData.push(item); |
| 205 | 264 | th.setData({ |
| ... | ... | @@ -237,40 +296,42 @@ Component({ |
| 237 | 296 | }) |
| 238 | 297 | |
| 239 | 298 | th.data.currentPage++; |
| 240 | - goods.forEach(function (val, ind) { | |
| 299 | + var now=ut.gettimestamp(); | |
| 300 | + goods.forEach(async function (val, ind) { | |
| 241 | 301 | var item = {}; |
| 242 | 302 | var prom_id = null; |
| 243 | 303 | console.log(val.goodsid); |
| 244 | 304 | //app.request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + val.goods_id, {}).then(res => { |
| 245 | 305 | //商品地址 |
| 246 | 306 | var goods = res.data.data; |
| 247 | - console.log("goods"); | |
| 248 | - console.log(goods); | |
| 249 | - // th.setData({ | |
| 250 | - // goods_btn: res.data.data | |
| 251 | - // }) | |
| 307 | + | |
| 252 | 308 | item.goods_name = val.goods_name; |
| 253 | 309 | item.goods_img = th.data.imghost + val.original_img; |
| 254 | 310 | item.market_price = val.market_price; |
| 255 | 311 | item.shop_price = val.shop_price; |
| 256 | 312 | item.sales_sum = val.sales_sum; |
| 257 | 313 | item.goods_id = val.goods_id; |
| 314 | + | |
| 315 | + item.cardprice1 = val.cardprice1; | |
| 316 | + item.cardprice2 = val.cardprice2; | |
| 317 | + item.cardprice3 = val.cardprice3; | |
| 318 | + | |
| 258 | 319 | prom_id = val.prom_id; |
| 259 | 320 | |
| 260 | 321 | var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单 |
| 261 | 322 | |
| 262 | 323 | var url = ""; |
| 263 | - if (prom_type == 1) { | |
| 324 | + if (prom_type == 6) { | |
| 264 | 325 | url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; |
| 265 | - } else if (prom_type == 6) { | |
| 326 | + } else if (prom_type == 1) { | |
| 266 | 327 | url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; |
| 267 | 328 | } |
| 268 | 329 | |
| 269 | 330 | if(url!=null){ |
| 270 | - app.request.promiseGet(url, {}).then(res => { | |
| 331 | + await app.request.promiseGet(url, {}).then(res => { | |
| 271 | 332 | var prom = res.data.data; |
| 272 | - if (prom != null) { | |
| 273 | - item.shop_price = res.data.data.price; | |
| 333 | + if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { | |
| 334 | + item.prom_price = res.data.data.price; | |
| 274 | 335 | } |
| 275 | 336 | th.data.requestData.push(item); |
| 276 | 337 | th.setData({ |
| ... | ... | @@ -303,6 +364,83 @@ Component({ |
| 303 | 364 | var _errObj = {}; |
| 304 | 365 | _errObj[_errImg] = this.data.imghost + "/public/images/default_goods_image_240.gif"; |
| 305 | 366 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 306 | - } | |
| 367 | + }, | |
| 368 | + | |
| 369 | + //---卡的初始化---- | |
| 370 | + card_init: function() { | |
| 371 | + var th = this,os=getApp().globalData.setting; | |
| 372 | + getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | |
| 373 | + success: function(e) { | |
| 374 | + getApp().globalData.userInfo = e.data.data; | |
| 375 | + getApp().getConfig2(function(e) { | |
| 376 | + var swithc_list = e.switch_list; | |
| 377 | + var sw_arr = JSON.parse(swithc_list); | |
| 378 | + //---如果后台又开等级卡的开关--- | |
| 379 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 380 | + th.setData({ | |
| 381 | + rank_switch: true | |
| 382 | + }); | |
| 383 | + //---回调卡的列表--- | |
| 384 | + th.getPlusCardType(function(ob) { | |
| 385 | + th.setData({ | |
| 386 | + card_list: ob.card_list | |
| 387 | + }); | |
| 388 | + var ti = setInterval(function() { | |
| 389 | + var user = getApp().globalData.userInfo; | |
| 390 | + if (!user) return false; | |
| 391 | + clearInterval(ti); | |
| 392 | + | |
| 393 | + if (user.card_field) { | |
| 394 | + var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 395 | + var end = new Date(str); | |
| 396 | + end = Date.parse(end) / 1000; | |
| 397 | + var now = ut.gettimestamp(); | |
| 398 | + | |
| 399 | + //--- 判断是等级会员,且在有效期范围内 --- | |
| 400 | + if (user.card_field && now < end) { | |
| 401 | + var card_name = ob.name_map.get(user.card_field); | |
| 402 | + if (card_name.length > 4) card_name = card_name.substring(0, 4); | |
| 403 | + th.setData({ | |
| 404 | + card_field: user.card_field, | |
| 405 | + card_name: card_name, | |
| 406 | + card_list: ob.card_list | |
| 407 | + }); | |
| 408 | + } | |
| 409 | + | |
| 410 | + } | |
| 411 | + | |
| 412 | + }, 500) | |
| 413 | + }) | |
| 414 | + | |
| 415 | + } | |
| 416 | + }) | |
| 417 | + } | |
| 418 | + }) | |
| 419 | + | |
| 420 | + }, | |
| 421 | + | |
| 422 | + //--- 获取卡类列表 --- | |
| 423 | + getPlusCardType: function(func) { | |
| 424 | + var storid = o.stoid; | |
| 425 | + var th = this; | |
| 426 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | |
| 427 | + var plusCard = res.data.data; | |
| 428 | + var arr = [1219, 2089, 3031]; | |
| 429 | + var new_arr = new Array(); | |
| 430 | + var card_name_map = new Map(); | |
| 431 | + for (var i = 0; i < plusCard.length; i++) { | |
| 432 | + var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | |
| 433 | + card_name_map.set(name, plusCard[i].CardName); | |
| 434 | + } | |
| 435 | + | |
| 436 | + var ob = { | |
| 437 | + "card_list": plusCard, | |
| 438 | + "name_map": card_name_map | |
| 439 | + }; | |
| 440 | + func(ob); | |
| 441 | + }) | |
| 442 | + }, | |
| 443 | + | |
| 444 | + | |
| 307 | 445 | } |
| 308 | 446 | }) |
| 309 | 447 | \ No newline at end of file | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.wxml
| 1 | 1 | <!--pages/diy_zs/diy_zs.wxml--> |
| 2 | -<!--1个--> | |
| 3 | -<view class="zs_goods_wai"> | |
| 4 | - <!--右下角--> | |
| 5 | - | |
| 6 | - <block wx:if='{{object.column==1 && object.position==4}}'> | |
| 7 | - <block wx:for="{{goods_array}}" > | |
| 2 | +<wxs module="filter" src="../../utils/filter.wxs"></wxs> | |
| 3 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | |
| 4 | +<!--1个列表的时候--> | |
| 5 | +<view class="zs_goods_wai" wx:if='{{object.column==1}}'> | |
| 6 | + <block wx:for="{{goods_array}}" > | |
| 8 | 7 | <view class='zs_goods'> |
| 9 | 8 | <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> |
| 10 | - <view class='zs_top'> | |
| 11 | - <block> | |
| 9 | + <view class='zs_top rel'> | |
| 12 | 10 | <image class='zs_t_img' src="{{item.goods_img}}" |
| 13 | 11 | data-errorimg="goods_array[{{index}}].goods_img" |
| 14 | 12 | binderror="bind_bnerr3" |
| 15 | - ></image></block> | |
| 13 | + ></image> | |
| 16 | 14 | |
| 17 | 15 | <block wx:if="{{object.goodicon==3}}"> |
| 18 | - <image class='zs_t1' wx:if="{{ object.position==4}}" | |
| 19 | - src='{{object.customicon}}'></image> | |
| 20 | - <!--<image class='zs_t1' wx:if="{{object.position==1}}"--> | |
| 21 | - <!--src='{{object.customicon}}'></image>--> | |
| 22 | - <!--<image class='zs_t1' wx:if="{{ object.position==1}}"--> | |
| 23 | - <!--src='{{object.customicon}}'></image>--> | |
| 24 | - <!--<image class='zs_t1' wx:if="{{object.position==1}}"--> | |
| 25 | - <!--src='{{object.customicon}}'></image>--> | |
| 16 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image> | |
| 26 | 17 | </block> |
| 27 | 18 | <block wx:if="{{object.goodicon==1}}"> |
| 28 | - <image class='zs_t1' src=''></image> | |
| 19 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | |
| 29 | 20 | </block> |
| 30 | 21 | <block wx:if="{{object.goodicon==2}}"> |
| 31 | - <image class='zs_t1' wx:if="{{object.styleicon==1}}" | |
| 22 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | |
| 32 | 23 | src='{{imghost}}/miniapp/images/Recommend.png'></image> |
| 33 | - <image class='zs_t1' wx:if="{{object.styleicon==2}}" | |
| 24 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2}}" | |
| 34 | 25 | src='{{imghost}}/miniapp/images/hot.png'></image> |
| 35 | - <image class='zs_t1' wx:if="{{object.styleicon==3}}" | |
| 26 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | |
| 36 | 27 | src='{{imghost}}/miniapp/images/new.png'></image> |
| 37 | - <image class='zs_t1' wx:if="{{object.styleicon==4}}" | |
| 28 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4}}" | |
| 38 | 29 | src='{{imghost}}/miniapp/images/Promotion.png'></image> |
| 39 | 30 | </block> |
| 40 | 31 | </view> |
| 41 | 32 | <view class='zs_center'> |
| 42 | - | |
| 43 | 33 | <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> |
| 34 | + <!--如果有显示价格 --> | |
| 44 | 35 | <view class='zs_wz2' wx:if="{{object.goodsprice}}"> |
| 45 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 46 | - <view class='del'>¥{{item.market_price}}</view> | |
| 36 | + <block wx:if="{{item.prom_price}}"> | |
| 37 | + <view class='wz_red'>¥{{item.prom_price}}</view> | |
| 38 | + <view class='del'>¥{{item.market_price}}</view> | |
| 39 | + </block> | |
| 40 | + <block wx:else> | |
| 41 | + | |
| 42 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | |
| 43 | + <!-- 当会员是等级卡的时候 --> | |
| 44 | + <block wx:if="{{card_field}}"> | |
| 45 | + <!-- 等级价>0 --> | |
| 46 | + <block wx:if="{{item[card_field]>0}}"> | |
| 47 | + <view class="money flex" > | |
| 48 | + <!-- 办卡价 --> | |
| 49 | + <view class="flex xc-wc"> | |
| 50 | + <view class="fs24">¥</view> | |
| 51 | + <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 52 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image><view class="card_name">{{card_name}}</view></view> | |
| 53 | + </view> | |
| 54 | + </view> | |
| 55 | + <view class="flex" style="line-height: 28rpx;" > | |
| 56 | + <!-- 原价 --> | |
| 57 | + <view class="price flex xc-ash line_th"> | |
| 58 | + <view class="fs22">¥</view> | |
| 59 | + <view class="fs22">{{item.market_price}}</view> | |
| 60 | + </view> | |
| 61 | + </view> | |
| 62 | + </block> | |
| 63 | + <blocK wx:else> | |
| 64 | + <view class="money flex" > | |
| 65 | + <!-- 办卡价 --> | |
| 66 | + <view class="flex xc-wc"> | |
| 67 | + <view class="fs24">¥</view> | |
| 68 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 69 | + </view> | |
| 70 | + </view> | |
| 71 | + <view class="flex" style="line-height: 28rpx;" > | |
| 72 | + <!-- 原价 --> | |
| 73 | + <view class="price flex xc-ash line_th"> | |
| 74 | + <view class="fs22">¥</view> | |
| 75 | + <view class="fs22">{{item.market_price}}</view> | |
| 76 | + </view> | |
| 77 | + </view> | |
| 78 | + </blocK> | |
| 79 | + </block> | |
| 80 | + <block wx:else> | |
| 81 | + <!-- 如果商品有设置等级价大于0的 --> | |
| 82 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 83 | + <view class="money flex" > | |
| 84 | + <!-- 办卡价 --> | |
| 85 | + <view class="flex xc-wc"> | |
| 86 | + <view class="fs24">¥</view> | |
| 87 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 88 | + </view> | |
| 89 | + <!-- 原价 --> | |
| 90 | + <view class="price flex xc-ash line_th"> | |
| 91 | + <view class="fs22">¥</view> | |
| 92 | + <view class="fs22">{{item.market_price}}</view> | |
| 93 | + </view> | |
| 94 | + | |
| 95 | + </view> | |
| 96 | + <view class="flex" style="line-height: 28rpx;" > | |
| 97 | + <!-- 等级价 --> | |
| 98 | + <view class="price flex"> | |
| 99 | + <view class="fs22">¥</view> | |
| 100 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 101 | + <view class="card_bg"> <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view> | |
| 102 | + </view> | |
| 103 | + </view> | |
| 104 | + </block> | |
| 105 | + <block wx:else> | |
| 106 | + <view class="money flex" > | |
| 107 | + <!-- 办卡价 --> | |
| 108 | + <view class="flex xc-wc"> | |
| 109 | + <view class="fs24">¥</view> | |
| 110 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 111 | + </view> | |
| 112 | + </view> | |
| 113 | + <view class="flex" style="line-height: 28rpx;" > | |
| 114 | + <!-- 原价 --> | |
| 115 | + <view class="price flex xc-ash line_th"> | |
| 116 | + <view class="fs22">¥</view> | |
| 117 | + <view class="fs22">{{item.market_price}}</view> | |
| 118 | + </view> | |
| 119 | + </view> | |
| 120 | + </block> | |
| 121 | + </block> | |
| 122 | + </block> | |
| 123 | + | |
| 124 | + <block wx:else> | |
| 125 | + <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 126 | + <view class='del'>¥{{item.market_price}}</view> | |
| 127 | + </block> | |
| 128 | + | |
| 129 | + </block> | |
| 130 | + | |
| 47 | 131 | </view> |
| 48 | - <!-- <view class='zs_wz3'>美妆价:¥9.00</view> | |
| 49 | - <view class='zs_wz4'>等级价:¥8.00</view> --> | |
| 50 | 132 | <view class='zs_wz5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> |
| 51 | 133 | |
| 52 | 134 | </view> |
| 53 | 135 | </navigator> |
| 54 | - </view> | |
| 136 | + </view> | |
| 137 | + <view style="height:20rpx"></view> | |
| 55 | 138 | </block> |
| 56 | - </block> | |
| 57 | - | |
| 58 | - <!-- 右上角 --> | |
| 59 | - <block wx:if='{{object.column==1 && object.position==2}}'> | |
| 60 | - <block wx:for="{{goods_array}}" > | |
| 61 | - <view class='zs_goods' > | |
| 62 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 63 | - <view class='zs_top'> | |
| 64 | - | |
| 65 | - <block> | |
| 66 | - <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 67 | - binderror="bind_bnerr3"></image> | |
| 68 | - </block> | |
| 69 | - | |
| 70 | - <!-- <image class='zs_t2' src='http://jmh.xinda100.cn/public/static/images/model/Recommend.png'></image> --> | |
| 71 | - <block wx:if="{{object.goodicon==3}}"> | |
| 72 | - <image class='zs_t2' wx:if="{{object.position==2}}" | |
| 73 | - src='{{object.customicon}}'></image> | |
| 74 | - <!--<image class='zs_t2' wx:if="{{object.styleicon==2 && object.position==2}}"--> | |
| 75 | - <!--src='{{object.customicon}}'></image>--> | |
| 76 | - <!--<image class='zs_t2' wx:if="{{object.styleicon==3 && object.position==2}}"--> | |
| 77 | - <!--src='{{object.customicon}}'></image>--> | |
| 78 | - <!--<image class='zs_t2' wx:if="{{object.styleicon==4 && object.position==2}}"--> | |
| 79 | - <!--src='{{object.customicon}}'></image>--> | |
| 80 | - </block> | |
| 81 | - <block wx:if="{{object.goodicon==1}}"> | |
| 82 | - <image class='zs_t2' src=''></image> | |
| 83 | - </block> | |
| 84 | - <block wx:if="{{object.goodicon==2}}"> | |
| 85 | - <image class='zs_t2' wx:if="{{object.styleicon==1}}" | |
| 86 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 87 | - <image class='zs_t2' wx:if="{{object.styleicon==2 }}" | |
| 88 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 89 | - <image class='zs_t2' wx:if="{{object.styleicon==3}}" | |
| 90 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 91 | - <image class='zs_t2' wx:if="{{object.styleicon==4 }}" | |
| 92 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 93 | - </block> | |
| 94 | - </view> | |
| 95 | - | |
| 96 | - <view class='zs_center'> | |
| 97 | - <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 98 | - <view class='zs_wz2' wx:if="{{object.goodsprice}}"> | |
| 99 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 100 | - <view class='del'>¥{{item.market_price}}</view> | |
| 101 | - </view> | |
| 102 | - <view class='zs_wz5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 103 | - | |
| 104 | - </view> | |
| 105 | - </navigator> | |
| 106 | - | |
| 107 | - </view> | |
| 108 | - </block> | |
| 109 | - </block> | |
| 110 | - <!-- 左上角 --> | |
| 111 | - <block wx:if='{{object.column==1 && object.position==1}}'> | |
| 112 | - <block wx:for="{{goods_array}}"> | |
| 113 | - <view class='zs_goods'> | |
| 114 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 115 | - <view class='zs_top'> | |
| 116 | - | |
| 117 | - <block> | |
| 118 | - <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 119 | - binderror="bind_bnerr3"></image> | |
| 120 | - </block> | |
| 121 | - <!-- <image class='zs_t3' src='http://jmh.xinda100.cn/public/static/images/model/hot.png'></image> --> | |
| 122 | - <block wx:if="{{object.goodicon==3}}"> | |
| 123 | - <image class='zs_t3' wx:if="{{ object.position==1}}" | |
| 124 | - src='{{object.customicon}}'></image> | |
| 125 | - <!--<image class='zs_t3' wx:if="{{object.styleicon==2 && object.position==3}}"--> | |
| 126 | - <!--src='{{object.customicon}}'></image>--> | |
| 127 | - <!--<image class='zs_t3' wx:if="{{object.styleicon==3 && object.position==3}}"--> | |
| 128 | - <!--src='{{object.customicon}}'></image>--> | |
| 129 | - <!--<image class='zs_t3' wx:if="{{object.styleicon==4 && object.position==3}}"--> | |
| 130 | - <!--src='{{object.customicon}}'></image>--> | |
| 131 | - </block> | |
| 132 | - <block wx:if="{{object.goodicon==1}}"> | |
| 133 | - <image class='zs_t3' src=''></image> | |
| 134 | - </block> | |
| 135 | - <block wx:if="{{object.goodicon==2}}"> | |
| 136 | - <image class='zs_t3' wx:if="{{object.styleicon==1}}" | |
| 137 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 138 | - <image class='zs_t3' wx:if="{{object.styleicon==2 }}" | |
| 139 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 140 | - <image class='zs_t3' wx:if="{{object.styleicon==3}}" | |
| 141 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 142 | - <image class='zs_t3' wx:if="{{object.styleicon==4 }}" | |
| 143 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 144 | - </block> | |
| 145 | - </view> | |
| 146 | - | |
| 147 | - <view class='zs_center'> | |
| 148 | - | |
| 149 | - <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 150 | - <view class='zs_wz2' wx:if="{{object.goodsprice}}"> | |
| 151 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 152 | - <view class='del'>¥{{item.market_price}}</view> | |
| 153 | - </view> | |
| 154 | - <view class='zs_wz5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 155 | - | |
| 156 | - </view> | |
| 157 | - </navigator> | |
| 158 | - | |
| 159 | - </view> | |
| 160 | - </block> | |
| 161 | - </block> | |
| 162 | - <!-- 左下角 --> | |
| 163 | - <block wx:if='{{object.column==1 && object.position==3}}'> | |
| 164 | - <block wx:for="{{goods_array}}" > | |
| 165 | - <view class='zs_goods' > | |
| 166 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 167 | - <view class='zs_top'> | |
| 168 | - | |
| 169 | - <block> | |
| 170 | - <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 171 | - binderror="bind_bnerr3"></image> | |
| 172 | - </block> | |
| 173 | - <!-- <image class='zs_t4' src='http://jmh.xinda100.cn/public/static/images/model/new.png'></image> --> | |
| 174 | - | |
| 175 | - <block wx:if="{{object.goodicon==3}}"> | |
| 176 | - <image class='zs_t4' wx:if="{{ object.position==3}}" | |
| 177 | - src='{{object.customicon}}'></image> | |
| 178 | - <!--<image class='zs_t4' wx:if="{{object.styleicon==2 && object.position==4}}"--> | |
| 179 | - <!--src='{{object.customicon}}'></image>--> | |
| 180 | - <!--<image class='zs_t4' wx:if="{{object.styleicon==3 && object.position==4}}"--> | |
| 181 | - <!--src='{{object.customicon}}'></image>--> | |
| 182 | - <!--<image class='zs_t4' wx:if="{{object.styleicon==4 && object.position==4}}"--> | |
| 183 | - <!--src='{{object.customicon}}'></image>--> | |
| 184 | - </block> | |
| 185 | - <block wx:if="{{object.goodicon==1}}"> | |
| 186 | - <image class='zs_t4' src=''></image> | |
| 187 | - </block> | |
| 188 | - <block wx:if="{{object.goodicon==2}}"> | |
| 189 | - <image class='zs_t4' wx:if="{{object.styleicon==1}}" | |
| 190 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 191 | - <image class='zs_t4' wx:if="{{object.styleicon==2 }}" | |
| 192 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 193 | - <image class='zs_t4' wx:if="{{object.styleicon==3}}" | |
| 194 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 195 | - <image class='zs_t4' wx:if="{{object.styleicon==4 }}" | |
| 196 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 197 | - </block> | |
| 198 | - </view> | |
| 199 | - | |
| 200 | - <view class='zs_center'> | |
| 201 | - <view class='zs_wz1' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 202 | - <view class='zs_wz2' wx:if="{{object.goodsprice}}"> | |
| 203 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 204 | - <view class='del'>¥{{item.market_price}}</view> | |
| 205 | - </view> | |
| 206 | - <view class='zs_wz5' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 207 | - | |
| 208 | - </view> | |
| 209 | - </navigator> | |
| 210 | - </view> | |
| 211 | - </block> | |
| 212 | - </block> | |
| 139 | + | |
| 213 | 140 | </view> |
| 214 | - | |
| 215 | - | |
| 216 | -<!-- 列表显示 --> | |
| 217 | -<view class="zs_goods_xiao_wai"> | |
| 218 | - <!--右上角--> | |
| 219 | - <block wx:if='{{object.column==4 && object.position==2}}'> | |
| 220 | - <block wx:for="{{goods_array}}" > | |
| 221 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 222 | - <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > | |
| 223 | - <view class='zs_top_x'> | |
| 224 | - <!--<image class='zs_t_img_x'></image>--> | |
| 225 | - <block> | |
| 226 | - <image class='zs_t_img_x' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 227 | - binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> | |
| 228 | - </block> | |
| 229 | - | |
| 230 | - <block wx:if="{{object.goodicon==3}}"> | |
| 231 | - <image class='zs_t1_x' wx:if="{{object.position==2}}" | |
| 232 | - src='{{object.customicon}}'></image> | |
| 233 | - <!--<image class='zs_t1_x' wx:if="{{object.styleicon==2 && object.position==1}}"--> | |
| 234 | - <!--src='{{object.customicon}}'></image>--> | |
| 235 | - <!--<image class='zs_t1_x' wx:if="{{object.styleicon==3 && object.position==1}}"--> | |
| 236 | - <!--src='{{object.customicon}}'></image>--> | |
| 237 | - <!--<image class='zs_t1_x' wx:if="{{object.styleicon==4 && object.position==1}}"--> | |
| 238 | - <!--src='{{object.customicon}}'></image>--> | |
| 239 | - </block> | |
| 240 | - <block wx:if="{{object.goodicon==1}}"> | |
| 241 | - <image class='zs_t1_x' src=''></image> | |
| 242 | - </block> | |
| 243 | - <block wx:if="{{object.goodicon==2}}"> | |
| 244 | - <image class='zs_t1_x' wx:if="{{object.styleicon==1}}" | |
| 245 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 246 | - <image class='zs_t1_x' wx:if="{{object.styleicon==2 }}" | |
| 247 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 248 | - <image class='zs_t1_x' wx:if="{{object.styleicon==3}}" | |
| 249 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 250 | - <image class='zs_t1_x' wx:if="{{object.styleicon==4 }}" | |
| 251 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 252 | - </block> | |
| 253 | - </view> | |
| 254 | - | |
| 255 | - <view class='zs_center_x'> | |
| 256 | - | |
| 257 | - | |
| 258 | - <view class='zs_wz1_x' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 259 | - <view class='zs_wz2_x' wx:if="{{object.goodsprice}}"> | |
| 260 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 261 | - <view class='del'>¥{{item.market_price}}</view> | |
| 262 | - </view> | |
| 263 | - <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 264 | - | |
| 265 | - | |
| 266 | - </view> | |
| 267 | - | |
| 268 | - </view> | |
| 269 | - </navigator> | |
| 270 | - </block> | |
| 271 | - </block> | |
| 272 | - <!-- 左上角 --> | |
| 273 | - <block wx:if='{{object.column==4 && object.position==1}}'> | |
| 274 | - <block wx:for="{{goods_array}}" > | |
| 275 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 276 | - <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > | |
| 277 | - <view class='zs_top_x'> | |
| 278 | - | |
| 279 | - <block wx:if="{{item.goods_img!=''}}"> | |
| 280 | - <image class='zs_t_img_x' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 281 | - binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> | |
| 282 | - </block> | |
| 283 | - | |
| 284 | - <block wx:if="{{object.goodicon==3}}"> | |
| 285 | - <image class='zs_t1_x1' wx:if="{{ object.position==1}}" | |
| 286 | - src='{{object.customicon}}'></image> | |
| 287 | - <!--<image class='zs_t1_x1' wx:if="{{object.styleicon==2 && object.position==2}}"--> | |
| 288 | - <!--src='{{object.customicon}}'></image>--> | |
| 289 | - <!--<image class='zs_t1_x1' wx:if="{{object.styleicon==3 && object.position==2}}"--> | |
| 290 | - <!--src='{{object.customicon}}'></image>--> | |
| 291 | - <!--<image class='zs_t1_x1' wx:if="{{object.styleicon==4 && object.position==2}}"--> | |
| 292 | - <!--src='{{object.customicon}}'></image>--> | |
| 293 | - </block> | |
| 294 | - <block wx:if="{{object.goodicon==1}}"> | |
| 295 | - <image class='zs_t1_x1' src=''></image> | |
| 296 | - </block> | |
| 297 | - <block wx:if="{{object.goodicon==2}}"> | |
| 298 | - <image class='zs_t1_x1' wx:if="{{object.styleicon==1}}" | |
| 299 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 300 | - <image class='zs_t1_x1' wx:if="{{object.styleicon==2 }}" | |
| 301 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 302 | - <image class='zs_t1_x1' wx:if="{{object.styleicon==3}}" | |
| 303 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 304 | - <image class='zs_t1_x1' wx:if="{{object.styleicon==4 }}" | |
| 305 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 306 | - </block> | |
| 307 | - </view> | |
| 308 | - <view class='zs_center_x'> | |
| 309 | - <view class='zs_wz1_x' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 310 | - <view class='zs_wz2_x' wx:if="{{object.goodsprice}}"> | |
| 311 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 312 | - <view class='del'>¥{{item.market_price}}</view> | |
| 313 | - </view> | |
| 314 | - <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 315 | - </view> | |
| 316 | - | |
| 317 | - </view> | |
| 318 | - </navigator> | |
| 319 | - </block> | |
| 320 | - </block> | |
| 321 | - <!-- 右下角 --> | |
| 322 | - <block wx:if='{{object.column==4 && object.position==4}}'> | |
| 323 | - <block wx:for="{{goods_array}}" > | |
| 324 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 325 | - <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > | |
| 326 | - <view class='zs_top_x'> | |
| 327 | - | |
| 328 | - <block> | |
| 329 | - <image class='zs_t_img_x' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 330 | - binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> | |
| 331 | - </block> | |
| 332 | - | |
| 333 | - <block wx:if="{{object.goodicon==3}}"> | |
| 334 | - <image class='zs_t1_x2' wx:if="{{object.position==4}}" | |
| 335 | - src='{{object.customicon}}'></image> | |
| 336 | - <!--<image class='zs_t1_x2' wx:if="{{object.styleicon==2 && object.position==3}}"--> | |
| 337 | - <!--src='{{object.customicon}}'></image>--> | |
| 338 | - <!--<image class='zs_t1_x2' wx:if="{{object.styleicon==3 && object.position==3}}"--> | |
| 339 | - <!--src='{{object.customicon}}'></image>--> | |
| 340 | - <!--<image class='zs_t1_x2' wx:if="{{object.styleicon==4 && object.position==3}}"--> | |
| 341 | - <!--src='{{object.customicon}}'></image>--> | |
| 342 | - </block> | |
| 343 | - <block wx:if="{{object.goodicon==1}}"> | |
| 344 | - <image class='zs_t1_x2' src=''></image> | |
| 345 | - </block> | |
| 346 | - <block wx:if="{{object.goodicon==2}}"> | |
| 347 | - <image class='zs_t1_x2' wx:if="{{object.styleicon==1}}" | |
| 348 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 349 | - <image class='zs_t1_x2' wx:if="{{object.styleicon==2 }}" | |
| 350 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 351 | - <image class='zs_t1_x2' wx:if="{{object.styleicon==3}}" | |
| 352 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 353 | - <image class='zs_t1_x2' wx:if="{{object.styleicon==4 }}" | |
| 354 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 355 | - </block> | |
| 356 | - </view> | |
| 357 | - | |
| 358 | - <view class='zs_center_x'> | |
| 359 | - <view class='zs_wz1_x' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 360 | - <view class='zs_wz2_x' wx:if="{{object.goodsprice}}"> | |
| 361 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 362 | - <view class='del'>¥{{item.market_price}}</view> | |
| 363 | - </view> | |
| 364 | - <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 365 | - | |
| 366 | - </view> | |
| 367 | - | |
| 368 | - </view> | |
| 369 | - </navigator> | |
| 370 | - </block> | |
| 371 | - </block> | |
| 372 | - <!-- 左下角 --> | |
| 373 | - <block wx:if='{{object.column==4 && object.position==3}}'> | |
| 374 | - <block wx:for="{{goods_array}}" > | |
| 375 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 376 | - <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > | |
| 377 | - <view class='zs_top_x'> | |
| 378 | - <block wx:if="{{item.goods_img!=''}}"> | |
| 379 | - <image class='zs_t_img_x' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 380 | - binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> | |
| 381 | - </block> | |
| 382 | - | |
| 383 | - <block wx:if="{{object.goodicon==3}}"> | |
| 384 | - <image class='zs_t1_x3' wx:if="{{object.position==3}}" | |
| 385 | - src='{{object.customicon}}'></image> | |
| 386 | - <!--<image class='zs_t1_x3' wx:if="{{object.styleicon==2 && object.position==4}}"--> | |
| 387 | - <!--src='{{object.customicon}}'></image>--> | |
| 388 | - <!--<image class='zs_t1_x3' wx:if="{{object.styleicon==3 && object.position==4}}"--> | |
| 389 | - <!--src='{{object.customicon}}'></image>--> | |
| 390 | - <!--<image class='zs_t1_x3' wx:if="{{object.styleicon==4 && object.position==4}}"--> | |
| 391 | - <!--src='{{object.customicon}}'></image>--> | |
| 392 | - </block> | |
| 393 | - <block wx:if="{{object.goodicon==1}}"> | |
| 394 | - <image class='zs_t1_x3' src=''></image> | |
| 395 | - </block> | |
| 396 | - <block wx:if="{{object.goodicon==2}}"> | |
| 397 | - <image class='zs_t1_x3' wx:if="{{object.styleicon==1}}" | |
| 398 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 399 | - <image class='zs_t1_x3' wx:if="{{object.styleicon==2 }}" | |
| 400 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 401 | - <image class='zs_t1_x3' wx:if="{{object.styleicon==3}}" | |
| 402 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 403 | - <image class='zs_t1_x3' wx:if="{{object.styleicon==4 }}" | |
| 404 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 405 | - </block> | |
| 406 | - </view> | |
| 407 | - <view class='zs_center_x'> | |
| 408 | - | |
| 409 | - <view class='zs_wz1_x' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 410 | - <view class='zs_wz2_x' wx:if="{{object.goodsprice}}"> | |
| 411 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 412 | - <view class='del'>¥{{item.market_price}}</view> | |
| 413 | - </view> | |
| 414 | - <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 415 | - </view> | |
| 416 | - | |
| 417 | - </view> | |
| 418 | - </navigator> | |
| 419 | - </block> | |
| 420 | - </block> | |
| 421 | -</view> | |
| 422 | - | |
| 423 | - | |
| 424 | 141 | <!--2个一列--> |
| 425 | -<!--左上角--> | |
| 426 | -<block wx:if="{{object.column==2 && object.position==1}}"> | |
| 427 | -<block wx:for="{{goods_array}}" > | |
| 142 | +<block wx:if="{{object.column==2}}"> | |
| 143 | + <block wx:for="{{goods_array}}" > | |
| 428 | 144 | <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> |
| 429 | - | |
| 430 | 145 | <view class="zs_goods_wai_ban"> |
| 431 | 146 | <view class="zs_goods_ban"> |
| 432 | 147 | <view class='zs_goods_2l'> |
| 433 | - | |
| 434 | - <view class='zs_top_2l'> | |
| 435 | - <!--<image class='zs_t_img_2l'></image>--> | |
| 436 | - <block wx:if="{{item.goods_img!=''}}"> | |
| 437 | - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 148 | + <view class='zs_top_2l rel'> | |
| 149 | + <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 438 | 150 | binderror="bind_bnerr3"></image> |
| 439 | - </block> | |
| 440 | - | |
| 441 | 151 | <block wx:if="{{object.goodicon==3}}"> |
| 442 | - <image class='zs_t1_2l' wx:if="{{object.position==1}}" | |
| 152 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.position==1}}" | |
| 443 | 153 | src='{{object.customicon}}'></image> |
| 444 | - <!--<image class='zs_t1_2l' wx:if="{{object.styleicon==2 && object.position==1}}"--> | |
| 445 | - <!--src='{{object.customicon}}'></image>--> | |
| 446 | - <!--<image class='zs_t1_2l' wx:if="{{object.styleicon==3 && object.position==1}}"--> | |
| 447 | - <!--src='{{object.customicon}}'></image>--> | |
| 448 | - <!--<image class='zs_t1_2l' wx:if="{{object.styleicon==4 && object.position==1}}"--> | |
| 449 | - <!--src='{{object.customicon}}'></image>--> | |
| 450 | 154 | </block> |
| 451 | 155 | <block wx:if="{{object.goodicon==1}}"> |
| 452 | - <image class='zs_t1_2l' src=''></image> | |
| 156 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | |
| 453 | 157 | </block> |
| 454 | 158 | <block wx:if="{{object.goodicon==2}}"> |
| 455 | - <image class='zs_t1_2l' wx:if="{{object.styleicon==1}}" | |
| 159 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | |
| 456 | 160 | src='{{imghost}}/miniapp/images/Recommend.png'></image> |
| 457 | - <image class='zs_t1_2l' wx:if="{{object.styleicon==2 }}" | |
| 161 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" | |
| 458 | 162 | src='{{imghost}}/miniapp/images/hot.png'></image> |
| 459 | - <image class='zs_t1_2l' wx:if="{{object.styleicon==3}}" | |
| 163 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | |
| 460 | 164 | src='{{imghost}}/miniapp/images/new.png'></image> |
| 461 | - <image class='zs_t1_2l' wx:if="{{object.styleicon==4 }}" | |
| 165 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" | |
| 462 | 166 | src='{{imghost}}/miniapp/images/Promotion.png'></image> |
| 463 | 167 | </block> |
| 464 | 168 | </view> |
| ... | ... | @@ -466,187 +170,100 @@ |
| 466 | 170 | <view class='zs_center_2l'> |
| 467 | 171 | <view class='zs_wz1_2l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> |
| 468 | 172 | <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}"> |
| 469 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 470 | - <view class='del'>¥{{item.market_price}}</view> | |
| 471 | - </view> | |
| 472 | - <view class='zs_wz5_2l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 473 | - </view> | |
| 474 | - </view> | |
| 475 | - </view> | |
| 476 | - | |
| 477 | - </view> | |
| 478 | - </navigator> | |
| 479 | -</block> | |
| 480 | 173 | |
| 481 | -<view class="clear"></view> | |
| 482 | -</block> | |
| 483 | -<!--右上角--> | |
| 484 | -<block wx:if='{{object.column==2 && object.position==2}}'> | |
| 485 | -<block wx:for="{{goods_array}}" > | |
| 486 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 487 | - <view class="zs_goods_wai_ban" > | |
| 488 | - <view class="zs_goods_ban"> | |
| 489 | - <view class='zs_goods_2l'> | |
| 490 | - | |
| 491 | - <view class='zs_top_2l'> | |
| 492 | - <!--<image class='zs_t_img_2l'></image>--> | |
| 493 | - <block> | |
| 494 | - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 495 | - binderror="bind_bnerr3"></image> | |
| 496 | - </block> | |
| 497 | - <block wx:if="{{object.goodicon==3}}"> | |
| 498 | - <image class='zs_t2_2l' wx:if="{{ object.position==2}}" | |
| 499 | - src='{{object.customicon}}'></image> | |
| 500 | - <!--<image class='zs_t2_2l' wx:if="{{object.styleicon==2 && object.position==2}}"--> | |
| 501 | - <!--src='{{object.customicon}}'></image>--> | |
| 502 | - <!--<image class='zs_t2_2l' wx:if="{{object.styleicon==3 && object.position==2}}"--> | |
| 503 | - <!--src='{{object.customicon}}'></image>--> | |
| 504 | - <!--<image class='zs_t2_2l' wx:if="{{object.styleicon==4 && object.position==2}}"--> | |
| 505 | - <!--src='{{object.customicon}}'></image>--> | |
| 506 | - </block> | |
| 507 | - <block wx:if="{{object.goodicon==1}}"> | |
| 508 | - <image class='zs_t2_2l' src=''></image> | |
| 509 | - </block> | |
| 510 | - <block wx:if="{{object.goodicon==2}}"> | |
| 511 | - <image class='zs_t2_2l' wx:if="{{object.styleicon==1}}" | |
| 512 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 513 | - <image class='zs_t2_2l' wx:if="{{object.styleicon==2 }}" | |
| 514 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 515 | - <image class='zs_t2_2l' wx:if="{{object.styleicon==3}}" | |
| 516 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 517 | - <image class='zs_t2_2l' wx:if="{{object.styleicon==4 }}" | |
| 518 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 519 | - </block> | |
| 520 | - </view> | |
| 521 | - <view class='zs_center_2l'> | |
| 522 | - | |
| 523 | - | |
| 524 | - <view class='zs_wz1_2l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 525 | - <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}"> | |
| 526 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 527 | - <view class='del'>¥{{item.market_price}}</view> | |
| 528 | - </view> | |
| 529 | - <view class='zs_wz5_2l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 530 | - | |
| 531 | - </view> | |
| 532 | - </view> | |
| 533 | - </view> | |
| 534 | - | |
| 535 | - </view> | |
| 536 | - </navigator> | |
| 537 | -</block> | |
| 538 | - | |
| 539 | -<view class="clear"></view> | |
| 540 | -</block> | |
| 541 | -<!--右下角--> | |
| 542 | -<block wx:if='{{object.column==2 && object.position==4}}'> | |
| 543 | -<block wx:for="{{goods_array}}" > | |
| 544 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 545 | - <view class="zs_goods_wai_ban" > | |
| 546 | - <view class="zs_goods_ban"> | |
| 547 | - <view class='zs_goods_2l'> | |
| 548 | - | |
| 549 | - <view class='zs_top_2l'> | |
| 550 | - <!--<image class='zs_t_img_2l'></image>--> | |
| 551 | - <block> | |
| 552 | - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 553 | - binderror="bind_bnerr3"></image> | |
| 554 | - </block> | |
| 555 | - | |
| 556 | - <block wx:if="{{object.goodicon==3}}"> | |
| 557 | - <image class='zs_t3_2l' wx:if="{{ object.position==4}}" | |
| 558 | - src='{{object.customicon}}'></image> | |
| 559 | - <!--<image class='zs_t3_2l' wx:if="{{object.styleicon==2 && object.position==3}}"--> | |
| 560 | - <!--src='{{object.customicon}}'></image>--> | |
| 561 | - <!--<image class='zs_t3_2l' wx:if="{{object.styleicon==3 && object.position==3}}"--> | |
| 562 | - <!--src='{{object.customicon}}'></image>--> | |
| 563 | - <!--<image class='zs_t3_2l' wx:if="{{object.styleicon==4 && object.position==3}}"--> | |
| 564 | - <!--src='{{object.customicon}}'></image>--> | |
| 565 | - </block> | |
| 566 | - <block wx:if="{{object.goodicon==1}}"> | |
| 567 | - <image class='zs_t3_2l' src=''></image> | |
| 568 | - </block> | |
| 569 | - <block wx:if="{{object.goodicon==2}}"> | |
| 570 | - <image class='zs_t3_2l' wx:if="{{object.styleicon==1}}" | |
| 571 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 572 | - <image class='zs_t3_2l' wx:if="{{object.styleicon==2 }}" | |
| 573 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 574 | - <image class='zs_t3_2l' wx:if="{{object.styleicon==3}}" | |
| 575 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 576 | - <image class='zs_t3_2l' wx:if="{{object.styleicon==4 }}" | |
| 577 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 578 | - </block> | |
| 579 | - </view> | |
| 580 | - | |
| 581 | - <view class='zs_center_2l'> | |
| 582 | - | |
| 583 | - <view class='zs_wz1_2l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 584 | - <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}"> | |
| 585 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 586 | - <view class='del'>¥{{item.market_price}}</view> | |
| 587 | - </view> | |
| 588 | - <view class='zs_wz5_2l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 589 | - </view> | |
| 590 | - | |
| 591 | - </view> | |
| 592 | - </view> | |
| 593 | - | |
| 594 | - | |
| 595 | - </view> | |
| 596 | - </navigator> | |
| 597 | -</block> | |
| 598 | - | |
| 599 | -<view class="clear"></view> | |
| 600 | -</block> | |
| 601 | -<!--左下角--> | |
| 602 | -<block wx:if='{{object.column==2 && object.position==3}}'> | |
| 603 | -<block wx:for="{{goods_array}}" > | |
| 604 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 605 | - <view class="zs_goods_wai_ban" > | |
| 606 | - <view class="zs_goods_ban"> | |
| 607 | - <view class='zs_goods_2l'> | |
| 608 | - | |
| 609 | - <view class='zs_top_2l'> | |
| 610 | - <!--<image class='zs_t_img_2l'></image>--> | |
| 611 | - <block> | |
| 612 | - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 613 | - binderror="bind_bnerr3"></image> | |
| 614 | - </block> | |
| 615 | - | |
| 616 | - <block wx:if="{{object.goodicon==3}}"> | |
| 617 | - <image class='zs_t4_2l' wx:if="{{ object.position==3}}" | |
| 618 | - src='{{object.customicon}}'></image> | |
| 619 | - <!--<image class='zs_t4_2l' wx:if="{{object.styleicon==2 && object.position==4}}"--> | |
| 620 | - <!--src='{{object.customicon}}'></image>--> | |
| 621 | - <!--<image class='zs_t4_2l' wx:if="{{object.styleicon==3 && object.position==4}}"--> | |
| 622 | - <!--src='{{object.customicon}}'></image>--> | |
| 623 | - <!--<image class='zs_t4_2l' wx:if="{{object.styleicon==4 && object.position==4}}"--> | |
| 624 | - <!--src='{{object.customicon}}'></image>--> | |
| 625 | - </block> | |
| 626 | - <block wx:if="{{object.goodicon==1}}"> | |
| 627 | - <image class='zs_t4_2l' src=''></image> | |
| 628 | - </block> | |
| 629 | - <block wx:if="{{object.goodicon==2}}"> | |
| 630 | - <image class='zs_t4_2l' wx:if="{{object.styleicon==1}}" | |
| 631 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 632 | - <image class='zs_t4_2l' wx:if="{{object.styleicon==2 }}" | |
| 633 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 634 | - <image class='zs_t4_2l' wx:if="{{object.styleicon==3}}" | |
| 635 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 636 | - <image class='zs_t4_2l' wx:if="{{object.styleicon==4 }}" | |
| 637 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 638 | - </block> | |
| 639 | - </view> | |
| 640 | - | |
| 641 | - <view class='zs_center_2l'> | |
| 642 | - | |
| 643 | - <view class='zs_wz1_2l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 644 | - <view class='zs_wz2_2l' wx:if="{{object.goodsprice}}"> | |
| 645 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 646 | - <view class='del'>¥{{item.market_price}}</view> | |
| 174 | + <block wx:if="{{item.prom_price}}"> | |
| 175 | + <view class='wz_red'>¥{{item.prom_price}}</view> | |
| 176 | + <view class='del'>¥{{item.market_price}}</view> | |
| 177 | + </block> | |
| 178 | + <block wx:else> | |
| 179 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | |
| 180 | + <!-- 当会员是等级卡的时候 --> | |
| 181 | + <block wx:if="{{card_field}}"> | |
| 182 | + <!-- 等级价>0 --> | |
| 183 | + <block wx:if="{{item[card_field]>0}}"> | |
| 184 | + <view class="money flex" > | |
| 185 | + <!-- 办卡价 --> | |
| 186 | + <view class="flex xc-wc"> | |
| 187 | + <view class="fs24"></view> | |
| 188 | + <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 189 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image><view class="card_name">{{card_name}}</view></view> | |
| 190 | + </view> | |
| 191 | + </view> | |
| 192 | + <view class="flex" style="line-height: 28rpx;" > | |
| 193 | + <!-- 原价 --> | |
| 194 | + <view class="price flex xc-ash line_th"> | |
| 195 | + <view class="fs22">¥</view> | |
| 196 | + <view class="fs22">{{item.market_price}}</view> | |
| 197 | + </view> | |
| 198 | + </view> | |
| 199 | + </block> | |
| 200 | + <blocK wx:else> | |
| 201 | + <view class="money flex" > | |
| 202 | + <!-- 办卡价 --> | |
| 203 | + <view class="flex xc-wc"> | |
| 204 | + <view class="fs24">¥</view> | |
| 205 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 206 | + </view> | |
| 207 | + </view> | |
| 208 | + <view class="flex" style="line-height: 28rpx;" > | |
| 209 | + <!-- 原价 --> | |
| 210 | + <view class="price flex xc-ash line_th"> | |
| 211 | + <view class="fs22">¥</view> | |
| 212 | + <view class="fs22">{{item.market_price}}</view> | |
| 213 | + </view> | |
| 214 | + </view> | |
| 215 | + </blocK> | |
| 216 | + </block> | |
| 217 | + <block wx:else> | |
| 218 | + <!-- 如果商品有设置等级价大于0的 --> | |
| 219 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 220 | + <view class="money flex" > | |
| 221 | + <!-- 办卡价 --> | |
| 222 | + <view class="flex xc-wc"> | |
| 223 | + <view class="fs24">¥</view> | |
| 224 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 225 | + </view> | |
| 226 | + <!-- 原价 --> | |
| 227 | + <view class="price flex xc-ash line_th"> | |
| 228 | + <view class="fs22">¥</view> | |
| 229 | + <view class="fs22">{{item.market_price}}</view> | |
| 230 | + </view> | |
| 231 | + | |
| 232 | + </view> | |
| 233 | + <view class="flex" style="line-height: 28rpx;" > | |
| 234 | + <!-- 等级价 --> | |
| 235 | + <view class="price flex"> | |
| 236 | + <view class="fs22">¥</view> | |
| 237 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 238 | + <view class="card_bg"> <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view> | |
| 239 | + </view> | |
| 240 | + </view> | |
| 241 | + </block> | |
| 242 | + <block wx:else> | |
| 243 | + <view class="money flex" > | |
| 244 | + <!-- 办卡价 --> | |
| 245 | + <view class="flex xc-wc"> | |
| 246 | + <view class="fs24">¥</view> | |
| 247 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 248 | + </view> | |
| 249 | + </view> | |
| 250 | + <view class="flex" style="line-height: 28rpx;" > | |
| 251 | + <!-- 原价 --> | |
| 252 | + <view class="price flex xc-ash line_th"> | |
| 253 | + <view class="fs22">¥</view> | |
| 254 | + <view class="fs22">{{item.market_price}}</view> | |
| 255 | + </view> | |
| 256 | + </view> | |
| 257 | + </block> | |
| 258 | + </block> | |
| 259 | + </block> | |
| 260 | + <block wx:else> | |
| 261 | + <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 262 | + <view class='del'>¥{{item.market_price}}</view> | |
| 263 | + </block> | |
| 264 | + </block> | |
| 647 | 265 | </view> |
| 648 | 266 | <view class='zs_wz5_2l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> |
| 649 | - | |
| 650 | 267 | </view> |
| 651 | 268 | </view> |
| 652 | 269 | </view> |
| ... | ... | @@ -654,46 +271,34 @@ |
| 654 | 271 | </view> |
| 655 | 272 | </navigator> |
| 656 | 273 | </block> |
| 657 | - | |
| 658 | -<view class="clear"></view> | |
| 274 | + <view class="clear"></view> | |
| 659 | 275 | </block> |
| 660 | - | |
| 661 | 276 | <!--3个一列--> |
| 662 | -<!--左上角--> | |
| 663 | -<block wx:if='{{object.column==3 && object.position==1}}'> | |
| 664 | -<view class="zwp_3"> | |
| 277 | +<block wx:if='{{object.column==3}}'> | |
| 278 | + <view class="zwp_3"> | |
| 665 | 279 | <block wx:for="{{goods_array}}" > |
| 666 | 280 | <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> |
| 667 | 281 | <view class="zs_goods_wai_san" > |
| 668 | 282 | <view class="zs_goods_san"> |
| 669 | 283 | <view class='zs_goods_3l'> |
| 670 | - <view class='zs_top_3l'> | |
| 671 | - <block> | |
| 672 | - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 284 | + <view class='zs_top_3l rel'> | |
| 285 | + <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 673 | 286 | binderror="bind_bnerr3"></image> |
| 674 | - </block> | |
| 675 | - | |
| 676 | 287 | <block wx:if="{{object.goodicon==3}}"> |
| 677 | - <image class='zs_t1_3l' wx:if="{{ object.position==1}}" | |
| 678 | - src='{{object.customicon}}'></image> | |
| 679 | - <!-- <image class='zs_t1_3l' wx:if="{{object.styleicon==2 && object.position==1}}" | |
| 288 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{ object.position==1}}" | |
| 680 | 289 | src='{{object.customicon}}'></image> |
| 681 | - <image class='zs_t1_3l' wx:if="{{object.styleicon==3 && object.position==1}}" | |
| 682 | - src='{{object.customicon}}'></image> | |
| 683 | - <image class='zs_t1_3l' wx:if="{{object.styleicon==4 && object.position==1}}" | |
| 684 | - src='{{object.customicon}}'></image> --> | |
| 685 | 290 | </block> |
| 686 | 291 | <block wx:if="{{object.goodicon==1}}"> |
| 687 | - <image class='zs_t1_3l' src=''></image> | |
| 292 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | |
| 688 | 293 | </block> |
| 689 | 294 | <block wx:if="{{object.goodicon==2}}"> |
| 690 | - <image class='zs_t1_3l' wx:if="{{object.styleicon==1}}" | |
| 295 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | |
| 691 | 296 | src='{{imghost}}/miniapp/images/Recommend.png'></image> |
| 692 | - <image class='zs_t1_3l' wx:if="{{object.styleicon==2 }}" | |
| 297 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" | |
| 693 | 298 | src='{{imghost}}/miniapp/images/hot.png'></image> |
| 694 | - <image class='zs_t1_3l' wx:if="{{object.styleicon==3}}" | |
| 299 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | |
| 695 | 300 | src='{{imghost}}/miniapp/images/new.png'></image> |
| 696 | - <image class='zs_t1_3l' wx:if="{{object.styleicon==4 }}" | |
| 301 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" | |
| 697 | 302 | src='{{imghost}}/miniapp/images/Promotion.png'></image> |
| 698 | 303 | </block> |
| 699 | 304 | </view> |
| ... | ... | @@ -702,8 +307,97 @@ |
| 702 | 307 | |
| 703 | 308 | <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> |
| 704 | 309 | <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> |
| 705 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 706 | - <view class='del'>¥{{item.market_price}}</view> | |
| 310 | + <block wx:if="{{item.prom_price}}"> | |
| 311 | + <view class='wz_red'>¥{{item.prom_price}}</view> | |
| 312 | + <view class='del'>¥{{item.market_price}}</view> | |
| 313 | + </block> | |
| 314 | + <block wx:else> | |
| 315 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | |
| 316 | + <!-- 当会员是等级卡的时候 --> | |
| 317 | + <block wx:if="{{card_field}}"> | |
| 318 | + <!-- 等级价>0 --> | |
| 319 | + <block wx:if="{{item[card_field]>0}}"> | |
| 320 | + <view class="money flex" > | |
| 321 | + <!-- 办卡价 --> | |
| 322 | + <view class="flex xc-wc"> | |
| 323 | + <view class="fs24">¥</view> | |
| 324 | + <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 325 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image><view class="card_name">{{card_name}}</view></view> | |
| 326 | + </view> | |
| 327 | + </view> | |
| 328 | + <view class="flex" style="line-height: 28rpx;" > | |
| 329 | + <!-- 原价 --> | |
| 330 | + <view class="price flex xc-ash line_th"> | |
| 331 | + <view class="fs22">¥</view> | |
| 332 | + <view class="fs22">{{item.market_price}}</view> | |
| 333 | + </view> | |
| 334 | + </view> | |
| 335 | + </block> | |
| 336 | + <blocK wx:else> | |
| 337 | + <view class="money flex" > | |
| 338 | + <!-- 办卡价 --> | |
| 339 | + <view class="flex xc-wc"> | |
| 340 | + <view class="fs24">¥</view> | |
| 341 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 342 | + </view> | |
| 343 | + </view> | |
| 344 | + <view class="flex" style="line-height: 28rpx;" > | |
| 345 | + <!-- 原价 --> | |
| 346 | + <view class="price flex xc-ash line_th"> | |
| 347 | + <view class="fs22">¥</view> | |
| 348 | + <view class="fs22">{{item.market_price}}</view> | |
| 349 | + </view> | |
| 350 | + </view> | |
| 351 | + </blocK> | |
| 352 | + </block> | |
| 353 | + <block wx:else> | |
| 354 | + <!-- 如果商品有设置等级价大于0的 --> | |
| 355 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 356 | + <view class="money flex" > | |
| 357 | + <!-- 办卡价 --> | |
| 358 | + <view class="flex xc-wc"> | |
| 359 | + <view class="fs24">¥</view> | |
| 360 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 361 | + </view> | |
| 362 | + <!-- 原价 --> | |
| 363 | + <view class="price flex xc-ash line_th"> | |
| 364 | + <view class="fs22">¥</view> | |
| 365 | + <view class="fs22">{{item.market_price}}</view> | |
| 366 | + </view> | |
| 367 | + | |
| 368 | + </view> | |
| 369 | + <view class="flex" style="line-height: 28rpx;" > | |
| 370 | + <!-- 等级价 --> | |
| 371 | + <view class="price flex"> | |
| 372 | + <view class="fs22">¥</view> | |
| 373 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 374 | + <view class="card_bg"> <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view> | |
| 375 | + </view> | |
| 376 | + </view> | |
| 377 | + </block> | |
| 378 | + <block wx:else> | |
| 379 | + <view class="money flex" > | |
| 380 | + <!-- 办卡价 --> | |
| 381 | + <view class="flex xc-wc"> | |
| 382 | + <view class="fs24">¥</view> | |
| 383 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 384 | + </view> | |
| 385 | + </view> | |
| 386 | + <view class="flex" style="line-height: 28rpx;" > | |
| 387 | + <!-- 原价 --> | |
| 388 | + <view class="price flex xc-ash line_th"> | |
| 389 | + <view class="fs22">¥</view> | |
| 390 | + <view class="fs22">{{item.market_price}}</view> | |
| 391 | + </view> | |
| 392 | + </view> | |
| 393 | + </block> | |
| 394 | + </block> | |
| 395 | + </block> | |
| 396 | + <block wx:else> | |
| 397 | + <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 398 | + <view class='del'>¥{{item.market_price}}</view> | |
| 399 | + </block> | |
| 400 | + </block> | |
| 707 | 401 | </view> |
| 708 | 402 | <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> |
| 709 | 403 | </view> |
| ... | ... | @@ -713,212 +407,145 @@ |
| 713 | 407 | </navigator> |
| 714 | 408 | </block> |
| 715 | 409 | </view> |
| 716 | -<view class="clear"></view> | |
| 410 | + <view class="clear"></view> | |
| 717 | 411 | </block> |
| 718 | -<!--右上角--> | |
| 719 | -<block wx:if='{{object.column==3 && object.position==2}}'> | |
| 720 | -<block wx:for="{{goods_array}}" > | |
| 721 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 722 | - <view class="zs_goods_wai_san" > | |
| 723 | - <view class="zs_goods_san"> | |
| 724 | - <view class='zs_goods_3l'> | |
| 725 | - <view class='zs_top_3l'> | |
| 726 | - <!--<image class='zs_t_img_3l'></image>--> | |
| 727 | - <block> | |
| 728 | - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 729 | - binderror="bind_bnerr3"></image> | |
| 730 | - </block> | |
| 731 | - | |
| 732 | - <block wx:if="{{object.goodicon==3}}"> | |
| 733 | - <image class='zs_t2_3l' wx:if="{{ object.position==2}}" | |
| 734 | - src='{{object.customicon}}'></image> | |
| 735 | - <!--<image class='zs_t2_3l' wx:if="{{object.styleicon==2 && object.position==2}}"--> | |
| 736 | - <!--src='{{object.customicon}}'></image>--> | |
| 737 | - <!--<image class='zs_t2_3l' wx:if="{{object.styleicon==3 && object.position==2}}"--> | |
| 738 | - <!--src='{{object.customicon}}'></image>--> | |
| 739 | - <!--<image class='zs_t2_3l' wx:if="{{object.styleicon==4 && object.position==2}}"--> | |
| 740 | - <!--src='{{object.customicon}}'></image>--> | |
| 741 | - </block> | |
| 742 | - <block wx:if="{{object.goodicon==1}}"> | |
| 743 | - <image class='zs_t2_3l' src=''></image> | |
| 744 | - </block> | |
| 745 | - <block wx:if="{{object.goodicon==2}}"> | |
| 746 | - <image class='zs_t2_3l' wx:if="{{object.styleicon==1}}" | |
| 747 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 748 | - <image class='zs_t2_3l' wx:if="{{object.styleicon==2 }}" | |
| 749 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 750 | - <image class='zs_t2_3l' wx:if="{{object.styleicon==3}}" | |
| 751 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 752 | - <image class='zs_t2_3l' wx:if="{{object.styleicon==4 }}" | |
| 753 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 754 | - </block> | |
| 755 | - </view> | |
| 756 | - <view class='zs_center_3l'> | |
| 757 | - | |
| 758 | - | |
| 759 | - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 760 | - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> | |
| 761 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 762 | - <view class='del'>¥{{item.market_price}}</view> | |
| 763 | - </view> | |
| 764 | - <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 765 | - | |
| 766 | - <!--<view class='zs_wz3_3l'>美妆价:¥9.00</view>--> | |
| 767 | - <!--<view class='zs_wz4_3l'>等级价:¥8.00</view>--> | |
| 412 | +<!-- 列表显示 --> | |
| 413 | +<view class="zs_goods_xiao_wai" wx:if='{{object.column==4 }}'> | |
| 414 | + <block wx:for="{{goods_array}}" > | |
| 415 | + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 416 | + <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > | |
| 417 | + <view class='zs_top_x'> | |
| 418 | + <!--<image class='zs_t_img_x'></image>--> | |
| 419 | + <block> | |
| 420 | + <image class='zs_t_img_x' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 421 | + binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image> | |
| 422 | + </block> | |
| 768 | 423 | |
| 769 | - </view> | |
| 424 | + <block wx:if="{{object.goodicon==3}}"> | |
| 425 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.position==2}}" | |
| 426 | + src='{{object.customicon}}'></image> | |
| 427 | + </block> | |
| 428 | + <block wx:if="{{object.goodicon==1}}"> | |
| 429 | + <image class='{{g_filter.get_class(object.column,object.position)}}' src=''></image> | |
| 430 | + </block> | |
| 431 | + <block wx:if="{{object.goodicon==2}}"> | |
| 432 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==1}}" | |
| 433 | + src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 434 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==2 }}" | |
| 435 | + src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 436 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==3}}" | |
| 437 | + src='{{imghost}}/miniapp/images/new.png'></image> | |
| 438 | + <image class='{{g_filter.get_class(object.column,object.position)}}' wx:if="{{object.styleicon==4 }}" | |
| 439 | + src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 440 | + </block> | |
| 770 | 441 | </view> |
| 771 | - </view> | |
| 772 | - </view> | |
| 773 | - </navigator> | |
| 774 | -</block> | |
| 775 | -<view class="clear"></view> | |
| 776 | -</block> | |
| 777 | -<!--右下角--> | |
| 778 | - | |
| 779 | -<block wx:if='{{object.column==3 && object.position==4}}'> | |
| 780 | -<block wx:for="{{goods_array}}" > | |
| 781 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 782 | - <view class="zs_goods_wai_san" > | |
| 783 | - <view class="zs_goods_san"> | |
| 784 | - <view class='zs_goods_3l'> | |
| 785 | - <view class='zs_top_3l'> | |
| 786 | 442 | |
| 787 | - <block> | |
| 788 | - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 789 | - binderror="bind_bnerr3"></image> | |
| 443 | + <view class='zs_center_x'> | |
| 444 | + <view class='zs_wz1_x' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 445 | + <view class='zs_wz2_x' wx:if="{{object.goodsprice}}"> | |
| 446 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | |
| 447 | + <!-- 当会员是等级卡的时候 --> | |
| 448 | + <block wx:if="{{card_field}}"> | |
| 449 | + <!-- 等级价>0 --> | |
| 450 | + <block wx:if="{{item[card_field]>0}}"> | |
| 451 | + <view class="money flex" > | |
| 452 | + <!-- 办卡价 --> | |
| 453 | + <view class="flex xc-wc"> | |
| 454 | + <view class="fs24">¥</view> | |
| 455 | + <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 456 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image><view class="card_name">{{card_name}}</view></view> | |
| 457 | + </view> | |
| 458 | + </view> | |
| 459 | + <view class="flex" style="line-height: 28rpx;" > | |
| 460 | + <!-- 原价 --> | |
| 461 | + <view class="price flex xc-ash line_th"> | |
| 462 | + <view class="fs22">¥</view> | |
| 463 | + <view class="fs22">{{item.market_price}}</view> | |
| 464 | + </view> | |
| 465 | + </view> | |
| 466 | + </block> | |
| 467 | + <blocK wx:else> | |
| 468 | + <view class="money flex" > | |
| 469 | + <!-- 办卡价 --> | |
| 470 | + <view class="flex xc-wc"> | |
| 471 | + <view class="fs24">¥</view> | |
| 472 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 473 | + </view> | |
| 474 | + </view> | |
| 475 | + <view class="flex" style="line-height: 28rpx;" > | |
| 476 | + <!-- 原价 --> | |
| 477 | + <view class="price flex xc-ash line_th"> | |
| 478 | + <view class="fs22">¥</view> | |
| 479 | + <view class="fs22">{{item.market_price}}</view> | |
| 480 | + </view> | |
| 481 | + </view> | |
| 482 | + </blocK> | |
| 483 | + </block> | |
| 484 | + <block wx:else> | |
| 485 | + <!-- 如果商品有设置等级价大于0的 --> | |
| 486 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 487 | + <view class="money flex" > | |
| 488 | + <!-- 办卡价 --> | |
| 489 | + <view class="flex xc-wc"> | |
| 490 | + <view class="fs24">¥</view> | |
| 491 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 492 | + </view> | |
| 493 | + <!-- 原价 --> | |
| 494 | + <view class="price flex xc-ash line_th"> | |
| 495 | + <view class="fs22">¥</view> | |
| 496 | + <view class="fs22">{{item.market_price}}</view> | |
| 497 | + </view> | |
| 498 | + | |
| 499 | + </view> | |
| 500 | + <view class="flex" style="line-height: 28rpx;" > | |
| 501 | + <!-- 等级价 --> | |
| 502 | + <view class="price flex"> | |
| 503 | + <view class="fs22">¥</view> | |
| 504 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 505 | + <view class="card_bg"> <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view> | |
| 506 | + </view> | |
| 507 | + </view> | |
| 508 | + </block> | |
| 509 | + <block wx:else> | |
| 510 | + <view class="money flex" > | |
| 511 | + <!-- 办卡价 --> | |
| 512 | + <view class="flex xc-wc"> | |
| 513 | + <view class="fs24">¥</view> | |
| 514 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 515 | + </view> | |
| 516 | + </view> | |
| 517 | + <view class="flex" style="line-height: 28rpx;" > | |
| 518 | + <!-- 原价 --> | |
| 519 | + <view class="price flex xc-ash line_th"> | |
| 520 | + <view class="fs22">¥</view> | |
| 521 | + <view class="fs22">{{item.market_price}}</view> | |
| 522 | + </view> | |
| 523 | + </view> | |
| 524 | + </block> | |
| 525 | + </block> | |
| 790 | 526 | </block> |
| 791 | 527 | |
| 792 | - <block wx:if="{{object.goodicon==3}}"> | |
| 793 | - <image class='zs_t3_3l' wx:if="{{ object.position==4}}" | |
| 794 | - src='{{object.customicon}}'></image> | |
| 795 | - <!--<image class='zs_t3_3l' wx:if="{{object.styleicon==2 && object.position==3}}"--> | |
| 796 | - <!--src='{{object.customicon}}'></image>--> | |
| 797 | - <!--<image class='zs_t3_3l' wx:if="{{object.styleicon==3 && object.position==3}}"--> | |
| 798 | - <!--src='{{object.customicon}}'></image>--> | |
| 799 | - <!--<image class='zs_t3_3l' wx:if="{{object.styleicon==4 && object.position==3}}"--> | |
| 800 | - <!--src='{{object.customicon}}'></image>--> | |
| 801 | - </block> | |
| 802 | - <block wx:if="{{object.goodicon==1}}"> | |
| 803 | - <image class='zs_t3_3l' src=''></image> | |
| 804 | - </block> | |
| 805 | - <block wx:if="{{object.goodicon==2}}"> | |
| 806 | - <image class='zs_t3_3l' wx:if="{{object.styleicon==1}}" | |
| 807 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 808 | - <image class='zs_t3_3l' wx:if="{{object.styleicon==2 }}" | |
| 809 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 810 | - <image class='zs_t3_3l' wx:if="{{object.styleicon==3}}" | |
| 811 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 812 | - <image class='zs_t3_3l' wx:if="{{object.styleicon==4 }}" | |
| 813 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 528 | + <block wx:else> | |
| 529 | + <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 530 | + <view class='del'>¥{{item.market_price}}</view> | |
| 814 | 531 | </block> |
| 815 | 532 | </view> |
| 816 | - <view class='zs_center_3l'> | |
| 817 | - | |
| 818 | - | |
| 819 | - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 820 | - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> | |
| 821 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 822 | - <view class='del'>¥{{item.market_price}}</view> | |
| 823 | - </view> | |
| 824 | - <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 825 | - <!--<view class='zs_wz3_3l'>美妆价:¥9.00</view>--> | |
| 826 | - <!--<view class='zs_wz4_3l'>等级价:¥8.00</view>--> | |
| 827 | - </view> | |
| 533 | + <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 828 | 534 | </view> |
| 829 | - </view> | |
| 830 | - | |
| 831 | - </view> | |
| 832 | - </navigator> | |
| 833 | -</block> | |
| 834 | - | |
| 835 | - | |
| 836 | -<view class="clear"></view> | |
| 837 | -</block> | |
| 838 | -<!--左下角--> | |
| 839 | -<block wx:if='{{object.column==3 && object.position==3}}'> | |
| 840 | -<block wx:for="{{goods_array}}" > | |
| 841 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1"> | |
| 842 | - <view class="zs_goods_wai_san" > | |
| 843 | - <view class="zs_goods_san"> | |
| 844 | - <view class='zs_goods_3l'> | |
| 845 | - | |
| 846 | - <view class='zs_top_3l'> | |
| 847 | - | |
| 848 | - <block> | |
| 849 | - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" | |
| 850 | - binderror="bind_bnerr3"></image> | |
| 851 | - </block> | |
| 852 | - | |
| 853 | - <block wx:if="{{object.goodicon==3}}"> | |
| 854 | - <image class='zs_t4_3l' wx:if="{{object.position==3}}" | |
| 855 | - src='{{object.customicon}}'></image> | |
| 856 | - <!--<image class='zs_t4_3l' wx:if="{{ object.position==4}}"--> | |
| 857 | - <!--src='{{object.customicon}}'></image>--> | |
| 858 | - <!--<image class='zs_t4_3l' wx:if="{{object.position==4}}"--> | |
| 859 | - <!--src='{{object.customicon}}'></image>--> | |
| 860 | - <!--<image class='zs_t4_3l' wx:if="{{ object.position==4}}"--> | |
| 861 | - <!--src='{{object.customicon}}'></image>--> | |
| 862 | - </block> | |
| 863 | - <block wx:if="{{object.goodicon==1}}"> | |
| 864 | - <image class='zs_t4_3l' src=''></image> | |
| 865 | - </block> | |
| 866 | - <block wx:if="{{object.goodicon==2}}"> | |
| 867 | - <image class='zs_t4_3l' wx:if="{{object.styleicon==1}}" | |
| 868 | - src='{{imghost}}/miniapp/images/Recommend.png'></image> | |
| 869 | - <image class='zs_t4_3l' wx:if="{{object.styleicon==2 }}" | |
| 870 | - src='{{imghost}}/miniapp/images/hot.png'></image> | |
| 871 | - <image class='zs_t4_3l' wx:if="{{object.styleicon==3}}" | |
| 872 | - src='{{imghost}}/miniapp/images/new.png'></image> | |
| 873 | - <image class='zs_t4_3l' wx:if="{{object.styleicon==4 }}" | |
| 874 | - src='{{imghost}}/miniapp/images/Promotion.png'></image> | |
| 875 | - </block> | |
| 876 | - </view> | |
| 877 | - | |
| 878 | - <view class='zs_center_3l'> | |
| 879 | 535 | |
| 880 | - <view class='zs_wz1_3l' wx:if="{{object.goodstit}}">{{item.goods_name}}</view> | |
| 881 | - <view class='zs_wz2_3l' wx:if="{{object.goodsprice}}"> | |
| 882 | - <view class='wz_red'>¥{{item.shop_price}}</view> | |
| 883 | - <view class='del'>¥{{item.market_price}}</view> | |
| 884 | - </view> | |
| 885 | - <view class='zs_wz5_3l' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view> | |
| 886 | - | |
| 887 | - | |
| 888 | - </view> | |
| 889 | - | |
| 890 | - | |
| 891 | - </view> | |
| 892 | 536 | </view> |
| 893 | - | |
| 894 | - </view> | |
| 895 | - </navigator> | |
| 896 | -</block> | |
| 897 | -<view class="clear"></view> | |
| 898 | -</block> | |
| 899 | - | |
| 900 | - | |
| 901 | -<!-- <block wx:if="{{object.classstyle=='2' }}"> | |
| 902 | -<view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> | |
| 903 | - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> | |
| 904 | - {{loadText}} | |
| 905 | - </button> | |
| 537 | + </navigator> | |
| 538 | + </block> | |
| 539 | + <view class="clear"></view> | |
| 906 | 540 | </view> |
| 907 | -</block> --> | |
| 908 | 541 | |
| 909 | -<block wx:if="{{object.classstyle=='1' }}"> | |
| 910 | -<view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none"> | |
| 542 | +<block wx:if="{{object.classstyle=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none"> | |
| 911 | 543 | <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> |
| 912 | 544 | {{loadText}} |
| 913 | 545 | </button> |
| 914 | -</view> | |
| 915 | -</block> | |
| 916 | - | |
| 546 | +</view></block> | |
| 917 | 547 | <block wx:if="{{object.classstyle!='1' }}"> |
| 918 | - <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> | |
| 919 | - <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> | |
| 920 | - {{loadText}} | |
| 921 | - </button> | |
| 922 | -</view> | |
| 923 | - | |
| 924 | - </block> | |
| 925 | 548 | \ No newline at end of file |
| 549 | + <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> | |
| 550 | + <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">{{loadText}}</button> | |
| 551 | + </view> | |
| 552 | +</block> | |
| 926 | 553 | \ No newline at end of file | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.wxss
| 1 | 1 | /* pages/diy_zs/diy_zs.wxss */ |
| 2 | - | |
| 2 | +.zwp_3{ margin-top: 10rpx} | |
| 3 | 3 | .zs_goods{ |
| 4 | - width: 100%; | |
| 5 | - min-height: 500rpx; | |
| 6 | -border: 2rpx #ddd solid; | |
| 7 | -margin: 0 auto; | |
| 8 | -} | |
| 9 | - | |
| 10 | -.zwp_3{ | |
| 11 | - /* width: 30%; */ | |
| 4 | + width: 700rpx; | |
| 5 | + border: 1rpx #ddd solid; | |
| 6 | + margin-bottom: 10rpx; | |
| 7 | + margin: 0 auto; | |
| 8 | + | |
| 12 | 9 | } |
| 13 | - | |
| 14 | 10 | .s1_gk_a1{ |
| 15 | 11 | display: inline; |
| 16 | 12 | width: auto; |
| 17 | 13 | height: auto; |
| 18 | 14 | } |
| 19 | -.clear{ | |
| 20 | - clear: both; | |
| 21 | -} | |
| 15 | +.clear{ clear: both;} | |
| 22 | 16 | .zs_top{ |
| 23 | 17 | width: 100%; |
| 24 | 18 | min-height: 700rpx; |
| 25 | 19 | margin: 0 auto; |
| 26 | - padding-left:22rpx; | |
| 27 | -padding-bottom:30rpx; | |
| 28 | - | |
| 29 | -display: flex; | |
| 30 | -/* padding-left: 6rpx; */ | |
| 31 | -/* padding-right: 30rpx; */ | |
| 20 | + margin-bottom:30rpx; | |
| 21 | + display: flex; | |
| 32 | 22 | } |
| 33 | 23 | |
| 34 | 24 | .zs_t_img { |
| 35 | - width: 700rpx; | |
| 36 | - height: 700rpx; | |
| 37 | - /* margin: 0 auto; */ | |
| 38 | - /* background-color: bisque; */ | |
| 39 | - | |
| 25 | + width: 698rpx; | |
| 26 | + height: 698rpx; | |
| 27 | + margin: 1rpx auto; | |
| 40 | 28 | } |
| 41 | 29 | |
| 42 | 30 | .zs_center{ |
| ... | ... | @@ -53,8 +41,9 @@ display: flex; |
| 53 | 41 | overflow: hidden; |
| 54 | 42 | text-overflow: ellipsis; |
| 55 | 43 | margin-bottom:10rpx; |
| 56 | -font-size:28rpx; | |
| 44 | + font-size:28rpx; | |
| 57 | 45 | white-space: nowrap; |
| 46 | + width: 640rpx | |
| 58 | 47 | } |
| 59 | 48 | |
| 60 | 49 | |
| ... | ... | @@ -95,52 +84,44 @@ font-size:28rpx; |
| 95 | 84 | font-size: 32rpx; |
| 96 | 85 | } |
| 97 | 86 | |
| 98 | -.del{ | |
| 99 | - font-size: 24rpx; | |
| 100 | - color: #999; | |
| 101 | - text-decoration: line-through; | |
| 102 | -} | |
| 87 | + | |
| 103 | 88 | |
| 104 | 89 | .zs_t1{ |
| 105 | 90 | width: 56rpx; |
| 106 | 91 | height: 56rpx; |
| 107 | - position: relative; | |
| 108 | - right: 58rpx; | |
| 109 | - bottom: -640rpx; | |
| 92 | + position: absolute; | |
| 93 | + left: 0rpx; | |
| 94 | + top: 10rpx; | |
| 110 | 95 | } |
| 111 | 96 | |
| 112 | 97 | |
| 113 | 98 | .zs_t2{ |
| 114 | 99 | width: 56rpx; |
| 115 | 100 | height: 56rpx; |
| 116 | - position: relative; | |
| 117 | - right: 58rpx; | |
| 118 | - bottom: -2rpx; | |
| 101 | + position: absolute; | |
| 102 | + right: 0rpx; | |
| 103 | + top: 10rpx; | |
| 119 | 104 | } |
| 120 | 105 | |
| 121 | 106 | .zs_t3{ |
| 122 | 107 | width: 56rpx; |
| 123 | 108 | height: 56rpx; |
| 124 | - position: relative; | |
| 125 | - right: 692rpx; | |
| 126 | - bottom: -4rpx; | |
| 109 | + position: absolute; | |
| 110 | + left: 0rpx; | |
| 111 | + bottom: 10rpx; | |
| 127 | 112 | } |
| 128 | 113 | |
| 129 | 114 | |
| 130 | 115 | .zs_t4{ |
| 131 | 116 | width: 56rpx; |
| 132 | 117 | height: 56rpx; |
| 133 | - position: relative; | |
| 134 | - right: 692rpx; | |
| 135 | - bottom: -642rpx; | |
| 118 | + position: absolute; | |
| 119 | + right: 20rpx; | |
| 120 | + bottom: 10rpx; | |
| 136 | 121 | } |
| 137 | 122 | |
| 138 | 123 | |
| 139 | 124 | |
| 140 | - | |
| 141 | -/* xiao */ | |
| 142 | - | |
| 143 | - | |
| 144 | 125 | .zs_goods_xiao_bottom{ |
| 145 | 126 | width: 100%; |
| 146 | 127 | min-height: 300rpx; |
| ... | ... | @@ -165,24 +146,15 @@ font-size:28rpx; |
| 165 | 146 | .zs_top_x{ |
| 166 | 147 | width: 400rpx; |
| 167 | 148 | height: 318rpx; |
| 168 | - margin-top: 20rpx; | |
| 169 | - /* /* padding-top:30rpx; | |
| 170 | -padding-bottom:30rpx; */ | |
| 171 | - | |
| 172 | -display: flex; | |
| 173 | - | |
| 149 | + margin-top: 20rpx; | |
| 150 | + display: flex; | |
| 174 | 151 | } |
| 175 | 152 | |
| 176 | -/* .zs_goods_xiao{ | |
| 177 | - background-color: white; | |
| 178 | -} */ | |
| 179 | - | |
| 180 | 153 | .zs_t_img_x { |
| 181 | 154 | width: 290rpx; |
| 182 | 155 | height: 290rpx; |
| 183 | 156 | margin-left: 20rpx; |
| 184 | - /* background-color: bisque; */ | |
| 185 | - | |
| 157 | + | |
| 186 | 158 | } |
| 187 | 159 | |
| 188 | 160 | .zs_center_x{ |
| ... | ... | @@ -243,10 +215,9 @@ font-size:28rpx; |
| 243 | 215 | } |
| 244 | 216 | |
| 245 | 217 | .del{ |
| 246 | - font-size: 24rpx; | |
| 218 | + font-size: 24rpx; | |
| 247 | 219 | color: #999; |
| 248 | 220 | text-decoration: line-through; |
| 249 | - margin-left: 10rpx; | |
| 250 | 221 | margin-top: 8rpx; |
| 251 | 222 | } |
| 252 | 223 | |
| ... | ... | @@ -381,61 +352,57 @@ top: 234rpx; |
| 381 | 352 | } |
| 382 | 353 | |
| 383 | 354 | |
| 355 | + | |
| 356 | +/*---俩列图片位置---*/ | |
| 384 | 357 | .zs_t1_2l{ |
| 385 | 358 | width: 56rpx; |
| 386 | 359 | height: 56rpx; |
| 387 | - position: relative; | |
| 388 | - right: -2rpx; | |
| 389 | - top: -310rpx; | |
| 360 | + position: absolute; | |
| 361 | + left: 0rpx; | |
| 362 | + top: 10rpx; | |
| 390 | 363 | } |
| 391 | 364 | |
| 392 | - | |
| 393 | 365 | .zs_t2_2l{ |
| 394 | 366 | width: 56rpx; |
| 395 | 367 | height: 56rpx; |
| 396 | - position: relative; | |
| 397 | - right: -294rpx; | |
| 398 | - bottom: 310rpx; | |
| 368 | + position: absolute; | |
| 369 | + right: 0rpx; | |
| 370 | + top: 10rpx; | |
| 399 | 371 | } |
| 400 | 372 | |
| 401 | 373 | .zs_t3_2l{ |
| 402 | 374 | width: 56rpx; |
| 403 | 375 | height: 56rpx; |
| 404 | - position: relative; | |
| 405 | - right: -294rpx; | |
| 406 | - bottom: 68rpx; | |
| 376 | + position: absolute; | |
| 377 | + left: 0rpx; | |
| 378 | + bottom: 10rpx; | |
| 407 | 379 | } |
| 408 | 380 | |
| 409 | 381 | |
| 410 | 382 | .zs_t4_2l{ |
| 411 | 383 | width: 56rpx; |
| 412 | 384 | height: 56rpx; |
| 413 | - position: relative; | |
| 414 | - right: -2rpx; | |
| 415 | - bottom: 68rpx; | |
| 385 | + position: absolute; | |
| 386 | + right: 0rpx; | |
| 387 | + bottom: 10rpx; | |
| 416 | 388 | } |
| 417 | 389 | |
| 390 | + | |
| 391 | + | |
| 418 | 392 | /*一个3列*/ |
| 419 | 393 | .zs_goods_wai_san{ |
| 420 | - width: 240rpx; | |
| 394 | + width: 230rpx; | |
| 421 | 395 | display: flex; |
| 422 | - margin-left: 8rpx; | |
| 396 | + margin-left: 10rpx; | |
| 423 | 397 | float: left; |
| 424 | 398 | margin-bottom: 8rpx; |
| 425 | - background-color:white; | |
| 426 | - | |
| 399 | + background-color:white; | |
| 427 | 400 | } |
| 428 | 401 | |
| 429 | 402 | .zs_goods_san{ |
| 430 | 403 | width: 240rpx; |
| 431 | 404 | |
| 432 | 405 | } |
| 433 | - | |
| 434 | - | |
| 435 | - | |
| 436 | - | |
| 437 | - | |
| 438 | - | |
| 439 | 406 | .zs_goods_3l{ |
| 440 | 407 | width: 240rpx; |
| 441 | 408 | min-height: 300rpx; |
| ... | ... | @@ -445,22 +412,15 @@ top: 234rpx; |
| 445 | 412 | } |
| 446 | 413 | |
| 447 | 414 | .zs_top_3l{ |
| 448 | - width: 240rpx; | |
| 449 | - height: 240rpx; | |
| 450 | - | |
| 451 | - | |
| 452 | - | |
| 453 | - | |
| 454 | - | |
| 455 | - | |
| 415 | + width: 232rpx; | |
| 416 | + height: 232rpx; | |
| 456 | 417 | } |
| 457 | 418 | |
| 458 | 419 | .zs_t_img_3l { |
| 459 | - width:237rpx; | |
| 460 | - height: 240rpx; | |
| 420 | + width:232rpx; | |
| 421 | + height: 232rpx; | |
| 461 | 422 | margin: 0 auto; |
| 462 | 423 | background-color: bisque; |
| 463 | - | |
| 464 | 424 | } |
| 465 | 425 | |
| 466 | 426 | .zs_center_3l{ |
| ... | ... | @@ -469,27 +429,28 @@ top: 234rpx; |
| 469 | 429 | font-size: 28rpx; |
| 470 | 430 | color: #333; |
| 471 | 431 | text-align: left; |
| 472 | - padding: 0 10rpx; | |
| 432 | + padding: 0 10rpx; | |
| 473 | 433 | } |
| 474 | 434 | |
| 475 | 435 | .zs_wz1_3l{ |
| 476 | - overflow: hidden; | |
| 477 | - text-overflow: ellipsis; | |
| 436 | + | |
| 478 | 437 | margin-bottom:10rpx; |
| 479 | 438 | font-size:30rpx; |
| 480 | 439 | height: 80rpx; |
| 481 | - width: 227rpx; | |
| 482 | - /* white-space: nowrap; */ | |
| 440 | + width: 220rpx; | |
| 441 | + | |
| 442 | + overflow: hidden; | |
| 443 | + text-overflow: ellipsis; | |
| 444 | + display: -webkit-box; | |
| 445 | + -webkit-box-orient: vertical; | |
| 446 | + -webkit-line-clamp: 2; | |
| 483 | 447 | } |
| 484 | 448 | |
| 485 | 449 | |
| 486 | 450 | .zs_wz2_3l{ |
| 487 | - /* overflow: hidden; | |
| 488 | - text-overflow: ellipsis; */ | |
| 489 | 451 | margin-bottom:10rpx; |
| 490 | 452 | font-size:30rpx; |
| 491 | - /* white-space: nowrap; */ | |
| 492 | - display: flex; | |
| 453 | + display: flex; | |
| 493 | 454 | } |
| 494 | 455 | |
| 495 | 456 | .zs_wz3_3l{ |
| ... | ... | @@ -497,7 +458,7 @@ top: 234rpx; |
| 497 | 458 | text-overflow: ellipsis; |
| 498 | 459 | margin-bottom:10rpx; |
| 499 | 460 | font-size:30rpx; |
| 500 | - white-space: nowrap; | |
| 461 | + white-space: nowrap; | |
| 501 | 462 | } |
| 502 | 463 | |
| 503 | 464 | .zs_wz4_3l{ |
| ... | ... | @@ -505,7 +466,7 @@ top: 234rpx; |
| 505 | 466 | text-overflow: ellipsis; |
| 506 | 467 | margin-bottom:10rpx; |
| 507 | 468 | font-size:30rpx; |
| 508 | - white-space: nowrap; | |
| 469 | + white-space: nowrap; | |
| 509 | 470 | } |
| 510 | 471 | |
| 511 | 472 | .zs_wz5_3l{ |
| ... | ... | @@ -519,38 +480,58 @@ top: 234rpx; |
| 519 | 480 | .zs_t1_3l{ |
| 520 | 481 | width: 56rpx; |
| 521 | 482 | height: 56rpx; |
| 522 | - position: relative; | |
| 523 | - right: 0rpx; | |
| 524 | - top: -250rpx; | |
| 483 | + position: absolute; | |
| 484 | + left: 0rpx; | |
| 485 | + top: 10rpx; | |
| 525 | 486 | } |
| 526 | 487 | |
| 527 | 488 | |
| 528 | 489 | .zs_t2_3l{ |
| 529 | 490 | width: 56rpx; |
| 530 | 491 | height: 56rpx; |
| 531 | - position: relative; | |
| 532 | - right: -177rpx; | |
| 533 | - bottom: 250rpx; | |
| 492 | + position: absolute; | |
| 493 | + right: 0rpx; | |
| 494 | + top: 10rpx; | |
| 534 | 495 | } |
| 535 | 496 | |
| 536 | 497 | .zs_t3_3l{ |
| 537 | 498 | width: 56rpx; |
| 538 | 499 | height: 56rpx; |
| 539 | - position: relative; | |
| 540 | - right: -177rpx; | |
| 541 | - bottom: 67rpx; | |
| 500 | + position: absolute; | |
| 501 | + left: 0rpx; | |
| 502 | + bottom: 10rpx; | |
| 542 | 503 | } |
| 543 | 504 | |
| 544 | 505 | |
| 545 | 506 | .zs_t4_3l{ |
| 546 | 507 | width: 56rpx; |
| 547 | 508 | height: 56rpx; |
| 548 | - position: relative; | |
| 509 | + position: absolute; | |
| 549 | 510 | right: 0rpx; |
| 550 | - bottom: 67rpx; | |
| 511 | + bottom: 10rpx; | |
| 551 | 512 | } |
| 552 | 513 | |
| 553 | 514 | .zs_goods_wai{ |
| 554 | 515 | background-color: white; |
| 555 | 516 | margin-top: 10rpx; |
| 556 | -} | |
| 557 | 517 | \ No newline at end of file |
| 518 | +} | |
| 519 | + | |
| 520 | +.rel{position: relative} | |
| 521 | +.flex{display: flex} | |
| 522 | +.fs24{font-size: 24rpx} | |
| 523 | +.fs35{font-size: 35rpx} | |
| 524 | +.xc-wc{ align-items: center} | |
| 525 | + | |
| 526 | +.price.xc-ash{ | |
| 527 | + font-size: 24rpx; | |
| 528 | + color: #999; | |
| 529 | + text-decoration: line-through; | |
| 530 | + margin-top: 8rpx; | |
| 531 | +} | |
| 532 | + | |
| 533 | + | |
| 534 | +.line_th{ text-decoration: line-through} | |
| 535 | +.card_bg {display: flex; padding: 2rpx 10rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx;line-height: 28rpx;max-width: 110rpx; | |
| 536 | + background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} | |
| 537 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} | |
| 538 | +.card_bg .card_name{ max-width: 76rpx; width: auto;overflow: hidden; white-space:nowrap; } | |
| 558 | 539 | \ No newline at end of file | ... | ... |
components/diy_goodsGroup/g_filter.wxs
0 → 100644
| 1 | +//获取样式 | |
| 2 | +var get_class = function(column,position) { | |
| 3 | + //--列的情况 | |
| 4 | + if(column==1){ return "zs_t"+position; } | |
| 5 | + //--俩列的情况 | |
| 6 | + if(column==2){ return "zs_t"+position+"_2l"; } | |
| 7 | + //--三列的情况 | |
| 8 | + if(column==3){ return "zs_t"+position+"_3l"; } | |
| 9 | + //----列表的情况----- | |
| 10 | + if(column==4 ){ return "zs_t1_x"+position; } | |
| 11 | + | |
| 12 | +} | |
| 13 | + | |
| 14 | + | |
| 15 | +var g_filters = { | |
| 16 | + //-- 判断是不是有等级价 -- | |
| 17 | + is_has_rank:function(rank_switch,item){ | |
| 18 | + if(!rank_switch) return false; | |
| 19 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | |
| 20 | + return false; | |
| 21 | + }, | |
| 22 | + | |
| 23 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | |
| 24 | + get_card_price:function(goods,all_card,type){ | |
| 25 | + var price1=parseFloat(goods['cardprice1']); | |
| 26 | + var price2 = parseFloat(goods['cardprice2']); | |
| 27 | + var price3 = parseFloat(goods['cardprice3']); | |
| 28 | + if(!all_card){ | |
| 29 | + if(type==0) return 0; | |
| 30 | + return ""; | |
| 31 | + } | |
| 32 | + | |
| 33 | + var min_price=null; | |
| 34 | + var min_name=null; | |
| 35 | + //---设置对应的价格名字---- | |
| 36 | + for(var i=0;i<3;i++) { | |
| 37 | + var vl=all_card[i]; | |
| 38 | + if(vl['CorrPrice']=="Price1" && price1>0) | |
| 39 | + { | |
| 40 | + if(min_price==null) { | |
| 41 | + min_price=price1;min_name=vl['CardName']; | |
| 42 | + } | |
| 43 | + else if(price1<min_price) { | |
| 44 | + min_price=price1;min_name=vl['CardName']; | |
| 45 | + } | |
| 46 | + } | |
| 47 | + if(vl['CorrPrice']=="Price2" && price2>0) | |
| 48 | + { | |
| 49 | + if(min_price==null) { | |
| 50 | + min_price=price2;min_name=vl['CardName']; | |
| 51 | + } | |
| 52 | + else if(price2<min_price) { | |
| 53 | + min_price=price2;min_name=vl['CardName']; | |
| 54 | + } | |
| 55 | + } | |
| 56 | + | |
| 57 | + if(vl['CorrPrice']=="Price3" && price3>0) | |
| 58 | + { | |
| 59 | + if(min_price==null) { | |
| 60 | + min_price=price3;min_name=vl['CardName']; | |
| 61 | + } | |
| 62 | + else if(price3<min_price) { | |
| 63 | + min_price=price3;min_name=vl['CardName']; | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 67 | + } | |
| 68 | + if(min_price==null){ | |
| 69 | + if(type==0) return 0; | |
| 70 | + return ""; | |
| 71 | + } | |
| 72 | + | |
| 73 | + if(type==0) return min_price; | |
| 74 | + if(min_name.length>4 ) min_name=min_name.substring(0, 4); | |
| 75 | + return min_name; | |
| 76 | + }, | |
| 77 | +} | |
| 78 | + | |
| 79 | + | |
| 80 | +module.exports = { | |
| 81 | + get_class: get_class, | |
| 82 | + is_has_rank:g_filters.is_has_rank, | |
| 83 | + get_card_price:g_filters.get_card_price, | |
| 84 | +} | ... | ... |
components/goods_list/goods_list.js
| 1 | -var t = getApp(), a = t.request, o = t.globalData.setting, os = o, | |
| 2 | - i = require("../../utils/util.js"), ut = i, s = require("../../utils/common.js"); | |
| 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"); | |
| 3 | 8 | |
| 4 | 9 | Component({ |
| 5 | 10 | data: { |
| 6 | 11 | url: o.imghost, |
| 7 | 12 | object: null, |
| 8 | - curPage:1, | |
| 9 | - is_no_more:1,//加载完所有数据的控制器 | |
| 10 | - load_complete:0,//加载完成, | |
| 11 | - rank_switch:false, | |
| 12 | - card_field:"", | |
| 13 | - card_name:"", | |
| 14 | - max_card_field:"", | |
| 15 | - card_list:null | |
| 13 | + curPage: 1, | |
| 14 | + is_no_more: 1, //加载完所有数据的控制器 | |
| 15 | + load_complete: 0, //加载完成, | |
| 16 | + rank_switch: false, //等级卡开关 | |
| 17 | + card_field: "", //等级卡 | |
| 18 | + card_name: "", //卡的名称 | |
| 19 | + max_card_field: "", // | |
| 20 | + card_list: null | |
| 16 | 21 | }, |
| 17 | 22 | properties: { |
| 18 | 23 | // 这里定义了innerText属性,属性值可以在组件使用时指定 |
| 19 | 24 | }, |
| 20 | - ready: function () { | |
| 21 | - | |
| 25 | + ready: function() { | |
| 26 | + | |
| 22 | 27 | }, |
| 23 | 28 | |
| 24 | - methods: { | |
| 25 | - init:function(){ | |
| 26 | - var th = this; | |
| 27 | - getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | |
| 28 | - success: function (e) { | |
| 29 | - getApp().globalData.userInfo = e.data.data; | |
| 30 | - getApp().getConfig2(function (e) { | |
| 31 | - var swithc_list = e.switch_list; | |
| 32 | - var sw_arr = JSON.parse(swithc_list); | |
| 33 | - //---如果后台又开等级卡的开关--- | |
| 34 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 35 | - th.setData({ rank_switch: true }); | |
| 36 | - //---回调卡的列表--- | |
| 37 | - th.getPlusCardType(function (ob) { | |
| 38 | - th.setData({ card_list: ob.card_list }); | |
| 39 | - var ti = setInterval(function () { | |
| 40 | - var user = getApp().globalData.userInfo; | |
| 41 | - if (!user) return false; | |
| 42 | - clearInterval(ti); | |
| 43 | - | |
| 44 | - if (user.card_field) { | |
| 45 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 46 | - var end = new Date(str); | |
| 47 | - end = Date.parse(end) / 1000; | |
| 48 | - var now = ut.gettimestamp(); | |
| 49 | - | |
| 50 | - //--- 判断是等级会员,且在有效期范围内 --- | |
| 51 | - if (user.card_field && now < end) { | |
| 52 | - var card_name = ob.name_map.get(user.card_field); | |
| 53 | - if (card_name.length > 4) card_name = card_name.substring(0, 4); | |
| 54 | - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | |
| 55 | - } | |
| 56 | - } | |
| 57 | - }, 500) | |
| 58 | - }) | |
| 59 | - | |
| 60 | - } | |
| 61 | - }) | |
| 62 | - } | |
| 63 | - }) | |
| 64 | - | |
| 65 | - }, | |
| 66 | - | |
| 67 | - | |
| 68 | - get_list:function(){ | |
| 69 | - var that = this; | |
| 70 | - if (that.data.is_no_more == 0) return false; | |
| 71 | - var curPage = that.data.curPage; | |
| 72 | - getApp().request.get('/api/weshop/goods/page?page', { | |
| 73 | - data: { | |
| 74 | - is_mainshow: 1, isonsale: 1, | |
| 75 | - is_recommend: 1, is_on_sale: 1, | |
| 76 | - store_id: o.stoid, | |
| 77 | - page: curPage, | |
| 78 | - pageSize: 6, | |
| 79 | - }, | |
| 80 | - success: function (res) { | |
| 81 | - var data = res.data; | |
| 82 | - var total = data.data.total; | |
| 83 | - if (total <= curPage * 6) { | |
| 84 | - that.setData({ is_no_more: 0 }); | |
| 85 | - } else { | |
| 86 | - that.data.curPage++; | |
| 87 | - } | |
| 88 | - | |
| 89 | - //加载完成 | |
| 90 | - if (data.data.pageData) { | |
| 91 | - that.setData({ load_complete: 1 }); | |
| 92 | - } | |
| 93 | - if (that.data.recommend != null) { | |
| 94 | - var ra = that.data.recommend.concat(data.data.pageData); | |
| 95 | - that.setData({ recommend: ra }); | |
| 96 | - } else { | |
| 97 | - that.setData({ recommend: data.data.pageData }); | |
| 98 | - } | |
| 99 | - } | |
| 100 | - }) | |
| 101 | - }, | |
| 102 | - | |
| 103 | - | |
| 104 | - bind_bnerr_xc: function (e) { | |
| 105 | - var _errImg = e.target.dataset.errorimg; | |
| 106 | - var _errurl = e.target.dataset.url; | |
| 107 | - var _errObj = {}; | |
| 108 | - _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | |
| 109 | - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 29 | + methods: { | |
| 30 | + init: function() { | |
| 31 | + var th = this; | |
| 32 | + getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | |
| 33 | + success: function(e) { | |
| 34 | + getApp().globalData.userInfo = e.data.data; | |
| 35 | + getApp().getConfig2(function(e) { | |
| 36 | + var swithc_list = e.switch_list; | |
| 37 | + var sw_arr = JSON.parse(swithc_list); | |
| 38 | + //---如果后台又开等级卡的开关--- | |
| 39 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 40 | + th.setData({ | |
| 41 | + rank_switch: true | |
| 42 | + }); | |
| 43 | + //---回调卡的列表--- | |
| 44 | + th.getPlusCardType(function(ob) { | |
| 45 | + th.setData({ | |
| 46 | + card_list: ob.card_list | |
| 47 | + }); | |
| 48 | + var ti = setInterval(function() { | |
| 49 | + var user = getApp().globalData.userInfo; | |
| 50 | + if (!user) return false; | |
| 51 | + clearInterval(ti); | |
| 52 | + | |
| 53 | + if (user.card_field) { | |
| 54 | + var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 55 | + var end = new Date(str); | |
| 56 | + end = Date.parse(end) / 1000; | |
| 57 | + var now = ut.gettimestamp(); | |
| 58 | + | |
| 59 | + //--- 判断是等级会员,且在有效期范围内 --- | |
| 60 | + if (user.card_field && now < end) { | |
| 61 | + var card_name = ob.name_map.get(user.card_field); | |
| 62 | + if (card_name.length > 4) card_name = card_name.substring(0, 4); | |
| 63 | + th.setData({ | |
| 64 | + card_field: user.card_field, | |
| 65 | + card_name: card_name, | |
| 66 | + card_list: ob.card_list | |
| 67 | + }); | |
| 68 | + } | |
| 69 | + } | |
| 70 | + }, 500) | |
| 71 | + }) | |
| 72 | + | |
| 73 | + } | |
| 74 | + }) | |
| 75 | + } | |
| 76 | + }) | |
| 77 | + | |
| 110 | 78 | }, |
| 111 | - | |
| 112 | - reset:function(){ | |
| 113 | - curPage=1; | |
| 114 | - }, | |
| 115 | - | |
| 116 | - //--- 获取卡类列表 --- | |
| 117 | - getPlusCardType: function (func) { | |
| 118 | - var storid = o.stoid; | |
| 119 | - var th = this; | |
| 120 | - getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | |
| 121 | - var plusCard = res.data.data; | |
| 122 | - var arr = [1219, 2089, 3031]; | |
| 123 | - var new_arr = new Array(); | |
| 124 | - var card_name_map=new Map(); | |
| 125 | - for (var i = 0; i < plusCard.length; i++) { | |
| 126 | - var name="card"+plusCard[i].CorrPrice.toLowerCase(); | |
| 127 | - card_name_map.set(name,plusCard[i].CardName); | |
| 128 | - } | |
| 129 | - | |
| 130 | - var ob={"card_list":plusCard,"name_map":card_name_map}; | |
| 131 | - func(ob); | |
| 132 | - }) | |
| 133 | - }, | |
| 134 | - | |
| 79 | + | |
| 80 | + | |
| 81 | + get_list: function() { | |
| 82 | + var that = this; | |
| 83 | + if (that.data.is_no_more == 0) return false; | |
| 84 | + var curPage = that.data.curPage; | |
| 85 | + getApp().request.get('/api/weshop/goods/page?page', { | |
| 86 | + data: { | |
| 87 | + is_mainshow: 1, | |
| 88 | + isonsale: 1, | |
| 89 | + is_recommend: 1, | |
| 90 | + is_on_sale: 1, | |
| 91 | + store_id: o.stoid, | |
| 92 | + page: curPage, | |
| 93 | + pageSize: 6, | |
| 94 | + }, | |
| 95 | + success: function(res) { | |
| 96 | + var data = res.data; | |
| 97 | + var total = data.data.total; | |
| 98 | + if (total <= curPage * 6) { | |
| 99 | + that.setData({ | |
| 100 | + is_no_more: 0 | |
| 101 | + }); | |
| 102 | + } else { | |
| 103 | + that.data.curPage++; | |
| 104 | + } | |
| 105 | + | |
| 106 | + //加载完成 | |
| 107 | + if (data.data.pageData) { | |
| 108 | + that.setData({ | |
| 109 | + load_complete: 1 | |
| 110 | + }); | |
| 111 | + } | |
| 112 | + if (that.data.recommend != null) { | |
| 113 | + var ra = that.data.recommend.concat(data.data.pageData); | |
| 114 | + that.setData({ | |
| 115 | + recommend: ra | |
| 116 | + }); | |
| 117 | + } else { | |
| 118 | + that.setData({ | |
| 119 | + recommend: data.data.pageData | |
| 120 | + }); | |
| 121 | + } | |
| 122 | + } | |
| 123 | + }) | |
| 124 | + }, | |
| 125 | + | |
| 126 | + | |
| 127 | + bind_bnerr_xc: function(e) { | |
| 128 | + var _errImg = e.target.dataset.errorimg; | |
| 129 | + var _errurl = e.target.dataset.url; | |
| 130 | + var _errObj = {}; | |
| 131 | + _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | |
| 132 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 135 | 133 | }, |
| 136 | - | |
| 137 | - | |
| 138 | - | |
| 134 | + | |
| 135 | + reset: function() { | |
| 136 | + curPage = 1; | |
| 137 | + }, | |
| 138 | + | |
| 139 | + //--- 获取卡类列表 --- | |
| 140 | + getPlusCardType: function(func) { | |
| 141 | + var storid = o.stoid; | |
| 142 | + var th = this; | |
| 143 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | |
| 144 | + var plusCard = res.data.data; | |
| 145 | + var arr = [1219, 2089, 3031]; | |
| 146 | + var new_arr = new Array(); | |
| 147 | + var card_name_map = new Map(); | |
| 148 | + for (var i = 0; i < plusCard.length; i++) { | |
| 149 | + var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | |
| 150 | + card_name_map.set(name, plusCard[i].CardName); | |
| 151 | + } | |
| 152 | + | |
| 153 | + var ob = { | |
| 154 | + "card_list": plusCard, | |
| 155 | + "name_map": card_name_map | |
| 156 | + }; | |
| 157 | + func(ob); | |
| 158 | + }) | |
| 159 | + }, | |
| 160 | + | |
| 161 | + }, | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 139 | 165 | }) |
| 140 | 166 | \ No newline at end of file | ... | ... |
components/goods_list/goods_list.wxml
| 1 | - <!-- 商品列表 --> | |
| 2 | - <wxs module="filter" src="../../utils/filter.wxs"></wxs> | |
| 3 | - <wxs module="g_filter" src="g_filter.wxs"></wxs> | |
| 4 | - <view class="collects"> | |
| 5 | - <view class="hang "> | |
| 6 | - <!-- 商品详情 --> | |
| 7 | - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
| 8 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
| 9 | - <!-- 商品图片 --> | |
| 10 | - <image class="sp" src="{{url+item.original_img}}" mode="scaleToFill" binderror="bind_bnerr_xc" data-url="{{item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> | |
| 11 | - <view class="bottom"> | |
| 12 | - <!-- 商品名称 --> | |
| 13 | - <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view> | |
| 14 | - | |
| 15 | - <!-- 商品价格,先判断下是后又等级价--> | |
| 16 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | |
| 17 | - <!-- 当会员是等级卡的时候 --> | |
| 18 | - <block wx:if="{{card_field}}"> | |
| 19 | - <!-- 等级价>0 --> | |
| 20 | - <block wx:if="{{item[card_field]>0}}"> | |
| 21 | - <view class="money flex" > | |
| 22 | - <!-- 办卡价 --> | |
| 23 | - <view class="flex xc-wc"> | |
| 24 | - <view class="fs24">¥</view> | |
| 25 | - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 26 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image><view class="card_name">{{card_name}}</view></view> | |
| 27 | - </view> | |
| 28 | - </view> | |
| 29 | - <view class="flex" style="line-height: 28rpx;" > | |
| 30 | - <!-- 原价 --> | |
| 31 | - <view class="price flex xc-ash line_th"> | |
| 32 | - <view class="fs22">¥</view> | |
| 33 | - <view class="fs22">{{item.market_price}}</view> | |
| 34 | - </view> | |
| 35 | - </view> | |
| 36 | - </block> | |
| 37 | - <blocK wx:else> | |
| 38 | - <view class="money flex" > | |
| 39 | - <!-- 办卡价 --> | |
| 40 | - <view class="flex xc-wc"> | |
| 41 | - <view class="fs24">¥</view> | |
| 42 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 43 | - </view> | |
| 44 | - </view> | |
| 45 | - <view class="flex" style="line-height: 28rpx;" > | |
| 46 | - <!-- 原价 --> | |
| 47 | - <view class="price flex xc-ash line_th"> | |
| 48 | - <view class="fs22">¥</view> | |
| 49 | - <view class="fs22">{{item.market_price}}</view> | |
| 50 | - </view> | |
| 51 | - </view> | |
| 52 | - </blocK> | |
| 53 | - </block> | |
| 54 | - <block wx:else> | |
| 55 | - <!-- 如果商品有设置等级价大于0的 --> | |
| 56 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 57 | - <view class="money flex" > | |
| 58 | - <!-- 办卡价 --> | |
| 59 | - <view class="flex xc-wc"> | |
| 60 | - <view class="fs24">¥</view> | |
| 61 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 62 | - </view> | |
| 63 | - <!-- 原价 --> | |
| 64 | - <view class="price flex xc-ash line_th"> | |
| 65 | - <view class="fs22">¥</view> | |
| 66 | - <view class="fs22">{{item.market_price}}</view> | |
| 67 | - </view> | |
| 68 | - | |
| 69 | - </view> | |
| 70 | - <view class="flex" style="line-height: 28rpx;" > | |
| 71 | - <!-- 等级价 --> | |
| 72 | - <view class="price flex"> | |
| 73 | - <view class="fs22">¥</view> | |
| 74 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 75 | - <view class="card_bg"> <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view> | |
| 76 | - </view> | |
| 77 | - </view> | |
| 78 | - </block> | |
| 79 | - <block wx:else> | |
| 80 | - <view class="money flex" > | |
| 81 | - <!-- 办卡价 --> | |
| 82 | - <view class="flex xc-wc"> | |
| 83 | - <view class="fs24">¥</view> | |
| 84 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 85 | - </view> | |
| 86 | - </view> | |
| 87 | - <view class="flex" style="line-height: 28rpx;" > | |
| 88 | - <!-- 原价 --> | |
| 89 | - <view class="price flex xc-ash line_th"> | |
| 90 | - <view class="fs22">¥</view> | |
| 91 | - <view class="fs22">{{item.market_price}}</view> | |
| 92 | - </view> | |
| 93 | - </view> | |
| 94 | - </block> | |
| 95 | - </block> | |
| 96 | - </block> | |
| 97 | - | |
| 98 | - <!-- 商品压根就没有等级价 --> | |
| 99 | - <block wx:else> | |
| 100 | - <view class="money flex" > | |
| 101 | - <!-- 办卡价 --> | |
| 102 | - <view class="flex xc-wc"> | |
| 103 | - <view class="fs24">¥</view> | |
| 104 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 105 | - </view> | |
| 106 | - </view> | |
| 107 | - <view class="flex" style="line-height: 28rpx;" > | |
| 108 | - <!-- 原价 --> | |
| 109 | - <view class="price flex xc-ash line_th"> | |
| 110 | - <view class="fs22">¥</view> | |
| 111 | - <view class="fs22">{{item.market_price}}</view> | |
| 112 | - </view> | |
| 113 | - </view> | |
| 114 | - </block> | |
| 115 | - | |
| 116 | - </view> | |
| 117 | - </navigator> | |
| 1 | +<!-- 商品列表 --> | |
| 2 | +<wxs module="filter" src="../../utils/filter.wxs"></wxs> | |
| 3 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | |
| 4 | +<view class="collects"> | |
| 5 | + <view class="hang "> | |
| 6 | + <!-- 商品详情 --> | |
| 7 | + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
| 8 | + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
| 9 | + <!-- 商品图片 --> | |
| 10 | + <image class="sp" src="{{url+item.original_img}}" mode="scaleToFill" binderror="bind_bnerr_xc" data-url="{{item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> | |
| 11 | + <view class="bottom"> | |
| 12 | + <!-- 商品名称 --> | |
| 13 | + <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view> | |
| 14 | + <block wx:if="{{item.prom_price}}"> | |
| 15 | + <view class="money flex"> | |
| 16 | + <!-- 活动价 --> | |
| 17 | + <view class="flex xc-wc"> | |
| 18 | + <view class="fs24">¥</view> | |
| 19 | + <view class="fs35">{{filter.toFix(item.prom_price,2)}}</view> | |
| 20 | + </view> | |
| 21 | + </view> | |
| 22 | + <view class="flex" style="line-height: 28rpx;"> | |
| 23 | + <!-- 原价 --> | |
| 24 | + <view class="price flex xc-ash line_th"> | |
| 25 | + <view class="fs22">¥</view> | |
| 26 | + <view class="fs22">{{item.market_price}}</view> | |
| 27 | + </view> | |
| 28 | + </view> | |
| 29 | + </block> | |
| 30 | + <block wx:else> | |
| 31 | + <!-- 商品价格,先判断下是后又等级价--> | |
| 32 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | |
| 33 | + <!-- 当会员是等级卡的时候 --> | |
| 34 | + <block wx:if="{{card_field}}"> | |
| 35 | + <!-- 等级价>0 --> | |
| 36 | + <block wx:if="{{item[card_field]>0}}"> | |
| 37 | + <view class="money flex"> | |
| 38 | + <!-- 办卡价 --> | |
| 39 | + <view class="flex xc-wc"> | |
| 40 | + <view class="fs24">¥</view> | |
| 41 | + <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 42 | + <view class="card_bg"> | |
| 43 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 44 | + <view class="card_name">{{card_name}}</view> | |
| 45 | + </view> | |
| 46 | + </view> | |
| 47 | + </view> | |
| 48 | + <view class="flex" style="line-height: 28rpx;"> | |
| 49 | + <!-- 原价 --> | |
| 50 | + <view class="price flex xc-ash line_th"> | |
| 51 | + <view class="fs22">¥</view> | |
| 52 | + <view class="fs22">{{item.market_price}}</view> | |
| 53 | + </view> | |
| 54 | + </view> | |
| 55 | + </block> | |
| 56 | + <blocK wx:else> | |
| 57 | + <view class="money flex"> | |
| 58 | + <!-- 办卡价 --> | |
| 59 | + <view class="flex xc-wc"> | |
| 60 | + <view class="fs24">¥</view> | |
| 61 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 62 | + </view> | |
| 63 | + </view> | |
| 64 | + <view class="flex" style="line-height: 28rpx;"> | |
| 65 | + <!-- 原价 --> | |
| 66 | + <view class="price flex xc-ash line_th"> | |
| 67 | + <view class="fs22">¥</view> | |
| 68 | + <view class="fs22">{{item.market_price}}</view> | |
| 69 | + </view> | |
| 70 | + </view> | |
| 71 | + </blocK> | |
| 72 | + </block> | |
| 73 | + <block wx:else> | |
| 74 | + <!-- 如果商品有设置等级价大于0的 --> | |
| 75 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 76 | + <view class="money flex"> | |
| 77 | + <!-- 办卡价 --> | |
| 78 | + <view class="flex xc-wc"> | |
| 79 | + <view class="fs24">¥</view> | |
| 80 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 81 | + </view> | |
| 82 | + <!-- 原价 --> | |
| 83 | + <view class="price flex xc-ash line_th"> | |
| 84 | + <view class="fs22">¥</view> | |
| 85 | + <view class="fs22">{{item.market_price}}</view> | |
| 86 | + </view> | |
| 87 | + | |
| 88 | + </view> | |
| 89 | + <view class="flex" style="line-height: 28rpx;"> | |
| 90 | + <!-- 等级价 --> | |
| 91 | + <view class="price flex"> | |
| 92 | + <view class="fs22">¥</view> | |
| 93 | + <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 94 | + <view class="card_bg"> | |
| 95 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{g_filter.get_card_price(item,card_list,1)}}</view> | |
| 96 | + </view> | |
| 97 | + </view> | |
| 98 | + </block> | |
| 99 | + <block wx:else> | |
| 100 | + <view class="money flex"> | |
| 101 | + <!-- 办卡价 --> | |
| 102 | + <view class="flex xc-wc"> | |
| 103 | + <view class="fs24">¥</view> | |
| 104 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 105 | + </view> | |
| 106 | + </view> | |
| 107 | + <view class="flex" style="line-height: 28rpx;"> | |
| 108 | + <!-- 原价 --> | |
| 109 | + <view class="price flex xc-ash line_th"> | |
| 110 | + <view class="fs22">¥</view> | |
| 111 | + <view class="fs22">{{item.market_price}}</view> | |
| 112 | + </view> | |
| 113 | + </view> | |
| 114 | + </block> | |
| 115 | + </block> | |
| 116 | + </block> | |
| 117 | + | |
| 118 | + <!-- 商品压根就没有等级价 --> | |
| 119 | + <block wx:else> | |
| 120 | + <view class="money flex"> | |
| 121 | + <!-- 办卡价 --> | |
| 122 | + <view class="flex xc-wc"> | |
| 123 | + <view class="fs24">¥</view> | |
| 124 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 125 | + </view> | |
| 126 | + </view> | |
| 127 | + <view class="flex" style="line-height: 28rpx;"> | |
| 128 | + <!-- 原价 --> | |
| 129 | + <view class="price flex xc-ash line_th"> | |
| 130 | + <view class="fs22">¥</view> | |
| 131 | + <view class="fs22">{{item.market_price}}</view> | |
| 132 | + </view> | |
| 133 | + </view> | |
| 134 | + </block> | |
| 135 | + </block> | |
| 118 | 136 | </view> |
| 119 | - </view> | |
| 120 | - <view class="nothing flex-center" wx:if="{{is_no_more==0}}"> | |
| 121 | - <view class="Foil"></view> | |
| 122 | - <view class="no_content fs24">没有更多内容了</view> | |
| 123 | - <view class="Foil"></view> | |
| 124 | - </view> | |
| 125 | - </view> | |
| 126 | - | |
| 127 | - | |
| 128 | - | |
| 129 | 137 | \ No newline at end of file |
| 138 | + </navigator> | |
| 139 | + </view> | |
| 140 | + </view> | |
| 141 | + <view class="nothing flex-center" wx:if="{{is_no_more==0}}"> | |
| 142 | + <view class="Foil"></view> | |
| 143 | + <view class="no_content fs24">没有更多内容了</view> | |
| 144 | + <view class="Foil"></view> | |
| 145 | + </view> | |
| 146 | +</view> | |
| 130 | 147 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -262,7 +262,7 @@ |
| 262 | 262 | |
| 263 | 263 | <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> |
| 264 | 264 | |
| 265 | - <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data)}}"> | |
| 265 | + <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data) && !prom_type}}"> | |
| 266 | 266 | |
| 267 | 267 | <view class="flex ai-center grade-card-frame card-frame" > |
| 268 | 268 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
| ... | ... | @@ -278,7 +278,7 @@ |
| 278 | 278 | |
| 279 | 279 | <block wx:if="{{g_filters.is_has_rank(rank_switch,data)}}"> |
| 280 | 280 | |
| 281 | - <view wx:if="{{!card_field }}"> | |
| 281 | + <view wx:if="{{!card_field && !prom_type }}"> | |
| 282 | 282 | <view class="beauty-makeup-frame flex ai-center"> |
| 283 | 283 | <view class="left flex ai-center"> |
| 284 | 284 | <view class="flex ai-center grade-card-frame card-frame advert-card"style="max-width:32%;width:auto" > | ... | ... |
pages/goods/goodsList/goodsList.wxml
| 1 | 1 | <wxs module="g_filter" src="g_filter.wxs"></wxs> |
| 2 | 2 | <view class="container"> |
| 3 | - <view class="nav"> | |
| 4 | - <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 | |
| 5 | - <view class="ico-dg" wx:if="{{tabname=='goods_id'}}"> | |
| 6 | - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 7 | - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 8 | - </view> | |
| 9 | - </navigator> | |
| 10 | - <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量 | |
| 11 | - <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}"> | |
| 12 | - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 13 | - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 14 | - </view> | |
| 15 | - | |
| 16 | - </navigator> | |
| 17 | - <navigator bindtap="changeTab" class="nav-item" data-href="shop_price" data-ad="{{adname}}"> | |
| 18 | - 价格 | |
| 19 | - <view class="ico-dg" wx:if="{{tabname=='shop_price'}}"> | |
| 20 | - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 21 | - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 22 | - </view> | |
| 23 | - </navigator> | |
| 24 | - <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter"> | |
| 3 | + <view class="nav"> | |
| 4 | + <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 | |
| 5 | + <view class="ico-dg" wx:if="{{tabname=='goods_id'}}"> | |
| 6 | + <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 7 | + <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 8 | + </view> | |
| 9 | + </navigator> | |
| 10 | + <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量 | |
| 11 | + <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}"> | |
| 12 | + <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 13 | + <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 14 | + </view> | |
| 15 | + | |
| 16 | + </navigator> | |
| 17 | + <navigator bindtap="changeTab" class="nav-item" data-href="shop_price" data-ad="{{adname}}"> | |
| 18 | + 价格 | |
| 19 | + <view class="ico-dg" wx:if="{{tabname=='shop_price'}}"> | |
| 20 | + <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 21 | + <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 22 | + </view> | |
| 23 | + </navigator> | |
| 24 | + <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter"> | |
| 25 | 25 | <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image> |
| 26 | 26 | </view> |
| 27 | 27 | </navigator> --> |
| 28 | 28 | |
| 29 | - <navigator class="nav-item search" url="/pages/goods/search/search"> | |
| 30 | - <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> | |
| 31 | - </navigator> | |
| 32 | - </view> | |
| 33 | - <view class="choice_list"> | |
| 34 | - <navigator class="choice_item" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}"> | |
| 35 | - <view class="img-wrap"> | |
| 36 | - <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{item.original_img}}" lazy-load="true" | |
| 37 | - data-errorimg="requestData[{{index}}].original_img"></image> | |
| 29 | + <navigator class="nav-item search" url="/pages/goods/search/search"> | |
| 30 | + <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> | |
| 31 | + </navigator> | |
| 32 | + </view> | |
| 33 | + <view class="choice_list"> | |
| 34 | + <navigator class="choice_item" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}"> | |
| 35 | + <view class="img-wrap"> | |
| 36 | + <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image> | |
| 37 | + </view> | |
| 38 | + <view class="item-cont"> | |
| 39 | + <view class="title">{{item.goods_name}}</view> | |
| 40 | + <!-- 判断是否有活动价 --> | |
| 41 | + <block wx:if="{{item.prom_price>0}}"> | |
| 42 | + <!-- 活动价 --> | |
| 43 | + <view class="price">¥{{item.prom_price}}</view> | |
| 44 | + <view class="comment flex jc_sb"> | |
| 45 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 46 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 38 | 47 | </view> |
| 39 | - <view class="item-cont"> | |
| 40 | - <view class="title">{{item.goods_name}}</view> | |
| 41 | - | |
| 42 | - <!-- 商品价格,先判断下是后又等级价--> | |
| 43 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | |
| 44 | - <!-- 当会员是等级卡的时候 --> | |
| 45 | - <block wx:if="{{card_field}}"> | |
| 46 | - <!-- 等级价>0 --> | |
| 47 | - <block wx:if="{{item[card_field]>0}}"> | |
| 48 | - <view class="flex ai-center"> | |
| 49 | - <view class="price">¥{{item[card_field]}}</view> | |
| 50 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 51 | - <view class="card_name">{{card_name}}</view></view> | |
| 52 | - </view> | |
| 53 | - <view class="comment flex jc_sb"> | |
| 54 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 55 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 56 | - </view> | |
| 57 | - </block> | |
| 58 | - <block wx:else> | |
| 59 | - <view class="price">¥{{item.shop_price}}</view> | |
| 60 | - <view class="comment flex jc_sb"> | |
| 61 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 62 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 63 | - </view> | |
| 64 | - </block> | |
| 65 | - </block> | |
| 66 | - <block wx:else> | |
| 67 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 68 | - <view class="flex ai-center"> | |
| 69 | - <view class="price">¥{{item.shop_price}}</view> | |
| 70 | - <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
| 71 | - </view> | |
| 72 | - <view class="comment flex jc_sb"> | |
| 73 | - <view class="flex"> | |
| 74 | - <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
| 75 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 76 | - {{g_filter.get_card_price(item,card_list,1)}} | |
| 77 | - </view> | |
| 78 | - </view> | |
| 79 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 80 | - </view> | |
| 81 | - </block> | |
| 82 | - <block wx:else> | |
| 83 | - <view class="price">¥{{item.shop_price}}</view> | |
| 84 | - <view class="comment flex jc_sb"> | |
| 85 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 86 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 87 | - </view> | |
| 88 | - </block> | |
| 89 | - </block> | |
| 90 | - </block> | |
| 91 | - <block wx:else> | |
| 92 | - <view class="price">¥{{item.shop_price}}</view> | |
| 93 | - <view class="comment flex jc_sb"> | |
| 94 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 95 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 96 | - </view> | |
| 97 | - </block> | |
| 48 | + </block> | |
| 49 | + | |
| 50 | + <block wx:else> | |
| 51 | + <!-- 商品价格,先判断下是后又等级价--> | |
| 52 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | |
| 53 | + <!-- 当会员是等级卡的时候 --> | |
| 54 | + <block wx:if="{{card_field}}"> | |
| 55 | + <!-- 等级价>0 --> | |
| 56 | + <block wx:if="{{item[card_field]>0}}"> | |
| 57 | + <view class="flex ai-center"> | |
| 58 | + <view class="price">¥{{item[card_field]}}</view> | |
| 59 | + <view class="card_bg"> | |
| 60 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 61 | + <view class="card_name">{{card_name}}</view> | |
| 62 | + </view> | |
| 63 | + </view> | |
| 64 | + <view class="comment flex jc_sb"> | |
| 65 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 66 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 67 | + </view> | |
| 68 | + </block> | |
| 69 | + <block wx:else> | |
| 70 | + <view class="price">¥{{item.shop_price}}</view> | |
| 71 | + <view class="comment flex jc_sb"> | |
| 72 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 73 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 74 | + </view> | |
| 75 | + </block> | |
| 76 | + </block> | |
| 77 | + <block wx:else> | |
| 78 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 79 | + <view class="flex ai-center"> | |
| 80 | + <view class="price">¥{{item.shop_price}}</view> | |
| 81 | + <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
| 82 | + </view> | |
| 83 | + <view class="comment flex jc_sb"> | |
| 84 | + <view class="flex"> | |
| 85 | + <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
| 86 | + <view class="card_bg"> | |
| 87 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 88 | + {{g_filter.get_card_price(item,card_list,1)}} | |
| 89 | + </view> | |
| 90 | + </view> | |
| 91 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 92 | + </view> | |
| 93 | + </block> | |
| 94 | + <block wx:else> | |
| 95 | + <view class="price">¥{{item.shop_price}}</view> | |
| 96 | + <view class="comment flex jc_sb"> | |
| 97 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 98 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 99 | + </view> | |
| 100 | + </block> | |
| 101 | + </block> | |
| 102 | + </block> | |
| 103 | + <block wx:else> | |
| 104 | + <view class="price">¥{{item.shop_price}}</view> | |
| 105 | + <view class="comment flex jc_sb"> | |
| 106 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 107 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 98 | 108 | </view> |
| 99 | - </navigator> | |
| 100 | - </view> | |
| 101 | - <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}"> | |
| 102 | - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | |
| 103 | - <view class="no-data-title">没有相关的数据</view> | |
| 104 | - <navigator class="lookat" openType="switchTab" url="/pages/index/index/index"> 去逛逛 </navigator> | |
| 105 | - </view> | |
| 109 | + </block> | |
| 110 | + </block> | |
| 111 | + </view> | |
| 112 | + </navigator> | |
| 113 | + </view> | |
| 114 | + <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}"> | |
| 115 | + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | |
| 116 | + <view class="no-data-title">没有相关的数据</view> | |
| 117 | + <navigator class="lookat" openType="switchTab" url="/pages/index/index/index"> 去逛逛 </navigator> | |
| 118 | + </view> | |
| 106 | 119 | </view> |
| 107 | 120 | <view hidden="{{!openFilterModal}}"> |
| 108 | - <view bindtap="closeFilterModal" class="cover-layer"></view> | |
| 109 | - <view class="filter-modal"> | |
| 110 | - <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 111 | - <button bindtap="restoreData" class="viewall-btn">显示全部分类</button> | |
| 112 | - <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}"> | |
| 113 | - <view class="filter-name">{{item.name}}</view> | |
| 114 | - <view class="filter-items"> | |
| 115 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 116 | - {{item.name}}</view> | |
| 117 | - </view> | |
| 118 | - </view> | |
| 119 | - <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}"> | |
| 120 | - <view class="filter-name">{{item.name}}</view> | |
| 121 | - <view class="filter-items"> | |
| 122 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 123 | - {{item.name}}</view> | |
| 124 | - </view> | |
| 125 | - </view> | |
| 126 | - <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}"> | |
| 127 | - <view class="filter-name">相关品牌</view> | |
| 128 | - <view class="filter-items"> | |
| 129 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}"> | |
| 130 | - {{item.name}}</view> | |
| 131 | - </view> | |
| 132 | - </view> | |
| 133 | - <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}"> | |
| 134 | - <view class="filter-name">价格区间</view> | |
| 135 | - <view class="filter-items"> | |
| 136 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}"> | |
| 137 | - {{item.name}}</view> | |
| 138 | - </view> | |
| 139 | - </view> | |
| 121 | + <view bindtap="closeFilterModal" class="cover-layer"></view> | |
| 122 | + <view class="filter-modal"> | |
| 123 | + <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 124 | + <button bindtap="restoreData" class="viewall-btn">显示全部分类</button> | |
| 125 | + <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}"> | |
| 126 | + <view class="filter-name">{{item.name}}</view> | |
| 127 | + <view class="filter-items"> | |
| 128 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 129 | + {{item.name}}</view> | |
| 130 | + </view> | |
| 140 | 131 | </view> |
| 141 | -</view> | |
| 132 | + <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}"> | |
| 133 | + <view class="filter-name">{{item.name}}</view> | |
| 134 | + <view class="filter-items"> | |
| 135 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 136 | + {{item.name}}</view> | |
| 137 | + </view> | |
| 138 | + </view> | |
| 139 | + <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}"> | |
| 140 | + <view class="filter-name">相关品牌</view> | |
| 141 | + <view class="filter-items"> | |
| 142 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}"> | |
| 143 | + {{item.name}}</view> | |
| 144 | + </view> | |
| 145 | + </view> | |
| 146 | + <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}"> | |
| 147 | + <view class="filter-name">价格区间</view> | |
| 148 | + <view class="filter-items"> | |
| 149 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}"> | |
| 150 | + {{item.name}}</view> | |
| 151 | + </view> | |
| 152 | + </view> | |
| 153 | + </view> | |
| 154 | +</view> | |
| 142 | 155 | \ No newline at end of file | ... | ... |
pages/goods/search/search.wxml
| 1 | 1 | <wxs module="g_filter" src="g_filter.wxs"></wxs> |
| 2 | 2 | <view class="container"> |
| 3 | - <view class="nav"> | |
| 4 | - <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 | |
| 5 | - <view class="ico-dg" wx:if="{{tabname=='goods_id'}}"> | |
| 6 | - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 7 | - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 8 | - </view> | |
| 9 | - </navigator> | |
| 10 | - <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}" >销量 | |
| 11 | - <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}"> | |
| 12 | - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 13 | - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 14 | - </view> | |
| 15 | - </navigator> | |
| 16 | - <navigator bindtap="changeTab" class="nav-item" data-href="shop_price" data-ad="{{adname}}" >价格 | |
| 17 | - <view class="ico-dg" wx:if="{{tabname=='shop_price'}}"> | |
| 18 | - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 19 | - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 20 | - </view> | |
| 21 | - </navigator> | |
| 22 | - <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter"> | |
| 3 | + <view class="nav"> | |
| 4 | + <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 | |
| 5 | + <view class="ico-dg" wx:if="{{tabname=='goods_id'}}"> | |
| 6 | + <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 7 | + <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 8 | + </view> | |
| 9 | + </navigator> | |
| 10 | + <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量 | |
| 11 | + <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}"> | |
| 12 | + <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 13 | + <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 14 | + </view> | |
| 15 | + </navigator> | |
| 16 | + <navigator bindtap="changeTab" class="nav-item" data-href="shop_price" data-ad="{{adname}}">价格 | |
| 17 | + <view class="ico-dg" wx:if="{{tabname=='shop_price'}}"> | |
| 18 | + <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 19 | + <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 20 | + </view> | |
| 21 | + </navigator> | |
| 22 | + <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter"> | |
| 23 | 23 | <image class="wh100" src="{{url}}/miniapp/images/xx.png"></image> |
| 24 | 24 | </view> |
| 25 | 25 | </navigator> --> |
| 26 | - <navigator bindtap="openSearchModal" class="nav-item nav-search"> | |
| 27 | - <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image> | |
| 28 | - </navigator> | |
| 29 | - </view> | |
| 30 | - <view class="choice_list"> | |
| 31 | - <navigator class="choice_item" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}"> | |
| 32 | - <view class="img-wrap"> | |
| 33 | - <image src="{{item.original_img}}" lazy-load="true" | |
| 34 | - binderror="bind_bnerr" data-errorimg="requestData[{{index}}].original_img"></image> | |
| 26 | + <navigator bindtap="openSearchModal" class="nav-item nav-search"> | |
| 27 | + <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image> | |
| 28 | + </navigator> | |
| 29 | + </view> | |
| 30 | + <view class="choice_list"> | |
| 31 | + <navigator class="choice_item" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}"> | |
| 32 | + <view class="img-wrap"> | |
| 33 | + <image src="{{item.original_img}}" lazy-load="true" binderror="bind_bnerr" data-errorimg="requestData[{{index}}].original_img"></image> | |
| 34 | + </view> | |
| 35 | + <view class="item-cont"> | |
| 36 | + <view class="title">{{item.goods_name}}</view> | |
| 37 | + <!-- 判断是否有活动价 --> | |
| 38 | + <block wx:if="{{item.prom_price>0}}"> | |
| 39 | + <!-- 活动价 --> | |
| 40 | + <view class="price">¥{{item.prom_price}}</view> | |
| 41 | + <view class="comment flex jc_sb"> | |
| 42 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 43 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 35 | 44 | </view> |
| 36 | - <view class="item-cont"> | |
| 37 | - <view class="title">{{item.goods_name}}</view> | |
| 38 | - <!-- 商品价格,先判断下是后又等级价--> | |
| 39 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}" > | |
| 40 | - <!-- 当会员是等级卡的时候 --> | |
| 41 | - <block wx:if="{{card_field}}"> | |
| 42 | - <!-- 等级价>0 --> | |
| 43 | - <block wx:if="{{item[card_field]>0}}"> | |
| 44 | - <view class="flex ai-center"> | |
| 45 | - <view class="price">¥{{item[card_field]}}</view> | |
| 46 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 47 | - <view class="card_name">{{card_name}}</view> | |
| 48 | - </view> | |
| 49 | - </view> | |
| 50 | - <view class="comment flex jc_sb"> | |
| 51 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 52 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 53 | - </view> | |
| 54 | - </block> | |
| 55 | - <block wx:else> | |
| 56 | - <view class="price">¥{{item.shop_price}}</view> | |
| 57 | - <view class="comment flex jc_sb"> | |
| 58 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 59 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 60 | - </view> | |
| 61 | - </block> | |
| 62 | - </block> | |
| 63 | - <block wx:else> | |
| 64 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 65 | - <view class="flex ai-center"> | |
| 66 | - <view class="price">¥{{item.shop_price}}</view> | |
| 67 | - <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
| 68 | - </view> | |
| 69 | - <view class="comment flex jc_sb"> | |
| 70 | - <view class="flex"> | |
| 71 | - <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
| 72 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 73 | - {{g_filter.get_card_price(item,card_list,1)}} | |
| 74 | - </view> | |
| 75 | - </view> | |
| 76 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 77 | - </view> | |
| 78 | - </block> | |
| 79 | - <block wx:else> | |
| 80 | - <view class="price">¥{{item.shop_price}}</view> | |
| 81 | - <view class="comment flex jc_sb"> | |
| 82 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 83 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 84 | - </view> | |
| 85 | - </block> | |
| 86 | - </block> | |
| 87 | - </block> | |
| 88 | - <block wx:else> | |
| 89 | - <view class="price">¥{{item.shop_price}}</view> | |
| 90 | - <view class="comment flex jc_sb"> | |
| 91 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 92 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 93 | - </view> | |
| 94 | - </block> | |
| 45 | + </block> | |
| 46 | + <block wx:else> | |
| 47 | + <!-- 商品价格,先判断下是后又等级价--> | |
| 48 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | |
| 49 | + <!-- 当会员是等级卡的时候 --> | |
| 50 | + <block wx:if="{{card_field}}"> | |
| 51 | + <!-- 等级价>0 --> | |
| 52 | + <block wx:if="{{item[card_field]>0}}"> | |
| 53 | + <view class="flex ai-center"> | |
| 54 | + <view class="price">¥{{item[card_field]}}</view> | |
| 55 | + <view class="card_bg"> | |
| 56 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 57 | + <view class="card_name">{{card_name}}</view> | |
| 58 | + </view> | |
| 59 | + </view> | |
| 60 | + <view class="comment flex jc_sb"> | |
| 61 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 62 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 63 | + </view> | |
| 64 | + </block> | |
| 65 | + <block wx:else> | |
| 66 | + <view class="price">¥{{item.shop_price}}</view> | |
| 67 | + <view class="comment flex jc_sb"> | |
| 68 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 69 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 70 | + </view> | |
| 71 | + </block> | |
| 72 | + </block> | |
| 73 | + <block wx:else> | |
| 74 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 75 | + <view class="flex ai-center"> | |
| 76 | + <view class="price">¥{{item.shop_price}}</view> | |
| 77 | + <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
| 78 | + </view> | |
| 79 | + <view class="comment flex jc_sb"> | |
| 80 | + <view class="flex"> | |
| 81 | + <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
| 82 | + <view class="card_bg"> | |
| 83 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 84 | + {{g_filter.get_card_price(item,card_list,1)}} | |
| 85 | + </view> | |
| 86 | + </view> | |
| 87 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 88 | + </view> | |
| 89 | + </block> | |
| 90 | + <block wx:else> | |
| 91 | + <view class="price">¥{{item.shop_price}}</view> | |
| 92 | + <view class="comment flex jc_sb"> | |
| 93 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 94 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 95 | + </view> | |
| 96 | + </block> | |
| 97 | + </block> | |
| 98 | + </block> | |
| 99 | + <block wx:else> | |
| 100 | + <view class="price">¥{{item.shop_price}}</view> | |
| 101 | + <view class="comment flex jc_sb"> | |
| 102 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 103 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 95 | 104 | </view> |
| 96 | - </navigator> | |
| 97 | - </view> | |
| 98 | - <view class="no-data" wx:if="{{!requestData||requestData.length==0}}"> | |
| 99 | - <image class="cart-image" src="{{url}}/miniapp/images/cart-null.png"></image> | |
| 100 | - <view class="no-data-title">没有相关的数据</view> | |
| 101 | - <navigator class="lookat" openType="switchTab" url="/pages/index/index/index"> 去逛逛 </navigator> | |
| 102 | - </view> | |
| 105 | + </block> | |
| 106 | + </block> | |
| 107 | + </view> | |
| 108 | + </navigator> | |
| 109 | + </view> | |
| 110 | + <view class="no-data" wx:if="{{!requestData||requestData.length==0}}"> | |
| 111 | + <image class="cart-image" src="{{url}}/miniapp/images/cart-null.png"></image> | |
| 112 | + <view class="no-data-title">没有相关的数据</view> | |
| 113 | + <navigator class="lookat" openType="switchTab" url="/pages/index/index/index"> 去逛逛 </navigator> | |
| 114 | + </view> | |
| 103 | 115 | </view> |
| 104 | 116 | <view hidden="{{!openFilterModal}}"> |
| 105 | - <view bindtap="closeFilterModal" class="cover-layer"></view> | |
| 106 | - <view class="filter-modal"> | |
| 107 | - <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 108 | - <button bindtap="restoreData" class="viewall-btn">显示全部分类</button> | |
| 109 | - <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}"> | |
| 110 | - <view class="filter-name">{{item.name}}</view> | |
| 111 | - <view class="filter-items"> | |
| 112 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 113 | - {{item.name}}</view> | |
| 114 | - </view> | |
| 115 | - </view> | |
| 116 | - <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}"> | |
| 117 | - <view class="filter-name">{{item.name}}</view> | |
| 118 | - <view class="filter-items"> | |
| 119 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 120 | - {{item.name}}</view> | |
| 121 | - </view> | |
| 122 | - </view> | |
| 123 | - <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}"> | |
| 124 | - <view class="filter-name">相关品牌</view> | |
| 125 | - <view class="filter-items"> | |
| 126 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}"> | |
| 127 | - {{item.name}}</view> | |
| 128 | - </view> | |
| 129 | - </view> | |
| 130 | - <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}"> | |
| 131 | - <view class="filter-name">价格区间</view> | |
| 132 | - <view class="filter-items"> | |
| 133 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}"> | |
| 134 | - {{item.name}}</view> | |
| 135 | - </view> | |
| 136 | - </view> | |
| 117 | + <view bindtap="closeFilterModal" class="cover-layer"></view> | |
| 118 | + <view class="filter-modal"> | |
| 119 | + <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 120 | + <button bindtap="restoreData" class="viewall-btn">显示全部分类</button> | |
| 121 | + <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}"> | |
| 122 | + <view class="filter-name">{{item.name}}</view> | |
| 123 | + <view class="filter-items"> | |
| 124 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 125 | + {{item.name}}</view> | |
| 126 | + </view> | |
| 127 | + </view> | |
| 128 | + <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}"> | |
| 129 | + <view class="filter-name">{{item.name}}</view> | |
| 130 | + <view class="filter-items"> | |
| 131 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 132 | + {{item.name}}</view> | |
| 133 | + </view> | |
| 134 | + </view> | |
| 135 | + <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}"> | |
| 136 | + <view class="filter-name">相关品牌</view> | |
| 137 | + <view class="filter-items"> | |
| 138 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}"> | |
| 139 | + {{item.name}}</view> | |
| 140 | + </view> | |
| 141 | + </view> | |
| 142 | + <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}"> | |
| 143 | + <view class="filter-name">价格区间</view> | |
| 144 | + <view class="filter-items"> | |
| 145 | + <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}"> | |
| 146 | + {{item.name}}</view> | |
| 147 | + </view> | |
| 137 | 148 | </view> |
| 149 | + </view> | |
| 138 | 150 | </view> |
| 139 | 151 | <view wx:if="{{openSearchModal}}"> |
| 140 | - <view class="search-modal"> | |
| 141 | - <view class="search-bar"> | |
| 142 | - <form bindsubmit="submitSearch"> | |
| 143 | - <input autoFocus class="search-input" name="word" placeholder="搜索商品"></input> | |
| 144 | - <button class="search-btn" formType="submit"> | |
| 145 | - <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image> | |
| 146 | - </button> | |
| 147 | - </form> | |
| 148 | - </view> | |
| 149 | - <view class="search-hot"> | |
| 150 | - <view class="hot-title">热门搜索</view> | |
| 151 | - <block wx:if="{{hotWords.length>0}}"> | |
| 152 | - <view class="hot-row" wx:for="{{hotWords}}" wx:key="{{index}}"> | |
| 153 | - <view bindtap="searchHotWord" class="hot-item" data-word="{{item}}" wx:for="{{item}}" wx:key="{{index}}">{{item}}</view> | |
| 154 | - </view> | |
| 155 | - </block> | |
| 152 | + <view class="search-modal"> | |
| 153 | + <view class="search-bar"> | |
| 154 | + <form bindsubmit="submitSearch"> | |
| 155 | + <input autoFocus class="search-input" name="word" placeholder="搜索商品"></input> | |
| 156 | + <button class="search-btn" formType="submit"> | |
| 157 | + <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image> | |
| 158 | + </button> | |
| 159 | + </form> | |
| 160 | + </view> | |
| 161 | + <view class="search-hot"> | |
| 162 | + <view class="hot-title">热门搜索</view> | |
| 163 | + <block wx:if="{{hotWords.length>0}}"> | |
| 164 | + <view class="hot-row" wx:for="{{hotWords}}" wx:key="{{index}}"> | |
| 165 | + <view bindtap="searchHotWord" class="hot-item" data-word="{{item}}" wx:for="{{item}}" wx:key="{{index}}">{{item}}</view> | |
| 156 | 166 | </view> |
| 167 | + </block> | |
| 157 | 168 | </view> |
| 158 | -</view> | |
| 169 | + </view> | |
| 170 | +</view> | |
| 159 | 171 | \ No newline at end of file | ... | ... |