diff --git a/components/diy_advertising/diy_advertising.wxss b/components/diy_advertising/diy_advertising.wxss index f2e0625..0c964de 100644 --- a/components/diy_advertising/diy_advertising.wxss +++ b/components/diy_advertising/diy_advertising.wxss @@ -5,8 +5,6 @@ width: 100%; color: #fff; font-size: 32rpx; - min-height: 300rpx; - line-height: 300rpx; text-align: center; } diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index a4467ba..a3bb465 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -25,6 +25,7 @@ Component({ is_new: 0, baseUrl: "/api/weshop/goods/page", resourceUrl: t.globalData.setting.resourceUrl, + url: t.globalData.setting.imghost, currentPage: 1, requestData: null, requestUrl: "", @@ -43,37 +44,80 @@ Component({ }, ready: function () { - console.log("ready"); - this.data.classstyle_id = this.data.object.classstyle; - this.data.goodscount = this.data.object.goodscount; - console.log(this.data.classstyle_id); - this.data.wgroup = this.data.object.wgroup; - console.log(this.data.wgroup); - this.setData({ - classstyle_id: this.data.object.classstyle - }) - if (this.data.object.goodsclass == 1) { - this.data.is_recommend = 1 - } - if (this.data.object.goodsclass == 2) { - this.data.is_hot = 1 - } - if (this.data.object.goodsclass == 3) { - this.data.is_new = 1 - } - this.data.requestData = new Array(); - this.data.g_id = this.data.object.data; - var arr = []; - - for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { - arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); - } - this.data.firist_type_data = arr; - console.log("firist_type_data"); - console.log(this.data.firist_type_data); - this.init(this.data.classstyle_id, this.data.wgroup); }, + + + lifetimes: { + attached: function() { + // 在组件实例进入页面节点树时执行 + this.data.classstyle_id = this.data.object.classstyle; + this.data.goodscount = this.data.object.goodscount; + this.data.wgroup = this.data.object.wgroup; + + this.setData({ + classstyle_id: this.data.object.classstyle + }) + if (this.data.object.goodsclass == 1) { + this.data.is_recommend = 1 + } + if (this.data.object.goodsclass == 2) { + this.data.is_hot = 1 + } + if (this.data.object.goodsclass == 3) { + this.data.is_new = 1 + } + this.data.requestData = new Array(); + this.data.g_id = this.data.object.data; + var arr = []; + + for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { + arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); + } + this.data.firist_type_data = arr; + this.init(this.data.classstyle_id, this.data.wgroup); + }, + detached: function() { + // 在组件实例被从页面节点树移除时执行 + }, + }, + + pageLifetimes: { + show: function () { + this.data.firist_type_curr=0, + this.data.currentPage=1, + this.setData({ goods_array: null}) + + // 页面被展示 + // 在组件实例进入页面节点树时执行 + this.data.classstyle_id = this.data.object.classstyle; + this.data.goodscount = this.data.object.goodscount; + this.data.wgroup = this.data.object.wgroup; + + this.setData({ + classstyle_id: this.data.object.classstyle + }) + if (this.data.object.goodsclass == 1) { + this.data.is_recommend = 1 + } + if (this.data.object.goodsclass == 2) { + this.data.is_hot = 1 + } + if (this.data.object.goodsclass == 3) { + this.data.is_new = 1 + } + this.data.requestData = new Array(); + this.data.g_id = this.data.object.data; + var arr = []; + + for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { + arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); + } + this.data.firist_type_data = arr; + this.init(this.data.classstyle_id, this.data.wgroup); + }, + }, + methods: { // 这里是一个自定义方法 init: function (classstyle_id, wgroup) { @@ -90,6 +134,11 @@ Component({ index = 0, gdata = []; + //--初始化卡类-- + th.card_init(); + + var os=getApp().globalData.setting; + classstyle_id = classstyle_id + ""; switch (classstyle_id) { case "1": @@ -110,14 +159,18 @@ Component({ item.shop_price = goods.shop_price; item.sales_sum = goods.sales_sum; item.goods_id = goods.goods_id; + item.cardprice1 = val.cardprice1; + item.cardprice2 = val.cardprice2; + item.cardprice3 = val.cardprice3; + prom_id = res.data.data.prom_id; var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单 var url = ""; - if (prom_type == 1) { + if (prom_type == 6) { url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; - } else if (prom_type == 6) { + } else if (prom_type == 1) { url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; } if(url==""){ @@ -130,12 +183,12 @@ Component({ return app.request.promiseGet(url, {}) } - }).then(res => { index++; var prom = res.data.data; - if (prom != null) { - item.shop_price = res.data.data.price; + var now=ut.gettimestamp(); + if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time { + await app.request.promiseGet(url, {}).then(res => { var prom = res.data.data; - if (prom != null) { - item.shop_price = res.data.data.price; + if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time { //商品地址 var goods = res.data.data; - console.log("goods"); - console.log(goods); - // th.setData({ - // goods_btn: res.data.data - // }) + item.goods_name = val.goods_name; item.goods_img = th.data.imghost + val.original_img; item.market_price = val.market_price; item.shop_price = val.shop_price; item.sales_sum = val.sales_sum; item.goods_id = val.goods_id; + + item.cardprice1 = val.cardprice1; + item.cardprice2 = val.cardprice2; + item.cardprice3 = val.cardprice3; + prom_id = val.prom_id; var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单 var url = ""; - if (prom_type == 1) { + if (prom_type == 6) { url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; - } else if (prom_type == 6) { + } else if (prom_type == 1) { url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; } if(url!=null){ - app.request.promiseGet(url, {}).then(res => { + await app.request.promiseGet(url, {}).then(res => { var prom = res.data.data; - if (prom != null) { - item.shop_price = res.data.data.price; + if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time 4) card_name = card_name.substring(0, 4); + th.setData({ + card_field: user.card_field, + card_name: card_name, + card_list: ob.card_list + }); + } + + } + + }, 500) + }) + + } + }) + } + }) + + }, + + //--- 获取卡类列表 --- + getPlusCardType: function(func) { + var storid = o.stoid; + var th = this; + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { + var plusCard = res.data.data; + var arr = [1219, 2089, 3031]; + var new_arr = new Array(); + var card_name_map = new Map(); + for (var i = 0; i < plusCard.length; i++) { + var name = "card" + plusCard[i].CorrPrice.toLowerCase(); + card_name_map.set(name, plusCard[i].CardName); + } + + var ob = { + "card_list": plusCard, + "name_map": card_name_map + }; + func(ob); + }) + }, + + } }) \ No newline at end of file diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxml b/components/diy_goodsGroup/diy_goodsGroup.wxml index 1b21d89..a4bd7f7 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxml +++ b/components/diy_goodsGroup/diy_goodsGroup.wxml @@ -1,464 +1,168 @@ - - - - - - + + + + + - - + + > - - - - - - - + - + - - - - - {{item.goods_name}} + - ¥{{item.shop_price}} - ¥{{item.market_price}} + + ¥{{item.prom_price}} + ¥{{item.market_price}} + + + + + + + + + + + + + {{filter.toFix(item[card_field],2)}} + {{card_name}} + + + + + + + {{item.market_price}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + {{item.market_price}} + + + + + + + + {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}} + {{g_filter.get_card_price(item,card_list,1)}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + + + + + ¥{{item.shop_price}} + ¥{{item.market_price}} + + + + - 销量:{{item.sales_sum}}件 - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - + + - - - - - - + - - - - - - - - - - + - - - - @@ -466,187 +170,100 @@ {{item.goods_name}} - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} + + ¥{{item.prom_price}} + ¥{{item.market_price}} + + + + + + + + + + + + {{filter.toFix(item[card_field],2)}} + {{card_name}} + + + + + + + {{item.market_price}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + {{item.market_price}} + + + + + + + + {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}} + {{g_filter.get_card_price(item,card_list,1)}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + + + + ¥{{item.shop_price}} + ¥{{item.market_price}} + + 销量:{{item.sales_sum}}件 - @@ -654,46 +271,34 @@ - - + - - - - + + - - - + - - - - - + - - - - @@ -702,8 +307,97 @@ {{item.goods_name}} - ¥{{item.shop_price}} - ¥{{item.market_price}} + + ¥{{item.prom_price}} + ¥{{item.market_price}} + + + + + + + + + + + + {{filter.toFix(item[card_field],2)}} + {{card_name}} + + + + + + + {{item.market_price}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + {{item.market_price}} + + + + + + + + {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}} + {{g_filter.get_card_price(item,card_list,1)}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + + + + ¥{{item.shop_price}} + ¥{{item.market_price}} + + 销量:{{item.sales_sum}}件 @@ -713,212 +407,145 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - + + + + + + + + + + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + {{item.goods_name}} + + + + + + + + + + + {{filter.toFix(item[card_field],2)}} + {{card_name}} + + + + + + + {{item.market_price}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + {{item.market_price}} + + + + + + + + {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}} + {{g_filter.get_card_price(item,card_list,1)}} + + + + + + + + + {{filter.toFix(item.shop_price,2)}} + + + + + + + {{item.market_price}} + + + + - - - - - - - - - - - - - - - - - + + ¥{{item.shop_price}} + ¥{{item.market_price}} - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - + 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - ¥{{item.market_price}} - - 销量:{{item.sales_sum}}件 - - - - - - - - - - - - - - - - - + - - - + - - - - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxss b/components/diy_goodsGroup/diy_goodsGroup.wxss index ad4e535..971fa91 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxss +++ b/components/diy_goodsGroup/diy_goodsGroup.wxss @@ -1,42 +1,30 @@ /* pages/diy_zs/diy_zs.wxss */ - +.zwp_3{ margin-top: 10rpx} .zs_goods{ - width: 100%; - min-height: 500rpx; -border: 2rpx #ddd solid; -margin: 0 auto; -} - -.zwp_3{ - /* width: 30%; */ + width: 700rpx; + border: 1rpx #ddd solid; + margin-bottom: 10rpx; + margin: 0 auto; + } - .s1_gk_a1{ display: inline; width: auto; height: auto; } -.clear{ - clear: both; -} +.clear{ clear: both;} .zs_top{ width: 100%; min-height: 700rpx; margin: 0 auto; - padding-left:22rpx; -padding-bottom:30rpx; - -display: flex; -/* padding-left: 6rpx; */ -/* padding-right: 30rpx; */ + margin-bottom:30rpx; + display: flex; } .zs_t_img { - width: 700rpx; - height: 700rpx; - /* margin: 0 auto; */ - /* background-color: bisque; */ - + width: 698rpx; + height: 698rpx; + margin: 1rpx auto; } .zs_center{ @@ -53,8 +41,9 @@ display: flex; overflow: hidden; text-overflow: ellipsis; margin-bottom:10rpx; -font-size:28rpx; + font-size:28rpx; white-space: nowrap; + width: 640rpx } @@ -95,52 +84,44 @@ font-size:28rpx; font-size: 32rpx; } -.del{ - font-size: 24rpx; - color: #999; - text-decoration: line-through; -} + .zs_t1{ width: 56rpx; height: 56rpx; - position: relative; - right: 58rpx; - bottom: -640rpx; + position: absolute; + left: 0rpx; + top: 10rpx; } .zs_t2{ width: 56rpx; height: 56rpx; - position: relative; - right: 58rpx; - bottom: -2rpx; + position: absolute; + right: 0rpx; + top: 10rpx; } .zs_t3{ width: 56rpx; height: 56rpx; - position: relative; - right: 692rpx; - bottom: -4rpx; + position: absolute; + left: 0rpx; + bottom: 10rpx; } .zs_t4{ width: 56rpx; height: 56rpx; - position: relative; - right: 692rpx; - bottom: -642rpx; + position: absolute; + right: 20rpx; + bottom: 10rpx; } - -/* xiao */ - - .zs_goods_xiao_bottom{ width: 100%; min-height: 300rpx; @@ -165,24 +146,15 @@ font-size:28rpx; .zs_top_x{ width: 400rpx; height: 318rpx; - margin-top: 20rpx; - /* /* padding-top:30rpx; -padding-bottom:30rpx; */ - -display: flex; - + margin-top: 20rpx; + display: flex; } -/* .zs_goods_xiao{ - background-color: white; -} */ - .zs_t_img_x { width: 290rpx; height: 290rpx; margin-left: 20rpx; - /* background-color: bisque; */ - + } .zs_center_x{ @@ -243,10 +215,9 @@ font-size:28rpx; } .del{ - font-size: 24rpx; + font-size: 24rpx; color: #999; text-decoration: line-through; - margin-left: 10rpx; margin-top: 8rpx; } @@ -352,6 +323,8 @@ top: 234rpx; font-size:30rpx; white-space: nowrap; margin-top: 10rpx; + height: 80rpx; + line-height: 40rpx } .zs_wz3_2l{ @@ -381,61 +354,57 @@ top: 234rpx; } + +/*---俩列图片位置---*/ .zs_t1_2l{ width: 56rpx; height: 56rpx; - position: relative; - right: -2rpx; - top: -310rpx; + position: absolute; + left: 0rpx; + top: 10rpx; } - .zs_t2_2l{ width: 56rpx; height: 56rpx; - position: relative; - right: -294rpx; - bottom: 310rpx; + position: absolute; + right: 0rpx; + top: 10rpx; } .zs_t3_2l{ width: 56rpx; height: 56rpx; - position: relative; - right: -294rpx; - bottom: 68rpx; + position: absolute; + left: 0rpx; + bottom: 10rpx; } .zs_t4_2l{ width: 56rpx; height: 56rpx; - position: relative; - right: -2rpx; - bottom: 68rpx; + position: absolute; + right: 0rpx; + bottom: 10rpx; } + + /*一个3列*/ .zs_goods_wai_san{ - width: 240rpx; + width: 230rpx; display: flex; - margin-left: 8rpx; + margin-left: 10rpx; float: left; margin-bottom: 8rpx; - background-color:white; - + background-color:white; } .zs_goods_san{ width: 240rpx; } - - - - - - .zs_goods_3l{ width: 240rpx; min-height: 300rpx; @@ -445,22 +414,15 @@ top: 234rpx; } .zs_top_3l{ - width: 240rpx; - height: 240rpx; - - - - - - + width: 232rpx; + height: 232rpx; } .zs_t_img_3l { - width:237rpx; - height: 240rpx; + width:232rpx; + height: 232rpx; margin: 0 auto; background-color: bisque; - } .zs_center_3l{ @@ -469,27 +431,28 @@ top: 234rpx; font-size: 28rpx; color: #333; text-align: left; - padding: 0 10rpx; + padding: 0 10rpx; } .zs_wz1_3l{ - overflow: hidden; - text-overflow: ellipsis; + margin-bottom:10rpx; font-size:30rpx; height: 80rpx; - width: 227rpx; - /* white-space: nowrap; */ + width: 220rpx; + + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; } .zs_wz2_3l{ - /* overflow: hidden; - text-overflow: ellipsis; */ margin-bottom:10rpx; font-size:30rpx; - /* white-space: nowrap; */ - display: flex; + display: flex; } .zs_wz3_3l{ @@ -497,7 +460,7 @@ top: 234rpx; text-overflow: ellipsis; margin-bottom:10rpx; font-size:30rpx; - white-space: nowrap; + white-space: nowrap; } .zs_wz4_3l{ @@ -505,7 +468,7 @@ top: 234rpx; text-overflow: ellipsis; margin-bottom:10rpx; font-size:30rpx; - white-space: nowrap; + white-space: nowrap; } .zs_wz5_3l{ @@ -519,38 +482,58 @@ top: 234rpx; .zs_t1_3l{ width: 56rpx; height: 56rpx; - position: relative; - right: 0rpx; - top: -250rpx; + position: absolute; + left: 0rpx; + top: 10rpx; } .zs_t2_3l{ width: 56rpx; height: 56rpx; - position: relative; - right: -177rpx; - bottom: 250rpx; + position: absolute; + right: 0rpx; + top: 10rpx; } .zs_t3_3l{ width: 56rpx; height: 56rpx; - position: relative; - right: -177rpx; - bottom: 67rpx; + position: absolute; + left: 0rpx; + bottom: 10rpx; } .zs_t4_3l{ width: 56rpx; height: 56rpx; - position: relative; + position: absolute; right: 0rpx; - bottom: 67rpx; + bottom: 10rpx; } .zs_goods_wai{ background-color: white; margin-top: 10rpx; -} \ No newline at end of file +} + +.rel{position: relative} +.flex{display: flex} +.fs24{font-size: 24rpx} +.fs35{font-size: 35rpx} +.xc-wc{ align-items: center; margin-top: -3rpx} + +.price.xc-ash{ + font-size: 24rpx; + color: #999; + text-decoration: line-through; + margin-top: 8rpx; +} + + +.line_th{ text-decoration: line-through} +.card_bg {display: flex; padding: 2rpx 10rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx;line-height: 28rpx;max-width: 110rpx; + background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} +.card_bg .card_name{ max-width: 76rpx; width: auto;overflow: hidden; white-space:nowrap; } \ No newline at end of file diff --git a/components/diy_goodsGroup/g_filter.wxs b/components/diy_goodsGroup/g_filter.wxs new file mode 100644 index 0000000..8bba9f3 --- /dev/null +++ b/components/diy_goodsGroup/g_filter.wxs @@ -0,0 +1,84 @@ +//获取样式 +var get_class = function(column,position) { + //--列的情况 + if(column==1){ return "zs_t"+position; } + //--俩列的情况 + if(column==2){ return "zs_t"+position+"_2l"; } + //--三列的情况 + if(column==3){ return "zs_t"+position+"_3l"; } + //----列表的情况----- + if(column==4 ){ return "zs_t1_x"+position; } + +} + + +var g_filters = { + //-- 判断是不是有等级价 -- + is_has_rank:function(rank_switch,item){ + if(!rank_switch) return false; + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} + return false; + }, + + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- + get_card_price:function(goods,all_card,type){ + var price1=parseFloat(goods['cardprice1']); + var price2 = parseFloat(goods['cardprice2']); + var price3 = parseFloat(goods['cardprice3']); + if(!all_card){ + if(type==0) return 0; + return ""; + } + + var min_price=null; + var min_name=null; + //---设置对应的价格名字---- + for(var i=0;i<3;i++) { + var vl=all_card[i]; + if(vl['CorrPrice']=="Price1" && price1>0) + { + if(min_price==null) { + min_price=price1;min_name=vl['CardName']; + } + else if(price10) + { + if(min_price==null) { + min_price=price2;min_name=vl['CardName']; + } + else if(price20) + { + if(min_price==null) { + min_price=price3;min_name=vl['CardName']; + } + else if(price34 ) min_name=min_name.substring(0, 4); + return min_name; + }, +} + + +module.exports = { + get_class: get_class, + is_has_rank:g_filters.is_has_rank, + get_card_price:g_filters.get_card_price, +}