Commit 9d1ad93cf5e110742bb3b0e9ed99e8defa067069
1 parent
3662e4d9
等级价显示
Showing
6 changed files
with
34 additions
and
11 deletions
components/goods_list/goods_list.wxml
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | <view class="flex xc-wc"> | 23 | <view class="flex xc-wc"> |
24 | <view class="fs24">¥</view> | 24 | <view class="fs24">¥</view> |
25 | <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | 25 | <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> |
26 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image><text>{{card_name}}</text></view> | 26 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image><view class="card_name">{{card_name}}</view></view> |
27 | </view> | 27 | </view> |
28 | </view> | 28 | </view> |
29 | <view class="flex" style="line-height: 28rpx;" > | 29 | <view class="flex" style="line-height: 28rpx;" > |
components/goods_list/goods_list.wxss
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | margin-top: 40rpx; | 2 | margin-top: 40rpx; |
3 | } | 3 | } |
4 | .ib{ | 4 | .ib{ |
5 | - display: inline-block; | 5 | + display: inline-block; |
6 | } | 6 | } |
7 | .fs20{ | 7 | .fs20{ |
8 | font-size: 20rpx; | 8 | font-size: 20rpx; |
@@ -151,6 +151,11 @@ color: #b9b9b9; | @@ -151,6 +151,11 @@ color: #b9b9b9; | ||
151 | } | 151 | } |
152 | 152 | ||
153 | .line_th{ text-decoration: line-through} | 153 | .line_th{ text-decoration: line-through} |
154 | -.card_bg {display: flex; padding: 0rpx 10rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx;line-height: 28rpx; | 154 | +.card_bg {display: flex; padding: 2rpx 10rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx;line-height: 28rpx;max-width: 110rpx; |
155 | background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} | 155 | background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} |
156 | -.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} | ||
157 | \ No newline at end of file | 156 | \ No newline at end of file |
157 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;}.card_bg .card_name{ | ||
158 | + max-width: 76rpx; | ||
159 | + width: auto; | ||
160 | + overflow: hidden; | ||
161 | + white-space:nowrap; | ||
162 | +} | ||
158 | \ No newline at end of file | 163 | \ No newline at end of file |
pages/goods/goodsList/goodsList.wxml
@@ -47,7 +47,8 @@ | @@ -47,7 +47,8 @@ | ||
47 | <block wx:if="{{item[card_field]>0}}"> | 47 | <block wx:if="{{item[card_field]>0}}"> |
48 | <view class="flex ai-center"> | 48 | <view class="flex ai-center"> |
49 | <view class="price">¥{{item[card_field]}}</view> | 49 | <view class="price">¥{{item[card_field]}}</view> |
50 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{card_name}}</view> | 50 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
51 | + <view class="card_name">{{card_name}}</view></view> | ||
51 | </view> | 52 | </view> |
52 | <view class="comment flex jc_sb"> | 53 | <view class="comment flex jc_sb"> |
53 | <view class="word-line xc-ash">¥{{item.market_price}}</view> | 54 | <view class="word-line xc-ash">¥{{item.market_price}}</view> |
pages/goods/goodsList/goodsList.wxss
@@ -156,8 +156,17 @@ | @@ -156,8 +156,17 @@ | ||
156 | width: 300rpx; | 156 | width: 300rpx; |
157 | } | 157 | } |
158 | 158 | ||
159 | -.card_bg {display: flex; width: 110rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | ||
160 | -background: #333; color: #fff; justify-content: center; margin-left: 3rpx; margin-top:7rpx; line-height: 28rpx;} | 159 | +.card_bg {display: flex; max-width: 110rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; |
160 | +background: #333; color: #fff; justify-content: center; margin-left: 3rpx; margin-top:7rpx; line-height: 28rpx; | ||
161 | +padding: 2rpx 10rpx;width: auto; | ||
162 | + | ||
163 | +} | ||
164 | +.card_bg .card_name{ | ||
165 | + max-width: 76rpx; | ||
166 | + width: auto; | ||
167 | + overflow: hidden; | ||
168 | + white-space:nowrap; | ||
169 | +} | ||
161 | .card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx; vertical-align: middle} | 170 | .card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx; vertical-align: middle} |
162 | .mk_price{margin-left: 10rpx; font-size: 25rpx;} | 171 | .mk_price{margin-left: 10rpx; font-size: 25rpx;} |
163 | .item-cont{ line-height: 38rpx} | 172 | .item-cont{ line-height: 38rpx} |
164 | \ No newline at end of file | 173 | \ No newline at end of file |
pages/goods/search/search.wxml
@@ -43,7 +43,9 @@ | @@ -43,7 +43,9 @@ | ||
43 | <block wx:if="{{item[card_field]>0}}"> | 43 | <block wx:if="{{item[card_field]>0}}"> |
44 | <view class="flex ai-center"> | 44 | <view class="flex ai-center"> |
45 | <view class="price">¥{{item[card_field]}}</view> | 45 | <view class="price">¥{{item[card_field]}}</view> |
46 | - <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>{{card_name}}</view> | 46 | + <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
47 | + <view class="card_name">{{card_name}}</view> | ||
48 | + </view> | ||
47 | </view> | 49 | </view> |
48 | <view class="comment flex jc_sb"> | 50 | <view class="comment flex jc_sb"> |
49 | <view class="word-line xc-ash">¥{{item.market_price}}</view> | 51 | <view class="word-line xc-ash">¥{{item.market_price}}</view> |
pages/goods/search/search.wxss
@@ -227,8 +227,14 @@ | @@ -227,8 +227,14 @@ | ||
227 | margin-left: 15rpx; | 227 | margin-left: 15rpx; |
228 | } | 228 | } |
229 | 229 | ||
230 | -.card_bg {display: flex; width: 110rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | ||
231 | -background: #333; color: #fff; justify-content: center; margin-left: 3rpx; margin-top:7rpx; line-height: 28rpx;} | ||
232 | -.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx; vertical-align: middle} | 230 | +.card_bg {display: flex; max-width: 110rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx;padding: 2rpx 10rpx; |
231 | +background: #333; color: #fff; justify-content: center; margin-left: 3rpx; margin-top:7rpx; line-height: 28rpx; width: auto} | ||
232 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx; vertical-align: middle} | ||
233 | +.card_bg .card_name{ | ||
234 | + max-width: 76rpx; | ||
235 | + width: auto; | ||
236 | + overflow: hidden; | ||
237 | + white-space:nowrap; | ||
238 | +} | ||
233 | .mk_price{margin-left: 10rpx; font-size: 25rpx;} | 239 | .mk_price{margin-left: 10rpx; font-size: 25rpx;} |
234 | .item-cont{ line-height: 38rpx} | 240 | .item-cont{ line-height: 38rpx} |