Commit 2f71e6f222e725082872501f7898de6d0652223f
Merge branch 'dev' into 'test'
Dev See merge request !142
Showing
28 changed files
with
1195 additions
and
794 deletions
app.wxss
| @@ -63,6 +63,9 @@ button { | @@ -63,6 +63,9 @@ button { | ||
| 63 | .t-c { | 63 | .t-c { |
| 64 | text-align: center; | 64 | text-align: center; |
| 65 | } | 65 | } |
| 66 | +.ai_and{ | ||
| 67 | + align-items: flex-end; | ||
| 68 | +} | ||
| 66 | .cover-layer { | 69 | .cover-layer { |
| 67 | position: fixed; | 70 | position: fixed; |
| 68 | left: 0; | 71 | left: 0; |
| @@ -206,7 +209,12 @@ position:fixed; | @@ -206,7 +209,12 @@ position:fixed; | ||
| 206 | .ai-bas{ | 209 | .ai-bas{ |
| 207 | align-items: baseline; | 210 | align-items: baseline; |
| 208 | } | 211 | } |
| 209 | - | 212 | +.ai-center{ |
| 213 | +align-items: center; | ||
| 214 | +} | ||
| 215 | +.jc-center{ | ||
| 216 | + justify-content: center; | ||
| 217 | +} | ||
| 210 | 218 | ||
| 211 | /* 垂直居中 中间等距两边贴边 7.13*/ | 219 | /* 垂直居中 中间等距两边贴边 7.13*/ |
| 212 | .flex-vertical-between{ | 220 | .flex-vertical-between{ |
components/goods_list/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | ||
| 2 | + //-- 判断是不是有等级价 -- | ||
| 3 | + is_has_rank:function(rank_switch,item){ | ||
| 4 | + if(!rank_switch) return false; | ||
| 5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | ||
| 6 | + return false; | ||
| 7 | + }, | ||
| 8 | + | ||
| 9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | ||
| 10 | + get_card_price:function(goods,all_card,type){ | ||
| 11 | + var price1=parseInt(goods['cardprice1']); | ||
| 12 | + var price2=parseInt(goods['cardprice2']); | ||
| 13 | + var price3=parseInt(goods['cardprice3']); | ||
| 14 | + if(!all_card){ | ||
| 15 | + if(type==0) return 0; | ||
| 16 | + return ""; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + var arr=[]; | ||
| 20 | + var min_price= 0; | ||
| 21 | + var min_name=""; | ||
| 22 | + //---设置对应的价格名字---- | ||
| 23 | + for(var i=0;i<3;i++) { | ||
| 24 | + var vl=all_card[i]; | ||
| 25 | + if(vl['CorrPrice']=="Price1" && price1>0) | ||
| 26 | + arr.push({'price':price1, 'name':vl['CardName']}); | ||
| 27 | + if(vl['CorrPrice']=="Price2" && price2>0) | ||
| 28 | + arr.push({'price':price2, 'name':vl['CardName']}); | ||
| 29 | + if(vl['CorrPrice']=="Price3" && price3>0) | ||
| 30 | + arr.push({'price':price3, 'name':vl['CardName']}); | ||
| 31 | + } | ||
| 32 | + if(arr.length==0){ | ||
| 33 | + if(type==0) return 0; | ||
| 34 | + return ""; | ||
| 35 | + } | ||
| 36 | + //--进行排序,升序--- | ||
| 37 | + arr.sort(function(a,b){ | ||
| 38 | + if (a.price < b.price) { | ||
| 39 | + return -1; | ||
| 40 | + } else if (a.fee == b.fee) { | ||
| 41 | + return 0; | ||
| 42 | + } else { | ||
| 43 | + return 1; | ||
| 44 | + } | ||
| 45 | + }) | ||
| 46 | + //-- 获取最下价钱,和相应的卡的名称 -- | ||
| 47 | + min_price=arr[0].price; | ||
| 48 | + min_name=arr[0].name; | ||
| 49 | + if(type==0) return min_price; | ||
| 50 | + if(min_name.length>4 ) min_name=min_name.substring(0, 4); | ||
| 51 | + return min_name; | ||
| 52 | + }, | ||
| 53 | +} | ||
| 54 | +module.exports = { | ||
| 55 | + is_has_rank:g_filters.is_has_rank, | ||
| 56 | + get_card_price:g_filters.get_card_price, | ||
| 57 | +} | ||
| 0 | \ No newline at end of file | 58 | \ No newline at end of file |
components/goods_list/goods_list.js
| 1 | -// pages/user/yhq/qr_code/qr_code.js | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -var | ||
| 5 | - t = getApp(), a = t.request, o = t.globalData.setting, os = o, | 1 | +var t = getApp(), a = t.request, o = t.globalData.setting, os = o, |
| 6 | i = require("../../utils/util.js"), ut = i, s = require("../../utils/common.js"); | 2 | i = require("../../utils/util.js"), ut = i, s = require("../../utils/common.js"); |
| 7 | 3 | ||
| 8 | - | ||
| 9 | Component({ | 4 | Component({ |
| 10 | data: { | 5 | data: { |
| 11 | url: o.imghost, | 6 | url: o.imghost, |
| 12 | object: null, | 7 | object: null, |
| 13 | curPage:1, | 8 | curPage:1, |
| 14 | is_no_more:1,//加载完所有数据的控制器 | 9 | is_no_more:1,//加载完所有数据的控制器 |
| 15 | - load_complete:0//加载完成 | 10 | + load_complete:0,//加载完成, |
| 11 | + rank_switch:false, | ||
| 12 | + card_field:"", | ||
| 13 | + card_name:"", | ||
| 14 | + max_card_field:"", | ||
| 15 | + card_list:null | ||
| 16 | }, | 16 | }, |
| 17 | properties: { | 17 | properties: { |
| 18 | // 这里定义了innerText属性,属性值可以在组件使用时指定 | 18 | // 这里定义了innerText属性,属性值可以在组件使用时指定 |
| 19 | }, | 19 | }, |
| 20 | ready: function () { | 20 | ready: function () { |
| 21 | + var th=this; | ||
| 22 | + getApp().getConfig2(function(e){ | ||
| 23 | + var swithc_list=e.switch_list; | ||
| 24 | + var sw_arr=JSON.parse(swithc_list); | ||
| 25 | + //---如果后台又开等级卡的开关--- | ||
| 26 | + if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ | ||
| 27 | + th.setData({rank_switch:true}); | ||
| 28 | + var user=getApp().globalData.userInfo; | ||
| 29 | + var ti=setInterval(function(){ | ||
| 30 | + if(!user) return false; | ||
| 31 | + clearInterval(ti); | ||
| 32 | + //---回调卡的列表--- | ||
| 33 | + th.getPlusCardType(function(ob){ | ||
| 34 | + th.setData({card_list:ob.card_list}); | ||
| 35 | + if(user.card_field ){ | ||
| 36 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 37 | + var end = new Date(str); | ||
| 38 | + end = Date.parse(end) / 1000; | ||
| 39 | + var now = ut.gettimestamp(); | ||
| 40 | + | ||
| 41 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 42 | + if(user.card_field && now<end){ | ||
| 43 | + var card_name=ob.name_map.get(user.card_field); | ||
| 44 | + if(card_name.length>4) card_name=card_name.substring(0,4); | ||
| 45 | + th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list}); | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + }) | ||
| 49 | + },500) | ||
| 50 | + } | ||
| 51 | + }) | ||
| 52 | + | ||
| 21 | }, | 53 | }, |
| 22 | 54 | ||
| 23 | 55 | ||
| 24 | methods: { | 56 | methods: { |
| 25 | 57 | ||
| 26 | - get_list:function(){ | ||
| 27 | - | 58 | + get_list:function(){ |
| 28 | var that = this; | 59 | var that = this; |
| 29 | if(that.data.is_no_more==0) return false; | 60 | if(that.data.is_no_more==0) return false; |
| 30 | - | ||
| 31 | - | ||
| 32 | var curPage = that.data.curPage; | 61 | var curPage = that.data.curPage; |
| 33 | getApp().request.get('/api/weshop/goods/page?page',{ | 62 | getApp().request.get('/api/weshop/goods/page?page',{ |
| 34 | data: { is_mainshow: 1, isonsale: 1, | 63 | data: { is_mainshow: 1, isonsale: 1, |
| @@ -45,8 +74,7 @@ Component({ | @@ -45,8 +74,7 @@ Component({ | ||
| 45 | }else{ | 74 | }else{ |
| 46 | that.data.curPage++; | 75 | that.data.curPage++; |
| 47 | } | 76 | } |
| 48 | - | ||
| 49 | - | 77 | + |
| 50 | //加载完成 | 78 | //加载完成 |
| 51 | if (data.data.pageData) { | 79 | if (data.data.pageData) { |
| 52 | that.setData({load_complete:1}); | 80 | that.setData({load_complete:1}); |
| @@ -60,26 +88,40 @@ Component({ | @@ -60,26 +88,40 @@ Component({ | ||
| 60 | } | 88 | } |
| 61 | }) | 89 | }) |
| 62 | }, | 90 | }, |
| 91 | + | ||
| 63 | bind_bnerr_xc: function (e) { | 92 | bind_bnerr_xc: function (e) { |
| 64 | - var _errImg = e.target.dataset.errorimg; | ||
| 65 | - var _errurl = e.target.dataset.url; | ||
| 66 | - | 93 | + var _errImg = e.target.dataset.errorimg; |
| 94 | + var _errurl = e.target.dataset.url; | ||
| 67 | var _errObj = {}; | 95 | var _errObj = {}; |
| 68 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | 96 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; |
| 69 | - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 70 | - | 97 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 71 | }, | 98 | }, |
| 72 | 99 | ||
| 73 | reset:function(){ | 100 | reset:function(){ |
| 74 | curPage=1; | 101 | curPage=1; |
| 75 | }, | 102 | }, |
| 76 | - | ||
| 77 | - | ||
| 78 | - | 103 | + |
| 104 | + //--- 获取卡类列表 --- | ||
| 105 | + getPlusCardType: function (func) { | ||
| 106 | + var storid = o.stoid; | ||
| 107 | + var th = this; | ||
| 108 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
| 109 | + var plusCard = res.data.data; | ||
| 110 | + var arr = [1219, 2089, 3031]; | ||
| 111 | + var new_arr = new Array(); | ||
| 112 | + var card_name_map=new Map(); | ||
| 113 | + for (var i = 0; i < plusCard.length; i++) { | ||
| 114 | + var name="card"+plusCard[i].CorrPrice.toLowerCase(); | ||
| 115 | + card_name_map.set(name,plusCard[i].CardName); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + var ob={"card_list":plusCard,"name_map":card_name_map}; | ||
| 119 | + func(ob); | ||
| 120 | + }) | ||
| 121 | + }, | ||
| 122 | + | ||
| 79 | }, | 123 | }, |
| 80 | - | ||
| 81 | - | ||
| 82 | - | ||
| 83 | - | ||
| 84 | - | 124 | + |
| 125 | + | ||
| 126 | + | ||
| 85 | }) | 127 | }) |
| 86 | \ No newline at end of file | 128 | \ No newline at end of file |
components/goods_list/goods_list.wxml
| 1 | <!-- 商品列表 --> | 1 | <!-- 商品列表 --> |
| 2 | <wxs module="filter" src="../../utils/filter.wxs"></wxs> | 2 | <wxs module="filter" src="../../utils/filter.wxs"></wxs> |
| 3 | + <wxs module="g_filter" src="g_filter.wxs"></wxs> | ||
| 3 | <view class="collects"> | 4 | <view class="collects"> |
| 4 | <view class="hang "> | 5 | <view class="hang "> |
| 5 | <!-- 商品详情 --> | 6 | <!-- 商品详情 --> |
| @@ -10,19 +11,108 @@ | @@ -10,19 +11,108 @@ | ||
| 10 | <view class="bottom"> | 11 | <view class="bottom"> |
| 11 | <!-- 商品名称 --> | 12 | <!-- 商品名称 --> |
| 12 | <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view> | 13 | <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view> |
| 13 | - <!-- 商品价格 --> | ||
| 14 | - <view class="money flex"> | ||
| 15 | - <!-- 办卡价 --> | ||
| 16 | - <view class="flex xc-wc"> | ||
| 17 | - <view class="fs24">¥</view> | ||
| 18 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
| 19 | - </view> | ||
| 20 | - <!-- 原价 --> | ||
| 21 | - <view class="price flex xc-ash"> | ||
| 22 | - <view class="fs22">¥</view> | ||
| 23 | - <view class="fs22">{{item.market_price}}</view> | ||
| 24 | - </view> | ||
| 25 | - </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>{{card_name}}</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 | + | ||
| 26 | </view> | 116 | </view> |
| 27 | </navigator> | 117 | </navigator> |
| 28 | </view> | 118 | </view> |
components/goods_list/goods_list.wxss
| @@ -4,9 +4,27 @@ | @@ -4,9 +4,27 @@ | ||
| 4 | .ib{ | 4 | .ib{ |
| 5 | display: inline-block; | 5 | display: inline-block; |
| 6 | } | 6 | } |
| 7 | +.fs20{ | ||
| 8 | + font-size: 20rpx; | ||
| 9 | +} | ||
| 10 | +.fs22{ | ||
| 11 | + font-size: 22rpx; | ||
| 12 | +} | ||
| 7 | .fs24{ | 13 | .fs24{ |
| 8 | font-size: 24rpx; | 14 | font-size: 24rpx; |
| 9 | } | 15 | } |
| 16 | +.fs26{ | ||
| 17 | + font-size: 26rpx; | ||
| 18 | +} | ||
| 19 | +.fs28{ | ||
| 20 | + font-size: 28rpx; | ||
| 21 | +} | ||
| 22 | +.fs35{ | ||
| 23 | + font-size:35rpx; | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + | ||
| 10 | .flex-center{ | 28 | .flex-center{ |
| 11 | display:flex; | 29 | display:flex; |
| 12 | justify-content:center; | 30 | justify-content:center; |
| @@ -16,18 +34,16 @@ align-items:center; | @@ -16,18 +34,16 @@ align-items:center; | ||
| 16 | color: #d60021; | 34 | color: #d60021; |
| 17 | 35 | ||
| 18 | } | 36 | } |
| 19 | -.fs22{ | ||
| 20 | - font-size: 22rpx; | ||
| 21 | -} | 37 | + |
| 38 | + | ||
| 39 | + | ||
| 22 | .xc-ash{ | 40 | .xc-ash{ |
| 23 | color: #b9b9b9; | 41 | color: #b9b9b9; |
| 24 | } | 42 | } |
| 25 | .choice_box .choice_list .choice_footer .price { | 43 | .choice_box .choice_list .choice_footer .price { |
| 26 | color: #f23030; height: 10px | 44 | color: #f23030; height: 10px |
| 27 | } | 45 | } |
| 28 | -.fs35{ | ||
| 29 | - font-size:35rpx; | ||
| 30 | -} | 46 | + |
| 31 | .flex{display: flex} | 47 | .flex{display: flex} |
| 32 | .ellipsis-2 { | 48 | .ellipsis-2 { |
| 33 | overflow: hidden; | 49 | overflow: hidden; |
| @@ -48,13 +64,11 @@ color: #b9b9b9; | @@ -48,13 +64,11 @@ color: #b9b9b9; | ||
| 48 | margin: auto; | 64 | margin: auto; |
| 49 | padding-left: 21rpx; | 65 | padding-left: 21rpx; |
| 50 | } | 66 | } |
| 51 | -.fs28{ | ||
| 52 | - font-size: 28rpx; | ||
| 53 | -} | 67 | + |
| 54 | 68 | ||
| 55 | .hang .collect { | 69 | .hang .collect { |
| 56 | width: 347rpx; | 70 | width: 347rpx; |
| 57 | - height: 495rpx; | 71 | + height: 520rpx; |
| 58 | border-radius: 25rpx; | 72 | border-radius: 25rpx; |
| 59 | border: 1rpx solid rgb(214, 214, 214); | 73 | border: 1rpx solid rgb(214, 214, 214); |
| 60 | overflow: hidden; | 74 | overflow: hidden; |
| @@ -72,8 +86,8 @@ color: #b9b9b9; | @@ -72,8 +86,8 @@ color: #b9b9b9; | ||
| 72 | } | 86 | } |
| 73 | 87 | ||
| 74 | .collect .money { | 88 | .collect .money { |
| 75 | - margin-top: 30rpx; | ||
| 76 | - margin-bottom: 18rpx; | 89 | + margin-top: 28rpx; |
| 90 | + margin-bottom: 8rpx; | ||
| 77 | line-height: 28rpx; | 91 | line-height: 28rpx; |
| 78 | align-items: baseline; | 92 | align-items: baseline; |
| 79 | } | 93 | } |
| @@ -134,4 +148,9 @@ color: #b9b9b9; | @@ -134,4 +148,9 @@ color: #b9b9b9; | ||
| 134 | width: 80rpx; | 148 | width: 80rpx; |
| 135 | height: 2rpx; | 149 | height: 2rpx; |
| 136 | background-color: rgb(138, 138, 138); | 150 | background-color: rgb(138, 138, 138); |
| 137 | -} | ||
| 138 | \ No newline at end of file | 151 | \ No newline at end of file |
| 152 | +} | ||
| 153 | + | ||
| 154 | +.line_th{ text-decoration: line-through} | ||
| 155 | +.card_bg {display: flex; width: 106rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | ||
| 156 | +background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} | ||
| 157 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} | ||
| 139 | \ No newline at end of file | 158 | \ No newline at end of file |
pages/cart/cart/cart.js
| @@ -2,7 +2,8 @@ var t = getApp(), | @@ -2,7 +2,8 @@ var t = getApp(), | ||
| 2 | a = t.request, | 2 | a = t.request, |
| 3 | oo = t.globalData.setting, | 3 | oo = t.globalData.setting, |
| 4 | app = getApp(), | 4 | app = getApp(), |
| 5 | - rq = t.request; | 5 | + rq = t.request, |
| 6 | + ut = require("../../../utils/util.js"); | ||
| 6 | var regeneratorRuntime = require('../../../utils/runtime.js'); | 7 | var regeneratorRuntime = require('../../../utils/runtime.js'); |
| 7 | 8 | ||
| 8 | Page({ | 9 | Page({ |
| @@ -23,6 +24,8 @@ Page({ | @@ -23,6 +24,8 @@ Page({ | ||
| 23 | up_dating: 0, //更新中 | 24 | up_dating: 0, //更新中 |
| 24 | isreduce: 0, //商品数量是否可减 | 25 | isreduce: 0, //商品数量是否可减 |
| 25 | isadd: 0, //是否可以加商品数量 | 26 | isadd: 0, //是否可以加商品数量 |
| 27 | + | ||
| 28 | + card_field:"", | ||
| 26 | }, | 29 | }, |
| 27 | 30 | ||
| 28 | onLoad: function() { | 31 | onLoad: function() { |
| @@ -73,6 +76,28 @@ Page({ | @@ -73,6 +76,28 @@ Page({ | ||
| 73 | } else { | 76 | } else { |
| 74 | th.get_cart(); | 77 | th.get_cart(); |
| 75 | } | 78 | } |
| 79 | + | ||
| 80 | + //要获取会员是不是等级会员 | ||
| 81 | + getApp().getConfig2(function(conf){ | ||
| 82 | + //--- 看后台是不是有开通等级卡 --- | ||
| 83 | + if(conf.switch_list){ | ||
| 84 | + var s_list=JSON.parse(conf.switch_list); | ||
| 85 | + //如果后台有开启等级价的功能 | ||
| 86 | + if(parseInt(s_list.rank_switch)==2){ | ||
| 87 | + var user=getApp().globalData.userInfo; | ||
| 88 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 89 | + var end = new Date(str); | ||
| 90 | + end = Date.parse(end) / 1000; | ||
| 91 | + var now = ut.gettimestamp(); | ||
| 92 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 93 | + if(user.card_field && now<end){ | ||
| 94 | + th.setData({card_field:user.card_field}) | ||
| 95 | + } | ||
| 96 | + } | ||
| 97 | + } | ||
| 98 | + }) | ||
| 99 | + | ||
| 100 | + | ||
| 76 | }, | 101 | }, |
| 77 | //-----真的获取购物车-------- | 102 | //-----真的获取购物车-------- |
| 78 | get_cart: function() { | 103 | get_cart: function() { |
| @@ -132,9 +157,6 @@ Page({ | @@ -132,9 +157,6 @@ Page({ | ||
| 132 | } | 157 | } |
| 133 | } | 158 | } |
| 134 | 159 | ||
| 135 | - console.log("1212"); | ||
| 136 | - console.log(arr); | ||
| 137 | - | ||
| 138 | th.setData({ | 160 | th.setData({ |
| 139 | requestData: arr, | 161 | requestData: arr, |
| 140 | all_num: all_num, | 162 | all_num: all_num, |
| @@ -677,13 +699,23 @@ Page({ | @@ -677,13 +699,23 @@ Page({ | ||
| 677 | return false; | 699 | return false; |
| 678 | } | 700 | } |
| 679 | 701 | ||
| 702 | + | ||
| 703 | + var card_field=th.data.card_field; | ||
| 680 | for (var i = 0; i < g_arr.length; i++) { | 704 | for (var i = 0; i < g_arr.length; i++) { |
| 681 | if (g_arr[i].goods_id == val.goods_id) { | 705 | if (g_arr[i].goods_id == val.goods_id) { |
| 682 | - if (g_arr[i].goods_price != val.shop_price && g_arr[i].goods_price != val.prom_price) { | ||
| 683 | - isok = 0; | ||
| 684 | - gname = val.goods_name; | ||
| 685 | - throw "商品价格已经变化"; | ||
| 686 | - } | 706 | + |
| 707 | + //如果会员是等级会员,商品有等级价,且不是活动商品 | ||
| 708 | + if(card_field && val[card_field]>0 && val.prom_type==0 ){ | ||
| 709 | + | ||
| 710 | + }else{ | ||
| 711 | + if (g_arr[i].goods_price != val.shop_price && g_arr[i].goods_price != val.prom_price) { | ||
| 712 | + isok = 0; | ||
| 713 | + gname = val.goods_name; | ||
| 714 | + throw "商品价格已经变化"; | ||
| 715 | + } | ||
| 716 | + } | ||
| 717 | + | ||
| 718 | + | ||
| 687 | rq.put("/api/weshop/cart/update", { | 719 | rq.put("/api/weshop/cart/update", { |
| 688 | data: { | 720 | data: { |
| 689 | id: g_arr[i].id, | 721 | id: g_arr[i].id, |
pages/cart/cart2/cart2.js
| @@ -415,9 +415,10 @@ Page({ | @@ -415,9 +415,10 @@ Page({ | ||
| 415 | case 3: | 415 | case 3: |
| 416 | case 4: | 416 | case 4: |
| 417 | case 6: | 417 | case 6: |
| 418 | - //--此时开始计算商品的使用券相关,如果有等级价还要计算和等级价相关的, | ||
| 419 | - // 如果有优惠促销,还要把促销的部分计算在内,因为促销还有不能使用优惠券-- | ||
| 420 | - | 418 | + //--此时开始计算商品的使用券相关,如果有等级价还要计算和等级价相关的, |
| 419 | + // 如果有优惠促销,还要把促销的部分计算在内,因为促销还有不能使用优惠券-- | ||
| 420 | + t.data.data.shop_price=gg.goods_price; | ||
| 421 | + | ||
| 421 | th.data.ckeck_quan_price=t.data.data.shop_price*gg.goods_num; | 422 | th.data.ckeck_quan_price=t.data.data.shop_price*gg.goods_num; |
| 422 | th.data.check_quan_price_list=t.data.data.shop_price*gg.goods_num+""; | 423 | th.data.check_quan_price_list=t.data.data.shop_price*gg.goods_num+""; |
| 423 | th.data.check_quan_ware_list=t.data.data.erpwareid+""; | 424 | th.data.check_quan_ware_list=t.data.data.erpwareid+""; |
pages/cart/cart2_pt/cart2_pt.js
| @@ -158,7 +158,8 @@ Page({ | @@ -158,7 +158,8 @@ Page({ | ||
| 158 | et = 0; | 158 | et = 0; |
| 159 | break; | 159 | break; |
| 160 | } | 160 | } |
| 161 | - | 161 | + |
| 162 | + t.data.data.shop_price=gg.goods_price; | ||
| 162 | //--如果是普通购买的时候-- | 163 | //--如果是普通购买的时候-- |
| 163 | if(gg.is_normal==1){ | 164 | if(gg.is_normal==1){ |
| 164 | t.data.data.prom_id = 0; | 165 | t.data.data.prom_id = 0; |
pages/getphone/getphone.js
| @@ -63,7 +63,7 @@ Page({ | @@ -63,7 +63,7 @@ Page({ | ||
| 63 | }, | 63 | }, |
| 64 | 64 | ||
| 65 | save_the_data:function (r,e,sessionKey,openid) { | 65 | save_the_data:function (r,e,sessionKey,openid) { |
| 66 | - var app=getApp(),a=app; | 66 | + var app=getApp(),a=app,th=this; |
| 67 | var dd = { | 67 | var dd = { |
| 68 | oauth: "miniapp", | 68 | oauth: "miniapp", |
| 69 | nickname: r.nickName, | 69 | nickname: r.nickName, |
pages/goods/categoryList/categoryList.wxml
| @@ -229,10 +229,11 @@ | @@ -229,10 +229,11 @@ | ||
| 229 | <view> | 229 | <view> |
| 230 | 230 | ||
| 231 | <view class="classify_name fs28 flex-space-between"data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> | 231 | <view class="classify_name fs28 flex-space-between"data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> |
| 232 | + | ||
| 232 | <view class="classify_title ellipsis-1">{{goods.items.name}}</view> | 233 | <view class="classify_title ellipsis-1">{{goods.items.name}}</view> |
| 233 | <view class="flex select_more" > | 234 | <view class="flex select_more" > |
| 234 | <view class="red-co fs24" >更多</view> | 235 | <view class="red-co fs24" >更多</view> |
| 235 | - <view class="bg_right width_height"></view> | 236 | + <view class="bg_right width_height"></view> |
| 236 | </view> | 237 | </view> |
| 237 | </view> | 238 | </view> |
| 238 | 239 |
pages/goods/goodsInfo/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | ||
| 2 | + //-- 判断是不是有等级价 -- | ||
| 3 | + is_has_rank:function(rank_switch,item){ | ||
| 4 | + if(!rank_switch) return false; | ||
| 5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | ||
| 6 | + return false; | ||
| 7 | + }, | ||
| 8 | + | ||
| 9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | ||
| 10 | + get_card_price:function(goods,all_card,type){ | ||
| 11 | + var price1=parseInt(goods['cardprice1']); | ||
| 12 | + var price2=parseInt(goods['cardprice2']); | ||
| 13 | + var price3=parseInt(goods['cardprice3']); | ||
| 14 | + if(!all_card){ | ||
| 15 | + if(type==0) return 0; | ||
| 16 | + return ""; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + var arr=[]; | ||
| 20 | + var min_price= 0; | ||
| 21 | + var min_name=""; | ||
| 22 | + //---设置对应的价格名字---- | ||
| 23 | + for(var i=0;i<3;i++) { | ||
| 24 | + var vl=all_card[i]; | ||
| 25 | + if(vl['CorrPrice']=="Price1" && price1>0) | ||
| 26 | + arr.push({'price':price1, 'name':vl['CardName']}); | ||
| 27 | + if(vl['CorrPrice']=="Price2" && price2>0) | ||
| 28 | + arr.push({'price':price2, 'name':vl['CardName']}); | ||
| 29 | + if(vl['CorrPrice']=="Price3" && price3>0) | ||
| 30 | + arr.push({'price':price3, 'name':vl['CardName']}); | ||
| 31 | + } | ||
| 32 | + if(arr.length==0){ | ||
| 33 | + if(type==0) return 0; | ||
| 34 | + return ""; | ||
| 35 | + } | ||
| 36 | + //--进行排序,升序--- | ||
| 37 | + arr.sort(function(a,b){ | ||
| 38 | + if (a.price < b.price) { | ||
| 39 | + return -1; | ||
| 40 | + } else if (a.fee == b.fee) { | ||
| 41 | + return 0; | ||
| 42 | + } else { | ||
| 43 | + return 1; | ||
| 44 | + } | ||
| 45 | + }) | ||
| 46 | + //-- 获取最下价钱,和相应的卡的名称 -- | ||
| 47 | + min_price=arr[0].price; | ||
| 48 | + min_name=arr[0].name; | ||
| 49 | + if(type==0) return min_price; | ||
| 50 | + if(min_name.length>5 ) min_name=min_name.substring(0, 5); | ||
| 51 | + return min_name; | ||
| 52 | + }, | ||
| 53 | +} | ||
| 54 | +module.exports = { | ||
| 55 | + is_has_rank:g_filters.is_has_rank, | ||
| 56 | + get_card_price:g_filters.get_card_price, | ||
| 57 | +} | ||
| 0 | \ No newline at end of file | 58 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.js
| @@ -287,6 +287,40 @@ Page({ | @@ -287,6 +287,40 @@ Page({ | ||
| 287 | th.requestCardNum(), wx.pageScrollTo && th.setData({ | 287 | th.requestCardNum(), wx.pageScrollTo && th.setData({ |
| 288 | supportPageScroll: !0 | 288 | supportPageScroll: !0 |
| 289 | }); | 289 | }); |
| 290 | + | ||
| 291 | + //计算等级价相关 | ||
| 292 | + var swithc_list=e.switch_list; | ||
| 293 | + var sw_arr=JSON.parse(swithc_list); | ||
| 294 | + //---如果后台又开等级卡的开关--- | ||
| 295 | + if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ | ||
| 296 | + th.setData({rank_switch:true}); | ||
| 297 | + var user=getApp().globalData.userInfo; | ||
| 298 | + var ti=setInterval(function(){ | ||
| 299 | + if(!user) return false; | ||
| 300 | + clearInterval(ti); | ||
| 301 | + //---回调卡的列表--- | ||
| 302 | + th.getPlusCardType(function(ob){ | ||
| 303 | + th.setData({card_list:ob.card_list}); | ||
| 304 | + if(user.card_field ){ | ||
| 305 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 306 | + var end = new Date(str); | ||
| 307 | + end = Date.parse(end) / 1000; | ||
| 308 | + var now = ut.gettimestamp(); | ||
| 309 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 310 | + if(user.card_field && now<end){ | ||
| 311 | + var card_name=ob.name_map.get(user.card_field); | ||
| 312 | + if(card_name.length>5) card_name=card_name.substring(0,5); | ||
| 313 | + | ||
| 314 | + var is_near_date=0; | ||
| 315 | + if(end-now<60*60*30*24) is_near_date=1; //如果小于30天 | ||
| 316 | + th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list,is_near_date:is_near_date}); | ||
| 317 | + } | ||
| 318 | + } | ||
| 319 | + }) | ||
| 320 | + },500) | ||
| 321 | + } | ||
| 322 | + | ||
| 323 | + | ||
| 290 | 324 | ||
| 291 | }); | 325 | }); |
| 292 | 326 | ||
| @@ -802,6 +836,24 @@ Page({ | @@ -802,6 +836,24 @@ Page({ | ||
| 802 | newd.prom_type = 0; | 836 | newd.prom_type = 0; |
| 803 | newd.prom_id = 0; | 837 | newd.prom_id = 0; |
| 804 | } | 838 | } |
| 839 | + | ||
| 840 | + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | ||
| 841 | + if(o.prom_type!=1 && o.prom_type!=6){ | ||
| 842 | + var conf=th.data.bconfig; | ||
| 843 | + if(conf.switch_list){ | ||
| 844 | + var s_list=JSON.parse(conf.switch_list); | ||
| 845 | + //如果后台有开启等级价的功能 | ||
| 846 | + if(parseInt(s_list.rank_switch)==2){ | ||
| 847 | + var card_price=o[getApp().globalData.userInfo['card_field']]; | ||
| 848 | + //如果会员有等级价 | ||
| 849 | + if(getApp().globalData.userInfo['card_field']!=undefined && getApp().globalData.userInfo['card_field']!=null | ||
| 850 | + && getApp().globalData.userInfo['card_field']!="" && card_price>0){ | ||
| 851 | + newd.goods_price=card_price; | ||
| 852 | + } | ||
| 853 | + } | ||
| 854 | + } | ||
| 855 | + } | ||
| 856 | + | ||
| 805 | 857 | ||
| 806 | //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d); | 858 | //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d); |
| 807 | if ("add" == t.currentTarget.dataset.action) { | 859 | if ("add" == t.currentTarget.dataset.action) { |
| @@ -2113,20 +2165,23 @@ Page({ | @@ -2113,20 +2165,23 @@ Page({ | ||
| 2113 | } | 2165 | } |
| 2114 | 2166 | ||
| 2115 | var redis_num = 0 | 2167 | var redis_num = 0 |
| 2116 | - //-------判断活动是否抢光--------- | ||
| 2117 | - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.sele_g.prom_id, { | ||
| 2118 | - 1: 1 | ||
| 2119 | - }).then(res => { | ||
| 2120 | - redis_num = res.data.data; | ||
| 2121 | - }) | ||
| 2122 | - | ||
| 2123 | - if (th.data.goodsInputNum > redis_num) { | ||
| 2124 | - wx.showModal({ | ||
| 2125 | - title: '提示', | ||
| 2126 | - content: '超出商品活动库存' | ||
| 2127 | - }); | ||
| 2128 | - return false; | ||
| 2129 | - } | 2168 | + //不是普通购买的时候 |
| 2169 | + if(th.data.is_normal!=1){ | ||
| 2170 | + //-------判断活动是否抢光--------- | ||
| 2171 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.sele_g.prom_id, { | ||
| 2172 | + 1: 1 | ||
| 2173 | + }).then(res => { | ||
| 2174 | + redis_num = res.data.data; | ||
| 2175 | + }) | ||
| 2176 | + | ||
| 2177 | + if (th.data.goodsInputNum > redis_num) { | ||
| 2178 | + wx.showModal({ | ||
| 2179 | + title: '提示', | ||
| 2180 | + content: '超出商品活动库存' | ||
| 2181 | + }); | ||
| 2182 | + return false; | ||
| 2183 | + } | ||
| 2184 | + } | ||
| 2130 | 2185 | ||
| 2131 | if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | 2186 | if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); |
| 2132 | if (th.data.goodsInputNum > o.store_count) return s.my_warnning("超出商品库存", 0, th); | 2187 | if (th.data.goodsInputNum > o.store_count) return s.my_warnning("超出商品库存", 0, th); |
| @@ -2147,9 +2202,28 @@ Page({ | @@ -2147,9 +2202,28 @@ Page({ | ||
| 2147 | goods_sn: o.goods_sn, | 2202 | goods_sn: o.goods_sn, |
| 2148 | sku: o.sku, | 2203 | sku: o.sku, |
| 2149 | }; | 2204 | }; |
| 2150 | - | ||
| 2151 | - //-----如果是秒杀,团购,积分购,拼团----- | ||
| 2152 | - if (th.data.prom_type == 6) { | 2205 | + |
| 2206 | + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | ||
| 2207 | + | ||
| 2208 | + if(th.data.is_normal == 1){ | ||
| 2209 | + var conf=th.data.bconfig; | ||
| 2210 | + if(conf.switch_list){ | ||
| 2211 | + var s_list=JSON.parse(conf.switch_list); | ||
| 2212 | + //如果后台有开启等级价的功能 | ||
| 2213 | + if(parseInt(s_list.rank_switch)==2){ | ||
| 2214 | + var card_price=o[getApp().globalData.userInfo['card_field']]; | ||
| 2215 | + //如果会员有等级价 | ||
| 2216 | + if(getApp().globalData.userInfo['card_field']!=undefined && getApp().globalData.userInfo['card_field']!=null | ||
| 2217 | + && getApp().globalData.userInfo['card_field']!="" && card_price>0){ | ||
| 2218 | + newd.goods_price=card_price; | ||
| 2219 | + } | ||
| 2220 | + } | ||
| 2221 | + } | ||
| 2222 | + } | ||
| 2223 | + | ||
| 2224 | + | ||
| 2225 | + //-----如果是秒杀,团购,积分购,拼团,且不是普通购买----- | ||
| 2226 | + if (th.data.prom_type == 6 && th.data.is_normal!= 1) { | ||
| 2153 | newd.goods_price = th.data.prom_price; | 2227 | newd.goods_price = th.data.prom_price; |
| 2154 | newd.prom_type = th.data.prom_type; | 2228 | newd.prom_type = th.data.prom_type; |
| 2155 | newd.prom_id = th.data.prom_id; | 2229 | newd.prom_id = th.data.prom_id; |
| @@ -2159,7 +2233,7 @@ Page({ | @@ -2159,7 +2233,7 @@ Page({ | ||
| 2159 | if (newd.kt_type > 1) { | 2233 | if (newd.kt_type > 1) { |
| 2160 | newd.is_pt_tz = 1; //开团类型 | 2234 | newd.is_pt_tz = 1; //开团类型 |
| 2161 | } | 2235 | } |
| 2162 | - if (newd.kt_type == 3 && th.data.is_normal != 1) { | 2236 | + if (newd.kt_type == 3) { |
| 2163 | th.data.sto_sele_distr = 1; | 2237 | th.data.sto_sele_distr = 1; |
| 2164 | } | 2238 | } |
| 2165 | 2239 | ||
| @@ -3265,6 +3339,32 @@ Page({ | @@ -3265,6 +3339,32 @@ Page({ | ||
| 3265 | comments: that.data.comments | 3339 | comments: that.data.comments |
| 3266 | }) | 3340 | }) |
| 3267 | }, | 3341 | }, |
| 3342 | + | ||
| 3343 | + //--- 获取卡类列表 --- | ||
| 3344 | + getPlusCardType: function (func) { | ||
| 3345 | + var storid = os.stoid; | ||
| 3346 | + var th = this; | ||
| 3347 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
| 3348 | + var plusCard = res.data.data; | ||
| 3349 | + var arr = [1219, 2089, 3031]; | ||
| 3350 | + var new_arr = new Array(); | ||
| 3351 | + var card_name_map=new Map(); | ||
| 3352 | + for (var i = 0; i < plusCard.length; i++) { | ||
| 3353 | + var name="card"+plusCard[i].CorrPrice.toLowerCase(); | ||
| 3354 | + card_name_map.set(name,plusCard[i].CardName); | ||
| 3355 | + } | ||
| 3356 | + | ||
| 3357 | + var ob={"card_list":plusCard,"name_map":card_name_map}; | ||
| 3358 | + func(ob); | ||
| 3359 | + }) | ||
| 3360 | + }, | ||
| 3361 | + | ||
| 3362 | + go_plus:function(){ | ||
| 3363 | + getApp().goto("/pages/user/plus/plus"); | ||
| 3364 | + }, | ||
| 3365 | + go_card_info:function(){ | ||
| 3366 | + getApp().goto("/pages/user/cardinfo/cardinfo"); | ||
| 3367 | + } | ||
| 3268 | 3368 | ||
| 3269 | 3369 | ||
| 3270 | }); | 3370 | }); |
| 3271 | \ No newline at end of file | 3371 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.wxml
| 1 | <import src="../../../utils/wxParse/wxParse.wxml"></import> | 1 | <import src="../../../utils/wxParse/wxParse.wxml"></import> |
| 2 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> | 2 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> |
| 3 | +<wxs module="g_filters" src="g_filter.wxs"></wxs> | ||
| 3 | 4 | ||
| 4 | <wxs module="" src="filter.wxs"></wxs> | 5 | <wxs module="" src="filter.wxs"></wxs> |
| 5 | -<!-- 商品内容区域,普通商品,秒杀,拼团 --> | ||
| 6 | <block wx:if="{{isshow}}"> | 6 | <block wx:if="{{isshow}}"> |
| 7 | <view class="container"> | 7 | <view class="container"> |
| 8 | - <view class="type-navbar"> | 8 | + <view class="type-navbar"> |
| 9 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | 9 | <view class="type-box" wx:for="{{categories}}" wx:key="categories"> |
| 10 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | 10 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> |
| 11 | {{item.name}} | 11 | {{item.name}} |
| 12 | - </view> | 12 | + </view> |
| 13 | </view> | 13 | </view> |
| 14 | </view> | 14 | </view> |
| 15 | 15 | ||
| 16 | <view class="goods-detail"> | 16 | <view class="goods-detail"> |
| 17 | <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> | 17 | <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> |
| 18 | - <!-- 视频 --> | 18 | + <!-- 视频,滚动图bannar --> |
| 19 | <!-- <swiper bindchange="swiperChange"class="xc-pictures swiperContainer rel" current="{{swiperCurrent}}" | 19 | <!-- <swiper bindchange="swiperChange"class="xc-pictures swiperContainer rel" current="{{swiperCurrent}}" |
| 20 | indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> --> | 20 | indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> --> |
| 21 | <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove"> | 21 | <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove"> |
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | </view> | 44 | </view> |
| 45 | <view class="xc-video-picture abs"> | 45 | <view class="xc-video-picture abs"> |
| 46 | <view class="xc-video" data-vipi="0" bindtap="videopicture"> | 46 | <view class="xc-video" data-vipi="0" bindtap="videopicture"> |
| 47 | - <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> | 47 | + <view class=" {{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> |
| 48 | 视频 | 48 | 视频 |
| 49 | </view> | 49 | </view> |
| 50 | </view> | 50 | </view> |
| @@ -57,8 +57,6 @@ | @@ -57,8 +57,6 @@ | ||
| 57 | </block> | 57 | </block> |
| 58 | </view> | 58 | </view> |
| 59 | </view> | 59 | </view> |
| 60 | - | ||
| 61 | - | ||
| 62 | <!----显示秒杀价,团购,积分购----> | 60 | <!----显示秒杀价,团购,积分购----> |
| 63 | <view class="prom_show rel" wx:if="{{prom_type==1}}"> | 61 | <view class="prom_show rel" wx:if="{{prom_type==1}}"> |
| 64 | 62 | ||
| @@ -80,7 +78,6 @@ | @@ -80,7 +78,6 @@ | ||
| 80 | <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">秒</view> | 78 | <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">秒</view> |
| 81 | </view> | 79 | </view> |
| 82 | </view> | 80 | </view> |
| 83 | - | ||
| 84 | <!----拼单----> | 81 | <!----拼单----> |
| 85 | <view class="pt_show " wx:if="{{prom_type==6}}"> | 82 | <view class="pt_show " wx:if="{{prom_type==6}}"> |
| 86 | <view class="pt_view rel"> | 83 | <view class="pt_view rel"> |
| @@ -228,15 +225,21 @@ | @@ -228,15 +225,21 @@ | ||
| 228 | </view> | 225 | </view> |
| 229 | </view> | 226 | </view> |
| 230 | </view> | 227 | </view> |
| 231 | - | ||
| 232 | <block wx:if="{{prom_type!=6}}"> | 228 | <block wx:if="{{prom_type!=6}}"> |
| 233 | <view class="goods-price rel"> | 229 | <view class="goods-price rel"> |
| 234 | <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}"> | 230 | <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}"> |
| 235 | <view class="market-price" style="overflow: hidden"> | 231 | <view class="market-price" style="overflow: hidden"> |
| 236 | - <text class="rel yuan">¥</text>{{ filters.toFix(data.shop_price,2)}} | ||
| 237 | - <view class='yj'> | ||
| 238 | - <text>原价:¥{{data.market_price}}</text> | ||
| 239 | - </view> | 232 | + <block wx:if="{{card_field}}"> |
| 233 | + <view class="flex ai-center grade-card-frame" style="margin-left:12rpx;"> | ||
| 234 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 235 | + <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | ||
| 236 | + </view> | ||
| 237 | + <text class="rel yuan">¥</text>{{filters.toFix(data[card_field],2)}} | ||
| 238 | + </block> | ||
| 239 | + <block wx:else> | ||
| 240 | + <text class="rel yuan">¥</text>{{ filters.toFix(data.shop_price,2)}} | ||
| 241 | + <view class='yj'><text>原价:¥{{data.market_price}}</text></view> | ||
| 242 | + </block> | ||
| 240 | </view> | 243 | </view> |
| 241 | </view> | 244 | </view> |
| 242 | 245 | ||
| @@ -245,8 +248,70 @@ | @@ -245,8 +248,70 @@ | ||
| 245 | <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> | 248 | <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> |
| 246 | <view class="share-font">分享</view> | 249 | <view class="share-font">分享</view> |
| 247 | </view> | 250 | </view> |
| 248 | - <!--许程 7.24 暂时注释 --> | ||
| 249 | - | 251 | + |
| 252 | + <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> | ||
| 253 | + <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data)}}"> | ||
| 254 | + <view class="flex ai-center grade-card-frame card-frame"style="padding-right:0rpx" > | ||
| 255 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 256 | + <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> | ||
| 257 | + </view> | ||
| 258 | + <view class="fs32 xc-black3 ai_and"><text class="fs26">¥</text>{{g_filters.get_card_price(data,card_list,0)}}</view> | ||
| 259 | + </view> | ||
| 260 | + | ||
| 261 | + | ||
| 262 | + <!-- 等级卡的显示,购买, 等级卡近30天要显示续费--> | ||
| 263 | + <block wx:if="{{g_filters.is_has_rank(rank_switch,data)}}"> | ||
| 264 | + <view wx:if="{{!card_field }}"> | ||
| 265 | + <view class="beauty-makeup-frame flex ai-center"> | ||
| 266 | + <view class="left flex ai-center"> | ||
| 267 | + <view class="flex ai-center grade-card-frame card-frame advert-card"style="max-width:32%;width:auto" > | ||
| 268 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 269 | + <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> | ||
| 270 | + </view> | ||
| 271 | + <view class="card-effect"> | ||
| 272 | + <view class="fs24 xc-black3">成为黄钻卡会员立<text class="co-red">省{{data.market_price-g_filters.get_card_price(data,card_list,0)}}</text>元</view> | ||
| 273 | + <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> | ||
| 274 | + </view> | ||
| 275 | + </view> | ||
| 276 | + <view class="right flex jc-center ai-center" bindtap="go_plus"> | ||
| 277 | + <view class="at_once_carde xc-black3 fs28">立即开卡</view> | ||
| 278 | + <view class="bg_right"></view> | ||
| 279 | + </view> | ||
| 280 | + | ||
| 281 | + </view> | ||
| 282 | + </view> | ||
| 283 | + <!-- 立即续费的显示 --> | ||
| 284 | + <view wx:elif="{{is_near_date}}"> | ||
| 285 | + <view class="beauty-makeup-frame flex ai-center"> | ||
| 286 | + <view class="left flex ai-center"> | ||
| 287 | + <view class="flex ai-center grade-card-frame card-frame advert-card"style="max-width:32%;width:auto" > | ||
| 288 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 289 | + <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | ||
| 290 | + </view> | ||
| 291 | + <view class="card-effect"> | ||
| 292 | + <view class="fs24 xc-black3">成为{{card_name}}立<text class="co-red">省{{data.market_price-data[card_field]}}</text>元</view> | ||
| 293 | + <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> | ||
| 294 | + </view> | ||
| 295 | + </view> | ||
| 296 | + <view class="right flex jc-center ai-center" bindtap="go_card_info"> | ||
| 297 | + <view class="at_once_carde xc-black3 fs28">立即续费</view> | ||
| 298 | + <view class="bg_right"></view> | ||
| 299 | + </view> | ||
| 300 | + | ||
| 301 | + </view> | ||
| 302 | + | ||
| 303 | + </view> | ||
| 304 | + | ||
| 305 | + </block> | ||
| 306 | + | ||
| 307 | + | ||
| 308 | + | ||
| 309 | + | ||
| 310 | + | ||
| 311 | + | ||
| 312 | + | ||
| 313 | + | ||
| 314 | + <!-- 商品名称 --> | ||
| 250 | <view wx:if="{{prom_type!=1}}"> | 315 | <view wx:if="{{prom_type!=1}}"> |
| 251 | <view class="goods-title"> | 316 | <view class="goods-title"> |
| 252 | <view class="goods-name elli">{{data.goods_name}}</view> | 317 | <view class="goods-name elli">{{data.goods_name}}</view> |
| @@ -254,7 +319,7 @@ | @@ -254,7 +319,7 @@ | ||
| 254 | </view> | 319 | </view> |
| 255 | 320 | ||
| 256 | <view class="goods-num" wx:if="{{prom_type!=1}}"> | 321 | <view class="goods-num" wx:if="{{prom_type!=1}}"> |
| 257 | - <view class="sales">销量:{{data.sales_sum}}件</view> | 322 | + <view class="sales">销量:{{data.sales_sum}}件</view> |
| 258 | <view class="stock">折扣:{{data.disc}}折</view> | 323 | <view class="stock">折扣:{{data.disc}}折</view> |
| 259 | <view class="stock">{{categories3[0].num}}人评价</view> | 324 | <view class="stock">{{categories3[0].num}}人评价</view> |
| 260 | </view> | 325 | </view> |
| @@ -273,7 +338,7 @@ | @@ -273,7 +338,7 @@ | ||
| 273 | </view> | 338 | </view> |
| 274 | </view> | 339 | </view> |
| 275 | </view> | 340 | </view> |
| 276 | - | 341 | + <view style='height:42rpx'></view> |
| 277 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0}}"> | 342 | <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0}}"> |
| 278 | {{data.goods_name}} | 343 | {{data.goods_name}} |
| 279 | </view> | 344 | </view> |
| @@ -300,37 +365,6 @@ | @@ -300,37 +365,6 @@ | ||
| 300 | 365 | ||
| 301 | </view> | 366 | </view> |
| 302 | </block> | 367 | </block> |
| 303 | - | ||
| 304 | - <!-- 门店收货地址 --> | ||
| 305 | - <view class="xc-address_frame flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}" > | ||
| 306 | - <view class="address_frame" bindtap="choice_store" data-ind="0"> | ||
| 307 | - <view class="flex-vertical-between "> | ||
| 308 | - <view class="flex-vertical select_store_height"> | ||
| 309 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 310 | - <view class="fs30 xc-ash-9f">选择门店</view> | ||
| 311 | - </view> | ||
| 312 | - <view class="red_bb fs32"> | ||
| 313 | - 更多门店 | ||
| 314 | - <text class="bg_jj"></text> | ||
| 315 | - </view> | ||
| 316 | - </view> | ||
| 317 | - | ||
| 318 | - <view wx:if="{{def_pick_store}}"> | ||
| 319 | - <view class="flex-space-between address ai_end "> | ||
| 320 | - <view> | ||
| 321 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 322 | - </view> | ||
| 323 | - <view class="distance fs24"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 324 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 325 | - | ||
| 326 | - </view> | ||
| 327 | - </view> | ||
| 328 | - <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | ||
| 329 | - </view> | ||
| 330 | - </view> | ||
| 331 | - | ||
| 332 | - </view> | ||
| 333 | - | ||
| 334 | <!--许程 7.24暂时注释 --> | 368 | <!--许程 7.24暂时注释 --> |
| 335 | <view wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}"> | 369 | <view wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}"> |
| 336 | <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> | 370 | <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> |
| @@ -372,16 +406,16 @@ | @@ -372,16 +406,16 @@ | ||
| 372 | <view class="xc_comment-left"> | 406 | <view class="xc_comment-left"> |
| 373 | <view class="xc_comment-user"> | 407 | <view class="xc_comment-user"> |
| 374 | <view class="xc_user-img"> | 408 | <view class="xc_user-img"> |
| 375 | - <image class="xc_imgs" src='{{item.is_anonymous!=1?item.head_pic:iurl+"/miniapp/images/hui_hear_pic.png"}}' binderror="bind_bnerr2" data-errorimg="fir_comments[{{index}}].head_pic"></image> | 409 | + <image class="xc_imgs" src='{{item.head_pic}}' binderror="bind_bnerr2" data-errorimg="fir_comments[{{index}}].head_pic"></image> |
| 376 | </view> | 410 | </view> |
| 377 | 411 | ||
| 378 | <view class="xc_user"> | 412 | <view class="xc_user"> |
| 379 | - <view class="xc_user-name five-level-word">{{item.is_anonymous!=1?item.username:'匿名'}}</view> | 413 | + <view class="xc_user-name five-level-word">{{item.username}}</view> |
| 380 | <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | 414 | <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> |
| 381 | </view> | 415 | </view> |
| 382 | </view> | 416 | </view> |
| 383 | - <view class="xc_comment-font pj_word_size ellipsis-2"> | ||
| 384 | - {{item.content?item.content:''}} | 417 | + <view class="xc_comment-font pj_word_size ellipsis-3"> |
| 418 | + {{item.content?item.content:''}} | ||
| 385 | </view> | 419 | </view> |
| 386 | <view class="xc_comment-val"> | 420 | <view class="xc_comment-val"> |
| 387 | <view class="xc_comment-time">{{item.add_time}}</view> | 421 | <view class="xc_comment-time">{{item.add_time}}</view> |
| @@ -389,8 +423,7 @@ | @@ -389,8 +423,7 @@ | ||
| 389 | </view> | 423 | </view> |
| 390 | </view> | 424 | </view> |
| 391 | <view class="xc_goods-img-frame"> | 425 | <view class="xc_goods-img-frame"> |
| 392 | - <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> | ||
| 393 | - <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image> | 426 | + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> |
| 394 | <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> | 427 | <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> |
| 395 | </view> | 428 | </view> |
| 396 | </view> | 429 | </view> |
| @@ -464,7 +497,7 @@ | @@ -464,7 +497,7 @@ | ||
| 464 | <text>规格</text> | 497 | <text>规格</text> |
| 465 | </view> | 498 | </view> |
| 466 | <view class="item_right"> | 499 | <view class="item_right"> |
| 467 | - <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text> | 500 | + <text>{{data.goods_spec==""?"规格1":data.goods_spec}}</text> |
| 468 | </view> | 501 | </view> |
| 469 | </view> | 502 | </view> |
| 470 | <view class="tb_item tb-l"> | 503 | <view class="tb_item tb-l"> |
| @@ -513,7 +546,7 @@ | @@ -513,7 +546,7 @@ | ||
| 513 | 546 | ||
| 514 | </view> | 547 | </view> |
| 515 | 548 | ||
| 516 | - <!------------商品详情图片页面----------------> | 549 | + <!------------商品详情图片页面--------------> |
| 517 | <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> | 550 | <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> |
| 518 | <view class="table_s"> | 551 | <view class="table_s"> |
| 519 | <view class="tb_item tb-l"> | 552 | <view class="tb_item tb-l"> |
| @@ -586,7 +619,7 @@ | @@ -586,7 +619,7 @@ | ||
| 586 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | 619 | <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> |
| 587 | </view> | 620 | </view> |
| 588 | </view> | 621 | </view> |
| 589 | - <!---------------评价页面--------------> | 622 | + <!------------评价页面--------------> |
| 590 | <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> | 623 | <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> |
| 591 | <view class="topframe"> | 624 | <view class="topframe"> |
| 592 | <view class="topframe-top"> | 625 | <view class="topframe-top"> |
| @@ -606,33 +639,26 @@ | @@ -606,33 +639,26 @@ | ||
| 606 | <view style='border-bottom:4rpx solid #eee;'> | 639 | <view style='border-bottom:4rpx solid #eee;'> |
| 607 | <view class="middle"> | 640 | <view class="middle"> |
| 608 | <view class="middle-img-frame"> | 641 | <view class="middle-img-frame"> |
| 609 | - <image class="middle-img" src="{{item.is_anonymous!=1?item.head_pic:iurl+'/miniapp/images/hui_hear_pic.png'}}" binderror="bind_bnerr2" data-errorimg="comments[{{cIdx}}].head_pic"></image> | 642 | + <image class="middle-img" src="{{item.head_pic}}" binderror="bind_bnerr2" data-errorimg="comments[{{cIdx}}].head_pic"></image> |
| 610 | <view class="middle-user-frame"> | 643 | <view class="middle-user-frame"> |
| 611 | - <view class="middle-user">{{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}}</view> | 644 | + <view class="middle-user">{{item.username==''?'匿名用户':item.username}}</view> |
| 612 | <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | 645 | <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> |
| 613 | </view> | 646 | </view> |
| 614 | </view> | 647 | </view> |
| 615 | <view class="xc-pirces"> | 648 | <view class="xc-pirces"> |
| 616 | - <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" > | 649 | + <text class="middle-font"> |
| 617 | {{item.content?item.content:''}} | 650 | {{item.content?item.content:''}} |
| 618 | - </view> | 651 | + </text> |
| 619 | </view> | 652 | </view> |
| 620 | - <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'>全部显示</view> | ||
| 621 | - <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'>收起</view> | ||
| 622 | <view class="img-ul"> | 653 | <view class="img-ul"> |
| 654 | + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | ||
| 655 | + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" | ||
| 656 | + data-id="{{index}}" src="{{iurl}}{{item}}"></image> | ||
| 657 | + </view> | ||
| 658 | + </view> | ||
| 623 | 659 | ||
| 624 | - <block wx:if="{{item.source_type==0}}"> | ||
| 625 | - <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | ||
| 626 | - <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" | ||
| 627 | - data-id="{{index}}" src="{{iurl}}{{item}}"></image> | ||
| 628 | - </view> | ||
| 629 | - </block> | ||
| 630 | - <block wx:if="{{item.source_type==1}}"> | ||
| 631 | - <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem"> | ||
| 632 | - <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" | ||
| 633 | - data-id="{{index}}" src="{{aitem}}"></image> | ||
| 634 | - </view> | ||
| 635 | - </block> | 660 | + <view class="iddle-goods-img"> |
| 661 | + <image bindtap="previewCommentImgs" class="goods-img" wx:for="{{item.img}}" wx:key="{{index}}" data-cidx="{{cIdx}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image> | ||
| 636 | </view> | 662 | </view> |
| 637 | 663 | ||
| 638 | <view class="z_parameter"> | 664 | <view class="z_parameter"> |
| @@ -654,11 +680,8 @@ | @@ -654,11 +680,8 @@ | ||
| 654 | </view> | 680 | </view> |
| 655 | </view> | 681 | </view> |
| 656 | </block> | 682 | </block> |
| 657 | - <block wx:if="{{(!comments || comments.length==0) && get_c }}"> | ||
| 658 | - <text class="no_pj_list">暂无评价</text> | ||
| 659 | - </block> | ||
| 660 | - <block wx:if="{{comments.length>10 && comments_no_more}}"> | ||
| 661 | - <text class="no_pj_list">已经加载到底部</text> | 683 | + <block wx:if="{{comments.length==0 && get_c}}"> |
| 684 | + <text class="no_pj_list">暂无评价</text> | ||
| 662 | </block> | 685 | </block> |
| 663 | </view> | 686 | </view> |
| 664 | </view> | 687 | </view> |
| @@ -667,7 +690,6 @@ | @@ -667,7 +690,6 @@ | ||
| 667 | <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> | 690 | <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> |
| 668 | <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> | 691 | <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> |
| 669 | </view> | 692 | </view> |
| 670 | - | ||
| 671 | <!-------------------底部按钮--------------------> | 693 | <!-------------------底部按钮--------------------> |
| 672 | <view class="join-cart"> | 694 | <view class="join-cart"> |
| 673 | <view bindtap="contactService" class="custom-service cart-ico new_split"> | 695 | <view bindtap="contactService" class="custom-service cart-ico new_split"> |
| @@ -686,19 +708,15 @@ | @@ -686,19 +708,15 @@ | ||
| 686 | <view>购物车</view> | 708 | <view>购物车</view> |
| 687 | </navigator> | 709 | </navigator> |
| 688 | </view> | 710 | </view> |
| 689 | - <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}">立即购买</view> | 711 | + <!---<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}">立即购买</view>--> |
| 712 | + <block wx:if="{{prom_type==0}}"> | ||
| 690 | 713 | ||
| 691 | - <!---- 普通商品购买 -----> | ||
| 692 | - <block wx:if="{{prom_type==0 || prom_type==2 || prom_type==3 || prom_type==4}}"> | ||
| 693 | - | ||
| 694 | - <block wx:if="{{sele_g.store_count>0}}"> | ||
| 695 | - <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | ||
| 696 | - <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> | 714 | + <block wx:if="{{data.store_count>0}}"> |
| 715 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | ||
| 716 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> | ||
| 697 | </block> | 717 | </block> |
| 698 | - <block wx:else> | ||
| 699 | - <view class="is_stock cart-btn is_stock xc-ash-b " style="width:55.5%"> | ||
| 700 | - 库存不足 | ||
| 701 | - </view> | 718 | + <block wx:else> |
| 719 | + <view data-ind="1" class="join-btn cart-btn no_store">库存不足</view> | ||
| 702 | </block> | 720 | </block> |
| 703 | 721 | ||
| 704 | </block> | 722 | </block> |
| @@ -723,7 +741,13 @@ | @@ -723,7 +741,13 @@ | ||
| 723 | <!-------拼单--------> | 741 | <!-------拼单--------> |
| 724 | <block wx:if="{{prom_type==6}}"> | 742 | <block wx:if="{{prom_type==6}}"> |
| 725 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> | 743 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> |
| 726 | - <view class="fir-v">¥{{filters.toFix(data.shop_price,2)}}</view> | 744 | + <block wx:if="{{card_field && data[card_field]>0}}"> |
| 745 | + <view class="fir-v">¥{{filters.toFix(data[card_field],2)}}</view> | ||
| 746 | + </block> | ||
| 747 | + <block wx:else> | ||
| 748 | + <view class="fir-v">¥{{filters.toFix(data.shop_price,2)}}</view> | ||
| 749 | + </block> | ||
| 750 | + | ||
| 727 | <view>单独购买</view> | 751 | <view>单独购买</view> |
| 728 | </view> | 752 | </view> |
| 729 | 753 | ||
| @@ -770,75 +794,59 @@ | @@ -770,75 +794,59 @@ | ||
| 770 | <nav_box></nav_box> | 794 | <nav_box></nav_box> |
| 771 | 795 | ||
| 772 | </block> | 796 | </block> |
| 797 | + | ||
| 773 | <!----弹起来,选择规格数量,普通商品购买和秒杀------> | 798 | <!----弹起来,选择规格数量,普通商品购买和秒杀------> |
| 774 | <view hidden="{{!openSpecModal}}"> | 799 | <view hidden="{{!openSpecModal}}"> |
| 775 | <view bindtap="closeSpecModal" class="cover-layer"></view> | 800 | <view bindtap="closeSpecModal" class="cover-layer"></view> |
| 776 | <view class="spec-model"> | 801 | <view class="spec-model"> |
| 777 | - <view class="pding"> | ||
| 778 | - <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | 802 | + <view class="pding"> |
| 803 | + <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | ||
| 779 | <view class="spec-goods"> | 804 | <view class="spec-goods"> |
| 780 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 805 | + <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
| 781 | <view class="spec-goods-info"> | 806 | <view class="spec-goods-info"> |
| 782 | - <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> | ||
| 783 | - <view class="flex ai_end xc-val-money"> | ||
| 784 | - <view class="spec-goods-price" wx:if="{{prom_price==null}}"><text class="fs20">¥</text>{{sele_g.shop_price}}</view> | ||
| 785 | - <view class="spec-goods-price" wx:else><text class="fs20">¥</text>{{prom_price}}</view> | ||
| 786 | - </view> | ||
| 787 | - | 807 | + <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> |
| 808 | + <view class="spec-goods-price" wx:if="{{prom_price==null}}"> | ||
| 809 | + <!-- 如果是等级会员,且有等级价 --> | ||
| 810 | + <block wx:if="card_field && sele_g[card_field]>0"> | ||
| 811 | + ¥ {{sele_g[card_field]}} | ||
| 812 | + </block> | ||
| 813 | + <block wx:else> | ||
| 814 | + ¥ {{sele_g.shop_price}} | ||
| 815 | + </block> | ||
| 816 | + </view> | ||
| 817 | + <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | ||
| 788 | <block wx:if="{{prom_type==0}}"> | 818 | <block wx:if="{{prom_type==0}}"> |
| 789 | - <view class="flex"> | ||
| 790 | <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | 819 | <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> |
| 791 | <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | 820 | <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> |
| 792 | - | ||
| 793 | - </view> | 821 | + <view class="spec-goods-stock">已选:{{sele_g.gg}}</view> |
| 794 | </block> | 822 | </block> |
| 795 | <block wx:if="{{prom_type==1}}"> | 823 | <block wx:if="{{prom_type==1}}"> |
| 796 | - <view class="flex"> | ||
| 797 | <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num+prom_act.virtual}}</view> | 824 | <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num+prom_act.virtual}}</view> |
| 798 | <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> | 825 | <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> |
| 799 | <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | 826 | <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> |
| 800 | - | ||
| 801 | - | ||
| 802 | - </view> | 827 | + <view class="spec-goods-stock">已选:{{sele_g.gg}}</view> |
| 803 | </block> | 828 | </block> |
| 804 | </view> | 829 | </view> |
| 805 | - | ||
| 806 | - <!-- 选择门店模块 --> | ||
| 807 | - <view class="flex-space-between address ai_end xc-width "> | ||
| 808 | - | ||
| 809 | - <view class="flex ai_end" wx:if="{{def_pick_store}}"> | ||
| 810 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 811 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 812 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 813 | - | ||
| 814 | - </view> | ||
| 815 | - </view> | ||
| 816 | - | ||
| 817 | - <!-- 没有门店的时候 --> | ||
| 818 | - <view class="flex" bindtap="choice_store"wx:else> | ||
| 819 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 820 | - <view class="fs28 xc-ash-9f">选择门店</view> | ||
| 821 | - </view> | ||
| 822 | - | ||
| 823 | - <view class="red-co fs28" bindtap="choice_store" > | ||
| 824 | - 更多门店 | ||
| 825 | - <text class="right-arrow"></text> | ||
| 826 | - </view> | ||
| 827 | - </view> | ||
| 828 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view> | ||
| 829 | - </view> | ||
| 830 | - | 830 | + </view> |
| 831 | <!----商品的属性项目----> | 831 | <!----商品的属性项目----> |
| 832 | - <view class="xc-goods-attribute"> | ||
| 833 | <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> | 832 | <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> |
| 834 | <view hidden="{{ismend==1}}" class="flex"> | 833 | <view hidden="{{ismend==1}}" class="flex"> |
| 835 | <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | 834 | <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> |
| 836 | {{item.gg}} | 835 | {{item.gg}} |
| 837 | </view> | 836 | </view> |
| 838 | </view> | 837 | </view> |
| 839 | -</view> | ||
| 840 | - | ||
| 841 | 838 | ||
| 839 | + <!----点击选择门店的时候要隐藏----> | ||
| 840 | + <view hidden="{{ismend==1}}"> | ||
| 841 | + <view bindtap="getmendian" class="quhuo logistics-item"> | ||
| 842 | + <view wx:if="{{sto_sele_name==''}}">取货门店 | ||
| 843 | + <text class='small'>(选择门店)</text> | ||
| 844 | + </view> | ||
| 845 | + <view wx:else>取货门店({{sto_sele_name}})</view> | ||
| 846 | + <view class="item-img"> | ||
| 847 | + <image class="wh100" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> | ||
| 848 | + </view> | ||
| 849 | + </view> | ||
| 842 | <view class="b_num"> | 850 | <view class="b_num"> |
| 843 | <view>购买数量</view> | 851 | <view>购买数量</view> |
| 844 | <view class="count"> | 852 | <view class="count"> |
| @@ -848,14 +856,6 @@ | @@ -848,14 +856,6 @@ | ||
| 848 | </view> | 856 | </view> |
| 849 | </view> | 857 | </view> |
| 850 | </view> | 858 | </view> |
| 851 | - <view class="spec-cart-btns"> | ||
| 852 | - | ||
| 853 | - | ||
| 854 | - <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart"data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow fs32" data-action="add">加入购物车</view> | ||
| 855 | - <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart"data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | ||
| 856 | - | ||
| 857 | - </view> | ||
| 858 | - | ||
| 859 | <view class="clear"></view> | 859 | <view class="clear"></view> |
| 860 | <!---选择门店的列表---> | 860 | <!---选择门店的列表---> |
| 861 | <view hidden="{{ismend==0}}" class="sto_v"> | 861 | <view hidden="{{ismend==0}}" class="sto_v"> |
| @@ -881,72 +881,51 @@ | @@ -881,72 +881,51 @@ | ||
| 881 | </view> | 881 | </view> |
| 882 | </view> | 882 | </view> |
| 883 | </view> | 883 | </view> |
| 884 | - | 884 | + <view class="spec-cart-btns"> |
| 885 | + <block> | ||
| 886 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" class="spec-cart-btn spec-buy" data-action="add">加入购物车</view> | ||
| 887 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | ||
| 888 | + </block> | ||
| 889 | + </view> | ||
| 890 | + </view> | ||
| 885 | </view> | 891 | </view> |
| 892 | + | ||
| 886 | <!----弹起来,选择规格数量,拼单商品购买------> | 893 | <!----弹起来,选择规格数量,拼单商品购买------> |
| 887 | <view hidden="{{!openSpecModal_pt}}"> | 894 | <view hidden="{{!openSpecModal_pt}}"> |
| 888 | <view bindtap="closeSpecModal" class="cover-layer"></view> | 895 | <view bindtap="closeSpecModal" class="cover-layer"></view> |
| 889 | <view class="spec-model"> | 896 | <view class="spec-model"> |
| 890 | <view class="pding"> | 897 | <view class="pding"> |
| 891 | <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | 898 | <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> |
| 892 | - | ||
| 893 | - <!-- 商品名称 --> | ||
| 894 | <view class="spec-goods"> | 899 | <view class="spec-goods"> |
| 895 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | 900 | + <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> |
| 896 | <view class="spec-goods-info"> | 901 | <view class="spec-goods-info"> |
| 897 | - <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> | ||
| 898 | - <view class="flex ai_end xc-val-money"> | ||
| 899 | - <view class="spec-goods-price" wx:if="{{is_normal==1}}">¥ {{sele_g.shop_price}}</view> | ||
| 900 | - <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | ||
| 901 | - </view> | 902 | + <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> |
| 903 | + <view class="spec-goods-price" wx:if="{{is_normal==1}}"> | ||
| 904 | + <!-- 如果是等级会员,且有等级价 --> | ||
| 905 | + <block wx:if="card_field && sele_g[card_field]>0"> | ||
| 906 | + ¥ {{sele_g[card_field]}} | ||
| 907 | + </block> | ||
| 908 | + <block wx:else> | ||
| 909 | + ¥ {{sele_g.shop_price}} | ||
| 910 | + </block> | ||
| 911 | + </view> | ||
| 912 | + <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | ||
| 902 | 913 | ||
| 903 | - <block wx:if="{{is_normal==1}}"> | ||
| 904 | - <view class="flex"> | ||
| 905 | - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
| 906 | - <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | ||
| 907 | - </view> | ||
| 908 | - </block> | ||
| 909 | <block wx:if="{{is_normal==0}}"> | 914 | <block wx:if="{{is_normal==0}}"> |
| 910 | - <view class="flex"> | ||
| 911 | - <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num}}</view> | ||
| 912 | - <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> | ||
| 913 | - <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | ||
| 914 | - </view> | 915 | + <view class="spec-goods-stock">已售:{{prom_act.buy_num}}</view> |
| 916 | + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | ||
| 917 | + <view class="spec-goods-stock">已选:{{sele_g.gg}}</view> | ||
| 918 | + </block> | ||
| 919 | + <block wx:else> | ||
| 920 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
| 921 | + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | ||
| 922 | + <view class="spec-goods-stock">已选:{{sku_g_pt[0].gg}}</view> | ||
| 915 | </block> | 923 | </block> |
| 916 | </view> | 924 | </view> |
| 917 | - | ||
| 918 | - </view> | ||
| 919 | - | ||
| 920 | - | ||
| 921 | - | ||
| 922 | - <view style="clear: both"></view> | ||
| 923 | - <view style="margin-top: 20rpx"> | ||
| 924 | - <view class="flex-space-between address ai_end xc-width "> | ||
| 925 | - | ||
| 926 | - <view class="flex ai_end" wx:if="{{def_pick_store}}"> | ||
| 927 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 928 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 929 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 930 | - | ||
| 931 | - </view> | ||
| 932 | - </view> | ||
| 933 | - | ||
| 934 | - <!-- 没有门店的时候 --> | ||
| 935 | - <view class="flex" bindtap="choice_store"wx:else> | ||
| 936 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 937 | - <view class="fs28 xc-ash-9f">选择门店</view> | ||
| 938 | - </view> | ||
| 939 | - | ||
| 940 | - <view class="red-co fs28" bindtap="choice_store" > | ||
| 941 | - 更多门店 | ||
| 942 | - <text class="right-arrow"></text> | ||
| 943 | - </view> | ||
| 944 | - </view> | ||
| 945 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view> | ||
| 946 | </view> | 925 | </view> |
| 947 | <!----商品的属性项目----> | 926 | <!----商品的属性项目----> |
| 948 | - <view> | ||
| 949 | <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> | 927 | <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> |
| 928 | + | ||
| 950 | <block wx:if="{{is_normal==0}}"> | 929 | <block wx:if="{{is_normal==0}}"> |
| 951 | <view hidden="{{ismend==1}}" class="flex"> | 930 | <view hidden="{{ismend==1}}" class="flex"> |
| 952 | <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} | 931 | <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} |
| @@ -961,26 +940,22 @@ | @@ -961,26 +940,22 @@ | ||
| 961 | </view> | 940 | </view> |
| 962 | </block> | 941 | </block> |
| 963 | <view class="clear"></view> | 942 | <view class="clear"></view> |
| 964 | - </view> | ||
| 965 | - | ||
| 966 | - | ||
| 967 | - <view> | ||
| 968 | - <!--<view bindtap="getmendian" class="quhuo logistics-item" hidden="{{ismend==1}}">--> | ||
| 969 | - <!--<view wx:if="{{sto_sele_name==''}}">取货门店--> | ||
| 970 | - <!--<text class='small'>(选择门店)</text>--> | ||
| 971 | - <!--</view>--> | ||
| 972 | - <!--<view wx:else>{{sto_sele_name}}</view>--> | ||
| 973 | - <!--<view class="item-img">--> | ||
| 974 | - <!--<image class="wh100" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image>--> | ||
| 975 | - <!--</view>--> | ||
| 976 | - <!--</view>--> | ||
| 977 | 943 | ||
| 978 | - | ||
| 979 | - <view class="b_num" hidden="{{ismend==1}}" style="margin-top: 20rpx"> | 944 | + <view> |
| 945 | + <view bindtap="getmendian" class="quhuo logistics-item" hidden="{{ismend==1}}"> | ||
| 946 | + <view wx:if="{{sto_sele_name==''}}">取货门店 | ||
| 947 | + <text class='small'>(选择门店)</text> | ||
| 948 | + </view> | ||
| 949 | + <view wx:else>{{sto_sele_name}}</view> | ||
| 950 | + <view class="item-img"> | ||
| 951 | + <image class="wh100" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image> | ||
| 952 | + </view> | ||
| 953 | + </view> | ||
| 954 | + <view class="b_num" hidden="{{ismend==1}}"> | ||
| 980 | <view>购买数量</view> | 955 | <view>购买数量</view> |
| 981 | <view class="count"> | 956 | <view class="count"> |
| 982 | <view bindtap="subCartNum" class="sub">-</view> | 957 | <view bindtap="subCartNum" class="sub">-</view> |
| 983 | - <input bindblur="inputCartNum xc-val-fream" type="number" value="{{goodsInputNum}}"></input> | 958 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> |
| 984 | <view bindtap="addCartNum" class="add">+</view> | 959 | <view bindtap="addCartNum" class="add">+</view> |
| 985 | </view> | 960 | </view> |
| 986 | </view> | 961 | </view> |
| @@ -993,7 +968,7 @@ | @@ -993,7 +968,7 @@ | ||
| 993 | </view> | 968 | </view> |
| 994 | <!-----第一级显示------> | 969 | <!-----第一级显示------> |
| 995 | <view class="itemlists" hidden="{{is_sec_mend==1}}"> | 970 | <view class="itemlists" hidden="{{is_sec_mend==1}}"> |
| 996 | - <block wx:if="{{is_show_sto_cat>0}}"> | 971 | + <block wx:if="{{is_show_sto_cat}}"> |
| 997 | <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}">{{item.name}}</view> | 972 | <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}">{{item.name}}</view> |
| 998 | </block> | 973 | </block> |
| 999 | <block wx:else> | 974 | <block wx:else> |
| @@ -1010,13 +985,12 @@ | @@ -1010,13 +985,12 @@ | ||
| 1010 | </view> | 985 | </view> |
| 1011 | </view> | 986 | </view> |
| 1012 | </view> | 987 | </view> |
| 1013 | - </view> | 988 | + </view> |
| 1014 | <view class="pt_qd"> | 989 | <view class="pt_qd"> |
| 1015 | <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> | 990 | <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> |
| 1016 | </view> | 991 | </view> |
| 1017 | </view> | 992 | </view> |
| 1018 | </view> | 993 | </view> |
| 1019 | -<!----弹起来优惠信息------> | ||
| 1020 | <view hidden="{{!openPromModal}}"> | 994 | <view hidden="{{!openPromModal}}"> |
| 1021 | <view bindtap="closePromModal" class="cover-layer"></view> | 995 | <view bindtap="closePromModal" class="cover-layer"></view> |
| 1022 | <view class="prom-model"> | 996 | <view class="prom-model"> |
| @@ -1071,7 +1045,7 @@ | @@ -1071,7 +1045,7 @@ | ||
| 1071 | <view class="xc-frame"> | 1045 | <view class="xc-frame"> |
| 1072 | <view class="top-frame"> | 1046 | <view class="top-frame"> |
| 1073 | <view class="xc-coupon-frame "> | 1047 | <view class="xc-coupon-frame "> |
| 1074 | - <!---单张的券---> | 1048 | + <!--单张的券--> |
| 1075 | <view class="rel" wx:for="{{quan_list}}" wx:key="{{index}}"> | 1049 | <view class="rel" wx:for="{{quan_list}}" wx:key="{{index}}"> |
| 1076 | <view class="coupon flex"> | 1050 | <view class="coupon flex"> |
| 1077 | <view class="circle xc-circular-one"></view> | 1051 | <view class="circle xc-circular-one"></view> |
| @@ -1106,151 +1080,9 @@ | @@ -1106,151 +1080,9 @@ | ||
| 1106 | </view> | 1080 | </view> |
| 1107 | </view> | 1081 | </view> |
| 1108 | 1082 | ||
| 1109 | -<!-- 选择门店的弹框,1.1版最新的 --> | ||
| 1110 | -<block wx:if="{{store==1}}"> | ||
| 1111 | - <view class="mongolia-layer" bindtap="close_popup"></view> | ||
| 1112 | - <view class="popup-frame"> | ||
| 1113 | - <block wx:if="{{sort_store==0}}"> | ||
| 1114 | - <!-- 头部 标题 --> | ||
| 1115 | - <view class="popup-top flex-space-between"> | ||
| 1116 | - <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | ||
| 1117 | - <view> | ||
| 1118 | - <view> | ||
| 1119 | - <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
| 1120 | - </view> | ||
| 1121 | - <view class="felx choose_more" bindtap="more_store"> | ||
| 1122 | - <text class="fs26 red-co" wx:if="{{is_show_sto_cat}}">{{choice_sort_store==0?'更多门店':'返回'}}</text> | ||
| 1123 | - <view class="bg_rights" wx:if="{{is_show_sto_cat}}"></view> | ||
| 1124 | - </view> | ||
| 1125 | - </view> | ||
| 1126 | - </view> | ||
| 1127 | - <!-- 门店列表,最外层的门店列表,一开始 --> | ||
| 1128 | - <view class="store-list"> | ||
| 1129 | - <!--如果还没有点击更多门店的时候 --> | ||
| 1130 | - <block wx:if="{{choice_sort_store==0}}"> | ||
| 1131 | - <!-- 需要for循环 --> | ||
| 1132 | - <block wx:if="{{is_show_sto_cat==1}}"> | ||
| 1133 | - <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
| 1134 | - <view class="store flex-vertical"> | ||
| 1135 | - <!-- 需要点击事件 --> | ||
| 1136 | - <block wx:if="{{index==fir_pick_index}}"> | ||
| 1137 | - <view class="circle white xc-hook fs20 red-b">Г</view> | ||
| 1138 | - </block> | ||
| 1139 | - <block wx:else> | ||
| 1140 | - <view class="circle xc-hooks"></view> | ||
| 1141 | - </block> | ||
| 1142 | - <view class="address-frame xc-ash"> | ||
| 1143 | - <view class="flex-vertical-between butttem5"> | ||
| 1144 | - <view class="flex xc-ash"> | ||
| 1145 | - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | ||
| 1146 | - </view> | ||
| 1147 | - <view> | ||
| 1148 | - <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> | ||
| 1149 | - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view> | ||
| 1150 | - </view> | ||
| 1151 | - </view> | ||
| 1152 | - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
| 1153 | - </view> | ||
| 1154 | - </view> | ||
| 1155 | - </view> | ||
| 1156 | - </block> | ||
| 1157 | - <block wx:else> | ||
| 1158 | - <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
| 1159 | - <view class="store flex-vertical"> | ||
| 1160 | - <!-- 需要点击事件 --> | ||
| 1161 | - <block wx:if="{{index==fir_pick_index}}" > | ||
| 1162 | - <view class="circle white xc-hook fs20 red-b">Г</view> | ||
| 1163 | - </block> | ||
| 1164 | - <block wx:else> | ||
| 1165 | - <view class="circle xc-hooks"></view> | ||
| 1166 | - </block> | ||
| 1167 | - | ||
| 1168 | - <view class="address-frame xc-ash"> | ||
| 1169 | - <view class="flex-vertical-between "> | ||
| 1170 | - <view class="flex xc-ash"> | ||
| 1171 | - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | ||
| 1172 | - </view> | ||
| 1173 | - <view> | ||
| 1174 | - <view class="distance fs24 address-val" | ||
| 1175 | - wx:if="{{item.distance!=null}}">距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | ||
| 1176 | - </view> | ||
| 1177 | - </view> | ||
| 1178 | - </view> | ||
| 1179 | - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
| 1180 | - </view> | ||
| 1181 | - </view> | ||
| 1182 | - </view> | ||
| 1183 | - </block> | ||
| 1184 | - </block> | ||
| 1185 | - <block wx:else> <!-- 如果是点击选择门店分类后显示分类下的门店 --> | ||
| 1186 | - <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | ||
| 1187 | - <view class="store flex-vertical"> | ||
| 1188 | - <!-- 需要点击事件 --> | ||
| 1189 | - <block wx:if="{{index==sec_pick_index}}"> | ||
| 1190 | - <view class="circle white xc-hook fs20 red-b">Г</view> | ||
| 1191 | - </block> | ||
| 1192 | - <block wx:else> | ||
| 1193 | - <view class="circle xc-hooks"></view> | ||
| 1194 | - </block> | ||
| 1195 | - | ||
| 1196 | - <view class="address-frame xc-ash"> | ||
| 1197 | - <view class="flex-vertical-between "> | ||
| 1198 | - <view class="flex xc-ash"> | ||
| 1199 | - <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | ||
| 1200 | - </view> | ||
| 1201 | - <view> | ||
| 1202 | - <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view> | ||
| 1203 | - </view> | ||
| 1204 | - </view> | ||
| 1205 | - <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
| 1206 | - </view> | ||
| 1207 | - </view> | ||
| 1208 | - </view> | ||
| 1209 | - </block> | ||
| 1210 | - | ||
| 1211 | - </view> | ||
| 1212 | - | ||
| 1213 | - <!-- 门店列表底部 --> | ||
| 1214 | - <view class="store-bottom-frame"> | ||
| 1215 | - <view class="store-bottom flex-vertical-between"> | ||
| 1216 | - <view class="determine red-b fs28 white t-c" bindtap="sure_pick" | ||
| 1217 | - data-openindstore="{{open_ind_store}}">确定</view> | ||
| 1218 | - <view class="default t-c fs28" bindtap="set_def_pick"data-openindstore="{{open_ind_store}}">设为默认</view> | ||
| 1219 | - </view> | ||
| 1220 | - </view> | ||
| 1221 | - | ||
| 1222 | - </block> | ||
| 1223 | - | ||
| 1224 | - | ||
| 1225 | - <block wx:else> | ||
| 1226 | - <view class="popup-top flex-space-between"> | ||
| 1227 | - <text class="fs32 nearby_store">门店分类选择</text> | ||
| 1228 | - <view> | ||
| 1229 | - <view> | ||
| 1230 | - <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
| 1231 | - </view> | ||
| 1232 | - <view class="felx choose_mores" bindtap="returns"> | ||
| 1233 | - <text class="fs26 red-co">返回</text> | ||
| 1234 | - </view> | ||
| 1235 | - </view> | ||
| 1236 | - </view> | ||
| 1237 | - <view class="sort_store_list"> | ||
| 1238 | - | ||
| 1239 | - <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | ||
| 1240 | - <view class="sort-store flex-vertical-between" > | ||
| 1241 | - <view class="fs30" di>{{item.name}}</view> | ||
| 1242 | - <view class="black_rights-frame"> | ||
| 1243 | - <view class="black_rights"></view> | ||
| 1244 | - </view> | ||
| 1245 | - </view> | ||
| 1246 | - </view> | ||
| 1247 | - | ||
| 1248 | - </view> | ||
| 1249 | - </block> | ||
| 1250 | - </view> | ||
| 1251 | -</block> | ||
| 1252 | - | ||
| 1253 | <!-- ---------------分享弹窗--------------- --> | 1083 | <!-- ---------------分享弹窗--------------- --> |
| 1254 | <!--二维码显示页面--> | 1084 | <!--二维码显示页面--> |
| 1255 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{!canvasHidden}}'></canvas> | 1085 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{!canvasHidden}}'></canvas> |
| 1086 | + | ||
| 1087 | + | ||
| 1256 | <warn id="warn"></warn> | 1088 | <warn id="warn"></warn> |
| 1257 | \ No newline at end of file | 1089 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.wxss
| @@ -6,7 +6,7 @@ image { | @@ -6,7 +6,7 @@ image { | ||
| 6 | .goods-detail{overflow: hidden} | 6 | .goods-detail{overflow: hidden} |
| 7 | 7 | ||
| 8 | .type-navbar { | 8 | .type-navbar { |
| 9 | - display: flex; | 9 | + display: flex; |
| 10 | justify-content: center; | 10 | justify-content: center; |
| 11 | width: 100%; | 11 | width: 100%; |
| 12 | height: 80rpx; | 12 | height: 80rpx; |
| @@ -26,9 +26,6 @@ image { | @@ -26,9 +26,6 @@ image { | ||
| 26 | } | 26 | } |
| 27 | .type-navbar-item { | 27 | .type-navbar-item { |
| 28 | border-bottom: 4rpx solid #fff; | 28 | border-bottom: 4rpx solid #fff; |
| 29 | - display: flex; | ||
| 30 | - justify-content: center; | ||
| 31 | - width: 100%; | ||
| 32 | } | 29 | } |
| 33 | .type-item-on { | 30 | .type-item-on { |
| 34 | border-bottom: 4rpx solid #333; | 31 | border-bottom: 4rpx solid #333; |
| @@ -285,7 +282,6 @@ image { | @@ -285,7 +282,6 @@ image { | ||
| 285 | width: 150rpx; | 282 | width: 150rpx; |
| 286 | height: 150rpx; | 283 | height: 150rpx; |
| 287 | margin-top: 8rpx; | 284 | margin-top: 8rpx; |
| 288 | - margin-right: 10rpx; | ||
| 289 | } | 285 | } |
| 290 | 286 | ||
| 291 | .comment-btn { | 287 | .comment-btn { |
| @@ -325,9 +321,6 @@ image { | @@ -325,9 +321,6 @@ image { | ||
| 325 | height: 100rpx; | 321 | height: 100rpx; |
| 326 | background-color: #fff; | 322 | background-color: #fff; |
| 327 | text-align: center; | 323 | text-align: center; |
| 328 | - z-index: 9; | ||
| 329 | - border-top: 4rpx solid #eee; | ||
| 330 | - | ||
| 331 | } | 324 | } |
| 332 | 325 | ||
| 333 | .join-cart>view { | 326 | .join-cart>view { |
| @@ -362,7 +355,7 @@ image { | @@ -362,7 +355,7 @@ image { | ||
| 362 | .cart-num { | 355 | .cart-num { |
| 363 | position: absolute; | 356 | position: absolute; |
| 364 | left: 50%; | 357 | left: 50%; |
| 365 | - top: 1rpx; | 358 | + top: 0; |
| 366 | width: 40rpx; | 359 | width: 40rpx; |
| 367 | height: 40rpx; | 360 | height: 40rpx; |
| 368 | line-height: 40rpx; | 361 | line-height: 40rpx; |
| @@ -375,19 +368,11 @@ image { | @@ -375,19 +368,11 @@ image { | ||
| 375 | .cart-btn { | 368 | .cart-btn { |
| 376 | font-size: 28rpx; | 369 | font-size: 28rpx; |
| 377 | color: #fff; | 370 | color: #fff; |
| 378 | - line-height: 70rpx; | ||
| 379 | - margin-top: 16rpx; | ||
| 380 | - | ||
| 381 | - | 371 | + line-height: 100rpx; |
| 382 | } | 372 | } |
| 383 | 373 | ||
| 384 | .join-btn { | 374 | .join-btn { |
| 385 | background-color: #ffb03f; | 375 | background-color: #ffb03f; |
| 386 | - height: 70rpx; | ||
| 387 | -border-radius: 55rpx 0rpx 0rpx 55rpx; | ||
| 388 | -margin-top: 16rpx; | ||
| 389 | - | ||
| 390 | - | ||
| 391 | } | 376 | } |
| 392 | 377 | ||
| 393 | view.cart-btn-lg { | 378 | view.cart-btn-lg { |
| @@ -396,9 +381,6 @@ view.cart-btn-lg { | @@ -396,9 +381,6 @@ view.cart-btn-lg { | ||
| 396 | 381 | ||
| 397 | .buy-btn { | 382 | .buy-btn { |
| 398 | background-color: #f23030; | 383 | background-color: #f23030; |
| 399 | - height: 70rpx; | ||
| 400 | -border-radius: 0 56rpx 55rpx 0; | ||
| 401 | - | ||
| 402 | } | 384 | } |
| 403 | 385 | ||
| 404 | .toTop { | 386 | .toTop { |
| @@ -523,23 +505,24 @@ border-radius: 0 56rpx 55rpx 0; | @@ -523,23 +505,24 @@ border-radius: 0 56rpx 55rpx 0; | ||
| 523 | /* padding: 0 30rpx; */ | 505 | /* padding: 0 30rpx; */ |
| 524 | font-size: 32rpx; | 506 | font-size: 32rpx; |
| 525 | box-sizing: border-box; | 507 | box-sizing: border-box; |
| 526 | - border-radius: 20rpx; | ||
| 527 | - height: 72%; | 508 | + |
| 528 | } | 509 | } |
| 529 | 510 | ||
| 530 | .spec-model .pding{padding: 0 30rpx;} | 511 | .spec-model .pding{padding: 0 30rpx;} |
| 531 | 512 | ||
| 532 | .spec-goods { | 513 | .spec-goods { |
| 533 | - padding: 30rpx 0 20rpx; | 514 | + padding: 15rpx 0 10rpx; |
| 534 | float: left; | 515 | float: left; |
| 535 | width: 100%; | 516 | width: 100%; |
| 536 | - border-bottom:2rpx solid #eee; | 517 | + border-bottom: 1px solid #f8f8f8; |
| 537 | } | 518 | } |
| 538 | 519 | ||
| 539 | .spec-img { | 520 | .spec-img { |
| 540 | float: left; | 521 | float: left; |
| 541 | height: 186rpx; | 522 | height: 186rpx; |
| 542 | width: 186rpx; | 523 | width: 186rpx; |
| 524 | + position: relative; | ||
| 525 | + top:-40rpx; | ||
| 543 | border: 4rpx solid #eee | 526 | border: 4rpx solid #eee |
| 544 | } | 527 | } |
| 545 | 528 | ||
| @@ -559,7 +542,7 @@ border-radius: 0 56rpx 55rpx 0; | @@ -559,7 +542,7 @@ border-radius: 0 56rpx 55rpx 0; | ||
| 559 | } | 542 | } |
| 560 | 543 | ||
| 561 | .spec-goods-price { | 544 | .spec-goods-price { |
| 562 | - color: #d60021; | 545 | + color: #ec5151; |
| 563 | font-size: 33rpx; | 546 | font-size: 33rpx; |
| 564 | font-weight: bold; | 547 | font-weight: bold; |
| 565 | } | 548 | } |
| @@ -568,7 +551,6 @@ border-radius: 0 56rpx 55rpx 0; | @@ -568,7 +551,6 @@ border-radius: 0 56rpx 55rpx 0; | ||
| 568 | margin-top: 3rpx; | 551 | margin-top: 3rpx; |
| 569 | font-size: 24rpx; | 552 | font-size: 24rpx; |
| 570 | color: #999999; | 553 | color: #999999; |
| 571 | - margin-right: 15rpx; | ||
| 572 | } | 554 | } |
| 573 | 555 | ||
| 574 | .spec-name { | 556 | .spec-name { |
| @@ -586,7 +568,7 @@ border-radius: 0 56rpx 55rpx 0; | @@ -586,7 +568,7 @@ border-radius: 0 56rpx 55rpx 0; | ||
| 586 | position: fixed; | 568 | position: fixed; |
| 587 | display: flex; | 569 | display: flex; |
| 588 | height: 50rpx; | 570 | height: 50rpx; |
| 589 | - border: 1rpx solid #000; | 571 | + border: 1rpx solid #f8f8f8; |
| 590 | font-size: 28rpx; | 572 | font-size: 28rpx; |
| 591 | right: 30rpx; | 573 | right: 30rpx; |
| 592 | } | 574 | } |
| @@ -599,15 +581,15 @@ border-radius: 0 56rpx 55rpx 0; | @@ -599,15 +581,15 @@ border-radius: 0 56rpx 55rpx 0; | ||
| 599 | text-align: center; | 581 | text-align: center; |
| 600 | } | 582 | } |
| 601 | .spec_bt{ | 583 | .spec_bt{ |
| 602 | - background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; | 584 | + background: fff;color: #333; margin-left: 10rpx;padding: 8rpx 12rpx; border-radius: 5px;font-size: 24rpx;border: 1rpx solid #ccc; |
| 603 | } | 585 | } |
| 604 | -.spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;} | 586 | +.spec_bt.act{background: #C4182E;color: #fff;border: 1rpx solid #C4182E;} |
| 605 | .sub { | 587 | .sub { |
| 606 | - border-right: 1px solid #000; | 588 | + border-right: 1px solid #ddd; |
| 607 | } | 589 | } |
| 608 | 590 | ||
| 609 | .add { | 591 | .add { |
| 610 | - border-left: 1px solid #000; | 592 | + border-left: 1px solid #ddd; |
| 611 | } | 593 | } |
| 612 | 594 | ||
| 613 | .spec-btn { | 595 | .spec-btn { |
| @@ -629,24 +611,22 @@ border-radius: 0 56rpx 55rpx 0; | @@ -629,24 +611,22 @@ border-radius: 0 56rpx 55rpx 0; | ||
| 629 | } | 611 | } |
| 630 | 612 | ||
| 631 | .spec-cart-btns { | 613 | .spec-cart-btns { |
| 632 | - width: 92%; | ||
| 633 | - line-height: 70rpx; | ||
| 634 | - margin: 0rpx auto; | ||
| 635 | - margin-top: 160rpx; | ||
| 636 | - border-radius: 20rpx; | ||
| 637 | -position: fixed; | ||
| 638 | -bottom: 50rpx; | ||
| 639 | -left: 4%; | ||
| 640 | - | 614 | + /* background-color: #f8f8f8; |
| 615 | + margin: 40rpx -30rpx 0; | ||
| 616 | + padding: 20rpx 34rpx; */ | ||
| 617 | + float: left; | ||
| 618 | + width: 100%; | ||
| 619 | + line-height: 80rpx; | ||
| 620 | + margin-top: 40rpx; | ||
| 641 | } | 621 | } |
| 642 | 622 | ||
| 643 | .spec-cart-btn { | 623 | .spec-cart-btn { |
| 644 | - | ||
| 645 | - width:100%; | 624 | + float: left; |
| 625 | + width: 100%; | ||
| 646 | font-size: 30rpx; | 626 | font-size: 30rpx; |
| 647 | text-align: center; | 627 | text-align: center; |
| 648 | color: white; | 628 | color: white; |
| 649 | - border-radius: 40rpx; | 629 | + border-radius: 4rpx; |
| 650 | } | 630 | } |
| 651 | 631 | ||
| 652 | .spec-add-cart { | 632 | .spec-add-cart { |
| @@ -738,8 +718,7 @@ left:31rpx;} | @@ -738,8 +718,7 @@ left:31rpx;} | ||
| 738 | 718 | ||
| 739 | .pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;} | 719 | .pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;} |
| 740 | .pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;} | 720 | .pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;} |
| 741 | -.pding{padding-top: 20rpx;padding-left: 20rpx;height: 81%; | ||
| 742 | - padding-right: 20rpx;font-size: 26rpx;color: #ea120f} | 721 | +.pding{padding-top: 20rpx;padding-left: 20rpx; padding-right: 20rpx;font-size: 26rpx;color: #ea120f} |
| 743 | .pdres{margin-left: 10rpx;color: #8f8f94} | 722 | .pdres{margin-left: 10rpx;color: #8f8f94} |
| 744 | .ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden } | 723 | .ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden } |
| 745 | .shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx} | 724 | .shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx} |
| @@ -762,7 +741,7 @@ left:31rpx;} | @@ -762,7 +741,7 @@ left:31rpx;} | ||
| 762 | .wf .item .item_txy.hs{ background: #cbcbcb;} | 741 | .wf .item .item_txy.hs{ background: #cbcbcb;} |
| 763 | .po{margin-bottom: 20rpx;} | 742 | .po{margin-bottom: 20rpx;} |
| 764 | 743 | ||
| 765 | -.cart-btn.line-h{ line-height: 26rpx;} | 744 | +.cart-btn.line-h{ line-height: 40rpx;} |
| 766 | .cart-btn .fir-v{ margin-top: 10rpx;} | 745 | .cart-btn .fir-v{ margin-top: 10rpx;} |
| 767 | 746 | ||
| 768 | .hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;} | 747 | .hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;} |
| @@ -798,7 +777,7 @@ left:31rpx;} | @@ -798,7 +777,7 @@ left:31rpx;} | ||
| 798 | .juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;} | 777 | .juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;} |
| 799 | 778 | ||
| 800 | .pt_qd{margin-top: 40rpx; height: auto;} | 779 | .pt_qd{margin-top: 40rpx; height: auto;} |
| 801 | -.spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; } | 780 | +.spec-cart-btn.w100{width: 100%; margin-left: 0; height: 80rpx; line-height: 80rpx;} |
| 802 | 781 | ||
| 803 | .sto_v{color: #333;} | 782 | .sto_v{color: #333;} |
| 804 | .ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} | 783 | .ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} |
| @@ -948,13 +927,14 @@ left:31rpx;} | @@ -948,13 +927,14 @@ left:31rpx;} | ||
| 948 | border-bottom: 3rpx solid #eee; border-top: 3rpx solid #eee; line-height: 100rpx } | 927 | border-bottom: 3rpx solid #eee; border-top: 3rpx solid #eee; line-height: 100rpx } |
| 949 | 928 | ||
| 950 | .bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 0 34rpx; color: #333; | 929 | .bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 0 34rpx; color: #333; |
| 951 | - font-size: 32rpx; height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx } | 930 | + font-size: 32rpx; height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:31rpx } |
| 952 | .red_bb{ color: #d70026; min-width:158rpx;width: auto;} | 931 | .red_bb{ color: #d70026; min-width:158rpx;width: auto;} |
| 953 | .bg_jj{ width: 18rpx; height:18rpx; | 932 | .bg_jj{ width: 18rpx; height:18rpx; |
| 954 | border-top: 2rpx solid #d70026; | 933 | border-top: 2rpx solid #d70026; |
| 955 | border-right: 2rpx solid #d70026; | 934 | border-right: 2rpx solid #d70026; |
| 956 | transform: rotate(45deg);display:inline-block; | 935 | transform: rotate(45deg);display:inline-block; |
| 957 | margin-bottom:3rpx; | 936 | margin-bottom:3rpx; |
| 937 | + | ||
| 958 | } | 938 | } |
| 959 | /* 顶部边框 */ | 939 | /* 顶部边框 */ |
| 960 | .topframe{ | 940 | .topframe{ |
| @@ -972,7 +952,7 @@ left:31rpx;} | @@ -972,7 +952,7 @@ left:31rpx;} | ||
| 972 | margin-bottom: 36rpx; | 952 | margin-bottom: 36rpx; |
| 973 | color: #7d7d7d; | 953 | color: #7d7d7d; |
| 974 | padding-left: 20rpx; | 954 | padding-left: 20rpx; |
| 975 | - font-size: 32rpx; | 955 | + font-size: 28rpx; |
| 976 | } | 956 | } |
| 977 | /*评价人数量*/ | 957 | /*评价人数量*/ |
| 978 | .topframe .topframe-top .topframe-top-val{ | 958 | .topframe .topframe-top .topframe-top-val{ |
| @@ -1000,7 +980,7 @@ left:31rpx;} | @@ -1000,7 +980,7 @@ left:31rpx;} | ||
| 1000 | 980 | ||
| 1001 | .buttem-list .item{ | 981 | .buttem-list .item{ |
| 1002 | min-width: 17%; | 982 | min-width: 17%; |
| 1003 | - font-size: 24rpx; | 983 | + font-size: 23rpx; |
| 1004 | border-radius: 20rpx; | 984 | border-radius: 20rpx; |
| 1005 | background:#ffe3e2; | 985 | background:#ffe3e2; |
| 1006 | height:38rpx; | 986 | height:38rpx; |
| @@ -1016,11 +996,16 @@ left:31rpx;} | @@ -1016,11 +996,16 @@ left:31rpx;} | ||
| 1016 | 996 | ||
| 1017 | /* 用户评价 */ | 997 | /* 用户评价 */ |
| 1018 | .middle{ | 998 | .middle{ |
| 999 | + | ||
| 1019 | width: 95%; | 1000 | width: 95%; |
| 1001 | + height:auto; | ||
| 1002 | + | ||
| 1020 | margin:0 auto; | 1003 | margin:0 auto; |
| 1004 | + | ||
| 1005 | + | ||
| 1021 | } | 1006 | } |
| 1022 | .middle-img-frame{ | 1007 | .middle-img-frame{ |
| 1023 | - height:65rpx; | 1008 | + height:65rp; |
| 1024 | display: flex; | 1009 | display: flex; |
| 1025 | margin-top: 32rpx; | 1010 | margin-top: 32rpx; |
| 1026 | 1011 | ||
| @@ -1050,13 +1035,11 @@ left:31rpx;} | @@ -1050,13 +1035,11 @@ left:31rpx;} | ||
| 1050 | text-align: center; | 1035 | text-align: center; |
| 1051 | margin-bottom:20rpx; | 1036 | margin-bottom:20rpx; |
| 1052 | margin-left:5rpx; | 1037 | margin-left:5rpx; |
| 1053 | -} | ||
| 1054 | -.xc-pirces{ | ||
| 1055 | - margin-top: 14rpx; | 1038 | + |
| 1056 | } | 1039 | } |
| 1057 | /* 评价文字 */ | 1040 | /* 评价文字 */ |
| 1058 | .middle-font{ | 1041 | .middle-font{ |
| 1059 | - font-size: 30rpx; | 1042 | + font-size: 24rpx; |
| 1060 | 1043 | ||
| 1061 | } | 1044 | } |
| 1062 | .iddle-goods-img{ | 1045 | .iddle-goods-img{ |
| @@ -1082,12 +1065,11 @@ left:31rpx;} | @@ -1082,12 +1065,11 @@ left:31rpx;} | ||
| 1082 | height: 45rpx; | 1065 | height: 45rpx; |
| 1083 | display:flex; | 1066 | display:flex; |
| 1084 | line-height: 45rpx; | 1067 | line-height: 45rpx; |
| 1085 | - margin-top: 20rpx; | ||
| 1086 | margin-bottom: 14rpx; | 1068 | margin-bottom: 14rpx; |
| 1087 | justify-content : space-between; | 1069 | justify-content : space-between; |
| 1088 | } | 1070 | } |
| 1089 | .parameter-font{ | 1071 | .parameter-font{ |
| 1090 | - font-size: 26rpx; | 1072 | + font-size: 24rpx; |
| 1091 | 1073 | ||
| 1092 | } | 1074 | } |
| 1093 | /* 规格 */ | 1075 | /* 规格 */ |
| @@ -1109,13 +1091,13 @@ left:31rpx;} | @@ -1109,13 +1091,13 @@ left:31rpx;} | ||
| 1109 | } | 1091 | } |
| 1110 | /* 点赞图片 */ | 1092 | /* 点赞图片 */ |
| 1111 | .parameter-img{ | 1093 | .parameter-img{ |
| 1112 | - width: 27rpx; | ||
| 1113 | - height: 27rpx; | 1094 | + width: 25rpx; |
| 1095 | + height: 25rpx; | ||
| 1114 | margin-top: 3rpx; | 1096 | margin-top: 3rpx; |
| 1115 | } | 1097 | } |
| 1116 | .parameter-val{ | 1098 | .parameter-val{ |
| 1117 | margin-left:25rpx; | 1099 | margin-left:25rpx; |
| 1118 | - font-size: 26rpx; | 1100 | + font-size: 24rpx; |
| 1119 | color: #999; | 1101 | color: #999; |
| 1120 | } | 1102 | } |
| 1121 | /* 回复 */ | 1103 | /* 回复 */ |
| @@ -1188,7 +1170,7 @@ left:31rpx;} | @@ -1188,7 +1170,7 @@ left:31rpx;} | ||
| 1188 | width: 524rpx; | 1170 | width: 524rpx; |
| 1189 | margin-left: 34rpx; | 1171 | margin-left: 34rpx; |
| 1190 | border-radius: 25rpx; | 1172 | border-radius: 25rpx; |
| 1191 | - border: 2rpx solid #d6d4d5; | 1173 | + border: 1rpx solid #d6d4d5; |
| 1192 | overflow: hidden; | 1174 | overflow: hidden; |
| 1193 | } | 1175 | } |
| 1194 | 1176 | ||
| @@ -1215,20 +1197,19 @@ left:31rpx;} | @@ -1215,20 +1197,19 @@ left:31rpx;} | ||
| 1215 | margin-right: 5rpx | 1197 | margin-right: 5rpx |
| 1216 | } | 1198 | } |
| 1217 | .xc_comment-font{ | 1199 | .xc_comment-font{ |
| 1218 | - height: 75rpx; | 1200 | + height: 85rpx; |
| 1219 | margin-left: 22rpx; | 1201 | margin-left: 22rpx; |
| 1220 | white-space:normal; | 1202 | white-space:normal; |
| 1221 | overflow: hidden; | 1203 | overflow: hidden; |
| 1222 | margin-top: 8rpx; | 1204 | margin-top: 8rpx; |
| 1223 | - | ||
| 1224 | } | 1205 | } |
| 1225 | .xc_comment-val{ | 1206 | .xc_comment-val{ |
| 1226 | width: 88%; | 1207 | width: 88%; |
| 1227 | height: 30rpx; | 1208 | height: 30rpx; |
| 1228 | margin-left: 22rpx; | 1209 | margin-left: 22rpx; |
| 1229 | display: flex; | 1210 | display: flex; |
| 1230 | - margin-top: 15rpx; | ||
| 1231 | - margin-bottom:15rpx; | 1211 | + margin-top: 28rpx; |
| 1212 | + margin-bottom:8rpx; | ||
| 1232 | } | 1213 | } |
| 1233 | 1214 | ||
| 1234 | .xc_comment-time{ | 1215 | .xc_comment-time{ |
| @@ -1285,7 +1266,7 @@ left:31rpx;} | @@ -1285,7 +1266,7 @@ left:31rpx;} | ||
| 1285 | height: 100%; | 1266 | height: 100%; |
| 1286 | line-height: 100rpx; | 1267 | line-height: 100rpx; |
| 1287 | overflow: hidden; | 1268 | overflow: hidden; |
| 1288 | - margin-left: 10rpx; | 1269 | + margin-left: 7rpx; |
| 1289 | } | 1270 | } |
| 1290 | .xc-coupon-fram{ | 1271 | .xc-coupon-fram{ |
| 1291 | position: relative; | 1272 | position: relative; |
| @@ -1325,7 +1306,7 @@ left:31rpx;} | @@ -1325,7 +1306,7 @@ left:31rpx;} | ||
| 1325 | padding-left:15rpx; | 1306 | padding-left:15rpx; |
| 1326 | color: #d70025; | 1307 | color: #d70025; |
| 1327 | position: absolute; | 1308 | position: absolute; |
| 1328 | - right: 5rpx; | 1309 | + right: 7rpx; |
| 1329 | } | 1310 | } |
| 1330 | 1311 | ||
| 1331 | /* 自定义弹出窗口 */ | 1312 | /* 自定义弹出窗口 */ |
| @@ -2240,254 +2221,81 @@ right:17rpx; top:55rpx; | @@ -2240,254 +2221,81 @@ right:17rpx; top:55rpx; | ||
| 2240 | .pd_top1{padding-top: 10rpx} | 2221 | .pd_top1{padding-top: 10rpx} |
| 2241 | .s_ms_bth{margin-top: 85rpx} | 2222 | .s_ms_bth{margin-top: 85rpx} |
| 2242 | 2223 | ||
| 2243 | - | ||
| 2244 | -.no_pj_list{text-align: center; width: 100%; color: #999; margin: 30rpx 0; display: inline-block; font-size: 28rpx} | ||
| 2245 | -/* 门店地址 */ | ||
| 2246 | -.xc-address_frame{ | ||
| 2247 | - border-top:1rpx solid #eee; | ||
| 2248 | - width: 100%; | ||
| 2249 | - height: auto; | ||
| 2250 | -} | ||
| 2251 | -.on_height{ | ||
| 2252 | -height: 90rpx; | ||
| 2253 | -} | ||
| 2254 | -.sn_height{ | ||
| 2255 | - height: 170rpx; | 2224 | +.xc-pirces{ |
| 2225 | + height:40rpx; | ||
| 2226 | + line-height:15rpx; | ||
| 2256 | } | 2227 | } |
| 2257 | -.xc-address_frame .address_frame{ | ||
| 2258 | - width: 92%; | ||
| 2259 | -padding-left: 10rpx; | ||
| 2260 | -margin: auto; | ||
| 2261 | 2228 | ||
| 2262 | -} | ||
| 2263 | -.shop_name{ | 2229 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx} |
| 2264 | 2230 | ||
| 2265 | -} | ||
| 2266 | -.stores-img{ | ||
| 2267 | -width: 40rpx; | ||
| 2268 | - height: 35rpx; | ||
| 2269 | - margin-right: 10rpx; | ||
| 2270 | -} | ||
| 2271 | -.shop_name{ | ||
| 2272 | - margin-right: 10rpx; | ||
| 2273 | -} | ||
| 2274 | -.address{ | ||
| 2275 | - width: 87%; | ||
| 2276 | - margin-top: 5rpx; | ||
| 2277 | - margin-bottom: 5rpx; | ||
| 2278 | -} | ||
| 2279 | -.distance{ | ||
| 2280 | - padding-left: 15rpx; | ||
| 2281 | - padding-right: 15rpx; | ||
| 2282 | - background: #eee; | ||
| 2283 | - border-radius: 20rpx; | ||
| 2284 | - margin-right: 5rpx; | ||
| 2285 | - color: #999; | ||
| 2286 | - height: 38rpx; | ||
| 2287 | -line-height: 38rpx; | ||
| 2288 | - | ||
| 2289 | -} | ||
| 2290 | -/* 选择门店的弹窗 */ | ||
| 2291 | -.mongolia-layer{ | ||
| 2292 | - position: fixed; | ||
| 2293 | -left: 0; | ||
| 2294 | -top: 0; | ||
| 2295 | -right: 0; | ||
| 2296 | -bottom: 0; | ||
| 2297 | -z-index: 11; | ||
| 2298 | -background: rgba(0,0,0,0.4); | ||
| 2299 | -width: 100%; | ||
| 2300 | -height: 91.9%; | ||
| 2301 | - | ||
| 2302 | -} | ||
| 2303 | -.popup-frame{ | ||
| 2304 | - position: fixed; | ||
| 2305 | -bottom:99rpx; | ||
| 2306 | -z-index: 20; | ||
| 2307 | -background: white; | ||
| 2308 | -width: 100%; | ||
| 2309 | -border-radius: 20rpx 20rpx 0 0; | ||
| 2310 | -height: 72%; | ||
| 2311 | -} | ||
| 2312 | -.popup-top{ | ||
| 2313 | - border-bottom: 1rpx solid #eee; | ||
| 2314 | - height: 155rpx; | ||
| 2315 | - width: 95%; | ||
| 2316 | - margin: auto; | ||
| 2317 | - line-height: 155rpx; | ||
| 2318 | 2231 | ||
| 2232 | +.join-cart>view.no_store { | ||
| 2233 | + width: 58%; background-color: #adadad; | ||
| 2319 | } | 2234 | } |
| 2320 | -.bg_rights{ | ||
| 2321 | - border-top: 2rpx solid ; | ||
| 2322 | - border-right: 2rpx solid ; | ||
| 2323 | - transform: rotate(45deg); | ||
| 2324 | - display:inline-block; | ||
| 2325 | - width:15rpx;height:15rpx; | ||
| 2326 | - border-color:#da0b31; | ||
| 2327 | -} | ||
| 2328 | -.modal-closes { | ||
| 2329 | - position: absolute; | ||
| 2330 | - right: 30rpx; | ||
| 2331 | - top: -15rpx; | ||
| 2332 | - height: 25rpx; | ||
| 2333 | 2235 | ||
| 2334 | -} | ||
| 2335 | -.choose_more{ | ||
| 2336 | - margin-top: 40rpx; | ||
| 2337 | - margin-right: 20rpx; | ||
| 2338 | 2236 | ||
| 2339 | -} | ||
| 2340 | -.choose_mores{ | ||
| 2341 | - margin-top: 30rpx; | ||
| 2342 | - margin-right: 15rpx; | ||
| 2343 | 2237 | ||
| 2344 | -} | ||
| 2345 | -.store-list{ | ||
| 2346 | - width: 95%; | ||
| 2347 | - height: 72%; | ||
| 2348 | - overflow-y: scroll; | 2238 | +/* 美妆价的样式 */ |
| 2239 | +.beauty-makeup-frame{ | ||
| 2240 | + width: 101.5%; | ||
| 2349 | margin: auto; | 2241 | margin: auto; |
| 2350 | -} | ||
| 2351 | -.store-list .store_choose{ | ||
| 2352 | - width: 100%; | ||
| 2353 | height: 120rpx; | 2242 | height: 120rpx; |
| 2354 | - line-height: 125rpx; | ||
| 2355 | - border-bottom: 1rpx solid #eee; | 2243 | + border-radius: 15rpx; |
| 2244 | + margin-top: 18px; | ||
| 2356 | 2245 | ||
| 2357 | } | 2246 | } |
| 2358 | -.store-list .store_choose .store{ | ||
| 2359 | -width: 100%; | ||
| 2360 | -margin: auto; | ||
| 2361 | -line-height: 37rpx; | ||
| 2362 | -padding-left: 20rpx; | ||
| 2363 | - | 2247 | +.beauty-makeup-frame .left{ |
| 2248 | + width: 80%; | ||
| 2249 | + height: 100%; | ||
| 2250 | + background:#f7f7f7; | ||
| 2251 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | ||
| 2252 | + padding-left: 20rpx; | ||
| 2364 | } | 2253 | } |
| 2365 | -.xc-hook{ | ||
| 2366 | - width: 35rpx; | ||
| 2367 | - height: 35rpx; | ||
| 2368 | - transform: rotate(-145deg); | ||
| 2369 | -line-height: 37rpx; | ||
| 2370 | -text-align: center; | ||
| 2371 | -} | ||
| 2372 | - .xc-hooks{ | ||
| 2373 | - width: 30rpx; | ||
| 2374 | - height: 30rpx; | ||
| 2375 | - border: 1rpx solid #999; | ||
| 2376 | - } | ||
| 2377 | - .address-frame{ | ||
| 2378 | - width: 93%; | ||
| 2379 | -margin-left: 7rpx; | ||
| 2380 | - | ||
| 2381 | - } | ||
| 2382 | - .nearby_store{ | ||
| 2383 | -margin-left: 17rpx; | ||
| 2384 | - } | ||
| 2385 | - .address_name{ | ||
| 2386 | - margin-right: 10rpx; | ||
| 2387 | - | ||
| 2388 | - } | ||
| 2389 | - .address-val{ | ||
| 2390 | - height: 38rpx; | ||
| 2391 | -line-height: 38rpx; | ||
| 2392 | - | ||
| 2393 | - } | ||
| 2394 | - .store-bottom{ | ||
| 2395 | - width: 85%; | ||
| 2396 | - margin: auto; | ||
| 2397 | - height: 70rpx; | ||
| 2398 | - } | ||
| 2399 | - .determine{ | ||
| 2400 | - width: 260rpx; | ||
| 2401 | - height: 55rpx; | ||
| 2402 | - border-radius: 50rpx; | ||
| 2403 | - line-height: 55rpx; | ||
| 2404 | - } | ||
| 2405 | - .default{ | ||
| 2406 | - width: 260rpx; | ||
| 2407 | - height: 55rpx; | ||
| 2408 | - border:3rpx solid #c8c8c8; | ||
| 2409 | - border-radius: 50rpx; | ||
| 2410 | - line-height: 55rpx; | ||
| 2411 | - } | ||
| 2412 | - .store-bottom-frame{ | ||
| 2413 | - width: 95%; | ||
| 2414 | - margin: auto; | ||
| 2415 | - | ||
| 2416 | - } | ||
| 2417 | - /* 门店分类列表 */ | ||
| 2418 | -.sort_store_list{ | ||
| 2419 | - height: 82%; | ||
| 2420 | - overflow: hidden; | ||
| 2421 | - overflow-y: scroll; | ||
| 2422 | - width: 95%; | ||
| 2423 | - margin: auto; | ||
| 2424 | -} | ||
| 2425 | -.sort_store_list .sort-store-frame{ | ||
| 2426 | - width: 100%; | ||
| 2427 | -height: 100rpx; | ||
| 2428 | -line-height:100rpx; | ||
| 2429 | -border-bottom: 1rpx solid #eee; | ||
| 2430 | - | ||
| 2431 | -} | ||
| 2432 | -.sort_store_list .sort-store-frame .sort-store{ | ||
| 2433 | - width: 94.5%; | ||
| 2434 | - margin: auto; | ||
| 2435 | -} | ||
| 2436 | -.black_rights-frame{ | ||
| 2437 | -width: 50%; | ||
| 2438 | -} | ||
| 2439 | -.black_rights-frame .black_rights{ | ||
| 2440 | - border-top: 3rpx solid; | ||
| 2441 | -border-right: 3rpx solid; | ||
| 2442 | -transform: rotate(45deg); | ||
| 2443 | -display: inline-block; | ||
| 2444 | -width: 20rpx; | ||
| 2445 | -height: 20rpx; | ||
| 2446 | -} | ||
| 2447 | -.xc-val-money{ | ||
| 2448 | - height:80rpx; | ||
| 2449 | -} | ||
| 2450 | - | ||
| 2451 | -.xc-distance-bottom{ | ||
| 2452 | - margin-bottom: 40rpx; | ||
| 2453 | -} | ||
| 2454 | -.xc-distance-top{ | ||
| 2455 | -margin-top: 10rpx; | ||
| 2456 | -} | ||
| 2457 | -.xc-width{ | ||
| 2458 | - width: 100%; | 2254 | + .card-frame{ |
| 2255 | + margin-top: 0rpx; padding-right: 23rpx; | ||
| 2256 | + margin-right: 15rpx; | ||
| 2459 | } | 2257 | } |
| 2460 | -.right-arrow{ width: 15rpx; height:15rpx; | ||
| 2461 | - border-top: 2rpx solid #d70026; | ||
| 2462 | - border-right: 2rpx solid #d70026; | 2258 | +.advert-card{ |
| 2259 | + margin-top: 0rpx!important; | ||
| 2260 | + | ||
| 2261 | +} | ||
| 2262 | +.beauty-makeup-frame .right{ | ||
| 2263 | + width: 20%; | ||
| 2264 | + height: 100%; | ||
| 2265 | + background:#f3efe3; | ||
| 2266 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | ||
| 2267 | + } | ||
| 2268 | +.grade-card-frame{ | ||
| 2269 | + width: 26%; | ||
| 2270 | + height:45rpx ; | ||
| 2271 | + background: #3c300a; | ||
| 2272 | + border-radius: 20rpx; | ||
| 2273 | + margin-top: 10px; | ||
| 2274 | + margin-left: 7rpx; | ||
| 2275 | + justify-content: center; | ||
| 2276 | + padding: 0 10rpx; | ||
| 2277 | +} | ||
| 2278 | +.grade-card-frame .img{ | ||
| 2279 | + width: 24rpx; | ||
| 2280 | + height: 24rpx; | ||
| 2281 | + margin-top: 2px; | ||
| 2282 | + | ||
| 2283 | +} | ||
| 2284 | +.grade-card-frame .card-name{ | ||
| 2285 | + margin-left: 5rpx; | ||
| 2286 | +} | ||
| 2287 | +.card-effect{ | ||
| 2288 | + margin-left: 15rpx; | ||
| 2289 | +} | ||
| 2290 | +.at_once_carde{ | ||
| 2291 | + width:65rpx; | ||
| 2292 | + height: 75rpx; | ||
| 2293 | + line-height:38rpx; | ||
| 2294 | +} | ||
| 2295 | +.bg_right{ width: 18rpx; height:18rpx; | ||
| 2296 | + border-top: 2rpx solid #333; | ||
| 2297 | + border-right: 2rpx solid #333; | ||
| 2463 | transform: rotate(45deg);display:inline-block; | 2298 | transform: rotate(45deg);display:inline-block; |
| 2464 | margin-bottom:3rpx; | 2299 | margin-bottom:3rpx; |
| 2465 | -} | ||
| 2466 | -.xc-goods-attribute{ | ||
| 2467 | - border-bottom: 1px solid #eee; | ||
| 2468 | -padding-bottom: 15px; | ||
| 2469 | -margin-bottom:40rpx; | ||
| 2470 | -} | ||
| 2471 | -.xc-val-fream{ | ||
| 2472 | - width: 105rpx; | ||
| 2473 | -} | ||
| 2474 | -.is_stock{ | ||
| 2475 | -width: 58%; | ||
| 2476 | -height: 70rpx; | ||
| 2477 | -border-radius: 55rpx; | ||
| 2478 | -} | ||
| 2479 | -.select_store_height{ | ||
| 2480 | - height: 50rpx; | ||
| 2481 | -} | ||
| 2482 | -.butttem5{ | ||
| 2483 | - margin-bottom: 5rpx; | ||
| 2484 | -} | ||
| 2485 | - | ||
| 2486 | -.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx} | ||
| 2487 | - | ||
| 2488 | - | ||
| 2489 | -.join-cart>view.no_store { | ||
| 2490 | - width: 58%; background-color: #adadad; | ||
| 2491 | -} | ||
| 2492 | 2300 | ||
| 2493 | -.s_btn{ margin-top: 25rpx; } | 2301 | +} |
| 2494 | \ No newline at end of file | 2302 | \ No newline at end of file |
pages/goods/goodsList/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | ||
| 2 | + //-- 判断是不是有等级价 -- | ||
| 3 | + is_has_rank:function(rank_switch,item){ | ||
| 4 | + if(!rank_switch) return false; | ||
| 5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | ||
| 6 | + return false; | ||
| 7 | + }, | ||
| 8 | + | ||
| 9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | ||
| 10 | + get_card_price:function(goods,all_card,type){ | ||
| 11 | + var price1=parseInt(goods['cardprice1']); | ||
| 12 | + var price2=parseInt(goods['cardprice2']); | ||
| 13 | + var price3=parseInt(goods['cardprice3']); | ||
| 14 | + if(!all_card){ | ||
| 15 | + if(type==0) return 0; | ||
| 16 | + return ""; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + var arr=[]; | ||
| 20 | + var min_price= 0; | ||
| 21 | + var min_name=""; | ||
| 22 | + //---设置对应的价格名字---- | ||
| 23 | + for(var i=0;i<3;i++) { | ||
| 24 | + var vl=all_card[i]; | ||
| 25 | + if(vl['CorrPrice']=="Price1" && price1>0) | ||
| 26 | + arr.push({'price':price1, 'name':vl['CardName']}); | ||
| 27 | + if(vl['CorrPrice']=="Price2" && price2>0) | ||
| 28 | + arr.push({'price':price2, 'name':vl['CardName']}); | ||
| 29 | + if(vl['CorrPrice']=="Price3" && price3>0) | ||
| 30 | + arr.push({'price':price3, 'name':vl['CardName']}); | ||
| 31 | + } | ||
| 32 | + if(arr.length==0){ | ||
| 33 | + if(type==0) return 0; | ||
| 34 | + return ""; | ||
| 35 | + } | ||
| 36 | + //--进行排序,升序--- | ||
| 37 | + arr.sort(function(a,b){ | ||
| 38 | + if (a.price < b.price) { | ||
| 39 | + return -1; | ||
| 40 | + } else if (a.fee == b.fee) { | ||
| 41 | + return 0; | ||
| 42 | + } else { | ||
| 43 | + return 1; | ||
| 44 | + } | ||
| 45 | + }) | ||
| 46 | + //-- 获取最下价钱,和相应的卡的名称 -- | ||
| 47 | + min_price=arr[0].price; | ||
| 48 | + min_name=arr[0].name; | ||
| 49 | + if(type==0) return min_price; | ||
| 50 | + if(min_name.length>4 ) min_name=min_name.substring(0, 4); | ||
| 51 | + return min_name; | ||
| 52 | + }, | ||
| 53 | +} | ||
| 54 | +module.exports = { | ||
| 55 | + is_has_rank:g_filters.is_has_rank, | ||
| 56 | + get_card_price:g_filters.get_card_price, | ||
| 57 | +} | ||
| 0 | \ No newline at end of file | 58 | \ No newline at end of file |
pages/goods/goodsList/goodsList.js
| @@ -2,7 +2,7 @@ var t = function(t) { | @@ -2,7 +2,7 @@ var t = function(t) { | ||
| 2 | return t && t.__esModule ? t : { | 2 | return t && t.__esModule ? t : { |
| 3 | default: t | 3 | default: t |
| 4 | }; | 4 | }; |
| 5 | -}(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), oo = e.globalData.setting; | 5 | +}(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), oo = e.globalData.setting, ut = require("../../../utils/util.js"); |
| 6 | 6 | ||
| 7 | Page({ | 7 | Page({ |
| 8 | data: { | 8 | data: { |
| @@ -21,6 +21,7 @@ Page({ | @@ -21,6 +21,7 @@ Page({ | ||
| 21 | is_hot:0, | 21 | is_hot:0, |
| 22 | }, | 22 | }, |
| 23 | onLoad: function(t) { | 23 | onLoad: function(t) { |
| 24 | + var th=this; | ||
| 24 | a.init(this, "", "requestData"); | 25 | a.init(this, "", "requestData"); |
| 25 | var url = this.data.baseUrl; | 26 | var url = this.data.baseUrl; |
| 26 | this.data.is_new=t.is_new; | 27 | this.data.is_new=t.is_new; |
| @@ -43,8 +44,40 @@ Page({ | @@ -43,8 +44,40 @@ Page({ | ||
| 43 | 44 | ||
| 44 | if (0 != t.is_new && t.is_new != undefined) { url += "&is_new=" + t.is_new; } | 45 | if (0 != t.is_new && t.is_new != undefined) { url += "&is_new=" + t.is_new; } |
| 45 | if (0 != t.is_hot && t.is_hot != undefined) { url += "&is_hot=" + t.is_hot; } | 46 | if (0 != t.is_hot && t.is_hot != undefined) { url += "&is_hot=" + t.is_hot; } |
| 46 | - | ||
| 47 | this.requestGoodsList(url); | 47 | this.requestGoodsList(url); |
| 48 | + | ||
| 49 | + getApp().getConfig2(function(rs){ | ||
| 50 | + //计算等级价相关 | ||
| 51 | + var swithc_list=rs.switch_list; | ||
| 52 | + var sw_arr=JSON.parse(swithc_list); | ||
| 53 | + //---如果后台又开等级卡的开关--- | ||
| 54 | + if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ | ||
| 55 | + th.setData({rank_switch:true}); | ||
| 56 | + var user=getApp().globalData.userInfo; | ||
| 57 | + var ti=setInterval(function(){ | ||
| 58 | + if(!user) return false; | ||
| 59 | + clearInterval(ti); | ||
| 60 | + //---回调卡的列表--- | ||
| 61 | + th.getPlusCardType(function(ob){ | ||
| 62 | + th.setData({card_list:ob.card_list}); | ||
| 63 | + if(user.card_field ){ | ||
| 64 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 65 | + var end = new Date(str); | ||
| 66 | + end = Date.parse(end) / 1000; | ||
| 67 | + var now = ut.gettimestamp(); | ||
| 68 | + | ||
| 69 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 70 | + if(user.card_field && now<end){ | ||
| 71 | + var card_name=ob.name_map.get(user.card_field); | ||
| 72 | + if(card_name.length>4) card_name=card_name.substring(0,4); | ||
| 73 | + th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list}); | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + }) | ||
| 77 | + },500) | ||
| 78 | + } | ||
| 79 | + }); | ||
| 80 | + | ||
| 48 | }, | 81 | }, |
| 49 | changeTab: function(t) { | 82 | changeTab: function(t) { |
| 50 | var ord = t.currentTarget.dataset.href; | 83 | var ord = t.currentTarget.dataset.href; |
| @@ -115,7 +148,26 @@ Page({ | @@ -115,7 +148,26 @@ Page({ | ||
| 115 | _errObj[_errImg] = this.data.iurl+"/miniapp/images/default_g_img.gif"; | 148 | _errObj[_errImg] = this.data.iurl+"/miniapp/images/default_g_img.gif"; |
| 116 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 149 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 117 | } | 150 | } |
| 118 | - } | 151 | + }, |
| 152 | + | ||
| 153 | + //--- 获取卡类列表 --- | ||
| 154 | + getPlusCardType: function (func) { | ||
| 155 | + var storid = oo.stoid; | ||
| 156 | + var th = this; | ||
| 157 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
| 158 | + var plusCard = res.data.data; | ||
| 159 | + var arr = [1219, 2089, 3031]; | ||
| 160 | + var new_arr = new Array(); | ||
| 161 | + var card_name_map=new Map(); | ||
| 162 | + for (var i = 0; i < plusCard.length; i++) { | ||
| 163 | + var name="card"+plusCard[i].CorrPrice.toLowerCase(); | ||
| 164 | + card_name_map.set(name,plusCard[i].CardName); | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + var ob={"card_list":plusCard,"name_map":card_name_map}; | ||
| 168 | + func(ob); | ||
| 169 | + }) | ||
| 170 | + }, | ||
| 119 | 171 | ||
| 120 | 172 | ||
| 121 | }); | 173 | }); |
| 122 | \ No newline at end of file | 174 | \ No newline at end of file |
pages/goods/goodsList/goodsList.wxml
| 1 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | ||
| 1 | <view class="container"> | 2 | <view class="container"> |
| 2 | <view class="nav"> | 3 | <view class="nav"> |
| 3 | <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 | 4 | <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 |
| @@ -37,8 +38,62 @@ | @@ -37,8 +38,62 @@ | ||
| 37 | </view> | 38 | </view> |
| 38 | <view class="item-cont"> | 39 | <view class="item-cont"> |
| 39 | <view class="title">{{item.goods_name}}</view> | 40 | <view class="title">{{item.goods_name}}</view> |
| 40 | - <view class="price">¥{{item.shop_price}}</view> | ||
| 41 | - <view class="comment">评论{{item.comment_count}} 销量{{item.sales_sum}}</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>{{card_name}}</view> | ||
| 51 | + </view> | ||
| 52 | + <view class="comment flex jc_sb"> | ||
| 53 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | ||
| 54 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 55 | + </view> | ||
| 56 | + </block> | ||
| 57 | + <block wx:else> | ||
| 58 | + <view class="price">¥{{item.shop_price}}</view> | ||
| 59 | + <view class="comment flex jc_sb"> | ||
| 60 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | ||
| 61 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 62 | + </view> | ||
| 63 | + </block> | ||
| 64 | + </block> | ||
| 65 | + <block wx:else> | ||
| 66 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 67 | + <view class="flex ai-center"> | ||
| 68 | + <view class="price">¥{{item.shop_price}}</view> | ||
| 69 | + <view class="word-line">¥{{item.market_price}}</view> | ||
| 70 | + </view> | ||
| 71 | + <view class="comment flex jc_sb"> | ||
| 72 | + <view class="flex"> | ||
| 73 | + <view class="word-line xc-ash">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | ||
| 74 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 75 | + {{g_filter.get_card_price(item,card_list,1)}} | ||
| 76 | + </view> | ||
| 77 | + </view> | ||
| 78 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 79 | + </view> | ||
| 80 | + </block> | ||
| 81 | + <block wx:else> | ||
| 82 | + <view class="price">¥{{item.shop_price}}</view> | ||
| 83 | + <view class="comment flex jc_sb"> | ||
| 84 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | ||
| 85 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 86 | + </view> | ||
| 87 | + </block> | ||
| 88 | + </block> | ||
| 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> | ||
| 42 | </view> | 97 | </view> |
| 43 | </navigator> | 98 | </navigator> |
| 44 | </view> | 99 | </view> |
pages/goods/goodsList/goodsList.wxss
| @@ -92,11 +92,13 @@ | @@ -92,11 +92,13 @@ | ||
| 92 | .price { | 92 | .price { |
| 93 | display: inline-block; | 93 | display: inline-block; |
| 94 | color: #f23030; | 94 | color: #f23030; |
| 95 | - padding-bottom: 20rpx; | 95 | + /* padding-bottom: 20rpx; */ |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | .comment { | 98 | .comment { |
| 99 | font-size: 25rpx; | 99 | font-size: 25rpx; |
| 100 | + margin-top: 4rpx; | ||
| 101 | + padding-right:30rpx | ||
| 100 | } | 102 | } |
| 101 | 103 | ||
| 102 | .filter-modal { | 104 | .filter-modal { |
| @@ -152,3 +154,7 @@ | @@ -152,3 +154,7 @@ | ||
| 152 | margin-top: 20rpx; | 154 | margin-top: 20rpx; |
| 153 | width: 300rpx; | 155 | width: 300rpx; |
| 154 | } | 156 | } |
| 157 | + | ||
| 158 | +.card_bg {display: flex; width: 106rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | ||
| 159 | +background: #333; color: #fff; justify-content: center; margin-left: 4rpx;} | ||
| 160 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} |
pages/goods/search/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | ||
| 2 | + //-- 判断是不是有等级价 -- | ||
| 3 | + is_has_rank:function(rank_switch,item){ | ||
| 4 | + if(!rank_switch) return false; | ||
| 5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | ||
| 6 | + return false; | ||
| 7 | + }, | ||
| 8 | + | ||
| 9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | ||
| 10 | + get_card_price:function(goods,all_card,type){ | ||
| 11 | + var price1=parseInt(goods['cardprice1']); | ||
| 12 | + var price2=parseInt(goods['cardprice2']); | ||
| 13 | + var price3=parseInt(goods['cardprice3']); | ||
| 14 | + if(!all_card){ | ||
| 15 | + if(type==0) return 0; | ||
| 16 | + return ""; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + var arr=[]; | ||
| 20 | + var min_price= 0; | ||
| 21 | + var min_name=""; | ||
| 22 | + //---设置对应的价格名字---- | ||
| 23 | + for(var i=0;i<3;i++) { | ||
| 24 | + var vl=all_card[i]; | ||
| 25 | + if(vl['CorrPrice']=="Price1" && price1>0) | ||
| 26 | + arr.push({'price':price1, 'name':vl['CardName']}); | ||
| 27 | + if(vl['CorrPrice']=="Price2" && price2>0) | ||
| 28 | + arr.push({'price':price2, 'name':vl['CardName']}); | ||
| 29 | + if(vl['CorrPrice']=="Price3" && price3>0) | ||
| 30 | + arr.push({'price':price3, 'name':vl['CardName']}); | ||
| 31 | + } | ||
| 32 | + if(arr.length==0){ | ||
| 33 | + if(type==0) return 0; | ||
| 34 | + return ""; | ||
| 35 | + } | ||
| 36 | + //--进行排序,升序--- | ||
| 37 | + arr.sort(function(a,b){ | ||
| 38 | + if (a.price < b.price) { | ||
| 39 | + return -1; | ||
| 40 | + } else if (a.fee == b.fee) { | ||
| 41 | + return 0; | ||
| 42 | + } else { | ||
| 43 | + return 1; | ||
| 44 | + } | ||
| 45 | + }) | ||
| 46 | + //-- 获取最下价钱,和相应的卡的名称 -- | ||
| 47 | + min_price=arr[0].price; | ||
| 48 | + min_name=arr[0].name; | ||
| 49 | + if(type==0) return min_price; | ||
| 50 | + if(min_name.length>4 ) min_name=min_name.substring(0, 4); | ||
| 51 | + return min_name; | ||
| 52 | + }, | ||
| 53 | +} | ||
| 54 | +module.exports = { | ||
| 55 | + is_has_rank:g_filters.is_has_rank, | ||
| 56 | + get_card_price:g_filters.get_card_price, | ||
| 57 | +} | ||
| 0 | \ No newline at end of file | 58 | \ No newline at end of file |
pages/goods/search/search.js
| @@ -41,6 +41,41 @@ Page({ | @@ -41,6 +41,41 @@ Page({ | ||
| 41 | if (arr2.length > 0) arr.push(arr2); | 41 | if (arr2.length > 0) arr.push(arr2); |
| 42 | th.setData({ hotWords: arr}); | 42 | th.setData({ hotWords: arr}); |
| 43 | } | 43 | } |
| 44 | + | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + //计算等级价相关 | ||
| 48 | + var swithc_list=rs.switch_list; | ||
| 49 | + var sw_arr=JSON.parse(swithc_list); | ||
| 50 | + //---如果后台又开等级卡的开关--- | ||
| 51 | + if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ | ||
| 52 | + th.setData({rank_switch:true}); | ||
| 53 | + var user=getApp().globalData.userInfo; | ||
| 54 | + var ti=setInterval(function(){ | ||
| 55 | + if(!user) return false; | ||
| 56 | + clearInterval(ti); | ||
| 57 | + //---回调卡的列表--- | ||
| 58 | + th.getPlusCardType(function(ob){ | ||
| 59 | + th.setData({card_list:ob.card_list}); | ||
| 60 | + if(user.card_field ){ | ||
| 61 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 62 | + var end = new Date(str); | ||
| 63 | + end = Date.parse(end) / 1000; | ||
| 64 | + var now = ut.gettimestamp(); | ||
| 65 | + | ||
| 66 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 67 | + if(user.card_field && now<end){ | ||
| 68 | + var card_name=ob.name_map.get(user.card_field); | ||
| 69 | + if(card_name.length>4) card_name=card_name.substring(0,4); | ||
| 70 | + th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list}); | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + }) | ||
| 74 | + },500) | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + | ||
| 44 | }) | 79 | }) |
| 45 | e.init(this, "", "requestData"); | 80 | e.init(this, "", "requestData"); |
| 46 | var url = this.data.baseUrl; | 81 | var url = this.data.baseUrl; |
| @@ -155,4 +190,23 @@ Page({ | @@ -155,4 +190,23 @@ Page({ | ||
| 155 | _errObj[_errImg] = this.data.url+ "/miniapp/images/default_g_img.gif"; | 190 | _errObj[_errImg] = this.data.url+ "/miniapp/images/default_g_img.gif"; |
| 156 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 191 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 157 | }, | 192 | }, |
| 193 | + | ||
| 194 | + //--- 获取卡类列表 --- | ||
| 195 | + getPlusCardType: function (func) { | ||
| 196 | + var storid = oo.stoid; | ||
| 197 | + var th = this; | ||
| 198 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
| 199 | + var plusCard = res.data.data; | ||
| 200 | + var arr = [1219, 2089, 3031]; | ||
| 201 | + var new_arr = new Array(); | ||
| 202 | + var card_name_map=new Map(); | ||
| 203 | + for (var i = 0; i < plusCard.length; i++) { | ||
| 204 | + var name="card"+plusCard[i].CorrPrice.toLowerCase(); | ||
| 205 | + card_name_map.set(name,plusCard[i].CardName); | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + var ob={"card_list":plusCard,"name_map":card_name_map}; | ||
| 209 | + func(ob); | ||
| 210 | + }) | ||
| 211 | + }, | ||
| 158 | }); | 212 | }); |
| 159 | \ No newline at end of file | 213 | \ No newline at end of file |
pages/goods/search/search.wxml
| 1 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | ||
| 1 | <view class="container"> | 2 | <view class="container"> |
| 2 | <view class="nav"> | 3 | <view class="nav"> |
| 3 | <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 | 4 | <navigator bindtap="changeTab" class="nav-item" data-href="goods_id" data-ad="{{adname}}">综合 |
| @@ -34,8 +35,61 @@ | @@ -34,8 +35,61 @@ | ||
| 34 | </view> | 35 | </view> |
| 35 | <view class="item-cont"> | 36 | <view class="item-cont"> |
| 36 | <view class="title">{{item.goods_name}}</view> | 37 | <view class="title">{{item.goods_name}}</view> |
| 37 | - <view class="price">¥{{item.shop_price}}</view> | ||
| 38 | - <view class="comment">评论{{item.comment_count}} 销量{{item.sales_sum}}</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>{{card_name}}</view> | ||
| 47 | + </view> | ||
| 48 | + <view class="comment flex jc_sb"> | ||
| 49 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | ||
| 50 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 51 | + </view> | ||
| 52 | + </block> | ||
| 53 | + <block wx:else> | ||
| 54 | + <view class="price">¥{{item.shop_price}}</view> | ||
| 55 | + <view class="comment flex jc_sb"> | ||
| 56 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | ||
| 57 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 58 | + </view> | ||
| 59 | + </block> | ||
| 60 | + </block> | ||
| 61 | + <block wx:else> | ||
| 62 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 63 | + <view class="flex ai-center"> | ||
| 64 | + <view class="price">¥{{item.shop_price}}</view> | ||
| 65 | + <view class="word-line">¥{{item.market_price}}</view> | ||
| 66 | + </view> | ||
| 67 | + <view class="comment flex jc_sb"> | ||
| 68 | + <view class="flex"> | ||
| 69 | + <view class="word-line xc-ash">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | ||
| 70 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 71 | + {{g_filter.get_card_price(item,card_list,1)}} | ||
| 72 | + </view> | ||
| 73 | + </view> | ||
| 74 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 75 | + </view> | ||
| 76 | + </block> | ||
| 77 | + <block wx:else> | ||
| 78 | + <view class="price">¥{{item.shop_price}}</view> | ||
| 79 | + <view class="comment flex jc_sb"> | ||
| 80 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | ||
| 81 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 82 | + </view> | ||
| 83 | + </block> | ||
| 84 | + </block> | ||
| 85 | + </block> | ||
| 86 | + <block wx:else> | ||
| 87 | + <view class="price">¥{{item.shop_price}}</view> | ||
| 88 | + <view class="comment flex jc_sb"> | ||
| 89 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | ||
| 90 | + <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | ||
| 91 | + </view> | ||
| 92 | + </block> | ||
| 39 | </view> | 93 | </view> |
| 40 | </navigator> | 94 | </navigator> |
| 41 | </view> | 95 | </view> |
pages/goods/search/search.wxss
| @@ -92,11 +92,14 @@ | @@ -92,11 +92,14 @@ | ||
| 92 | .price { | 92 | .price { |
| 93 | display: inline-block; | 93 | display: inline-block; |
| 94 | color: #f23030; | 94 | color: #f23030; |
| 95 | - padding-bottom: 20rpx; | 95 | + /* padding-bottom: 20rpx; */ |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | .comment { | 98 | .comment { |
| 99 | font-size: 25rpx; | 99 | font-size: 25rpx; |
| 100 | + padding-right:30rpx; | ||
| 101 | + margin-top:4rpx | ||
| 102 | + | ||
| 100 | } | 103 | } |
| 101 | 104 | ||
| 102 | .filter-modal { | 105 | .filter-modal { |
| @@ -222,3 +225,7 @@ | @@ -222,3 +225,7 @@ | ||
| 222 | font-size: 28rpx; | 225 | font-size: 28rpx; |
| 223 | margin-left: 15rpx; | 226 | margin-left: 15rpx; |
| 224 | } | 227 | } |
| 228 | + | ||
| 229 | +.card_bg {display: flex; width: 106rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | ||
| 230 | +background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} | ||
| 231 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} |
pages/user/cardinfo/cardinfo.js
| @@ -15,7 +15,6 @@ Page({ | @@ -15,7 +15,6 @@ Page({ | ||
| 15 | */ | 15 | */ |
| 16 | data: { | 16 | data: { |
| 17 | images: [o.imghost + "/miniapp/images/plus/card_one.jpg", o.imghost + "/miniapp/images/plus/card_two.jpg", o.imghost + "/miniapp/images/plus/card_three.jpg"], | 17 | images: [o.imghost + "/miniapp/images/plus/card_one.jpg", o.imghost + "/miniapp/images/plus/card_two.jpg", o.imghost + "/miniapp/images/plus/card_three.jpg"], |
| 18 | - | ||
| 19 | url: o.imghost, | 18 | url: o.imghost, |
| 20 | screenWidth: 0, | 19 | screenWidth: 0, |
| 21 | screenheight: 0, | 20 | screenheight: 0, |
| @@ -70,9 +69,7 @@ Page({ | @@ -70,9 +69,7 @@ Page({ | ||
| 70 | 69 | ||
| 71 | }).then(res => { | 70 | }).then(res => { |
| 72 | var plusCard = res.data.data; | 71 | var plusCard = res.data.data; |
| 73 | - if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg"+(i + 1)+ ".jpg?v=1"; | ||
| 74 | - var big_card = null; | ||
| 75 | - var big_cards = null; | 72 | + var big_cards = null,big_card=null; |
| 76 | console.log(plusCard, "数据什么的", res); | 73 | console.log(plusCard, "数据什么的", res); |
| 77 | for (var i = 0; i < plusCard.length; i++) { | 74 | for (var i = 0; i < plusCard.length; i++) { |
| 78 | if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg" + (i + 1) + ".jpg?v=1"; | 75 | if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg" + (i + 1) + ".jpg?v=1"; |
| @@ -708,9 +705,31 @@ Page({ | @@ -708,9 +705,31 @@ Page({ | ||
| 708 | 705 | ||
| 709 | 706 | ||
| 710 | //-----立即续费的功能------ | 707 | //-----立即续费的功能------ |
| 711 | - xufei:function(){ | ||
| 712 | - var th = this; | ||
| 713 | - var is_card = 0; | 708 | + xufei:async function(){ |
| 709 | + var th = this,is_card = 0,end_time=0; | ||
| 710 | + await getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=1&type=3", | ||
| 711 | + {1:1}).then(res => { | ||
| 712 | + if (res.data.code == 0) { | ||
| 713 | + end_time=res.data.data.pageData[0].end_time; | ||
| 714 | + } | ||
| 715 | + }) | ||
| 716 | + var now=ut.gettimestamp(); | ||
| 717 | + if(end_time<now){ | ||
| 718 | + getApp().my_warnning("请联系商家升级plus功能", 0, th); | ||
| 719 | + return false; | ||
| 720 | + } | ||
| 721 | + | ||
| 722 | + end_time=ut.format(end_time,'yyyy-MM-dd'); | ||
| 723 | + var errmsg=""; | ||
| 724 | + //--商家是不是有等级卡功能,开通的人数是不是够用,开通是时间是不是到期-- | ||
| 725 | + await getApp().request.promiseGet("/api/weshop/plus/plus/card/register", | ||
| 726 | + { data: { storeId: os.stoid,isRenewal:1,endData: end_time,userId:getApp().globalData.user_id} }).then(res => { | ||
| 727 | + if (res.data.code == 0) is_card = 1; | ||
| 728 | + else errmsg=res.data.msg; | ||
| 729 | + }) | ||
| 730 | + | ||
| 731 | + if (is_card == 0){ getApp().my_warnning(errmsg?errmsg:"请联系商家升级plus功能", 0, th);} | ||
| 732 | + | ||
| 714 | var item = th.data.user_card; | 733 | var item = th.data.user_card; |
| 715 | var req = {}; | 734 | var req = {}; |
| 716 | req.cardId = item.CardId; | 735 | req.cardId = item.CardId; |
pages/user/deposit/prepaid/prepaid.wxml
| @@ -10,8 +10,7 @@ | @@ -10,8 +10,7 @@ | ||
| 10 | <view class="bz">备注: | 10 | <view class="bz">备注: |
| 11 | <view class="yck">{{perpaid.ItemName}}</view> | 11 | <view class="yck">{{perpaid.ItemName}}</view> |
| 12 | </view> | 12 | </view> |
| 13 | - <view class="ljcz" bindtap="submit" data-name="{{perpaid.BeginSum}}" | ||
| 14 | - data-advance="{{perpaid.AdvanceItemId }}" data-money="{{perpaid.NewSum}}">立即充值</view> | 13 | + <view class="ljcz" bindtap="submit" data-name="{{perpaid.BeginSum}}" data-advance="{{perpaid.AdvanceItemId}}"data-money="{{perpaid.NewSum}}">立即充值</view> |
| 15 | </image> | 14 | </image> |
| 16 | </block> | 15 | </block> |
| 17 | 16 |
pages/user/index/index.js
| @@ -37,7 +37,10 @@ Page({ | @@ -37,7 +37,10 @@ Page({ | ||
| 37 | /** | 37 | /** |
| 38 | * 生命周期函数--监听页面加载 | 38 | * 生命周期函数--监听页面加载 |
| 39 | */ | 39 | */ |
| 40 | - onLoad: function (options) { }, | 40 | + onLoad: function (options) { |
| 41 | + var goods_list = this.selectComponent("#goods_recommend"); //组件的id | ||
| 42 | + goods_list.get_list(); | ||
| 43 | + }, | ||
| 41 | /** | 44 | /** |
| 42 | * 生命周期函数--监听页面显示 | 45 | * 生命周期函数--监听页面显示 |
| 43 | */ | 46 | */ |
| @@ -208,6 +211,9 @@ Page({ | @@ -208,6 +211,9 @@ Page({ | ||
| 208 | } | 211 | } |
| 209 | }) | 212 | }) |
| 210 | 213 | ||
| 214 | + | ||
| 215 | + //th.requestRecommend(); | ||
| 216 | + | ||
| 211 | } | 217 | } |
| 212 | }); | 218 | }); |
| 213 | 219 | ||
| @@ -245,7 +251,9 @@ Page({ | @@ -245,7 +251,9 @@ Page({ | ||
| 245 | * 页面上拉触底事件的处理函数 | 251 | * 页面上拉触底事件的处理函数 |
| 246 | */ | 252 | */ |
| 247 | onReachBottom: function () { | 253 | onReachBottom: function () { |
| 248 | - !this.nomore && this.requestRecommend(); | 254 | + //!this.nomore && this.requestRecommend(); |
| 255 | + var goods_list = this.selectComponent("#goods_recommend"); //组件的id | ||
| 256 | + goods_list.get_list(); | ||
| 249 | }, | 257 | }, |
| 250 | 258 | ||
| 251 | /** | 259 | /** |
pages/user/index/index.json
| 1 | { | 1 | { |
| 2 | "usingComponents": { | 2 | "usingComponents": { |
| 3 | - "pop_txt": "/components/userqy_pop_up/userqy_pop_up" | 3 | + "pop_txt": "/components/userqy_pop_up/userqy_pop_up", |
| 4 | + "goods_recommend": "/components/goods_list/goods_list" | ||
| 4 | }, | 5 | }, |
| 5 | "navigationBarTitleText": "会员中心" | 6 | "navigationBarTitleText": "会员中心" |
| 6 | } | 7 | } |
| 7 | \ No newline at end of file | 8 | \ No newline at end of file |
pages/user/index/index.wxml
| @@ -237,30 +237,12 @@ | @@ -237,30 +237,12 @@ | ||
| 237 | <!-- </view> --> | 237 | <!-- </view> --> |
| 238 | </view> | 238 | </view> |
| 239 | </view> | 239 | </view> |
| 240 | - </view> | ||
| 241 | - <!-- 显示商品 --> | ||
| 242 | - <view class="xc-goods "> | ||
| 243 | - <view> | ||
| 244 | - <view bindtap="go_goods" data-gid="{{item.goods_id}}" class="rel xc-goods-recommend {{index%2==0?'':'ml'}}" wx:for="{{recommend_list}}"> | ||
| 245 | - <image class="xc-goods-imgs" src="{{iurl+item.original_img}}"></image> | ||
| 246 | - <view class='xc-goods-bottom abs'> | ||
| 247 | - <view class="flex monry-frame"> | ||
| 248 | - <view class="flex"> | ||
| 249 | - <view class="three-level-word money-color-val rmb-symbol">¥</view> | ||
| 250 | - <view class="two-level-word money-color-val">{{item.shop_price}}</view> | ||
| 251 | - </view> | ||
| 252 | - <view class="five-level-word word-line xc-original-price"> 原价¥{{item.market_price}}</view> | ||
| 253 | - </view> | ||
| 254 | - <view class="xc-good-explain fs26 ellipsis-2 ">{{item.goods_name}}</view> | ||
| 255 | - </view> | ||
| 256 | - </view> | ||
| 257 | - </view> | ||
| 258 | 240 | ||
| 259 | - <view class="xc-content" wx:if="{{nomore}}"> | ||
| 260 | - <view class="xc-middle-line xc-frame"> | ||
| 261 | - <view class="xc-line-text">已经到底</view> | ||
| 262 | - </view> | ||
| 263 | - </view> | 241 | + |
| 242 | + <!-- 显示商品 --> | ||
| 243 | + <!-- 好物推荐 --> | ||
| 244 | + <goods_recommend id="goods_recommend"></goods_recommend> | ||
| 245 | + | ||
| 264 | </view> | 246 | </view> |
| 265 | </view> | 247 | </view> |
| 266 | 248 |
utils/filter.wxs
| @@ -32,7 +32,9 @@ var filters = { | @@ -32,7 +32,9 @@ var filters = { | ||
| 32 | if((color=="" || color==null || color=="null")){ return spec; | 32 | if((color=="" || color==null || color=="null")){ return spec; |
| 33 | }else{ return spec+"/"+color; } | 33 | }else{ return spec+"/"+color; } |
| 34 | } | 34 | } |
| 35 | - } | 35 | + }, |
| 36 | + | ||
| 37 | + | ||
| 36 | } | 38 | } |
| 37 | module.exports = { | 39 | module.exports = { |
| 38 | toFix: filters.toFix, | 40 | toFix: filters.toFix, |
| @@ -40,5 +42,5 @@ module.exports = { | @@ -40,5 +42,5 @@ module.exports = { | ||
| 40 | replace_time2: filters.replace_time2, | 42 | replace_time2: filters.replace_time2, |
| 41 | format_time:filters.format_time, | 43 | format_time:filters.format_time, |
| 42 | pInt:filters.pInt, | 44 | pInt:filters.pInt, |
| 43 | - show_gui_ge:filters.show_gui_ge | 45 | + show_gui_ge:filters.show_gui_ge, |
| 44 | } | 46 | } |
| 45 | \ No newline at end of file | 47 | \ No newline at end of file |