Blame view
src/pages/cart/cart.vue
5.52 KB
0db291810 “-mcomfirmOder页面 |
1 2 |
<template> <view class="content"> |
6111092e8 update cart |
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
<checkbox-group name=""> <label> <view class="card"> <view class="cardHeader"> <checkbox color="#FF6B4A" :value="totalPrice" style="transform:scale(0.7)"/> <image src="../../static/customerService-btn.png" mode="aspectFill"></image> <text>非常戴镜</text> </view> <view class="cardBody"> <checkbox color="#FF6B4A" :value="totalPrice" style="transform:scale(0.7)" /> <view class="goodInfo"> <view class="imageWrap"> <image src="../../static/img/detail/d1.png" mode="aspectFill" style="width: 188rpx;height: 168rpx;"></image> </view> <view class="infoRight"> <text class="goodName">商品名称商品名称商品名称名称名称商品名称名商品名称名</text> <view class="describ"><text>支持7天无理由退货 顺丰发货支持7天无理由退货 顺丰发货支持7天无理由退货 顺丰发货</text> <!-- <text class="icon">></text> --> </view> <view class="priceBox"> <view class="price">¥198</view> <text>(限购{{maxCount}}副)</text> <view class="counter"> <view class="btn" disabled="this.addDisabled" type="default" @click="counter(false)">-</view> <text>{{count}}</text> <view class="btn" disabled="this.desDisabled" type="default" @click="counter(true)">+</view> </view> </view> </view> </view> </view> </view> </label> </checkbox-group> <view class="footer"> <view class="footerLeft">实付金额:<text>¥{{totalPrice}}</text></view> <view class="footerRight"> <view class="paybtn">立即支付</view> </view> |
0db291810 “-mcomfirmOder页面 |
44 45 46 47 48 49 50 51 |
</view> </view> </template> <script> export default { data() { return { |
6111092e8 update cart |
52 53 54 |
totalPrice: 360, count:1, maxCount:20, |
0db291810 “-mcomfirmOder页面 |
55 56 57 58 59 60 |
} }, onLoad() { }, methods: { |
6111092e8 update cart |
61 62 63 64 65 66 67 |
counter(isadd){ if(isadd){ this.count >= this.maxCount? this.addDisabled = true:this.count++; }else{ this.count <= 1? this.desDisabled = true:this.count--; } }, |
0db291810 “-mcomfirmOder页面 |
68 69 70 71 |
} } </script> |
6111092e8 update cart |
72 |
<style lang="scss"> |
0db291810 “-mcomfirmOder页面 |
73 |
.content { |
6111092e8 update cart |
74 75 |
min-height: 100vh; background-color: #F7F6F6; |
0db291810 “-mcomfirmOder页面 |
76 77 78 |
display: flex; flex-direction: column; align-items: center; |
6111092e8 update cart |
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
justify-content: space-between; padding: 20rpx 40rpx; box-sizing: border-box; .card{ background-color: #FFFFFF; border-radius: 16rpx; box-sizing: border-box; padding: 36rpx 36rpx 36rpx 18rpx; display: flex; flex-direction: column; align-items: center; justify-content: space-between; .cardHeader{ width: 100%; height: 36rpx; display: flex; align-items: center; justify-content: flex-start; image{ height: 32rpx; width: 32rpx; } } .cardBody{ width: 100%; height: 300rpx; display: flex; align-items: center; justify-content: space-between; .goodInfo{ width: 95%; display: flex; flex-direction: row; justify-content: flex-start; .imageWrap{ height: 188rpx; width: 188rpx; margin-right: 28rpx; image{ height: 188rpx; width: 188rpx; } } .infoRight{ display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; height: 220rpx; .goodName{ font-size: 28rpx; color: #333333; } .describ{ width: 100%; height: 80rpx; box-sizing: border-box; padding: 10rpx; font-size: 20rpx; color: #999999; background: #F2F2F2; text{ text-overflow: -o-ellipsis-lastline; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; } // .icon{ // transform: rotate(90deg); // } } .priceBox{ display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 14px; color: #999999; .price{ color: #FF6B4A; font-size: 28rpx; } .counter{ display: flex; flex-direction: row; justify-content: space-between; align-items: center; font-size: 28rpx; color: #333333; width: 122rpx; .btn{ display: flex; justify-content: center; line-height: 32rpx; height: 32rpx; width: 32rpx; background-color: #F2F2F2; color: #CFCFCF; } } } } } } } .footer{ position: fixed; left: 0; bottom: 0; height: 112rpx; width: 100%; background-color: #FFFFFF; font-size: 16px; display: flex; justify-content: space-between; align-items: center; .footerLeft{ display: flex; justify-content: center; align-items: center; width: 50%; color: #333333; text{ color: #FF6B4A; } } .footerRight{ display: flex; justify-content: flex-end; align-items: center; width: 50%; margin-right: 26rpx; .paybtn{ display: flex; justify-content: center; align-items: center; background: #FF6B4A; border-radius: 20px; border-radius: 20px; color: #FFFFFF; width: 204rpx; height: 80rpx; } } } |
0db291810 “-mcomfirmOder页面 |
230 |
} |
6111092e8 update cart |
231 |
|
a2408fc3f init |
232 |
</style> |