Commit d3e32ed898088173ed1e9cb4a72fcbc7637d201b
1 parent
db20f6e0
分销功能修改
Showing
9 changed files
with
199 additions
and
127 deletions
app.wxss
packageA/pages/distribution/goods/goods.js
| ... | ... | @@ -344,6 +344,10 @@ Page({ |
| 344 | 344 | }; |
| 345 | 345 | if(data.page) delete data.page; |
| 346 | 346 | if(data.key) delete data.key; |
| 347 | + // if(data.nation_id) delete data.nation_id; | |
| 348 | + // if(data.brand_id) delete data.brand_id; | |
| 349 | + // if(data.startprice) delete data.startprice; | |
| 350 | + // if(data.endprice) delete data.endprice; | |
| 347 | 351 | |
| 348 | 352 | this.setData({ |
| 349 | 353 | currentTabIndex: currentIndex, |
| ... | ... | @@ -427,12 +431,12 @@ Page({ |
| 427 | 431 | /** |
| 428 | 432 | * promiseGet请求数据 |
| 429 | 433 | */ |
| 430 | - getData: function(isInit, url, data) { | |
| 434 | + getData: function(isInit, url, data, isShowLoading) { | |
| 431 | 435 | return new Promise(function(resolve, reject) { |
| 432 | 436 | |
| 433 | 437 | app.request.promiseGet(url, { |
| 434 | 438 | data: data, |
| 435 | - isShowLoading: true, | |
| 439 | + isShowLoading: !isShowLoading ? isShowLoading : true, | |
| 436 | 440 | }) |
| 437 | 441 | .then(function(res) { |
| 438 | 442 | // console.log('1121', res.data.code); |
| ... | ... | @@ -581,11 +585,26 @@ Page({ |
| 581 | 585 | userId: app.globalData.user_id, |
| 582 | 586 | goods: checkedList, |
| 583 | 587 | }, |
| 584 | - }).then(function() { | |
| 585 | - self.setData({ | |
| 586 | - isCheckAll: false, | |
| 587 | - }); | |
| 588 | - self.getData(true, '/api/weshop/goods/page?is_mainshow=1&isonsale=1&dis_type=1', self.data.currentQuery); | |
| 588 | + }).then(function(res) { | |
| 589 | + if(res.data.code == 0) { | |
| 590 | + self.setData({ | |
| 591 | + isCheckAll: false, | |
| 592 | + }); | |
| 593 | + wx.showToast({ | |
| 594 | + title: '上架成功', | |
| 595 | + icon: 'success', | |
| 596 | + duration: 1000, | |
| 597 | + }); | |
| 598 | + | |
| 599 | + self.getData(true, '/api/weshop/goods/page?is_mainshow=1&isonsale=1&dis_type=1', self.data.currentQuery, false); | |
| 600 | + } else { | |
| 601 | + wx.showToast({ | |
| 602 | + title: '上架失败', | |
| 603 | + icon: 'success', | |
| 604 | + duration: 1000, | |
| 605 | + }); | |
| 606 | + } | |
| 607 | + | |
| 589 | 608 | }); |
| 590 | 609 | }, |
| 591 | 610 | |
| ... | ... | @@ -611,12 +630,25 @@ Page({ |
| 611 | 630 | app.request.promisePost('/api/weshop/users/distribut/DownGoods', { |
| 612 | 631 | is_json: true, |
| 613 | 632 | data: data, |
| 614 | - }).then(function() { | |
| 615 | - // console.log('data', self.data.currentQuery); | |
| 616 | - self.setData({ | |
| 617 | - isCheckAll: false, | |
| 618 | - }); | |
| 619 | - self.getData(true, '/api/weshop/goods/page?dis_type=1&searchtype=1', self.data.currentQuery); | |
| 633 | + }).then(function(res) { | |
| 634 | + if(res.data.code == 0) { | |
| 635 | + self.setData({ | |
| 636 | + isCheckAll: false, | |
| 637 | + }); | |
| 638 | + wx.showToast({ | |
| 639 | + title: '下架成功', | |
| 640 | + icon: 'success', | |
| 641 | + duration: 1000, | |
| 642 | + }); | |
| 643 | + self.getData(true, '/api/weshop/goods/page?dis_type=1&searchtype=1', self.data.currentQuery, false); | |
| 644 | + } else { | |
| 645 | + wx.showToast({ | |
| 646 | + title: '下架失败', | |
| 647 | + icon: 'success', | |
| 648 | + duration: 1000, | |
| 649 | + }); | |
| 650 | + } | |
| 651 | + | |
| 620 | 652 | }); |
| 621 | 653 | }, |
| 622 | 654 | |
| ... | ... | @@ -694,7 +726,10 @@ Page({ |
| 694 | 726 | if(!data.nation_id && !data.brand_id && !startprice && !endprice && !this.data.inputVal) { |
| 695 | 727 | this.setData({ |
| 696 | 728 | isHiddenDropdown: true, |
| 729 | + currentTabIndex: 0, | |
| 697 | 730 | }); |
| 731 | + if(data.orderField) delete data.orderField; | |
| 732 | + this.getData(true, '/api/weshop/goods/page', data); | |
| 698 | 733 | return; |
| 699 | 734 | }; |
| 700 | 735 | ... | ... |
packageA/pages/distribution/shop/shop.wxml
| ... | ... | @@ -69,24 +69,24 @@ |
| 69 | 69 | <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> |
| 70 | 70 | <view class="img-container pdr20" data-txt="已售:{{item.sales_sum}}"><image class="img" src="{{imghost + item.original_img}}" lazy-load mode="aspectFit"/></view> |
| 71 | 71 | <view class="flex fdc jc_sb"> |
| 72 | - <view class="ellipsis-2">{{item.goods_name}}</view> | |
| 72 | + <view class="ellipsis-2 h68">{{item.goods_name}}</view> | |
| 73 | 73 | |
| 74 | 74 | <!-- 判断是否有活动价 --> |
| 75 | 75 | <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}"> |
| 76 | - <view class="money flex xc-wc" > | |
| 76 | + <view class="flex xc-wc" > | |
| 77 | 77 | <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{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 | - <view class="fs24">¥</view> | |
| 82 | - <view class="fs35">{{item.prom_price}}</view> | |
| 81 | + <!-- <view class="fs24">¥</view> --> | |
| 82 | + <view class="fs35 money">{{item.prom_price}}</view> | |
| 83 | 83 | </view> |
| 84 | 84 | </view> |
| 85 | 85 | <view class="flex" style="line-height: 28rpx;"> |
| 86 | 86 | <!-- 原价 --> |
| 87 | 87 | <view class="price flex xc-ash line_th"> |
| 88 | - <view class="fs22">¥</view> | |
| 89 | - <view class="fs22">{{item.market_price}}</view> | |
| 88 | + <!-- <view class="fs22">¥</view> --> | |
| 89 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 90 | 90 | </view> |
| 91 | 91 | </view> |
| 92 | 92 | </block> |
| ... | ... | @@ -97,38 +97,38 @@ |
| 97 | 97 | <block wx:if="{{card_field}}"> |
| 98 | 98 | <!-- 等级价>0 --> |
| 99 | 99 | <block wx:if="{{item[card_field]>0}}"> |
| 100 | - <view class="money flex"> | |
| 100 | + <view class="flex"> | |
| 101 | 101 | <!-- 办卡价 --> |
| 102 | 102 | <view class="flex xc-wc ai_and"> |
| 103 | - <view class="fs24">¥</view> | |
| 104 | - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 105 | - <view class="card_bg ellipsis-1"> | |
| 103 | + <!-- <view class="fs24">¥</view> --> | |
| 104 | + <view class="fs35 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 105 | + <view class="card_bg"> | |
| 106 | 106 | <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
| 107 | - <text class="card_name">{{card_name}}</text> | |
| 107 | + <text class="card_name ellipsis-1">{{card_name}}</text> | |
| 108 | 108 | </view> |
| 109 | 109 | </view> |
| 110 | 110 | </view> |
| 111 | 111 | <view class="flex" style="line-height: 28rpx;"> |
| 112 | 112 | <!-- 原价 --> |
| 113 | 113 | <view class="price flex xc-ash line_th"> |
| 114 | - <view class="fs22">¥</view> | |
| 115 | - <view class="fs22">{{item.market_price}}</view> | |
| 114 | + <!-- <view class="fs22">¥</view> --> | |
| 115 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 116 | 116 | </view> |
| 117 | 117 | </view> |
| 118 | 118 | </block> |
| 119 | 119 | <blocK wx:else> |
| 120 | - <view class="money flex"> | |
| 120 | + <view class="flex"> | |
| 121 | 121 | <!-- 办卡价 --> |
| 122 | 122 | <view class="flex xc-wc"> |
| 123 | - <view class="fs24">¥</view> | |
| 124 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 123 | + <!-- <view class="fs24">¥</view> --> | |
| 124 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 125 | 125 | </view> |
| 126 | 126 | </view> |
| 127 | 127 | <view class="flex" style="line-height: 28rpx;"> |
| 128 | 128 | <!-- 原价 --> |
| 129 | 129 | <view class="price flex xc-ash line_th"> |
| 130 | - <view class="fs22">¥</view> | |
| 131 | - <view class="fs22">{{item.market_price}}</view> | |
| 130 | + <!-- <view class="fs22">¥</view> --> | |
| 131 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 132 | 132 | </view> |
| 133 | 133 | </view> |
| 134 | 134 | </blocK> |
| ... | ... | @@ -136,43 +136,43 @@ |
| 136 | 136 | <block wx:else> |
| 137 | 137 | <!-- 如果商品有设置等级价⼤于0的 --> |
| 138 | 138 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
| 139 | - <view class="money flex"> | |
| 139 | + <view class="flex"> | |
| 140 | 140 | <!-- 办卡价 --> |
| 141 | 141 | <view class="flex xc-wc"> |
| 142 | - <view class="fs24">¥</view> | |
| 143 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 142 | + <!-- <view class="fs24">¥</view> --> | |
| 143 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 144 | 144 | </view> |
| 145 | 145 | <!-- 原价 --> |
| 146 | 146 | <view class="price flex xc-ash line_th"> |
| 147 | - <view class="fs22">¥</view> | |
| 148 | - <view class="fs22">{{item.market_price}}</view> | |
| 147 | + <!-- <view class="fs22">¥</view> --> | |
| 148 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 149 | 149 | </view> |
| 150 | 150 | </view> |
| 151 | 151 | <view class="flexr" style=""> |
| 152 | 152 | <!-- 等级价 --> |
| 153 | 153 | <view class="price flex ai-center"> |
| 154 | - <view class="fs22">¥</view> | |
| 155 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 156 | - <view class="card_bg ellipsis-1"> | |
| 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 | 157 | <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> |
| 158 | - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 158 | + <text class="card_name ellipsis-1">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 159 | 159 | </view> |
| 160 | 160 | </view> |
| 161 | 161 | </view> |
| 162 | 162 | </block> |
| 163 | 163 | <block wx:else> |
| 164 | - <view class="money flex"> | |
| 164 | + <view class="flex"> | |
| 165 | 165 | <!-- 办卡价 --> |
| 166 | 166 | <view class="flex xc-wc"> |
| 167 | - <view class="fs24">¥</view> | |
| 168 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 167 | + <!-- <view class="fs24">¥</view> --> | |
| 168 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 169 | 169 | </view> |
| 170 | 170 | </view> |
| 171 | 171 | <view class="flex" style="line-height: 28rpx;"> |
| 172 | 172 | <!-- 原价 --> |
| 173 | 173 | <view class="price flex xc-ash line_th"> |
| 174 | - <view class="fs22">¥</view> | |
| 175 | - <view class="fs22">{{item.market_price}}</view> | |
| 174 | + <!-- <view class="fs22">¥</view> --> | |
| 175 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 176 | 176 | </view> |
| 177 | 177 | </view> |
| 178 | 178 | </block> |
| ... | ... | @@ -180,24 +180,24 @@ |
| 180 | 180 | </block> |
| 181 | 181 | <!-- 商品压根就没有等级价 --> |
| 182 | 182 | <block wx:else> |
| 183 | - <view class="money flex"> | |
| 183 | + <view class="flex"> | |
| 184 | 184 | <!-- 办卡价 --> |
| 185 | 185 | <view class="flex xc-wc"> |
| 186 | - <view class="fs24">¥</view> | |
| 187 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 186 | + <!-- <view class="fs24">¥</view> --> | |
| 187 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 188 | 188 | </view> |
| 189 | 189 | </view> |
| 190 | 190 | <view class="flex" style="line-height: 28rpx;"> |
| 191 | 191 | <!-- 原价 --> |
| 192 | 192 | <view class="price flex xc-ash line_th"> |
| 193 | - <view class="fs22">¥</view> | |
| 194 | - <view class="fs22">{{item.market_price}}</view> | |
| 193 | + <!-- <view class="fs22">¥</view> --> | |
| 194 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 195 | 195 | </view> |
| 196 | 196 | </view> |
| 197 | 197 | </block> |
| 198 | 198 | </block> |
| 199 | 199 | <!-- 分层金额 --> |
| 200 | - <view hidden="{{ishidden_comise}}" class="fs24 c-a">分成金额:<text class="money c-red">{{item.fcommission}}</text></view> | |
| 200 | + <view hidden="{{ishidden_comise}}" class="fs24 c-a">分成金额:<text class="money c-red">{{filter.toFix(item.commission,2)}}</text></view> | |
| 201 | 201 | |
| 202 | 202 | |
| 203 | 203 | </view> |
| ... | ... | @@ -211,23 +211,23 @@ |
| 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 | 212 | <view class="img-container" data-txt="已售:{{item.sales_sum}}"><image class="img2" src="{{imghost + item.original_img}}" mode="aspectFit" lazy-load/></view> |
| 213 | 213 | <view class="pd20 fs26"> |
| 214 | - <view class="ellipsis-2">{{item.goods_name}}</view> | |
| 214 | + <view class="ellipsis-2 h68">{{item.goods_name}}</view> | |
| 215 | 215 | <!-- 判断是否有活动价 --> |
| 216 | 216 | <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}"> |
| 217 | - <view class="money flex xc-wc" > | |
| 217 | + <view class="flex xc-wc" > | |
| 218 | 218 | <text wx:if="{{item.prom_integral}}"><text class="fs35" 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 | - <view class="fs24">¥</view> | |
| 223 | - <view class="fs35">{{item.prom_price}}</view> | |
| 222 | + <!-- <view class="fs24">¥</view> --> | |
| 223 | + <view class="fs35 money">{{item.prom_price}}</view> | |
| 224 | 224 | </view> |
| 225 | 225 | </view> |
| 226 | 226 | <view class="flex" style="line-height: 28rpx;"> |
| 227 | 227 | <!-- 原价 --> |
| 228 | 228 | <view class="price flex xc-ash line_th"> |
| 229 | - <view class="fs22">¥</view> | |
| 230 | - <view class="fs22">{{item.market_price}}</view> | |
| 229 | + <!-- <view class="fs22">¥</view> --> | |
| 230 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 231 | 231 | </view> |
| 232 | 232 | </view> |
| 233 | 233 | </block> |
| ... | ... | @@ -238,38 +238,38 @@ |
| 238 | 238 | <block wx:if="{{card_field}}"> |
| 239 | 239 | <!-- 等级价>0 --> |
| 240 | 240 | <block wx:if="{{item[card_field]>0}}"> |
| 241 | - <view class="money flex"> | |
| 241 | + <view class="flex"> | |
| 242 | 242 | <!-- 办卡价 --> |
| 243 | 243 | <view class="flex xc-wc ai_and"> |
| 244 | - <view class="fs24">¥</view> | |
| 245 | - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 246 | - <view class="card_bg ellipsis-1"> | |
| 244 | + <!-- <view class="fs24">¥</view> --> | |
| 245 | + <view class="fs35 money">{{filter.toFix(item[card_field],2)}}</view> | |
| 246 | + <view class="card_bg"> | |
| 247 | 247 | <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
| 248 | - <text class="card_name">{{card_name}}</text> | |
| 248 | + <text class="card_name ellipsis-1">{{card_name}}</text> | |
| 249 | 249 | </view> |
| 250 | 250 | </view> |
| 251 | 251 | </view> |
| 252 | 252 | <view class="flex" style="line-height: 28rpx;"> |
| 253 | 253 | <!-- 原价 --> |
| 254 | 254 | <view class="price flex xc-ash line_th"> |
| 255 | - <view class="fs22">¥</view> | |
| 256 | - <view class="fs22">{{item.market_price}}</view> | |
| 255 | + <!-- <view class="fs22">¥</view> --> | |
| 256 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 257 | 257 | </view> |
| 258 | 258 | </view> |
| 259 | 259 | </block> |
| 260 | 260 | <blocK wx:else> |
| 261 | - <view class="money flex"> | |
| 261 | + <view class="flex"> | |
| 262 | 262 | <!-- 办卡价 --> |
| 263 | 263 | <view class="flex xc-wc ai_and"> |
| 264 | - <view class="fs24">¥</view> | |
| 265 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 264 | + <!-- <view class="fs24">¥</view> --> | |
| 265 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 266 | 266 | </view> |
| 267 | 267 | </view> |
| 268 | 268 | <view class="flex" style="line-height: 28rpx;"> |
| 269 | 269 | <!-- 原价 --> |
| 270 | 270 | <view class="price flex xc-ash line_th"> |
| 271 | - <view class="fs22">¥</view> | |
| 272 | - <view class="fs22">{{item.market_price}}</view> | |
| 271 | + <!-- <view class="fs22">¥</view> --> | |
| 272 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 273 | 273 | </view> |
| 274 | 274 | </view> |
| 275 | 275 | </blocK> |
| ... | ... | @@ -277,43 +277,43 @@ |
| 277 | 277 | <block wx:else> |
| 278 | 278 | <!-- 如果商品有设置等级价⼤于0的 --> |
| 279 | 279 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
| 280 | - <view class="money flex"> | |
| 280 | + <view class="flex"> | |
| 281 | 281 | <!-- 办卡价 --> |
| 282 | 282 | <view class="flex xc-wc ai_and"> |
| 283 | - <view class="fs24">¥</view> | |
| 284 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 283 | + <!-- <view class="fs24">¥</view> --> | |
| 284 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 285 | 285 | </view> |
| 286 | 286 | <!-- 原价 --> |
| 287 | 287 | <view class="price flex xc-ash line_th"> |
| 288 | - <view class="fs22">¥</view> | |
| 289 | - <view class="fs22">{{item.market_price}}</view> | |
| 288 | + <!-- <view class="fs22">¥</view> --> | |
| 289 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 290 | 290 | </view> |
| 291 | 291 | </view> |
| 292 | 292 | <view class="flexr" style=""> |
| 293 | 293 | <!-- 等级价 --> |
| 294 | 294 | <view class="price flex ai-center"> |
| 295 | - <view class="fs22">¥</view> | |
| 296 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 297 | - <view class="card_bg ellipsis-1"> | |
| 295 | + <!-- <view class="fs22">¥</view> --> | |
| 296 | + <view class="fs28 money">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 297 | + <view class="card_bg"> | |
| 298 | 298 | <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> |
| 299 | - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 299 | + <text class="card_name ellipsis-1">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 300 | 300 | </view> |
| 301 | 301 | </view> |
| 302 | 302 | </view> |
| 303 | 303 | </block> |
| 304 | 304 | <block wx:else> |
| 305 | - <view class="money flex"> | |
| 305 | + <view class="flex"> | |
| 306 | 306 | <!-- 办卡价 --> |
| 307 | 307 | <view class="flex xc-wc ai_and"> |
| 308 | - <view class="fs24">¥</view> | |
| 309 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 308 | + <!-- <view class="fs24">¥</view> --> | |
| 309 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 310 | 310 | </view> |
| 311 | 311 | </view> |
| 312 | 312 | <view class="flex" style="line-height: 28rpx;"> |
| 313 | 313 | <!-- 原价 --> |
| 314 | 314 | <view class="price flex xc-ash line_th"> |
| 315 | - <view class="fs22">¥</view> | |
| 316 | - <view class="fs22">{{item.market_price}}</view> | |
| 315 | + <!-- <view class="fs22">¥</view> --> | |
| 316 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 317 | 317 | </view> |
| 318 | 318 | </view> |
| 319 | 319 | </block> |
| ... | ... | @@ -321,24 +321,24 @@ |
| 321 | 321 | </block> |
| 322 | 322 | <!-- 商品压根就没有等级价 --> |
| 323 | 323 | <block wx:else> |
| 324 | - <view class="money flex"> | |
| 324 | + <view class="flex"> | |
| 325 | 325 | <!-- 办卡价 --> |
| 326 | 326 | <view class="flex xc-wc ai_and"> |
| 327 | - <view class="fs24">¥</view> | |
| 328 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 327 | + <!-- <view class="fs24">¥</view> --> | |
| 328 | + <view class="fs35 money">{{filter.toFix(item.shop_price,2)}}</view> | |
| 329 | 329 | </view> |
| 330 | 330 | </view> |
| 331 | 331 | <view class="flex" style="line-height: 28rpx;"> |
| 332 | 332 | <!-- 原价 --> |
| 333 | 333 | <view class="price flex xc-ash line_th"> |
| 334 | - <view class="fs22">¥</view> | |
| 335 | - <view class="fs22">{{item.market_price}}</view> | |
| 334 | + <!-- <view class="fs22">¥</view> --> | |
| 335 | + <view class="fs22 money">{{item.market_price}}</view> | |
| 336 | 336 | </view> |
| 337 | 337 | </view> |
| 338 | 338 | </block> |
| 339 | 339 | </block> |
| 340 | 340 | <!-- 分层金额 --> |
| 341 | - <view class="fs24 c-a">分成金额:<text class="money c-red">1.00</text></view> | |
| 341 | + <view class="fs24 c-a">分成金额:<text class="money c-red">{{filter.toFix(item.commission,2)}}</text></view> | |
| 342 | 342 | </view> |
| 343 | 343 | </view> |
| 344 | 344 | </view> | ... | ... |
packageA/pages/distribution/shop/shop.wxss
| ... | ... | @@ -104,6 +104,10 @@ page { |
| 104 | 104 | /* word-break: break-all; |
| 105 | 105 | word-wrap: break-word; */ |
| 106 | 106 | } |
| 107 | +.money::before { | |
| 108 | + content: '¥'; | |
| 109 | + font-size: 22rpx; | |
| 110 | +} | |
| 107 | 111 | .md { |
| 108 | 112 | position: relative; |
| 109 | 113 | } |
| ... | ... | @@ -578,18 +582,18 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { |
| 578 | 582 | .card_bg { |
| 579 | 583 | box-sizing: border-box; |
| 580 | 584 | padding: 2rpx 10rpx; |
| 581 | - height: 28rpx; | |
| 585 | + /* height: 28rpx; */ | |
| 582 | 586 | border-radius: 26rpx; |
| 583 | - font-size: 18rpx; | |
| 584 | - line-height: 28rpx; | |
| 585 | - max-width: 210rpx; | |
| 587 | + font-size: 20rpx; | |
| 588 | + /* line-height: 28rpx; */ | |
| 589 | + max-width: 200rpx; | |
| 586 | 590 | background: #333; |
| 587 | 591 | color: #fff; |
| 588 | 592 | margin-left: 8rpx; |
| 589 | 593 | display: flex; |
| 590 | 594 | align-items: center; |
| 591 | - position: relative; | |
| 592 | - top: -4rpx; | |
| 595 | + /* position: relative; | |
| 596 | + top: -4rpx; */ | |
| 593 | 597 | } |
| 594 | 598 | |
| 595 | 599 | .card_bg image { | ... | ... |
pages/distribution/distribution.js
| ... | ... | @@ -55,32 +55,51 @@ Page({ |
| 55 | 55 | self.setData({ |
| 56 | 56 | data: res.data.data, |
| 57 | 57 | }); |
| 58 | + | |
| 59 | + // 广告banner | |
| 60 | + app.request.promiseGet("/api/weshop/ad/page", { | |
| 61 | + data: { | |
| 62 | + pid: 401, | |
| 63 | + enabled: 1, | |
| 64 | + store_id: app.globalData.setting.stoid, | |
| 65 | + } | |
| 66 | + }).then(res => { | |
| 67 | + if(res.data.code == 0 && res.data.data) { | |
| 68 | + let item = res.data.data.pageData[0]; | |
| 69 | + if(item && item.ad_code) { | |
| 70 | + self.setData({ | |
| 71 | + ad_img: item.ad_code, | |
| 72 | + }); | |
| 73 | + }; | |
| 74 | + }; | |
| 75 | + }); | |
| 58 | 76 | |
| 59 | 77 | } else { |
| 60 | 78 | // if(!res.data.data.is_distribut) {//如果不是分销商:0不是,1是 |
| 61 | 79 | |
| 62 | - app.request.promiseGet('/api/weshop/users/distribut/getIsDistribut', { | |
| 63 | - data: { | |
| 64 | - storeId: self.data.userInfo.store_id, | |
| 65 | - userId: self.data.userInfo.user_id, | |
| 66 | - first_leader: self.data.userInfo.first_leader, | |
| 67 | - }, | |
| 68 | - isShowLoading: true, | |
| 69 | - }).then(function(res) { | |
| 70 | - console.log('!!!===>', res); | |
| 71 | - if(res.data.code == 0) { | |
| 72 | - self.setData({ | |
| 73 | - fenxiao: res.data.data, | |
| 74 | - }); | |
| 75 | - } else { | |
| 76 | - self.setData({ | |
| 77 | - msg: res.data.msg, | |
| 78 | - }); | |
| 79 | - } | |
| 80 | - | |
| 81 | - }); | |
| 80 | + app.request.promiseGet('/api/weshop/users/distribut/getIsDistribut', { | |
| 81 | + data: { | |
| 82 | + storeId: self.data.userInfo.store_id, | |
| 83 | + userId: self.data.userInfo.user_id, | |
| 84 | + first_leader: self.data.userInfo.first_leader, | |
| 85 | + }, | |
| 86 | + isShowLoading: true, | |
| 87 | + }).then(function(res) { | |
| 88 | + console.log('!!!===>', res); | |
| 89 | + if(res.data.code == 0) { | |
| 90 | + self.setData({ | |
| 91 | + fenxiao: res.data.data, | |
| 92 | + }); | |
| 93 | + } else { | |
| 94 | + self.setData({ | |
| 95 | + msg: res.data.msg, | |
| 96 | + }); | |
| 97 | + } | |
| 98 | + | |
| 99 | + }); | |
| 82 | 100 | |
| 83 | - // }; | |
| 101 | + | |
| 102 | + | |
| 84 | 103 | }; |
| 85 | 104 | }, |
| 86 | 105 | ... | ... |
pages/distribution/distribution.wxml
| ... | ... | @@ -2,10 +2,11 @@ |
| 2 | 2 | <view class="main"> |
| 3 | 3 | <!-- 头像 --> |
| 4 | 4 | <view class="avatar-container t-c pdv40"> |
| 5 | - <view class="pdb20"> | |
| 5 | + <image class="bgImg" src="{{imghost + (ad_img ? ad_img:'/miniapp/images/user_index_powder.jpg')}}"/> | |
| 6 | + <view class="pdb20 pr"> | |
| 6 | 7 | <image class="avatar" src="{{userInfo.head_pic}}"/> |
| 7 | 8 | </view> |
| 8 | - <view class="fs26"><text class="nickname">{{filter.show_default(userInfo.nickname)}}</text></view> | |
| 9 | + <view class="fs26 pr"><text class="nickname">{{filter.show_default(userInfo.nickname)}}</text></view> | |
| 9 | 10 | </view> |
| 10 | 11 | <!-- 金额 --> |
| 11 | 12 | <view> | ... | ... |
pages/distribution/distribution.wxss
| ... | ... | @@ -9,10 +9,19 @@ page { |
| 9 | 9 | .avatar-container { |
| 10 | 10 | padding-top: 60rpx; |
| 11 | 11 | padding-bottom: 60rpx; |
| 12 | - background: url(https://mshopimg.yolipai.net/miniapp/images/user_index_powder.jpg) no-repeat 100% 100%; | |
| 12 | + /* background: url(https://mshopimg.yolipai.net/miniapp/images/user_index_powder.jpg) no-repeat 100% 100%; */ | |
| 13 | + position: relative; | |
| 13 | 14 | /* background-size: 100%; */ |
| 14 | 15 | } |
| 15 | 16 | |
| 17 | +.bgImg { | |
| 18 | + position: absolute; | |
| 19 | + top: 0; | |
| 20 | + left: 0; | |
| 21 | + width: 100%; | |
| 22 | + height: 100%; | |
| 23 | +} | |
| 24 | + | |
| 16 | 25 | .avatar { |
| 17 | 26 | width: 160rpx; |
| 18 | 27 | height: 160rpx; | ... | ... |
pages/goods/categoryList/categoryList.wxml
| ... | ... | @@ -110,10 +110,10 @@ |
| 110 | 110 | </view> |
| 111 | 111 | </view> |
| 112 | 112 | <view class="xc-search-inner "> |
| 113 | - <view class="search-img left"> | |
| 114 | - <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> | |
| 115 | - </view> | |
| 116 | - <input bindfocus="goseach" class="search-cont" placeholder="搜索你想要的生活" type="text"></input> | |
| 113 | + <view class="search-img left"> | |
| 114 | + <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> | |
| 115 | + </view> | |
| 116 | + <input bindfocus="goseach" class="search-cont" placeholder="请输入您所搜索的商品" type="text"></input> | |
| 117 | 117 | </view> |
| 118 | 118 | </view> |
| 119 | 119 | |
| ... | ... | @@ -285,7 +285,7 @@ |
| 285 | 285 | <view class="search-img left"> |
| 286 | 286 | <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> |
| 287 | 287 | </view> |
| 288 | - <input bindfocus="goseach" class="search-cont" placeholder="搜索你想要的生活" type="text"></input> | |
| 288 | + <input bindfocus="goseach" class="search-cont" placeholder="请输入您所搜索的商品" type="text"></input> | |
| 289 | 289 | </view> |
| 290 | 290 | </view> |
| 291 | 291 | <!-- /头部 --> | ... | ... |
pages/goods/categoryList/categoryList.wxss
| ... | ... | @@ -61,14 +61,14 @@ swiper{ |
| 61 | 61 | margin-right: 12rpx; |
| 62 | 62 | width: 30rpx; |
| 63 | 63 | height: 30rpx; |
| 64 | - margin-top: -20rpx; | |
| 64 | + margin-top: -8rpx; | |
| 65 | 65 | margin-left: 20rpx; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | .search-cont { |
| 69 | 69 | height: 58rpx; |
| 70 | 70 | width: 536rpx; |
| 71 | - padding-left: 12rpx; | |
| 71 | + /* padding-left: 12rpx; */ | |
| 72 | 72 | line-height: 58rpx; |
| 73 | 73 | font-size: 28rpx; |
| 74 | 74 | color: #666; |
| ... | ... | @@ -195,7 +195,7 @@ margin-top: 8rpx; |
| 195 | 195 | |
| 196 | 196 | } |
| 197 | 197 | .search-img.left{ |
| 198 | - margin-left: 35rpx; | |
| 198 | + /* margin-left: 35rpx; */ | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | .xc-search-inner { | ... | ... |