Commit 1d4bed779296fc16090201e083828e5413ddb16a

Authored by 王强
1 parent 6fd97b48

goodsItem_8.vue组件添加“已抢光”按钮状态,count = 0 时显示,无库存~

src/components/goodsItem_8/goodsItem_8.less
... ... @@ -95,13 +95,22 @@
95 95 }
96 96 }
97 97 .icon-box {
98   - width: 54px;
99   - height: 54px;
100 98 .icon-img {
101 99 display: block;
102 100 width: 54px;
103 101 height: 54px;
104 102 }
  103 +
  104 + }
  105 + .btn {
  106 + &.btn-disabled {
  107 + background-color: #D1D1D1;
  108 + padding: 8px 24px;
  109 + color: #FFFFFF;
  110 + font-size: 24px;
  111 + font-weight: 500;
  112 + border-radius: 24px;
  113 + }
105 114 }
106 115 }
107 116 }
... ...
src/components/goodsItem_8/goodsItem_8.vue
... ... @@ -21,7 +21,11 @@
21 21 </div>
22 22 <div class="icon-box" @click.stop.prevent="primary(item)">
23 23 <img src="static/img/icon_list_arrow_right.png" class="icon-img" v-if="sty == 2" />
  24 + <div class="btn btn-disabled" v-else-if="item.count == '0'">已抢光</div>
24 25 <img src="static/img/icon_shopping_cart_active.png" class="icon-img" v-else />
  26 +
  27 + <!-- 限购几件,不能再加入购物车展示效果,灰度图片 -->
  28 + <!-- <img src="static/img/icon_shopping_cart.png" class="icon-img" v-else /> -->
25 29 </div>
26 30 </div>
27 31 </div>
... ...
src/pages/discountList/discountList.vue
... ... @@ -137,6 +137,7 @@
137 137 id: "9524815",
138 138 price: "50.00",
139 139 prices: "300.00",
  140 + count: '10',
140 141 shop: {
141 142 id: "57",
142 143 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -154,6 +155,7 @@
154 155 id: "9524815",
155 156 price: "50.00",
156 157 prices: "20.00",
  158 + count: '10',
157 159 shop: {
158 160 id: "57",
159 161 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -171,6 +173,7 @@
171 173 id: "9524815",
172 174 price: "50.00",
173 175 prices: "300.00",
  176 + count: '0',
174 177 shop: {
175 178 id: "57",
176 179 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -188,6 +191,7 @@
188 191 id: "9524815",
189 192 price: "50.00",
190 193 prices: "300.00",
  194 + count: '10',
191 195 shop: {
192 196 id: "57",
193 197 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -205,6 +209,7 @@
205 209 id: "9524815",
206 210 price: "50.00",
207 211 prices: "300.00",
  212 + count: '10',
208 213 shop: {
209 214 id: "57",
210 215 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -222,6 +227,7 @@
222 227 id: "9524815",
223 228 price: "50.00",
224 229 prices: "300.00",
  230 + count: '0',
225 231 shop: {
226 232 id: "57",
227 233 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -239,6 +245,7 @@
239 245 id: "9524815",
240 246 price: "50.00",
241 247 prices: "300.00",
  248 + count: '0',
242 249 shop: {
243 250 id: "57",
244 251 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -256,6 +263,7 @@
256 263 id: "9524815",
257 264 price: "50.00",
258 265 prices: "300.00",
  266 + count: '10',
259 267 shop: {
260 268 id: "57",
261 269 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -273,6 +281,7 @@
273 281 id: "9524815",
274 282 price: "50.00",
275 283 prices: "300.00",
  284 + count: '10',
276 285 shop: {
277 286 id: "57",
278 287 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -290,6 +299,7 @@
290 299 id: "9524815",
291 300 price: "50.00",
292 301 prices: "300.00",
  302 + count: '10',
293 303 shop: {
294 304 id: "57",
295 305 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -307,6 +317,7 @@
307 317 id: "9524815",
308 318 price: "50.00",
309 319 prices: "300.00",
  320 + count: '0',
310 321 shop: {
311 322 id: "57",
312 323 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ... @@ -324,6 +335,7 @@
324 335 id: "9524815",
325 336 price: "50.00",
326 337 prices: "300.00",
  338 + count: '10',
327 339 shop: {
328 340 id: "57",
329 341 logo: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/20/5cbab33c82a82.png",
... ...