|
|
|
@ -17,19 +17,13 @@
|
|
|
|
|
购物数量 |
|
|
|
|
<text class="num font-color-red">{{ count }}</text> |
|
|
|
|
</view> |
|
|
|
|
<view |
|
|
|
|
v-if="cartList.valid.length > 0" |
|
|
|
|
class="administrate acea-row row-center-wrapper" |
|
|
|
|
@click="manage" |
|
|
|
|
>{{ footerswitch ? '取消' : '管理' }}</view> |
|
|
|
|
<view v-if="cartList.valid.length > 0" class="administrate acea-row row-center-wrapper" @click="manage"> |
|
|
|
|
{{ footerswitch ? '取消' : '管理' }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view v-if="validList.length > 0 || cartList.invalid.length > 0"> |
|
|
|
|
<view class="list"> |
|
|
|
|
<view |
|
|
|
|
class="item acea-row row-between-wrapper" |
|
|
|
|
v-for="(item, cartListValidIndex) in validList" |
|
|
|
|
:key="cartListValidIndex" |
|
|
|
|
> |
|
|
|
|
<view class="item acea-row row-between-wrapper" v-for="(item, cartListValidIndex) in validList" |
|
|
|
|
:key="cartListValidIndex"> |
|
|
|
|
<view class="select-btn"> |
|
|
|
|
<view class="checkbox-wrapper"> |
|
|
|
|
<checkbox-group @change="switchSelect(cartListValidIndex)"> |
|
|
|
@ -46,31 +40,19 @@
|
|
|
|
|
</view> |
|
|
|
|
<view class="text"> |
|
|
|
|
<view class="line1">{{ item.productInfo.storeName }}</view> |
|
|
|
|
<view |
|
|
|
|
class="infor line1" |
|
|
|
|
v-if="item.productInfo.attrInfo" |
|
|
|
|
>属性:{{ item.productInfo.attrInfo.sku }}</view> |
|
|
|
|
<view class="infor line1" v-if="item.productInfo.attrInfo">属性:{{ item.productInfo.attrInfo.sku }}</view> |
|
|
|
|
<view class="money">¥{{ item.truePrice }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="carnum acea-row row-center-wrapper"> |
|
|
|
|
<view |
|
|
|
|
class="reduce" |
|
|
|
|
:class="validList[cartListValidIndex].cartNum <= 1 ? 'on' : ''" |
|
|
|
|
@click.prevent="reduce(cartListValidIndex)" |
|
|
|
|
>-</view> |
|
|
|
|
<view class="reduce" :class="validList[cartListValidIndex].cartNum <= 1 ? 'on' : ''" |
|
|
|
|
@click.prevent="reduce(cartListValidIndex)">-</view> |
|
|
|
|
<view class="num">{{ item.cartNum }}</view> |
|
|
|
|
<view |
|
|
|
|
class="plus" |
|
|
|
|
v-if="validList[cartListValidIndex].attrInfo" |
|
|
|
|
<view class="plus" v-if="validList[cartListValidIndex].attrInfo" |
|
|
|
|
:class="validList[cartListValidIndex].cartNum >= validList[cartListValidIndex].attrInfo.stock ? 'on' : ''" |
|
|
|
|
@click.prevent="plus(cartListValidIndex)" |
|
|
|
|
>+</view> |
|
|
|
|
<view |
|
|
|
|
class="plus" |
|
|
|
|
v-else |
|
|
|
|
@click.prevent="plus(cartListValidIndex)">+</view> |
|
|
|
|
<view class="plus" v-else |
|
|
|
|
:class="validList[cartListValidIndex].cartNum >= validList[cartListValidIndex].stock ? 'on' : ''" |
|
|
|
|
@click.prevent="plus(cartListValidIndex)" |
|
|
|
|
>+</view> |
|
|
|
|
@click.prevent="plus(cartListValidIndex)">+</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -78,25 +60,15 @@
|
|
|
|
|
<view class="invalidGoods" v-if="cartList.invalid.length > 0"> |
|
|
|
|
<view class="goodsNav acea-row row-between-wrapper"> |
|
|
|
|
<view @click="goodsOpen"> |
|
|
|
|
<text |
|
|
|
|
class="iconfont" |
|
|
|
|
:class="goodsHidden === true ? 'icon-xiangyou' : 'icon-xiangxia'" |
|
|
|
|
></text>失效商品 |
|
|
|
|
<text class="iconfont" :class="goodsHidden === true ? 'icon-xiangyou' : 'icon-xiangxia'"></text>失效商品 |
|
|
|
|
</view> |
|
|
|
|
<view class="del" @click="delInvalidGoods"> |
|
|
|
|
<text class="iconfont icon-shanchu1"></text>清空 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsList" :hidden="goodsHidden"> |
|
|
|
|
<view |
|
|
|
|
v-for="(item, cartListinvalidIndex) in cartList.invalid" |
|
|
|
|
:key="cartListinvalidIndex" |
|
|
|
|
> |
|
|
|
|
<view |
|
|
|
|
@click="goGoodsCon(item)" |
|
|
|
|
class="item acea-row row-between-wrapper" |
|
|
|
|
v-if="item.productInfo" |
|
|
|
|
> |
|
|
|
|
<view v-for="(item, cartListinvalidIndex) in cartList.invalid" :key="cartListinvalidIndex"> |
|
|
|
|
<view @click="goGoodsCon(item)" class="item acea-row row-between-wrapper" v-if="item.productInfo"> |
|
|
|
|
<view class="invalid acea-row row-center-wrapper">失效</view> |
|
|
|
|
<view class="pictrue"> |
|
|
|
|
<image :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" /> |
|
|
|
@ -104,10 +76,8 @@
|
|
|
|
|
</view> |
|
|
|
|
<view class="text acea-row row-column-between"> |
|
|
|
|
<view class="line1">{{ item.productInfo.storeName }}</view> |
|
|
|
|
<view |
|
|
|
|
class="infor line1" |
|
|
|
|
v-if="item.productInfo.attrInfo" |
|
|
|
|
>属性:{{ item.productInfo.attrInfo.sku }}</view> |
|
|
|
|
<view class="infor line1" v-if="item.productInfo.attrInfo">属性:{{ item.productInfo.attrInfo.sku }} |
|
|
|
|
</view> |
|
|
|
|
<view class="acea-row row-between-wrapper"> |
|
|
|
|
<view class="end">该商品已下架</view> |
|
|
|
|
</view> |
|
|
|
@ -160,13 +130,15 @@
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<Authorization v-if="!$store.getters.token" /> |
|
|
|
|
<Authorization v-else /> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import Recommend from "@/components/Recommend"; |
|
|
|
|
import Authorization from "@/pages/authorization/index"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import { |
|
|
|
|
mapGetters |
|
|
|
|
} from "vuex"; |
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
getCartList, |
|
|
|
@ -174,8 +146,13 @@ import {
|
|
|
|
|
changeCartNum, |
|
|
|
|
getCartCount |
|
|
|
|
} from "@/api/store"; |
|
|
|
|
import { postCollectAll } from "@/api/user"; |
|
|
|
|
import { mul, add } from "@/utils/bc"; |
|
|
|
|
import { |
|
|
|
|
postCollectAll |
|
|
|
|
} from "@/api/user"; |
|
|
|
|
import { |
|
|
|
|
mul, |
|
|
|
|
add |
|
|
|
|
} from "@/utils/bc"; |
|
|
|
|
import cookie from "@/utils/store/cookie"; |
|
|
|
|
|
|
|
|
|
const CHECKED_IDS = "cart_checked"; |
|
|
|
|