Commit 5f492b884cb7e8c31e166385779844e68f5514de
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
7 changed files
with
319 additions
and
104 deletions
app.json
| ... | ... | @@ -85,14 +85,14 @@ |
| 85 | 85 | "pages/template/index", |
| 86 | 86 | "pages/store/index", |
| 87 | 87 | "pages/user/choice_guide/choice_guide", |
| 88 | - "pages/cart/cart2_inte/cart2_inte", | |
| 89 | - "pages/giftpack/festival/festival", | |
| 90 | - "pages/team/team_more/team_more", | |
| 91 | - "pages/user/collect_list/collect_list", | |
| 92 | - "pages/user/deposit/deposit", | |
| 93 | - "pages/user/deposit/prepaid/msg/msg", | |
| 94 | - "pages/user/deposit/prepaid/prepaid", | |
| 95 | - "pages/distribution/distribution" | |
| 88 | + "pages/cart/cart2_inte/cart2_inte", | |
| 89 | + "pages/giftpack/festival/festival", | |
| 90 | + "pages/team/team_more/team_more", | |
| 91 | + "pages/user/collect_list/collect_list", | |
| 92 | + "pages/user/deposit/deposit", | |
| 93 | + "pages/user/deposit/prepaid/msg/msg", | |
| 94 | + "pages/user/deposit/prepaid/prepaid", | |
| 95 | + "pages/distribution/distribution" | |
| 96 | 96 | ], |
| 97 | 97 | "plugins": { |
| 98 | 98 | "live-player-plugin": { | ... | ... |
packageA/pages/distribution/goods/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=parseFloat(goods['cardprice1']); | |
| 12 | + var price2 = parseFloat(goods['cardprice2']); | |
| 13 | + var price3 = parseFloat(goods['cardprice3']); | |
| 14 | + if(!all_card){ | |
| 15 | + if(type==0) return 0; | |
| 16 | + return ""; | |
| 17 | + } | |
| 18 | + | |
| 19 | + var min_price=null; | |
| 20 | + var min_name=null; | |
| 21 | + //---设置对应的价格名字---- | |
| 22 | + for(var i=0;i<3;i++) { | |
| 23 | + var vl=all_card[i]; | |
| 24 | + if(!vl) continue; | |
| 25 | + | |
| 26 | + if(vl['CorrPrice']=="Price1" && price1>0) | |
| 27 | + { | |
| 28 | + if(min_price==null) { | |
| 29 | + min_price=price1;min_name=vl['CardName']; | |
| 30 | + } | |
| 31 | + else if(price1<min_price) { | |
| 32 | + min_price=price1;min_name=vl['CardName']; | |
| 33 | + } | |
| 34 | + } | |
| 35 | + if(vl['CorrPrice']=="Price2" && price2>0) | |
| 36 | + { | |
| 37 | + if(min_price==null) { | |
| 38 | + min_price=price2;min_name=vl['CardName']; | |
| 39 | + } | |
| 40 | + else if(price2<min_price) { | |
| 41 | + min_price=price2;min_name=vl['CardName']; | |
| 42 | + } | |
| 43 | + } | |
| 44 | + | |
| 45 | + if(vl['CorrPrice']=="Price3" && price3>0) | |
| 46 | + { | |
| 47 | + if(min_price==null) { | |
| 48 | + min_price=price3;min_name=vl['CardName']; | |
| 49 | + } | |
| 50 | + else if(price3<min_price) { | |
| 51 | + min_price=price3;min_name=vl['CardName']; | |
| 52 | + } | |
| 53 | + } | |
| 54 | + | |
| 55 | + } | |
| 56 | + if(min_price==null){ | |
| 57 | + if(type==0) return 0; | |
| 58 | + return ""; | |
| 59 | + } | |
| 60 | + | |
| 61 | + if(type==0) return min_price; | |
| 62 | + if(min_name.length>4 ) min_name=min_name.substring(0, 8); | |
| 63 | + return min_name; | |
| 64 | + }, | |
| 65 | +} | |
| 66 | +module.exports = { | |
| 67 | + is_has_rank:g_filters.is_has_rank, | |
| 68 | + get_card_price:g_filters.get_card_price, | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
packageA/pages/distribution/goods/goods.js
| 1 | 1 | // packageA//pages/distribution/commision/commision.js |
| 2 | 2 | const app = getApp(); |
| 3 | 3 | let self = null; |
| 4 | +var os = app.globalData.setting, | |
| 5 | +ut = require("../../../../utils/util.js"); | |
| 4 | 6 | |
| 5 | 7 | Page({ |
| 6 | 8 | |
| ... | ... | @@ -28,6 +30,7 @@ Page({ |
| 28 | 30 | currentQuery: { |
| 29 | 31 | store_id: app.globalData.setting.stoid, |
| 30 | 32 | }, |
| 33 | + default_img: '/miniapp/images/default_g_img.gif', | |
| 31 | 34 | }, |
| 32 | 35 | |
| 33 | 36 | /** |
| ... | ... | @@ -121,6 +124,61 @@ Page({ |
| 121 | 124 | brandList: res.data.data, |
| 122 | 125 | }); |
| 123 | 126 | }); |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + //更新一下会员的信息 | |
| 131 | + if(getApp().globalData.user_id) { | |
| 132 | + // if(!getApp().globalData.userInfo['is_distribut']){ | |
| 133 | + // this.setData({ishidden_comise:1}) | |
| 134 | + // } | |
| 135 | + getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | |
| 136 | + isShowLoading:false, | |
| 137 | + success: function (e) { | |
| 138 | + getApp().globalData.userInfo = e.data.data; | |
| 139 | + getApp().getConfig2(function (e) { | |
| 140 | + var swithc_list = e.switch_list; | |
| 141 | + var sw_arr = JSON.parse(swithc_list); | |
| 142 | + //---如果后台有开等级卡的开关--- | |
| 143 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 144 | + self.setData({ | |
| 145 | + rank_switch: true | |
| 146 | + }); | |
| 147 | + //---回调卡的列表--- | |
| 148 | + self.getPlusCardType(function (ob) { | |
| 149 | + self.setData({ | |
| 150 | + card_list: ob.card_list | |
| 151 | + }); | |
| 152 | + var ti = setInterval(function () { | |
| 153 | + var user = getApp().globalData.userInfo; | |
| 154 | + if (!user) return false; | |
| 155 | + clearInterval(ti); | |
| 156 | + if (user.card_field && user['card_expiredate']) { | |
| 157 | + var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 158 | + var end = new Date(str); | |
| 159 | + end = Date.parse(end) / 1000; | |
| 160 | + var now = ut.gettimestamp(); | |
| 161 | + //--- 判断是等级会员,且在有效期范围内 --- | |
| 162 | + if (user.card_field && now < end) { | |
| 163 | + var card_name = ob.name_map.get(user.card_field); | |
| 164 | + if (card_name.length > 4) card_name = card_name.substring(0, 8); | |
| 165 | + self.setData({ | |
| 166 | + card_field: user.card_field, | |
| 167 | + card_name: card_name, | |
| 168 | + card_list: ob.card_list | |
| 169 | + }); | |
| 170 | + } | |
| 171 | + } | |
| 172 | + }, 500) | |
| 173 | + }) | |
| 174 | + } | |
| 175 | + }) | |
| 176 | + } | |
| 177 | + }) | |
| 178 | + } | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 124 | 182 | }; |
| 125 | 183 | }; |
| 126 | 184 | }, |
| ... | ... | @@ -584,6 +642,7 @@ Page({ |
| 584 | 642 | storeId: app.globalData.setting.stoid, |
| 585 | 643 | userId: app.globalData.user_id, |
| 586 | 644 | goods: checkedList, |
| 645 | + searchtype: 2, | |
| 587 | 646 | }, |
| 588 | 647 | }).then(function(res) { |
| 589 | 648 | if(res.data.code == 0) { |
| ... | ... | @@ -772,5 +831,47 @@ Page({ |
| 772 | 831 | price: null, |
| 773 | 832 | inputVal: null, |
| 774 | 833 | }); |
| 775 | - } | |
| 834 | + }, | |
| 835 | + | |
| 836 | + | |
| 837 | + //--- 获取卡类列表 --- | |
| 838 | + getPlusCardType: function (func) { | |
| 839 | + var storid = os.stoid; | |
| 840 | + var th = this; | |
| 841 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, | |
| 842 | + {}).then(res => { | |
| 843 | + | |
| 844 | + if(res.data.code!=0 || !res.data.data){ | |
| 845 | + var ob = { | |
| 846 | + "card_list": [], | |
| 847 | + "name_map": "" | |
| 848 | + }; | |
| 849 | + func(ob); | |
| 850 | + return false; | |
| 851 | + } | |
| 852 | + | |
| 853 | + var plusCard = res.data.data; | |
| 854 | + var arr = [1219, 2089, 3031]; | |
| 855 | + var new_arr = new Array(); | |
| 856 | + var card_name_map = new Map(); | |
| 857 | + | |
| 858 | + var user = getApp().globalData.userInfo; | |
| 859 | + if(plusCard) { | |
| 860 | + for (var i = 0; i < plusCard.length; i++) { | |
| 861 | + if ((!user || user.card_field == null || user.card_field == "") && (plusCard[i].IsStopBuy == true)) { | |
| 862 | + continue; | |
| 863 | + } | |
| 864 | + var name = "card" + plusCard[i].CorrPrice.toLowerCase(); | |
| 865 | + card_name_map.set(name, plusCard[i].CardName); | |
| 866 | + new_arr.push(plusCard[i]); | |
| 867 | + | |
| 868 | + } | |
| 869 | + } | |
| 870 | + var ob = { | |
| 871 | + "card_list": new_arr, | |
| 872 | + "name_map": card_name_map | |
| 873 | + }; | |
| 874 | + func(ob); | |
| 875 | + }) | |
| 876 | + }, | |
| 776 | 877 | }) |
| 777 | 878 | \ No newline at end of file | ... | ... |
packageA/pages/distribution/goods/goods.wxml
| 1 | 1 | <wxs src="../../../../utils/filter.wxs" module="filter"></wxs> |
| 2 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | |
| 2 | 3 | <view> |
| 3 | 4 | <view class="head pr"> |
| 4 | 5 | <!-- 搜索 --> |
| ... | ... | @@ -69,32 +70,32 @@ |
| 69 | 70 | |
| 70 | 71 | <view class="content"> |
| 71 | 72 | <checkbox-group class="fs26" wx:if="{{isShowRow}}" bindchange="checkboxChange"> |
| 72 | - <view class="item bg-white flex ai-center pd20" wx:for="{{list.pageData}}"> | |
| 73 | + <view class="item bg-white flex ai-center pd16" wx:for="{{list.pageData}}"> | |
| 73 | 74 | <!-- <label> |
| 74 | 75 | |
| 75 | 76 | </label> --> |
| 76 | 77 | <checkbox value="{{item.goods_id}}" checked="{{item.checked}}"/> |
| 77 | 78 | <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> |
| 78 | - <view class="pdr20"><image class="img" src="{{imghost + item.original_img}}" lazy-load/></view> | |
| 79 | + <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view> | |
| 79 | 80 | <view class="flex fdc jc_sb"> |
| 80 | 81 | <view class="ellipsis-2">{{item.goods_name}}</view> |
| 81 | 82 | <view> |
| 82 | 83 | <!-- 判断是否有活动价 --> |
| 83 | 84 | <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}"> |
| 84 | 85 | <view class="flex xc-wc ai-center" > |
| 85 | - <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> | |
| 86 | + <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text> | |
| 86 | 87 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 87 | 88 | <!-- 活动价 --> |
| 88 | 89 | <view class="flex xc-wc ai-center" wx:if="{{item.prom_price}}"> |
| 89 | - <view class="fs24">¥</view> | |
| 90 | - <view class="fs35">{{item.prom_price}}</view> | |
| 90 | + <!-- <view class="fs24">¥</view> --> | |
| 91 | + <view class="fs30 money">{{item.prom_price}}</view> | |
| 91 | 92 | </view> |
| 92 | 93 | </view> |
| 93 | 94 | <view class="flex" style="line-height: 28rpx;"> |
| 94 | 95 | <!-- 原价 --> |
| 95 | 96 | <view class="price flex xc-ash line_th"> |
| 96 | - <view class="fs22">¥</view> | |
| 97 | - <view class="fs22">{{item.market_price}}</view> | |
| 97 | + <!-- <view class="fs22">¥</view> --> | |
| 98 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 98 | 99 | </view> |
| 99 | 100 | </view> |
| 100 | 101 | </block> |
| ... | ... | @@ -108,10 +109,10 @@ |
| 108 | 109 | <view class="flex"> |
| 109 | 110 | <!-- 办卡价 --> |
| 110 | 111 | <view class="flex xc-wc ai-center"> |
| 111 | - <view class="fs24">¥</view> | |
| 112 | - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 112 | + <!-- <view class="fs24">¥</view> --> | |
| 113 | + <view class="fs30 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 113 | 114 | <view class="card_bg ellipsis-1"> |
| 114 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 115 | + <image src="{{url + 'miniapp/images/plus/dj_icon.png'}}"></image> | |
| 115 | 116 | <text class="card_name">{{card_name}}</text> |
| 116 | 117 | </view> |
| 117 | 118 | </view> |
| ... | ... | @@ -119,8 +120,8 @@ |
| 119 | 120 | <view class="flex" style="line-height: 28rpx;"> |
| 120 | 121 | <!-- 原价 --> |
| 121 | 122 | <view class="price flex xc-ash line_th"> |
| 122 | - <view class="fs22">¥</view> | |
| 123 | - <view class="fs22">{{item.market_price}}</view> | |
| 123 | + <!-- <view class="fs22">¥</view> --> | |
| 124 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 124 | 125 | </view> |
| 125 | 126 | </view> |
| 126 | 127 | </block> |
| ... | ... | @@ -128,15 +129,15 @@ |
| 128 | 129 | <view class="flex"> |
| 129 | 130 | <!-- 办卡价 --> |
| 130 | 131 | <view class="flex xc-wc ai-center"> |
| 131 | - <view class="fs24">¥</view> | |
| 132 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 132 | + <!-- <view class="fs24">¥</view> --> | |
| 133 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 133 | 134 | </view> |
| 134 | 135 | </view> |
| 135 | 136 | <view class="flex" style="line-height: 28rpx;"> |
| 136 | 137 | <!-- 原价 --> |
| 137 | 138 | <view class="price flex xc-ash line_th"> |
| 138 | - <view class="fs22">¥</view> | |
| 139 | - <view class="fs22">{{item.market_price}}</view> | |
| 139 | + <!-- <view class="fs22">¥</view> --> | |
| 140 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 140 | 141 | </view> |
| 141 | 142 | </view> |
| 142 | 143 | </blocK> |
| ... | ... | @@ -147,22 +148,22 @@ |
| 147 | 148 | <view class="flex"> |
| 148 | 149 | <!-- 办卡价 --> |
| 149 | 150 | <view class="flex xc-wc ai-center"> |
| 150 | - <view class="fs24">¥</view> | |
| 151 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 151 | + <!-- <view class="fs24">¥</view> --> | |
| 152 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 152 | 153 | </view> |
| 153 | 154 | <!-- 原价 --> |
| 154 | 155 | <view class="price flex xc-ash line_th"> |
| 155 | - <view class="fs22">¥</view> | |
| 156 | - <view class="fs22">{{item.market_price}}</view> | |
| 156 | + <!-- <view class="fs22">¥</view> --> | |
| 157 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 157 | 158 | </view> |
| 158 | 159 | </view> |
| 159 | - <view class="flexr" style=""> | |
| 160 | + <view class="flexr"> | |
| 160 | 161 | <!-- 等级价 --> |
| 161 | 162 | <view class="price flex ai-center"> |
| 162 | - <view class="fs22">¥</view> | |
| 163 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 163 | + <!-- <view class="fs22">¥</view> --> | |
| 164 | + <view class="fs28 money">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 164 | 165 | <view class="card_bg ellipsis-1"> |
| 165 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 166 | + <image src="{{url + 'miniapp/images/plus/dj_icon.png'}}" class="badge"></ image> | |
| 166 | 167 | <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> |
| 167 | 168 | </view> |
| 168 | 169 | </view> |
| ... | ... | @@ -172,15 +173,15 @@ |
| 172 | 173 | <view class="flex"> |
| 173 | 174 | <!-- 办卡价 --> |
| 174 | 175 | <view class="flex xc-wc ai-center"> |
| 175 | - <view class="fs24">¥</view> | |
| 176 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 176 | + <!-- <view class="fs24">¥</view> --> | |
| 177 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 177 | 178 | </view> |
| 178 | 179 | </view> |
| 179 | 180 | <view class="flex" style="line-height: 28rpx;"> |
| 180 | 181 | <!-- 原价 --> |
| 181 | 182 | <view class="price flex xc-ash line_th"> |
| 182 | - <view class="fs22">¥</view> | |
| 183 | - <view class="fs22">{{item.market_price}}</view> | |
| 183 | + <!-- <view class="fs22">¥</view> --> | |
| 184 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 184 | 185 | </view> |
| 185 | 186 | </view> |
| 186 | 187 | </block> |
| ... | ... | @@ -191,15 +192,15 @@ |
| 191 | 192 | <view class="flex"> |
| 192 | 193 | <!-- 办卡价 --> |
| 193 | 194 | <view class="flex xc-wc ai-center"> |
| 194 | - <view class="fs24">¥</view> | |
| 195 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 195 | + <!-- <view class="fs24">¥</view> --> | |
| 196 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 196 | 197 | </view> |
| 197 | 198 | </view> |
| 198 | 199 | <view class="flex" style="line-height: 28rpx;"> |
| 199 | 200 | <!-- 原价 --> |
| 200 | 201 | <view class="price flex xc-ash line_th"> |
| 201 | - <view class="fs22">¥</view> | |
| 202 | - <view class="fs22">{{item.market_price}}</view> | |
| 202 | + <!-- <view class="fs22">¥</view> --> | |
| 203 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 203 | 204 | </view> |
| 204 | 205 | </view> |
| 205 | 206 | </block> |
| ... | ... | @@ -212,30 +213,30 @@ |
| 212 | 213 | </view> |
| 213 | 214 | </checkbox-group> |
| 214 | 215 | |
| 215 | - <checkbox-group class="fs26 flex pd20 wrap" catchchange="checkboxChange" wx:else> | |
| 216 | + <checkbox-group class="fs26 flex pd16 wrap" catchchange="checkboxChange" wx:else> | |
| 216 | 217 | <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> |
| 217 | - <image class="img2" src="{{imghost + item.original_img}}" mode="aspectFit" lazy-load/> | |
| 218 | + <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/> | |
| 218 | 219 | <view class="pd20 fs26 flex jc_sb fdc f1"> |
| 219 | 220 | <view class="ellipsis-2">{{item.goods_name}}</view> |
| 220 | 221 | <view class="flex ai-center jc_sb pdt20"> |
| 221 | 222 | <checkbox value="{{item.goods_id}}" checked="{{item.checked}}" data-name="checkbox"/> |
| 222 | - <view class="t-r"> | |
| 223 | + <view> | |
| 223 | 224 | <!-- 判断是否有活动价 --> |
| 224 | 225 | <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}"> |
| 225 | 226 | <view class="flex xc-wc ai-center" > |
| 226 | - <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> | |
| 227 | + <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text> | |
| 227 | 228 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 228 | 229 | <!-- 活动价 --> |
| 229 | 230 | <view class="flex xc-wc ai-center" wx:if="{{item.prom_price}}"> |
| 230 | - <view class="fs24">¥</view> | |
| 231 | - <view class="fs35">{{item.prom_price}}</view> | |
| 231 | + <!-- <view class="fs24">¥</view> --> | |
| 232 | + <view class="fs30 money">{{item.prom_price}}</view> | |
| 232 | 233 | </view> |
| 233 | 234 | </view> |
| 234 | 235 | <view class="flex" style="line-height: 28rpx;"> |
| 235 | 236 | <!-- 原价 --> |
| 236 | 237 | <view class="price flex xc-ash line_th"> |
| 237 | - <view class="fs22">¥</view> | |
| 238 | - <view class="fs22">{{item.market_price}}</view> | |
| 238 | + <!-- <view class="fs22">¥</view> --> | |
| 239 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 239 | 240 | </view> |
| 240 | 241 | </view> |
| 241 | 242 | </block> |
| ... | ... | @@ -249,10 +250,10 @@ |
| 249 | 250 | <view class="flex"> |
| 250 | 251 | <!-- 办卡价 --> |
| 251 | 252 | <view class="flex xc-wc ai-center"> |
| 252 | - <view class="fs24">¥</view> | |
| 253 | - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 253 | + <!-- <view class="fs24">¥</view> --> | |
| 254 | + <view class="fs30 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 254 | 255 | <view class="card_bg ellipsis-1"> |
| 255 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 256 | + <image src="{{imghost + 'miniapp/images/plus/dj_icon.png'}}" class="badge"></image> | |
| 256 | 257 | <text class="card_name">{{card_name}}</text> |
| 257 | 258 | </view> |
| 258 | 259 | </view> |
| ... | ... | @@ -260,8 +261,8 @@ |
| 260 | 261 | <view class="flex" style="line-height: 28rpx;"> |
| 261 | 262 | <!-- 原价 --> |
| 262 | 263 | <view class="price flex xc-ash line_th"> |
| 263 | - <view class="fs22">¥</view> | |
| 264 | - <view class="fs22">{{item.market_price}}</view> | |
| 264 | + <!-- <view class="fs22">¥</view> --> | |
| 265 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 265 | 266 | </view> |
| 266 | 267 | </view> |
| 267 | 268 | </block> |
| ... | ... | @@ -269,15 +270,15 @@ |
| 269 | 270 | <view class="flex"> |
| 270 | 271 | <!-- 办卡价 --> |
| 271 | 272 | <view class="flex xc-wc ai-center"> |
| 272 | - <view class="fs24">¥</view> | |
| 273 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 273 | + <!-- <view class="fs24">¥</view> --> | |
| 274 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 274 | 275 | </view> |
| 275 | 276 | </view> |
| 276 | 277 | <view class="flex" style="line-height: 28rpx;"> |
| 277 | 278 | <!-- 原价 --> |
| 278 | 279 | <view class="price flex xc-ash line_th"> |
| 279 | - <view class="fs22">¥</view> | |
| 280 | - <view class="fs22">{{item.market_price}}</view> | |
| 280 | + <!-- <view class="fs22">¥</view> --> | |
| 281 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 281 | 282 | </view> |
| 282 | 283 | </view> |
| 283 | 284 | </blocK> |
| ... | ... | @@ -288,22 +289,22 @@ |
| 288 | 289 | <view class="flex"> |
| 289 | 290 | <!-- 办卡价 --> |
| 290 | 291 | <view class="flex xc-wc ai-center"> |
| 291 | - <view class="fs24">¥</view> | |
| 292 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 292 | + <!-- <view class="fs24">¥</view> --> | |
| 293 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 293 | 294 | </view> |
| 294 | 295 | <!-- 原价 --> |
| 295 | 296 | <view class="price flex xc-ash line_th"> |
| 296 | - <view class="fs22">¥</view> | |
| 297 | - <view class="fs22">{{item.market_price}}</view> | |
| 297 | + <!-- <view class="fs22">¥</view> --> | |
| 298 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 298 | 299 | </view> |
| 299 | 300 | </view> |
| 300 | 301 | <view class="flexr" style=""> |
| 301 | 302 | <!-- 等级价 --> |
| 302 | 303 | <view class="price flex ai-center"> |
| 303 | - <view class="fs22">¥</view> | |
| 304 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 304 | + <!-- <view class="fs22">¥</view> --> | |
| 305 | + <view class="fs28 money">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 305 | 306 | <view class="card_bg ellipsis-1"> |
| 306 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 307 | + <image src="{{url + 'miniapp/images/plus/dj_icon.png'}}"></ image> | |
| 307 | 308 | <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> |
| 308 | 309 | </view> |
| 309 | 310 | </view> |
| ... | ... | @@ -313,15 +314,15 @@ |
| 313 | 314 | <view class="flex"> |
| 314 | 315 | <!-- 办卡价 --> |
| 315 | 316 | <view class="flex xc-wc ai-center"> |
| 316 | - <view class="fs24">¥</view> | |
| 317 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 317 | + <!-- <view class="fs24">¥</view> --> | |
| 318 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 318 | 319 | </view> |
| 319 | 320 | </view> |
| 320 | 321 | <view class="flex" style="line-height: 28rpx;"> |
| 321 | 322 | <!-- 原价 --> |
| 322 | 323 | <view class="price flex xc-ash line_th"> |
| 323 | - <view class="fs22">¥</view> | |
| 324 | - <view class="fs22">{{item.market_price}}</view> | |
| 324 | + <!-- <view class="fs22">¥</view> --> | |
| 325 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 325 | 326 | </view> |
| 326 | 327 | </view> |
| 327 | 328 | </block> |
| ... | ... | @@ -332,21 +333,21 @@ |
| 332 | 333 | <view class="flex"> |
| 333 | 334 | <!-- 办卡价 --> |
| 334 | 335 | <view class="flex xc-wc ai-center"> |
| 335 | - <view class="fs24">¥</view> | |
| 336 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 336 | + <!-- <view class="fs24">¥</view> --> | |
| 337 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 337 | 338 | </view> |
| 338 | 339 | </view> |
| 339 | 340 | <view class="flex" style="line-height: 28rpx;"> |
| 340 | 341 | <!-- 原价 --> |
| 341 | 342 | <view class="price flex xc-ash line_th"> |
| 342 | - <view class="fs22">¥</view> | |
| 343 | - <view class="fs22">{{item.market_price}}</view> | |
| 343 | + <!-- <view class="fs22">¥</view> --> | |
| 344 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 344 | 345 | </view> |
| 345 | 346 | </view> |
| 346 | 347 | </block> |
| 347 | 348 | </block> |
| 348 | 349 | <!-- <view class="money c-red fs32">{{item.market_price}}</view> --> |
| 349 | - <view class="c-a">分成金额:<text class="money c-red">{{item.commission}}</text></view> | |
| 350 | + <view class="c-a fs24">分成金额:<text class="money c-red">{{filter.toFix(item.commission, 2)}}</text></view> | |
| 350 | 351 | </view> |
| 351 | 352 | </view> |
| 352 | 353 | </view> | ... | ... |
packageA/pages/distribution/goods/goods.wxss
| ... | ... | @@ -328,5 +328,28 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { |
| 328 | 328 | text-decoration: line-through; |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | +.badge { | |
| 332 | + display: block; | |
| 333 | + width: 19rpx; | |
| 334 | + height: 19rpx; | |
| 335 | +} | |
| 336 | + | |
| 337 | +.card_bg { | |
| 338 | + box-sizing: border-box; | |
| 339 | + padding: 2rpx 10rpx; | |
| 340 | + /* height: 28rpx; */ | |
| 341 | + border-radius: 26rpx; | |
| 342 | + font-size: 20rpx; | |
| 343 | + /* line-height: 28rpx; */ | |
| 344 | + max-width: 200rpx; | |
| 345 | + background: #333; | |
| 346 | + color: #fff; | |
| 347 | + margin-left: 8rpx; | |
| 348 | + display: flex; | |
| 349 | + align-items: center; | |
| 350 | + /* position: relative; | |
| 351 | + top: -4rpx; */ | |
| 352 | +} | |
| 353 | + | |
| 331 | 354 | |
| 332 | 355 | ... | ... |
packageA/pages/distribution/shop/shop.js
| ... | ... | @@ -36,7 +36,8 @@ Page({ |
| 36 | 36 | card_list: null, |
| 37 | 37 | |
| 38 | 38 | isAll: true, |
| 39 | - | |
| 39 | + | |
| 40 | + default_img: '/miniapp/images/default_g_img.gif', | |
| 40 | 41 | }, |
| 41 | 42 | |
| 42 | 43 | /** |
| ... | ... | @@ -696,5 +697,25 @@ Page({ |
| 696 | 697 | }, |
| 697 | 698 | |
| 698 | 699 | |
| 700 | + /** | |
| 701 | + * 点击新品 | |
| 702 | + */ | |
| 703 | + // imgError(e) { | |
| 704 | + // this.setData({ | |
| 705 | + // noImg: true, | |
| 706 | + // }); | |
| 707 | + // }, | |
| 708 | + | |
| 709 | + | |
| 710 | + bind_bnerr2: function (e) { | |
| 711 | + var _errImg = e.target.dataset.errorimg; | |
| 712 | + var _errurl = e.target.dataset.url; | |
| 713 | + var ii = _errurl.indexOf(oo.imghost); | |
| 714 | + if (ii != -1) { | |
| 715 | + var _errObj = {}; | |
| 716 | + _errObj[_errImg] = this.data.iurl+"/miniapp/images/default_g_img.gif"; | |
| 717 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 718 | + } | |
| 719 | + }, | |
| 699 | 720 | |
| 700 | 721 | }) |
| 701 | 722 | \ No newline at end of file | ... | ... |
packageA/pages/distribution/shop/shop.wxml
| ... | ... | @@ -67,19 +67,19 @@ |
| 67 | 67 | <view class="fs26" wx:if="{{isShowRow}}"> |
| 68 | 68 | <view class="item bg-white flex ai-center pd20" wx:for="{{list.pageData}}"> |
| 69 | 69 | <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> |
| 70 | - <view class="img-container pdr20" data-txt="已售:{{item.sales_sum}}"><image class="img" src="{{imghost + item.original_img}}" lazy-load mode="aspectFit"/></view> | |
| 70 | + <view class="img-container pdr20" data-txt="已售:{{item.sales_sum}}"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load mode="aspectFit"/></view> | |
| 71 | 71 | <view class="flex fdc jc_sb"> |
| 72 | - <view class="ellipsis-2 h68">{{item.goods_name}}</view> | |
| 72 | + <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view> | |
| 73 | 73 | |
| 74 | 74 | <!-- 判断是否有活动价 --> |
| 75 | 75 | <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}"> |
| 76 | - <view class="flex xc-wc" > | |
| 77 | - <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> | |
| 76 | + <view class="flex xc-wc pdt20" > | |
| 77 | + <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text> | |
| 78 | 78 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 79 | 79 | <!-- 活动价 --> |
| 80 | 80 | <view class="flex xc-wc ai_and" wx:if="{{item.prom_price}}"> |
| 81 | 81 | <!-- <view class="fs24">¥</view> --> |
| 82 | - <view class="fs35 money">{{item.prom_price}}</view> | |
| 82 | + <view class="fs30 money">{{item.prom_price}}</view> | |
| 83 | 83 | </view> |
| 84 | 84 | </view> |
| 85 | 85 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -101,9 +101,9 @@ |
| 101 | 101 | <!-- 办卡价 --> |
| 102 | 102 | <view class="flex xc-wc ai_and"> |
| 103 | 103 | <!-- <view class="fs24">¥</view> --> |
| 104 | - <view class="fs35 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 104 | + <view class="fs30 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 105 | 105 | <view class="card_bg"> |
| 106 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 106 | + <image src="{{url + 'miniapp/images/plus/dj_icon.png'}}"></image> | |
| 107 | 107 | <text class="card_name ellipsis-1">{{card_name}}</text> |
| 108 | 108 | </view> |
| 109 | 109 | </view> |
| ... | ... | @@ -121,7 +121,7 @@ |
| 121 | 121 | <!-- 办卡价 --> |
| 122 | 122 | <view class="flex xc-wc"> |
| 123 | 123 | <!-- <view class="fs24">¥</view> --> |
| 124 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 124 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 125 | 125 | </view> |
| 126 | 126 | </view> |
| 127 | 127 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -140,7 +140,7 @@ |
| 140 | 140 | <!-- 办卡价 --> |
| 141 | 141 | <view class="flex xc-wc"> |
| 142 | 142 | <!-- <view class="fs24">¥</view> --> |
| 143 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 143 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 144 | 144 | </view> |
| 145 | 145 | <!-- 原价 --> |
| 146 | 146 | <view class="price flex xc-ash line_th"> |
| ... | ... | @@ -150,14 +150,14 @@ |
| 150 | 150 | </view> |
| 151 | 151 | <view class="flexr" style=""> |
| 152 | 152 | <!-- 等级价 --> |
| 153 | - <view class="price flex ai-center"> | |
| 154 | - <!-- <view class="fs22">¥</view> --> | |
| 155 | - <view class="fs28 money">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 156 | - <view class="card_bg"> | |
| 157 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 158 | - <text class="card_name ellipsis-1">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 159 | - </view> | |
| 160 | - </view> | |
| 153 | + <view class="price flex ai-center"> | |
| 154 | + <!-- <view class="fs22">¥</view> --> | |
| 155 | + <view class="fs28 money">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 156 | + <view class="card_bg"> | |
| 157 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 158 | + <text class="card_name ellipsis-1">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 159 | + </view> | |
| 160 | + </view> | |
| 161 | 161 | </view> |
| 162 | 162 | </block> |
| 163 | 163 | <block wx:else> |
| ... | ... | @@ -165,7 +165,7 @@ |
| 165 | 165 | <!-- 办卡价 --> |
| 166 | 166 | <view class="flex xc-wc"> |
| 167 | 167 | <!-- <view class="fs24">¥</view> --> |
| 168 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 168 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 169 | 169 | </view> |
| 170 | 170 | </view> |
| 171 | 171 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -184,7 +184,7 @@ |
| 184 | 184 | <!-- 办卡价 --> |
| 185 | 185 | <view class="flex xc-wc"> |
| 186 | 186 | <!-- <view class="fs24">¥</view> --> |
| 187 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 187 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 188 | 188 | </view> |
| 189 | 189 | </view> |
| 190 | 190 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -209,18 +209,18 @@ |
| 209 | 209 | |
| 210 | 210 | <view class="fs26 flex pd20 wrap" wx:else> |
| 211 | 211 | <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> |
| 212 | - <view class="img-container" data-txt="已售:{{item.sales_sum}}"><image class="img2" src="{{imghost + item.original_img}}" mode="aspectFit" lazy-load/></view> | |
| 212 | + <view class="img-container" data-txt="已售:{{item.sales_sum}}"><image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load="true"/></view> | |
| 213 | 213 | <view class="pd20 fs26"> |
| 214 | - <view class="ellipsis-2 h68">{{item.goods_name}}</view> | |
| 214 | + <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view> | |
| 215 | 215 | <!-- 判断是否有活动价 --> |
| 216 | 216 | <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}"> |
| 217 | - <view class="flex xc-wc" > | |
| 218 | - <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> | |
| 217 | + <view class="flex xc-wc"> | |
| 218 | + <text wx:if="{{item.prom_integral}}"><text class="fs30" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> | |
| 219 | 219 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 220 | 220 | <!-- 活动价 --> |
| 221 | 221 | <view class="flex xc-wc" wx:if="{{item.prom_price}}"> |
| 222 | 222 | <!-- <view class="fs24">¥</view> --> |
| 223 | - <view class="fs35 money">{{item.prom_price}}</view> | |
| 223 | + <view class="fs30 money">{{item.prom_price}}</view> | |
| 224 | 224 | </view> |
| 225 | 225 | </view> |
| 226 | 226 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -242,7 +242,7 @@ |
| 242 | 242 | <!-- 办卡价 --> |
| 243 | 243 | <view class="flex xc-wc ai_and"> |
| 244 | 244 | <!-- <view class="fs24">¥</view> --> |
| 245 | - <view class="fs35 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 245 | + <view class="fs30 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 246 | 246 | <view class="card_bg"> |
| 247 | 247 | <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
| 248 | 248 | <text class="card_name ellipsis-1">{{card_name}}</text> |
| ... | ... | @@ -262,7 +262,7 @@ |
| 262 | 262 | <!-- 办卡价 --> |
| 263 | 263 | <view class="flex xc-wc ai_and"> |
| 264 | 264 | <!-- <view class="fs24">¥</view> --> |
| 265 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 265 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 266 | 266 | </view> |
| 267 | 267 | </view> |
| 268 | 268 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -281,7 +281,7 @@ |
| 281 | 281 | <!-- 办卡价 --> |
| 282 | 282 | <view class="flex xc-wc ai_and"> |
| 283 | 283 | <!-- <view class="fs24">¥</view> --> |
| 284 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 284 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 285 | 285 | </view> |
| 286 | 286 | <!-- 原价 --> |
| 287 | 287 | <view class="price flex xc-ash line_th"> |
| ... | ... | @@ -306,7 +306,7 @@ |
| 306 | 306 | <!-- 办卡价 --> |
| 307 | 307 | <view class="flex xc-wc ai_and"> |
| 308 | 308 | <!-- <view class="fs24">¥</view> --> |
| 309 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 309 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 310 | 310 | </view> |
| 311 | 311 | </view> |
| 312 | 312 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -325,7 +325,7 @@ |
| 325 | 325 | <!-- 办卡价 --> |
| 326 | 326 | <view class="flex xc-wc ai_and"> |
| 327 | 327 | <!-- <view class="fs24">¥</view> --> |
| 328 | - <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 328 | + <view class="fs30 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 329 | 329 | </view> |
| 330 | 330 | </view> |
| 331 | 331 | <view class="flex" style="line-height: 28rpx;"> | ... | ... |