Feat:优惠券对接

This commit is contained in:
lifizer
2023-12-25 17:16:56 +08:00
parent 847a80f251
commit 18a2fbb8a6
46 changed files with 1360 additions and 858 deletions
+8 -28
View File
@@ -1,16 +1,5 @@
<template>
<view class="shoppingCart">
<!-- <hx-navbar
title="购物车"
:fixed="true"
:back="false"
:left-slot="false"
:right-slot="false"
color="#ffffff"
statusBarFontColor="#ffffff"
:bgImgHeight="bgImgHeight"
:background-color="[254,82,97]"
:background-img="webUrl+'/20200729160752671638.png'"/> -->
<hx-navbar
title="购物车"
:fixed="true"
@@ -31,28 +20,11 @@
<view>
<text class="num" style="color: #666666;">{{ count }}件商品</text>
</view>
<!-- <view
v-if="cartList.valid.length > 0"
class="administrate acea-row row-center-wrapper font-color-white"
@click="manage"
>{{ footerswitch ? '取消' : '管理' }}</view> -->
<view class="top-delete-btn acea-row row-middle" @click="delgoods">
<image class="delete-icon" :src="webUrl+'/20210806133058078099.png'" mode=""></image>
</view>
</view>
<view style="border-top: 1px solid #f5f5f5" v-if="$store.getters.token||userInfo.uid">
<!-- <view style="margin-top: 80rpx;" v-if="$store.getters.token||userInfo.uid"> -->
<!-- <view class="labelNav acea-row row-around row-middle">
<view class="item">
<text class="iconfont icon-xuanzhong"></text>100%正品保证
</view>
<view class="item">
<text class="iconfont icon-xuanzhong"></text>所有商品精挑细选
</view>
<view class="item">
<text class="iconfont icon-xuanzhong"></text>售后无忧
</view>
</view> -->
<view v-if="validList.length > 0 || cartList.invalid.length > 0">
<view class="list">
@@ -529,6 +501,14 @@ export default {
plus: function (index) {
let that = this;
let list = that.cartList.valid[index];
if (list.cartNum + 1 > list.trueStock) {
uni.showToast({
title: '该商品库存不足,无法继续增加',
icon: 'none'
})
return
}
list.cartNum++;
if (list.attrInfo) {
if (list.cartNum >= list.attrInfo.stock) {