Commit 4504815e92f726323b3bb9b7c569665e63241b24
Merge branch 'dev' into 'test'
Dev See merge request !779
Showing
10 changed files
with
476 additions
and
99 deletions
app.wxss
| ... | ... | @@ -46,6 +46,9 @@ |
| 46 | 46 | .pdl20 { |
| 47 | 47 | padding-left: 20rpx; |
| 48 | 48 | } |
| 49 | +.pdl30 { | |
| 50 | + padding-left: 30rpx; | |
| 51 | +} | |
| 49 | 52 | .pdr10 { |
| 50 | 53 | padding-right: 10rpx; |
| 51 | 54 | } |
| ... | ... | @@ -632,7 +635,6 @@ background: #ffe3e2; |
| 632 | 635 | .fs24{ |
| 633 | 636 | font-size: 24rpx !important; |
| 634 | 637 | } |
| 635 | - | |
| 636 | 638 | .fs26{ |
| 637 | 639 | font-size: 26rpx; |
| 638 | 640 | } |
| ... | ... | @@ -651,7 +653,7 @@ background: #ffe3e2; |
| 651 | 653 | font-size:35rpx; |
| 652 | 654 | } |
| 653 | 655 | .fs36 { |
| 654 | - font-size: 36rpx; | |
| 656 | + font-size: 36rpx !important; | |
| 655 | 657 | } |
| 656 | 658 | .fs38 { |
| 657 | 659 | font-size: 38rpx; | ... | ... |
pages/goods/categoryList/categoryList.wxss
| 1 | 1 | /*---nyf 2018-9-7---*/ |
| 2 | 2 | |
| 3 | -page{height: 100%; background: #fff;} | |
| 3 | +page{height: 100%; background: #fff !important;} | |
| 4 | 4 | .top_view{ width: 100%;background: #fff;} |
| 5 | 5 | |
| 6 | 6 | .swiper-tab{ |
| ... | ... | @@ -30,11 +30,14 @@ swiper{ |
| 30 | 30 | |
| 31 | 31 | /*--搜索--*/ |
| 32 | 32 | .search-box { |
| 33 | - width: 100%; | |
| 34 | - height: 88rpx; | |
| 35 | - z-index: 10; | |
| 33 | + width: 100% !important; | |
| 34 | + height: 88rpx !important; | |
| 35 | + z-index: 10 !important; | |
| 36 | + border-radius: 0 !important; | |
| 36 | 37 | /*-background: linear-gradient(rgba(0,0,0,.2),rgba(255,255,255,0));-*/ |
| 37 | - background: #f2f2f2; | |
| 38 | + background: #f2f2f2 !important; | |
| 39 | + padding: 0 !important; | |
| 40 | + font-size: medium !important; | |
| 38 | 41 | } |
| 39 | 42 | |
| 40 | 43 | .logo { |
| ... | ... | @@ -208,7 +211,7 @@ margin-top: 8rpx; |
| 208 | 211 | background-color: #f2f2f2; |
| 209 | 212 | } |
| 210 | 213 | .project_height{ |
| 211 | - height: 90%; | |
| 214 | + height: 100%; | |
| 212 | 215 | |
| 213 | 216 | } |
| 214 | 217 | .project_type{ |
| ... | ... | @@ -292,14 +295,14 @@ width: 60%; |
| 292 | 295 | |
| 293 | 296 | } |
| 294 | 297 | .classify_name{ |
| 295 | - width: 90%; | |
| 296 | - margin: auto; | |
| 298 | + /* width: 90%; | |
| 299 | + margin: auto; */ | |
| 297 | 300 | height: 70rpx; |
| 298 | 301 | border-bottom: 1rpx solid #f5f6f6; |
| 299 | - line-height: 85rpx; | |
| 300 | - font-weight: 600; | |
| 301 | - | |
| 302 | - | |
| 302 | + line-height: 70rpx; | |
| 303 | + font-weight: 600; | |
| 304 | + padding-left: 20rpx; | |
| 305 | + padding-right: 20rpx; | |
| 303 | 306 | } |
| 304 | 307 | .classify_content{ |
| 305 | 308 | width: 100% |
| ... | ... | @@ -425,7 +428,7 @@ margin: auto; |
| 425 | 428 | |
| 426 | 429 | .no_child_lev{width: 100%; text-align: center; color: #adadad; padding-top: 30rpx} |
| 427 | 430 | .classify_title { |
| 428 | - width: 80%; | |
| 431 | + /* width: 80%; */ | |
| 429 | 432 | } |
| 430 | 433 | |
| 431 | 434 | .brand_img_name {color: #666;} |
| ... | ... | @@ -521,22 +524,30 @@ margin: auto; |
| 521 | 524 | } |
| 522 | 525 | |
| 523 | 526 | .classify_content > view:only-child .classify_content-frame { |
| 524 | - padding-bottom: 0; | |
| 527 | + /* padding-bottom: 0; */ | |
| 525 | 528 | } |
| 526 | 529 | |
| 527 | 530 | .classify_content > .classify_content-frame { |
| 528 | 531 | padding-bottom: 118rpx; |
| 529 | 532 | } |
| 530 | - | |
| 531 | - | |
| 532 | - page { | |
| 533 | - /* overflow-x: hidden; */ | |
| 534 | - /* padding-bottom: 40rpx; */ | |
| 535 | - } | |
| 536 | 533 | |
| 537 | - /* .my-container { | |
| 538 | - padding-bottom: 118rpx; | |
| 539 | - } */ | |
| 534 | + .img-wrap { | |
| 535 | + width: 180rpx !important; | |
| 536 | + height: 180rpx !important; | |
| 537 | + } | |
| 538 | + | |
| 539 | + .rmb::before { | |
| 540 | + content: '¥'; | |
| 541 | + font-size: 24rpx; | |
| 542 | + } | |
| 543 | + | |
| 544 | + | |
| 545 | + .item-cont .title { | |
| 546 | + margin-bottom: 0 !important; | |
| 547 | + } | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 540 | 551 | |
| 541 | 552 | /* 风格三商品列表样式引入 */ |
| 542 | 553 | @import "../goodsList/goodsList.wxss"; |
| 543 | 554 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -1481,13 +1481,13 @@ |
| 1481 | 1481 | <view class="poster-wrapper"> |
| 1482 | 1482 | <view class="poster"> |
| 1483 | 1483 | <!-- <view class="poster" bindtap="previewImage"> --> |
| 1484 | - <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | |
| 1484 | + <image src="{{shareImgPath}}" class="poster-img" ></image> | |
| 1485 | 1485 | <view class="btn-close" catchtap="closePoster"><text class="iconfont icon-close"></text></view> |
| 1486 | 1486 | </view> |
| 1487 | - <!-- <view class="btn-container"> | |
| 1488 | - <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> | |
| 1489 | - <button class="btn-share" bindtap="savePic">保存到相册</button> | |
| 1490 | - </view> --> | |
| 1487 | + <view class="btn-container"> | |
| 1488 | + <!--<button class="btn-share" open-type="share" bindtap="">微信好友分享</button>--> | |
| 1489 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | |
| 1490 | + </view> | |
| 1491 | 1491 | </view> |
| 1492 | 1492 | </view> |
| 1493 | 1493 | </view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
| ... | ... | @@ -2731,7 +2731,7 @@ button.custom-service::after{ |
| 2731 | 2731 | top: 50%; |
| 2732 | 2732 | left: 50%; |
| 2733 | 2733 | transform: translate(-50%, -50%); |
| 2734 | - width: calc(100% - 120rpx); | |
| 2734 | + width: calc(100% - 220rpx); | |
| 2735 | 2735 | z-index: 1000; |
| 2736 | 2736 | } |
| 2737 | 2737 | .mask { |
| ... | ... | @@ -2741,7 +2741,7 @@ button.custom-service::after{ |
| 2741 | 2741 | width: 100%; |
| 2742 | 2742 | height: 100%; |
| 2743 | 2743 | z-index: 999; |
| 2744 | - background-color: rgba(0,0,0,.4); | |
| 2744 | + background-color: rgba(0,0,0,.6); | |
| 2745 | 2745 | } |
| 2746 | 2746 | .poster-wrapper { |
| 2747 | 2747 | width: 100%; |
| ... | ... | @@ -2750,7 +2750,7 @@ button.custom-service::after{ |
| 2750 | 2750 | .poster { |
| 2751 | 2751 | box-sizing: border-box; |
| 2752 | 2752 | width: 100%; |
| 2753 | - height: 1055rpx; | |
| 2753 | + height: 915rpx; | |
| 2754 | 2754 | border-radius: 20rpx; |
| 2755 | 2755 | /* box-shadow: 0 8px 12px #666; */ |
| 2756 | 2756 | position: relative; | ... | ... |
pages/goods/goodsList/goodsList.js
| ... | ... | @@ -22,6 +22,7 @@ Page({ |
| 22 | 22 | is_hot:0, |
| 23 | 23 | prom_goods_list:null, |
| 24 | 24 | rq_data:null, |
| 25 | + isToggle: false, //切换商品视图控制符 | |
| 25 | 26 | }, |
| 26 | 27 | |
| 27 | 28 | onLoad: function(t) { |
| ... | ... | @@ -273,6 +274,15 @@ Page({ |
| 273 | 274 | func(ob); |
| 274 | 275 | }) |
| 275 | 276 | }, |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + // 切换显示 | |
| 281 | + bindToggleDisplay() { | |
| 282 | + this.setData({ | |
| 283 | + isToggle: !this.data.isToggle, | |
| 284 | + }); | |
| 285 | + }, | |
| 276 | 286 | |
| 277 | 287 | |
| 278 | 288 | }); |
| 279 | 289 | \ No newline at end of file | ... | ... |
pages/goods/goodsList/goodsList.wxml
| 1 | 1 | <wxs module="g_filter" src="g_filter.wxs"></wxs> |
| 2 | 2 | <view class="container"> |
| 3 | - <view style="padding: 20rpx 30rpx"> | |
| 3 | + <view> | |
| 4 | 4 | <block wx:for="{{prom_goods_list}}"> |
| 5 | - <view class="fs30 ellipsis-1"> | |
| 5 | + <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx"> | |
| 6 | 6 | 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text> |
| 7 | 7 | <text space="{{true}}" wx:if="{{item.content.is_money}}">减{{item.content.money}}元 </text> |
| 8 | 8 | <text space="{{true}}" wx:if="{{item.content.is_sale}}">打{{item.content.sale}}折 </text> |
| ... | ... | @@ -13,7 +13,16 @@ |
| 13 | 13 | </view> |
| 14 | 14 | </block> |
| 15 | 15 | </view> |
| 16 | - | |
| 16 | + | |
| 17 | + <view class="pd20 flex ai-center jc_sb"> | |
| 18 | + <!-- 搜索框 --> | |
| 19 | + <view class="search-box f1"> | |
| 20 | + <navigator hover-class="none" url="/pages/goods/search/search"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</navigator> | |
| 21 | + </view> | |
| 22 | + <!-- 单列/双列 显示切换 --> | |
| 23 | + <text class="iconfont {{isToggle ? 'icon-fenxiang':'icon-fenlie'}} pdl30 fs36" bindtap="bindToggleDisplay"></text> | |
| 24 | + </view> | |
| 25 | + | |
| 17 | 26 | <view class="nav"> |
| 18 | 27 | <navigator bindtap="changeTab" class="nav-item" data-href="sort" data-ad="{{adname}}">综合 |
| 19 | 28 | <view class="ico-dg" wx:if="{{tabname=='sort'}}"> |
| ... | ... | @@ -40,29 +49,37 @@ |
| 40 | 49 | </view> |
| 41 | 50 | </navigator> --> |
| 42 | 51 | |
| 43 | - <navigator class="nav-item search" url="/pages/goods/search/search"> | |
| 52 | + <!-- <navigator class="nav-item search" url="/pages/goods/search/search"> | |
| 44 | 53 | <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> |
| 45 | - </navigator> | |
| 54 | + </navigator> --> | |
| 46 | 55 | </view> |
| 47 | - <view class="choice_list"> | |
| 56 | + | |
| 57 | + <view class="choice_list" wx:if="{{!isToggle}}"> | |
| 48 | 58 | <navigator class="choice_item" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}"> |
| 49 | 59 | <view class="img-wrap"> |
| 50 | 60 | <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image> |
| 51 | 61 | </view> |
| 52 | 62 | <view class="item-cont"> |
| 53 | - <view class="title">{{item.goods_name}}</view> | |
| 63 | + <view class="title ellipsis-2">{{item.goods_name}}</view> | |
| 54 | 64 | <!-- 判断是否有活动价 --> |
| 55 | 65 | <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2}}"> |
| 56 | - <!-- 活动价 --> | |
| 57 | - <view class="price"> | |
| 58 | - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | |
| 59 | - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | |
| 60 | - <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | |
| 61 | - </view> | |
| 66 | + <view class="flex on"> | |
| 67 | + <!-- 活动价 --> | |
| 68 | + <view class="price"> | |
| 69 | + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | |
| 70 | + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | |
| 71 | + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | |
| 72 | + </view> | |
| 73 | + <view class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view> | |
| 74 | + </view> | |
| 75 | + | |
| 62 | 76 | |
| 63 | - <view class="comment flex jc_sb"> | |
| 64 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 65 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 77 | + <view class="comment pdt10"> | |
| 78 | + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> --> | |
| 79 | + <view class="fs24 t-r"> | |
| 80 | + <span>评论{{item.comment_count}}</span> | |
| 81 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 82 | + </view> | |
| 66 | 83 | </view> |
| 67 | 84 | </block> |
| 68 | 85 | <block wx:else> |
| ... | ... | @@ -79,56 +96,201 @@ |
| 79 | 96 | <text class="card_name">{{card_name}}</text> |
| 80 | 97 | </view> |
| 81 | 98 | </view> |
| 82 | - <view class="comment flex jc_sb"> | |
| 99 | + <view class="comment"> | |
| 83 | 100 | <view class="word-line xc-ash">¥{{item.market_price}}</view> |
| 84 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 101 | + <view class="fs24 t-r"> | |
| 102 | + <span>评论{{item.comment_count}}</span> | |
| 103 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 104 | + </view> | |
| 85 | 105 | </view> |
| 86 | 106 | </block> |
| 87 | 107 | <block wx:else> |
| 88 | 108 | <view class="price">¥{{item.shop_price}}</view> |
| 89 | - <view class="comment flex jc_sb"> | |
| 109 | + <view class="comment"> | |
| 90 | 110 | <view class="word-line xc-ash">¥{{item.market_price}}</view> |
| 91 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 111 | + <view class="fs24 t-r"> | |
| 112 | + <span>评论{{item.comment_count}}</span> | |
| 113 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 114 | + </view> | |
| 92 | 115 | </view> |
| 93 | 116 | </block> |
| 94 | 117 | </block> |
| 95 | 118 | <block wx:else> |
| 96 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 119 | + <view wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 97 | 120 | <view class="flex ai-center"> |
| 98 | - <view class="price">¥{{item.shop_price}}</view> | |
| 99 | - <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
| 121 | + <view class="price rmb">{{item.shop_price}}</view> | |
| 122 | + <view class="word-line xc-ash mk_price rmb">{{item.market_price}}</view> | |
| 100 | 123 | </view> |
| 101 | - <view class="comment flex jc_sb"> | |
| 124 | + <view class="comment"> | |
| 102 | 125 | <view class="flex ai-center"> |
| 103 | - <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
| 126 | + <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view> | |
| 104 | 127 | <view class="card_bg ellipsis-1"> |
| 105 | 128 | <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
| 106 | 129 | <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> |
| 107 | 130 | </view> |
| 108 | 131 | </view> |
| 109 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 132 | + <view class="fs24 pdt10 t-r"> | |
| 133 | + <span class="">评论{{item.comment_count}}</span> | |
| 134 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 135 | + </view> | |
| 110 | 136 | </view> |
| 111 | - </block> | |
| 137 | + </view> | |
| 112 | 138 | <block wx:else> |
| 113 | - <view class="price">¥{{item.shop_price}}</view> | |
| 114 | - <view class="comment flex jc_sb"> | |
| 115 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 116 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 139 | + <view> | |
| 140 | + <view class="price">¥{{item.shop_price}}</view> | |
| 141 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 142 | + </view> | |
| 143 | + <!-- <view class="price">¥{{item.shop_price}}</view> --> | |
| 144 | + <view class="comment pdt10"> | |
| 145 | + <view class="fs24 t-r"> | |
| 146 | + <span>评论{{item.comment_count}}</span> | |
| 147 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 148 | + </view> | |
| 117 | 149 | </view> |
| 118 | 150 | </block> |
| 119 | 151 | </block> |
| 120 | 152 | </block> |
| 121 | - <block wx:else> | |
| 122 | - <view class="price">¥{{item.shop_price}}</view> | |
| 123 | - <view class="comment flex jc_sb"> | |
| 124 | - <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 125 | - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> | |
| 153 | + <view wx:else> | |
| 154 | + <view class="flex ai-center"> | |
| 155 | + <view class="price rmb">{{item.shop_price}}</view> | |
| 156 | + <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | |
| 157 | + </view> | |
| 158 | + | |
| 159 | + <view class="comment pdt10"> | |
| 160 | + <view class="fs24 t-r"> | |
| 161 | + <span>评论{{item.comment_count}}</span> | |
| 162 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 163 | + </view> | |
| 126 | 164 | </view> |
| 127 | - </block> | |
| 165 | + </view> | |
| 128 | 166 | </block> |
| 129 | 167 | </view> |
| 130 | 168 | </navigator> |
| 131 | 169 | </view> |
| 170 | + | |
| 171 | + | |
| 172 | + <view class="choice_list on" wx:else> | |
| 173 | + <navigator class="choice_item" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}"> | |
| 174 | + <view class="img-wrap"> | |
| 175 | + <image src="{{item.original_img}}" binderror="bind_bnerr2" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image> | |
| 176 | + </view> | |
| 177 | + <view class="item-cont"> | |
| 178 | + <view class="title ellipsis-2">{{item.goods_name}}</view> | |
| 179 | + <!-- 判断是否有活动价 --> | |
| 180 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2}}"> | |
| 181 | + <view class="flex on"> | |
| 182 | + <!-- 活动价 --> | |
| 183 | + <view class="price"> | |
| 184 | + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | |
| 185 | + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | |
| 186 | + <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> | |
| 187 | + </view> | |
| 188 | + <view class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view> | |
| 189 | + </view> | |
| 190 | + | |
| 191 | + | |
| 192 | + <view class="comment pdt10"> | |
| 193 | + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> --> | |
| 194 | + <view class="fs24 t-r"> | |
| 195 | + <span>评论{{item.comment_count}}</span> | |
| 196 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 197 | + </view> | |
| 198 | + </view> | |
| 199 | + </block> | |
| 200 | + <block wx:else> | |
| 201 | + <!-- 商品价格,先判断下是后又等级价--> | |
| 202 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | |
| 203 | + <!-- 当会员是等级卡的时候 --> | |
| 204 | + <block wx:if="{{card_field}}"> | |
| 205 | + <!-- 等级价>0 --> | |
| 206 | + <block wx:if="{{item[card_field]>0}}"> | |
| 207 | + <view class="flex ai-center"> | |
| 208 | + <view class="price">¥{{item[card_field]}}</view> | |
| 209 | + <view class="card_bg ellipsis-1"> | |
| 210 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 211 | + <text class="card_name">{{card_name}}</text> | |
| 212 | + </view> | |
| 213 | + </view> | |
| 214 | + <view class="comment"> | |
| 215 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 216 | + <view class="fs24 t-r"> | |
| 217 | + <span>评论{{item.comment_count}}</span> | |
| 218 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 219 | + </view> | |
| 220 | + </view> | |
| 221 | + </block> | |
| 222 | + <block wx:else> | |
| 223 | + <view class="price">¥{{item.shop_price}}</view> | |
| 224 | + <view class="comment"> | |
| 225 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 226 | + <view class="fs24 t-r"> | |
| 227 | + <span>评论{{item.comment_count}}</span> | |
| 228 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 229 | + </view> | |
| 230 | + </view> | |
| 231 | + </block> | |
| 232 | + </block> | |
| 233 | + <block wx:else> | |
| 234 | + <view wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 235 | + <view class="flex ai-center"> | |
| 236 | + <view class="price rmb">{{item.shop_price}}</view> | |
| 237 | + <view class="word-line xc-ash mk_price rmb">{{item.market_price}}</view> | |
| 238 | + </view> | |
| 239 | + <view class="comment"> | |
| 240 | + <view class="flex ai-center"> | |
| 241 | + <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view> | |
| 242 | + <view class="card_bg ellipsis-1"> | |
| 243 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 244 | + <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 245 | + </view> | |
| 246 | + </view> | |
| 247 | + <view class="fs24 pdt10 t-r"> | |
| 248 | + <span class="">评论{{item.comment_count}}</span> | |
| 249 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 250 | + </view> | |
| 251 | + </view> | |
| 252 | + </view> | |
| 253 | + <block wx:else> | |
| 254 | + <view> | |
| 255 | + <view class="price">¥{{item.shop_price}}</view> | |
| 256 | + <view class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 257 | + </view> | |
| 258 | + <!-- <view class="price">¥{{item.shop_price}}</view> --> | |
| 259 | + <view class="comment pdt10"> | |
| 260 | + <view class="fs24 t-r"> | |
| 261 | + <span>评论{{item.comment_count}}</span> | |
| 262 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 263 | + </view> | |
| 264 | + </view> | |
| 265 | + </block> | |
| 266 | + </block> | |
| 267 | + </block> | |
| 268 | + <view wx:else> | |
| 269 | + <view class=""> | |
| 270 | + <view class="price rmb">{{item.shop_price}}</view> | |
| 271 | + <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | |
| 272 | + </view> | |
| 273 | + | |
| 274 | + <view class="comment pdt10"> | |
| 275 | + <view class="fs24 t-r"> | |
| 276 | + <span>评论{{item.comment_count}}</span> | |
| 277 | + <span class="pdl30">已售{{item.sales_sum}}</span> | |
| 278 | + </view> | |
| 279 | + </view> | |
| 280 | + </view> | |
| 281 | + </block> | |
| 282 | + </view> | |
| 283 | + </navigator> | |
| 284 | + </view> | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 132 | 294 | <view class="no-data" wx:if="{{(!requestData||requestData.length==0) && is_go}}"> |
| 133 | 295 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> |
| 134 | 296 | <view class="no-data-title">没有相关的数据</view> | ... | ... |
pages/goods/goodsList/goodsList.wxss
| 1 | +page { | |
| 2 | + background-color: #f0f0f0; | |
| 3 | +} | |
| 4 | + | |
| 1 | 5 | .container { |
| 2 | 6 | color: #666; |
| 3 | 7 | } |
| 4 | 8 | |
| 9 | +.nav { | |
| 10 | + display: flex; | |
| 11 | + border-radius: 30rpx 30rpx 0 0; | |
| 12 | + overflow: hidden; | |
| 13 | +} | |
| 14 | + | |
| 5 | 15 | .nav-item { |
| 6 | - float: left; | |
| 7 | - width: 30%; | |
| 8 | - height: 90rpx; | |
| 9 | - line-height: 90rpx; | |
| 16 | + /* float: left; */ | |
| 17 | + flex: 1; | |
| 18 | + /* width: 30%; */ | |
| 19 | + height: 80rpx; | |
| 20 | + /* line-height: 90rpx; */ | |
| 10 | 21 | display: flex; |
| 11 | 22 | align-items: center; |
| 12 | 23 | justify-content: center; |
| 13 | - font-size: 32rpx; | |
| 14 | - border-bottom: 1px solid #dfefef; | |
| 24 | + font-size: 26rpx; | |
| 25 | + border-bottom: 1px solid #f5f5f5; | |
| 15 | 26 | background-color: #fff; |
| 16 | 27 | } |
| 17 | 28 | |
| 18 | 29 | .nav-item .ico-dg { |
| 19 | - width: 18rpx; | |
| 20 | - height: 12rpx; | |
| 30 | + width: 12rpx; | |
| 31 | + height: 8rpx; | |
| 21 | 32 | margin-left: 10rpx; |
| 22 | 33 | line-height: 0; |
| 23 | 34 | } |
| ... | ... | @@ -46,6 +57,19 @@ |
| 46 | 57 | background-position-x: -32rpx; |
| 47 | 58 | } |
| 48 | 59 | |
| 60 | +.search-box { | |
| 61 | + color: #BEBEBE; | |
| 62 | + font-size: 24rpx; | |
| 63 | + /* border: 2rpx solid #f23030; */ | |
| 64 | + border-radius: 40rpx; | |
| 65 | + padding: 16rpx; | |
| 66 | + background-color: #e0e0e0; | |
| 67 | +} | |
| 68 | + | |
| 69 | +.icon-sousuo { | |
| 70 | + font-size: 26rpx !important; | |
| 71 | +} | |
| 72 | + | |
| 49 | 73 | .search { |
| 50 | 74 | width: 10%; |
| 51 | 75 | } |
| ... | ... | @@ -57,22 +81,31 @@ |
| 57 | 81 | |
| 58 | 82 | .choice_list { |
| 59 | 83 | background-color: #fff; |
| 84 | + /* padding-left: 20rpx; | |
| 85 | + padding-right: 20rpx; */ | |
| 60 | 86 | } |
| 61 | 87 | |
| 62 | 88 | .choice_item { |
| 63 | 89 | position: relative; |
| 64 | 90 | width: 100%; |
| 65 | - min-height: 200rpx; | |
| 66 | - padding: 10rpx 0; | |
| 67 | - border-bottom: 1px solid #f5f6f6; | |
| 91 | + /* min-height: 200rpx; */ | |
| 92 | + /* padding: 10rpx 0; */ | |
| 93 | + /* border-bottom: 1px solid #f5f6f6; */ | |
| 68 | 94 | font-size: 30rpx; |
| 95 | + display: flex; | |
| 96 | + padding: 20rpx; | |
| 97 | + box-sizing: border-box; | |
| 69 | 98 | } |
| 70 | 99 | |
| 71 | 100 | .img-wrap { |
| 72 | - float: left; | |
| 73 | - width: 180rpx; | |
| 74 | - height: 180rpx; | |
| 75 | - padding: 0 10rpx 10rpx; | |
| 101 | + /* float: left; */ | |
| 102 | + width: 270rpx; | |
| 103 | + height: 270rpx; | |
| 104 | + margin-right: 22rpx; | |
| 105 | + border-radius: 15rpx; | |
| 106 | + overflow: hidden; | |
| 107 | + flex-shrink: 0; | |
| 108 | + /* padding: 0 10rpx 10rpx; */ | |
| 76 | 109 | } |
| 77 | 110 | |
| 78 | 111 | .img-wrap image { |
| ... | ... | @@ -81,25 +114,36 @@ |
| 81 | 114 | } |
| 82 | 115 | |
| 83 | 116 | .item-cont .title { |
| 117 | + font-size: 26rpx; | |
| 84 | 118 | height: 72rpx; |
| 85 | - margin: 16rpx 0; | |
| 86 | - padding-right: 10rpx; | |
| 119 | + margin-bottom: 20rpx; | |
| 120 | + /* padding-right: 10rpx; */ | |
| 87 | 121 | line-height: 36rpx; |
| 88 | - color: #333; | |
| 122 | + color: #2C2C2C; | |
| 123 | + text-align: justify; | |
| 89 | 124 | overflow: hidden; |
| 90 | 125 | } |
| 91 | 126 | |
| 92 | 127 | .price { |
| 93 | 128 | display: inline-block; |
| 94 | 129 | color: #f23030; |
| 95 | - line-height: 24rpx; | |
| 130 | + /* line-height: 24rpx; */ | |
| 131 | + font-size: 30rpx; | |
| 132 | + /* font-weight: bold; | |
| 133 | + font-size: 28rpx; */ | |
| 96 | 134 | /* padding-bottom: 20rpx; */ |
| 97 | 135 | } |
| 98 | 136 | |
| 137 | +.rmb::before { | |
| 138 | + content: '¥'; | |
| 139 | + font-size: 24rpx; | |
| 140 | +} | |
| 141 | + | |
| 99 | 142 | .comment { |
| 100 | - font-size: 25rpx; | |
| 101 | - margin-top: 4rpx; | |
| 102 | - padding-right: 30rpx; | |
| 143 | + font-size: 24rpx; | |
| 144 | + /* margin-top: 4rpx; */ | |
| 145 | + color: #8d8d8d; | |
| 146 | + /* padding-right: 30rpx; */ | |
| 103 | 147 | } |
| 104 | 148 | |
| 105 | 149 | .filter-modal { |
| ... | ... | @@ -207,9 +251,55 @@ |
| 207 | 251 | |
| 208 | 252 | .mk_price { |
| 209 | 253 | margin-left: 10rpx; |
| 210 | - font-size: 25rpx; | |
| 254 | + font-size: 24rpx; | |
| 211 | 255 | } |
| 212 | 256 | |
| 213 | 257 | .item-cont { |
| 214 | 258 | line-height: 38rpx; |
| 259 | + display: flex; | |
| 260 | + flex-direction: column; | |
| 261 | + justify-content: space-evenly; | |
| 262 | + flex: 1; | |
| 263 | +} | |
| 264 | + | |
| 265 | + | |
| 266 | +.choice_list.on { | |
| 267 | + display: flex; | |
| 268 | + flex-wrap: wrap; | |
| 269 | + padding-bottom: 12rpx; | |
| 270 | + padding-left: 16rpx; | |
| 271 | + padding-right: 16rpx; | |
| 272 | + background-color: #f0f0f0; | |
| 273 | +} | |
| 274 | + | |
| 275 | +.choice_list.on .choice_item { | |
| 276 | + padding: 0; | |
| 277 | + margin-top: 16rpx; | |
| 278 | + display: block; | |
| 279 | + width: 350rpx; | |
| 280 | + background-color: white; | |
| 281 | + border-radius: 15rpx; | |
| 282 | +} | |
| 283 | + | |
| 284 | +.choice_list.on .choice_item:nth-child(even) { | |
| 285 | + margin-left: 18rpx; | |
| 286 | +} | |
| 287 | + | |
| 288 | +.choice_list.on .img-wrap { | |
| 289 | + width: 350rpx; | |
| 290 | + height: 350rpx; | |
| 291 | + border-bottom-left-radius: 0; | |
| 292 | + border-bottom-right-radius: 0; | |
| 293 | +} | |
| 294 | + | |
| 295 | +.choice_list.on .item-cont { | |
| 296 | + padding: 10rpx; | |
| 297 | + display: flex; | |
| 298 | + flex-direction: column; | |
| 299 | + justify-content: space-between; | |
| 300 | +} | |
| 301 | + | |
| 302 | + | |
| 303 | +.choice_list.on .item-cont .flex.on { | |
| 304 | + display: block; | |
| 215 | 305 | } | ... | ... |
pages/team/team_success/team_success.js
| ... | ... | @@ -866,6 +866,108 @@ Page({ |
| 866 | 866 | }); |
| 867 | 867 | }, |
| 868 | 868 | |
| 869 | - | |
| 869 | + | |
| 870 | + // 保存图片到手机 | |
| 871 | + savePic() { | |
| 872 | + console.log('保存图片'); | |
| 873 | + var self = this; | |
| 874 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | |
| 875 | + this.getSetting().then((res) => { | |
| 876 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | |
| 877 | + if (!res.authSetting['scope.writePhotosAlbum']) { | |
| 878 | + this.authorize().then(() => { | |
| 879 | + // 同意授权后保存下载文件 | |
| 880 | + this.saveImage(self.data.shareImgPath) | |
| 881 | + .then(() => { | |
| 882 | + self.setData({ | |
| 883 | + showPoster: false | |
| 884 | + }); | |
| 885 | + }); | |
| 886 | + }) | |
| 887 | + } else { | |
| 888 | + // 如果已经授权,保存下载文件 | |
| 889 | + this.saveImage(self.data.shareImgPath) | |
| 890 | + .then(() => { | |
| 891 | + self.setData({ | |
| 892 | + showPoster: false | |
| 893 | + }); | |
| 894 | + }); | |
| 895 | + } | |
| 896 | + | |
| 897 | + }) | |
| 898 | + }, | |
| 899 | + | |
| 900 | + | |
| 901 | + // 保存图片到系统相册 | |
| 902 | + saveImage(saveUrl) { | |
| 903 | + var self = this; | |
| 904 | + return new Promise((resolve, reject) => { | |
| 905 | + wx.saveImageToPhotosAlbum({ | |
| 906 | + filePath: saveUrl, | |
| 907 | + success: (res) => { | |
| 908 | + wx.showToast({ | |
| 909 | + title: '保存成功', | |
| 910 | + duration: 1000, | |
| 911 | + }); | |
| 912 | + self.setData({ | |
| 913 | + showPlaybill: 'true' | |
| 914 | + }); | |
| 915 | + resolve(); | |
| 916 | + }, | |
| 917 | + fail: () => { | |
| 918 | + wx.showToast({ | |
| 919 | + title: '保存失败', | |
| 920 | + duration: 1000, | |
| 921 | + }); | |
| 922 | + } | |
| 923 | + }) | |
| 924 | + }) | |
| 925 | + }, | |
| 926 | + | |
| 927 | + // 获取用户已经授予了哪些权限 | |
| 928 | + getSetting() { | |
| 929 | + return new Promise((resolve, reject) => { | |
| 930 | + wx.getSetting({ | |
| 931 | + success: res => { | |
| 932 | + resolve(res) | |
| 933 | + } | |
| 934 | + }) | |
| 935 | + }) | |
| 936 | + }, | |
| 937 | + | |
| 938 | + // 发起首次授权请求 | |
| 939 | + authorize() { | |
| 940 | + // isFirst 用来记录是否为首次发起授权, | |
| 941 | + // 如果首次授权拒绝后,isFirst赋值为1 | |
| 942 | + let isFirst = wx.getStorageSync('isFirst') || 0; | |
| 943 | + return new Promise((resolve, reject) => { | |
| 944 | + wx.authorize({ | |
| 945 | + scope: 'scope.writePhotosAlbum', | |
| 946 | + // 同意授权 | |
| 947 | + success: () => { | |
| 948 | + resolve(); | |
| 949 | + }, | |
| 950 | + // 拒绝授权,这里是用户拒绝授权后的回调 | |
| 951 | + fail: res => { | |
| 952 | + if(isFirst === 0) { | |
| 953 | + wx.setStorageSync('isFirst', 1); | |
| 954 | + wx.showToast({ | |
| 955 | + title: '保存失败', | |
| 956 | + icon: 'none', | |
| 957 | + duration: 1000 | |
| 958 | + }) | |
| 959 | + } else { | |
| 960 | + this.showModal(); | |
| 961 | + } | |
| 962 | + console.log('拒绝授权'); | |
| 963 | + reject(); | |
| 964 | + } | |
| 965 | + }) | |
| 966 | + }) | |
| 967 | + }, | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 870 | 972 | }) |
| 871 | 973 | ... | ... |
pages/team/team_success/team_success.wxml
| ... | ... | @@ -333,10 +333,10 @@ |
| 333 | 333 | <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> |
| 334 | 334 | <view class="btn-close" catchtap="closePoster"><text class="iconfont icon-close"></text></view> |
| 335 | 335 | </view> |
| 336 | - <!-- <view class="btn-container"> | |
| 337 | - <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> | |
| 336 | + <view class="btn-container"> | |
| 337 | + <!--<button class="btn-share" open-type="share" bindtap="">微信好友分享</button>--> | |
| 338 | 338 | <button class="btn-share" bindtap="savePic">保存到相册</button> |
| 339 | - </view> --> | |
| 339 | + </view> | |
| 340 | 340 | </view> |
| 341 | 341 | </view> |
| 342 | 342 | </view> | ... | ... |
pages/team/team_success/team_success.wxss
| ... | ... | @@ -901,7 +901,7 @@ height:40rpx; |
| 901 | 901 | top: 50%; |
| 902 | 902 | left: 50%; |
| 903 | 903 | transform: translate(-50%, -50%); |
| 904 | - width: calc(100% - 120rpx); | |
| 904 | + width: calc(100% - 210rpx); | |
| 905 | 905 | z-index: 1000; |
| 906 | 906 | } |
| 907 | 907 | .mask { |
| ... | ... | @@ -920,7 +920,7 @@ height:40rpx; |
| 920 | 920 | .poster { |
| 921 | 921 | box-sizing: border-box; |
| 922 | 922 | width: 100%; |
| 923 | - height: 1055rpx; | |
| 923 | + height: 905rpx; | |
| 924 | 924 | border-radius: 20rpx; |
| 925 | 925 | /* box-shadow: 0 8px 12px #666; */ |
| 926 | 926 | position: relative; | ... | ... |