Commit 7301fd560fd8c2da53b20866607627906290584c

Authored by BigBoss
1 parent 4e5fb860bc
Exists in master

添加购物车默认样式

src/pages/address/addressList.vue
... ... @@ -62,7 +62,7 @@ export default {
62 62 if (edit) {
63 63 this.edit = true
64 64 }
65   - store.dispatch('address/list')
  65 + // store.dispatch('address/list')
66 66 },
67 67 onShow() {
68 68 store.dispatch('address/list')
... ...
src/pages/cart/cart.vue
1 1 <template>
2 2 <view class="content">
3 3 <block v-if="cartList.length==0">
4   -
  4 + <view class="nocard">
  5 + <image src="../../static/nocart.png" class="nocartPic" mode="aspectFill"></image>
  6 + <text class="nocartText">购物车竟然是空的</text>
  7 + </view>
5 8 </block>
6 9 <block v-else>
7 10 <view class="card">
... ... @@ -19,7 +22,7 @@
19 22 <text>非常戴镜</text>
20 23 </view>
21 24 <view
22   - class="cardBody"
  25 + class="cardBody"
23 26 v-for="(item,index) in cartList"
24 27 :key="index"
25 28 @longpress="delCart(item.cart_id,index)"
... ... @@ -67,7 +70,7 @@
67 70 </view>
68 71 </view>
69 72 <view class="priceBox">
70   - <view class="price">¥{{item.nowPrice*item.num}}</view>
  73 + <view class="price">¥{{item.nowPrice}}</view>
71 74 <text class="maxCount">(限购{{maxCount}}副)</text>
72 75 <view class="counter">
73 76 <view
... ... @@ -329,7 +332,22 @@ export default {
329 332 justify-content: space-between;
330 333 padding: 20rpx 40rpx;
331 334 box-sizing: border-box;
332   -
  335 + .nocard{
  336 + width: 100%;
  337 + display: flex;
  338 + flex-direction: column;
  339 + align-items: center;
  340 + justify-content: space-between;
  341 + .nocartPic{
  342 + height: 400rpx;
  343 + border-radius: 200rpx;
  344 + margin: 40rpx 0;
  345 + }
  346 + .nocartText{
  347 + color: #333333;
  348 + font-size: 28rpx;
  349 + }
  350 + }
333 351 .partentCheck {
334 352 width: 16px;
335 353 height: 16px;
... ...
src/pages/confirmOrder/confirmOrder.vue
... ... @@ -68,8 +68,8 @@
68 68 <text class="goodName">{{item.p_name}}</text>
69 69 <text class="remarks">支持7天无理由退货 顺丰发货</text>
70 70 <view class="priceBox">
71   - <view class="price">¥{{Number(item.nowPrice) * item.num}}<text class="originCost">
72   - ¥{{item.oldPrice*item.num}}
  71 + <view class="price">¥{{Number(item.nowPrice) }}<text class="originCost">
  72 + ¥{{item.oldPrice}}
73 73 </text></view>
74 74 <view class="counter">
75 75 <view
... ... @@ -121,8 +121,8 @@
121 121 <text class="goodName">{{goodInfo.p_name}}</text>
122 122 <text class="remarks">支持7天无理由退货 顺丰发货</text>
123 123 <view class="priceBox">
124   - <view class="price">¥{{buyItem.real_price * count}}<text class="originCost">
125   - ¥{{buyItem.out_price * count}}
  124 + <view class="price">¥{{buyItem.real_price}}<text class="originCost">
  125 + ¥{{buyItem.out_price}}
126 126 </text></view>
127 127 <view class="counter">
128 128 <view
... ... @@ -321,7 +321,7 @@ export default {
321 321 this.$store.state.cart.checkedCartLst.map(item => {
322 322 total += item.nowPrice * item.num
323 323 })
324   - return total
  324 + return total
325 325 } else {
326 326 return this.buyItem.real_price * this.count
327 327 }
... ...
src/static/nocart.png

19 KB