2021-05-13 11:03:32 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div class="wrapper">
|
|
|
|
|
<!-- 空白页-->
|
2023-04-11 18:41:34 +08:00
|
|
|
|
<view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty">
|
2021-06-28 14:22:27 +08:00
|
|
|
|
<image src="/static/emptyCart.png" mode="aspectFit"></image>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<view class="empty-tips">
|
|
|
|
|
空空如也
|
|
|
|
|
<navigator class="navigator" url="/pages/tabbar/home/index" open-type="switchTab">随便逛逛></navigator>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 店铺商品信息 -->
|
|
|
|
|
<div class="content">
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<div class="box box2" :class="{ invalid: isInvalid(item) }" v-for="(item, index) in cartDetail.cartList"
|
|
|
|
|
:key="index">
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<view class="tab">
|
|
|
|
|
<view class="store-line">
|
|
|
|
|
<u-checkbox-group class="store-line-check">
|
|
|
|
|
<!-- #ifndef MP-WEIXIN -->
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
|
|
|
|
|
@change="checkboxChangeDP(item)"></u-checkbox>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- #endif -->
|
|
|
|
|
<!-- 微信小程序这里 v-model出现问题,改用:value -->
|
|
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<u-checkbox shape="circle" :active-color="lightColor" :value="item.checked"
|
|
|
|
|
@change="checkboxChangeDP(item)"></u-checkbox>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- #endif -->
|
|
|
|
|
</u-checkbox-group>
|
2023-04-10 11:18:09 +08:00
|
|
|
|
<span class="store-name wes store-line-desc" @click.stop="navigateToStore(item)">{{
|
2021-12-25 10:55:25 +08:00
|
|
|
|
item.storeName
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}}</span>
|
2021-12-25 10:55:25 +08:00
|
|
|
|
<u-icon @click="navigateToStore(item)" size="24" style="margin-left:10rpx;" name="arrow-right"></u-icon>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</view>
|
2023-01-29 18:14:53 +08:00
|
|
|
|
<view class="right-col" v-if="item.canReceiveCoupon" @click="navigateToCoupon(item)">
|
2021-10-26 15:27:13 +08:00
|
|
|
|
<div class="right-line"></div>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<span>领劵</span>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<u-swipe-action :show="skuItem.selected" @open="openAction(skuItem)" :options="options" bg-color="#fff"
|
2021-10-26 15:27:13 +08:00
|
|
|
|
ref="swiperAction" class="cart-item" v-for="(skuItem, i) in item.skuList" :index="i" :key="skuItem.goodsSku.id"
|
2021-09-22 11:31:37 +08:00
|
|
|
|
@click="changeActionTab(skuItem)" @longpress="changeActionTab(skuItem)">
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- 满减活动 -->
|
2021-12-23 18:36:00 +08:00
|
|
|
|
<div v-if="Object.keys(skuItem.promotionMap).length != 0">
|
|
|
|
|
<div v-if="getPromotion(skuItem).includes('FULL_DISCOUNT')">
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<div class="promotion-notice" v-if="item.promotionNotice">
|
|
|
|
|
<span class="tips">满减</span>
|
|
|
|
|
<span style="flex:10;">{{item.promotionNotice}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<view class="goods-row" :class="{ invalid: isInvalid(skuItem) }">
|
|
|
|
|
<view class="goods-config">
|
|
|
|
|
<view>
|
2022-05-05 15:11:45 +08:00
|
|
|
|
<u-checkbox-group v-if="skuItem.invalid == 0 && !skuItem.errorMessage">
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- #ifndef MP-WEIXIN -->
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<u-checkbox shape="circle" :active-color="lightColor" class="c-left" v-model="skuItem.checked"
|
|
|
|
|
@change="checkboxChange(skuItem)"></u-checkbox>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- #endif -->
|
|
|
|
|
<!-- 微信小程序这里 v-model出现问题,改用:value -->
|
|
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<u-checkbox shape="circle" :active-color="lightColor" class="c-left" :value="skuItem.checked"
|
|
|
|
|
@change="checkboxChange(skuItem)"></u-checkbox>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- #endif -->
|
|
|
|
|
</u-checkbox-group>
|
|
|
|
|
<span class="invalid" v-else style="font-size: 24rpx">失效</span>
|
|
|
|
|
</view>
|
2021-10-26 15:27:13 +08:00
|
|
|
|
<u-image border-radius="10" :fade="true" @click="navigateToGoods(skuItem)" width="160rpx" height="160rpx"
|
|
|
|
|
:src="skuItem.goodsSku.thumbnail" />
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="goods-content">
|
|
|
|
|
<!-- 商品名称 -->
|
2021-05-17 18:19:26 +08:00
|
|
|
|
<p class="sp-name" @click="navigateToGoods(skuItem)">
|
2021-05-13 11:03:32 +08:00
|
|
|
|
{{ skuItem.goodsSku.goodsName }}
|
|
|
|
|
</p>
|
|
|
|
|
<!-- 规格 -->
|
|
|
|
|
<p class="sp-type">{{skuItem.goodsSku.simpleSpecs}}</p>
|
2022-05-27 18:17:23 +08:00
|
|
|
|
<p class="sp-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'">批发商品</p>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<p class="sp-number">
|
|
|
|
|
<view class="sp-price">
|
2023-07-10 16:05:45 +08:00
|
|
|
|
<!-- <div class="default-color" :class="{'main-color':Object.keys(skuItem.promotionMap).length ==0 }"> -->
|
|
|
|
|
<div class="main-color">
|
2022-10-10 18:53:14 +08:00
|
|
|
|
¥<span>{{ $options.filters.goodsFormatPrice(skuItem.goodsSku.price)[0] }}</span>
|
|
|
|
|
<span>.{{ $options.filters.goodsFormatPrice(skuItem.goodsSku.price)[1] }}</span>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</div>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
2023-05-04 11:03:44 +08:00
|
|
|
|
<uni-number-box class="uNumber" :min="1" :max="999" @change="numChange(skuItem)" v-model="skuItem.num"></uni-number-box>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</view>
|
|
|
|
|
<!-- 如果当有促销并且促销是 限时抢购 -->
|
|
|
|
|
<!-- promotions -->
|
2021-12-23 18:36:00 +08:00
|
|
|
|
<div class="promotions-list" v-if="Object.keys(skuItem.promotionMap).length != 0"
|
|
|
|
|
>
|
|
|
|
|
<div class="promotions-item-seckill" v-if="getPromotion(skuItem).includes('SECKILL')">
|
2021-09-22 11:31:37 +08:00
|
|
|
|
距秒杀结束: <u-count-down show-border :hide-zero-day="true" :color="$mainColor" border-color="#ededed"
|
2022-04-29 12:10:19 +08:00
|
|
|
|
font-size="24" :timestamp="getCountDownTime(skuItem)">
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</u-count-down>
|
|
|
|
|
</div>
|
2023-07-10 16:05:45 +08:00
|
|
|
|
</div>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
|
2023-07-10 16:05:45 +08:00
|
|
|
|
<!-- 此处先隐藏 对于预估到手价来说 前端无法真正的计算出来,光靠促销模式进行展示可能有些不妥。所以暂且隐藏 -->
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- 如果有活动 并且是选中的状态,显示预估到手价格 -->
|
2023-07-10 16:05:45 +08:00
|
|
|
|
<!-- <div class="priceDetail-flowPrice" :class="{'main-color':skuItem.priceDetailDTO}"
|
2021-12-23 18:36:00 +08:00
|
|
|
|
v-if="skuItem.priceDetailDTO && skuItem.invalid == 0 && Object.keys(skuItem.promotionMap).length != 0 && skuItem.checked && skuItem.checked">
|
2022-10-10 18:53:14 +08:00
|
|
|
|
预估到手价 ¥<span>{{ $options.filters.goodsFormatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}</span>
|
|
|
|
|
<span>.{{ $options.filters.goodsFormatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
|
2023-07-10 16:05:45 +08:00
|
|
|
|
</div> -->
|
2022-07-20 18:24:49 +08:00
|
|
|
|
<div style='margin-left: 20rpx;' v-if="!skuItem.checked && skuItem.errorMessage">
|
|
|
|
|
{{skuItem.errorMessage}}
|
2022-05-05 15:11:45 +08:00
|
|
|
|
</div>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-swipe-action>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-01-29 18:14:53 +08:00
|
|
|
|
<u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="deleteConfirm" show-cancel-button
|
2021-09-22 11:31:37 +08:00
|
|
|
|
:content="deleteContent" :async-close="true"></u-modal>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<!-- 结账 -->
|
|
|
|
|
<div class="box box6">
|
|
|
|
|
<view class="navL">
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<u-checkbox shape="circle" :active-color="lightColor" v-model="checkout" @change="checkOut()" label-size="24">全选
|
|
|
|
|
</u-checkbox>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<span class="price">
|
|
|
|
|
<div class="prices">
|
|
|
|
|
<div class="fullPrice">
|
|
|
|
|
<span class="number" v-if="cartDetail && cartDetail.priceDetailDTO">
|
2021-09-22 11:31:37 +08:00
|
|
|
|
总计:
|
2022-10-10 18:53:14 +08:00
|
|
|
|
<span>¥{{ $options.filters.goodsFormatPrice(cartDetail.priceDetailDTO.flowPrice)[0] }}</span>.<span>{{ $options.filters.goodsFormatPrice(cartDetail.priceDetailDTO.flowPrice)[1] }}</span>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</span>
|
|
|
|
|
<span class="number" v-else>总计:0.00</span>
|
|
|
|
|
</div>
|
2021-09-22 11:31:37 +08:00
|
|
|
|
<div
|
|
|
|
|
v-if="cartDetail.cartList && cartDetail.cartList.length!=0 && cartDetail.priceDetailDTO && cartDetail.priceDetailDTO.discountPrice!=0 "
|
|
|
|
|
class="discountPrice">
|
|
|
|
|
<span>优惠减:¥{{(cartDetail.priceDetailDTO.goodsPrice - cartDetail.priceDetailDTO.flowPrice) | unitPrice}}
|
|
|
|
|
</span>
|
2021-10-26 15:27:13 +08:00
|
|
|
|
<span class="discount-details" @click="discountDetails">优惠明细</span>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</span>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 优惠详情 -->
|
|
|
|
|
<u-popup z-index="3" close mode="bottom" height="50%" closeable v-model="discountDetailsFlag" border-radius="20">
|
|
|
|
|
<div class="discount-list">
|
|
|
|
|
<view class="discount-title">优惠明细</view>
|
|
|
|
|
<div class="discount-way">
|
|
|
|
|
<div class="discount-item" v-if="cartDetail.priceDetailDTO">
|
|
|
|
|
<span>商品总额</span>
|
|
|
|
|
<span>¥{{cartDetail.priceDetailDTO.goodsPrice | unitPrice}}</span>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="discount-item" v-if="cartDetail.priceDetailDTO">
|
|
|
|
|
<span>优惠券</span>
|
|
|
|
|
<span>-¥{{cartDetail.priceDetailDTO.couponPrice | unitPrice}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="discount-item" v-if="cartDetail.priceDetailDTO">
|
|
|
|
|
<span>其他优惠</span>
|
|
|
|
|
<span>-¥{{cartDetail.priceDetailDTO.discountPrice | unitPrice}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
<view v-if="isEdit" @click="deleteGoods()">
|
|
|
|
|
<div class="settlement">删除</div>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view v-else @click="submitOrder()">
|
2021-05-17 18:19:26 +08:00
|
|
|
|
<div class="settlement">去结算</div>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import * as API_Trade from "@/api/trade";
|
2022-11-30 11:32:45 +08:00
|
|
|
|
import { debounce } from "@/utils/tools.js";
|
2023-05-04 11:03:44 +08:00
|
|
|
|
import uniNumberBox from '@/components/uni-number-box'
|
2021-05-13 11:03:32 +08:00
|
|
|
|
export default {
|
2023-05-04 11:03:44 +08:00
|
|
|
|
components:{uniNumberBox}, // 数量加减组件
|
2021-05-13 11:03:32 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-04-11 18:41:34 +08:00
|
|
|
|
loading:false,
|
2021-06-08 18:46:25 +08:00
|
|
|
|
lightColor: this.$lightColor,
|
2021-05-17 18:19:26 +08:00
|
|
|
|
discountDetailsFlag: false, //优惠明细开关
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// 商品栏右侧滑动按钮
|
|
|
|
|
options: [
|
|
|
|
|
{
|
|
|
|
|
text: "删除",
|
|
|
|
|
style: {
|
2021-05-17 18:19:26 +08:00
|
|
|
|
backgroundColor: this.$lightColor, //高亮颜色
|
2021-05-13 11:03:32 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
isInvalid(val) {
|
2022-05-05 15:11:45 +08:00
|
|
|
|
//是否无效商品/没库存商品
|
|
|
|
|
if (val.invalid == 1 || (!val.checked && val.errorMessage)) {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-17 18:19:26 +08:00
|
|
|
|
deleteShow: false, //右滑删除
|
|
|
|
|
deleteContent: "删除该商品?", //删除显示的信息
|
|
|
|
|
cartDetail: "", //购物车详情
|
|
|
|
|
goodsVal: "", //单个商品详情
|
|
|
|
|
isEdit: false, // 是否是编辑
|
2021-12-28 19:50:06 +08:00
|
|
|
|
checkout: false, //全选按钮
|
2021-05-17 18:19:26 +08:00
|
|
|
|
WEIXIN_num: "", //购物车兼容微信步进器
|
2021-05-13 11:03:32 +08:00
|
|
|
|
};
|
|
|
|
|
},
|
2021-10-26 15:27:13 +08:00
|
|
|
|
|
2021-06-22 18:12:35 +08:00
|
|
|
|
mounted() {
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
|
// 小程序默认分享
|
|
|
|
|
uni.showShareMenu({ withShareTicket: true });
|
|
|
|
|
// #endif
|
|
|
|
|
},
|
2021-12-25 10:55:25 +08:00
|
|
|
|
onPullDownRefresh(){
|
|
|
|
|
this.getCardData();
|
|
|
|
|
},
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 初始化信息
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
onShow() {
|
2021-05-17 18:19:26 +08:00
|
|
|
|
this.deleteShow ? (this.deleteShow = false) : true;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
if (this.$refs.swiperAction) {
|
|
|
|
|
this.$refs.swiperAction.forEach((item, index) => {
|
|
|
|
|
item.show = false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.getCardData();
|
|
|
|
|
} else {
|
|
|
|
|
this.getCardData();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
2022-04-29 12:07:30 +08:00
|
|
|
|
* 倒数计时
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
getCountDownTime(val) {
|
2022-04-29 12:07:30 +08:00
|
|
|
|
if (val.promotionMap) {
|
|
|
|
|
let key = Object.keys(val.promotionMap).find((child, index) => {
|
|
|
|
|
return child.split("-")[0] == 'SECKILL'
|
|
|
|
|
});
|
|
|
|
|
return val.promotionMap[key].endTime / 1000 - (new Date().getTime() / 1000)
|
|
|
|
|
}
|
2021-05-13 11:03:32 +08:00
|
|
|
|
},
|
2021-05-17 18:19:26 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 优惠明细开关
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
discountDetails() {
|
|
|
|
|
this.discountDetailsFlag = true;
|
|
|
|
|
},
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 左滑打开删除
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
openAction(skuItem) {
|
|
|
|
|
/**循环父级有多少个店铺 */
|
2021-05-17 18:19:26 +08:00
|
|
|
|
this.cartDetail.cartList.forEach((cartItem) => {
|
|
|
|
|
if (cartItem.skuList) {
|
|
|
|
|
cartItem.skuList.forEach((sku) => {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
this.$set(sku, "selected", false);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.$set(skuItem, "selected", true);
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 滑动删除
|
|
|
|
|
*/
|
|
|
|
|
changeActionTab(val) {
|
|
|
|
|
this.deleteShow = true;
|
|
|
|
|
this.goodsVal = val;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 点击删除
|
|
|
|
|
*/
|
2023-01-29 18:14:53 +08:00
|
|
|
|
deleteConfirm() {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
API_Trade.deleteSkuItem(this.goodsVal.goodsSku.id).then((res) => {
|
|
|
|
|
if (res.statusCode == 200) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "此商品删除成功",
|
|
|
|
|
duration: 2000,
|
|
|
|
|
});
|
2021-05-17 18:19:26 +08:00
|
|
|
|
this.deleteShow = false;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
this.getCardData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 删除商品
|
|
|
|
|
*/
|
|
|
|
|
deleteGoods() {
|
|
|
|
|
if (this.whetherChecked()) {
|
|
|
|
|
var delGoodsData = [];
|
|
|
|
|
this.cartDetail.cartList.forEach((item) => {
|
|
|
|
|
item.skuList.forEach((goodsItem) => {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
if (goodsItem.checked) {
|
2021-05-17 18:19:26 +08:00
|
|
|
|
delGoodsData.push(goodsItem.goodsSku.id);
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2021-05-17 18:19:26 +08:00
|
|
|
|
if (delGoodsData && delGoodsData.length > 0) {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// 执行删除
|
2021-05-17 18:19:26 +08:00
|
|
|
|
API_Trade.deleteSkuItem(delGoodsData).then((res) => {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
if (res.data.success) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "删除成功!",
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
this.getCardData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "请选择删除商品,如果商品失效,请左滑无效商品删除",
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 跳转到店铺
|
|
|
|
|
*/
|
|
|
|
|
navigateToStore(val) {
|
2022-09-15 15:40:50 +08:00
|
|
|
|
uni.navigateTo({
|
2021-12-24 09:12:21 +08:00
|
|
|
|
url: "/pages/product/shopPage?id=" + val.storeId,
|
2021-05-13 11:03:32 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
2021-05-17 18:19:26 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 跳转到优惠券
|
|
|
|
|
*/
|
2023-01-29 18:14:53 +08:00
|
|
|
|
navigateToCoupon(val) {
|
2022-09-15 15:40:50 +08:00
|
|
|
|
uni.navigateTo({
|
2021-05-13 11:03:32 +08:00
|
|
|
|
url: "/pages/cart/coupon/couponCenter?storeId=" + val.storeId,
|
|
|
|
|
});
|
|
|
|
|
},
|
2021-05-17 18:19:26 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 跳转到商品
|
|
|
|
|
*/
|
|
|
|
|
navigateToGoods(val) {
|
2022-09-15 15:40:50 +08:00
|
|
|
|
uni.navigateTo({
|
2021-05-13 11:03:32 +08:00
|
|
|
|
url:
|
|
|
|
|
"/pages/product/goods?id=" +
|
|
|
|
|
val.goodsSku.id +
|
|
|
|
|
"&goodsId=" +
|
|
|
|
|
val.goodsSku.goodsId,
|
|
|
|
|
});
|
|
|
|
|
},
|
2021-05-17 18:19:26 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 点击步进器回调
|
|
|
|
|
*/
|
2023-05-04 11:03:44 +08:00
|
|
|
|
numChange: debounce(function (val) {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
this.updateSkuNumFun(val.goodsSku.id, val.num);
|
2022-11-30 11:32:45 +08:00
|
|
|
|
}, 1000),
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 去结算
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
submitOrder() {
|
2021-05-17 18:19:26 +08:00
|
|
|
|
if (this.whetherChecked()) {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
this.navigateTo("/pages/order/fillorder?way=CART");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 验证是否选中商品
|
|
|
|
|
*/
|
|
|
|
|
whetherChecked() {
|
2021-12-24 09:12:21 +08:00
|
|
|
|
this.$options.filters.forceLogin()
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
let canBuy = false;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
this.cartDetail.cartList.forEach((item) => {
|
|
|
|
|
if (item.checked) {
|
2021-05-17 18:19:26 +08:00
|
|
|
|
canBuy = true;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
} else {
|
|
|
|
|
item.skuList.forEach((skuItem) => {
|
|
|
|
|
if (skuItem.checked) {
|
2021-05-17 18:19:26 +08:00
|
|
|
|
canBuy = true;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-05-17 18:19:26 +08:00
|
|
|
|
if (!canBuy) {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "您还没有选择商品",
|
|
|
|
|
duration: 2000,
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 跳转
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
navigateTo(url) {
|
2022-09-15 15:40:50 +08:00
|
|
|
|
uni.navigateTo({
|
2021-05-13 11:03:32 +08:00
|
|
|
|
url,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 全选
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
checkOut() {
|
|
|
|
|
API_Trade.checkAll(this.checkout).then((result) => {
|
|
|
|
|
if (result.data.success) {
|
|
|
|
|
this.getCardData();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取店铺选中信息
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
checkStoreFun(skuId, num) {
|
|
|
|
|
API_Trade.checkStore(skuId, num).then((result) => {
|
|
|
|
|
if (result.data.success) {
|
|
|
|
|
this.getCardData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 店铺点击
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
checkboxChangeDP(e) {
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
|
e.checked = !e.checked;
|
|
|
|
|
// #endif
|
|
|
|
|
this.checkStoreFun(e.storeId, e.checked);
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取购物车选中信息
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
updateSkuCheckedFun(skuId, num) {
|
|
|
|
|
API_Trade.updateSkuChecked(skuId, num).then((result) => {
|
|
|
|
|
if (result.data.success) {
|
|
|
|
|
this.getCardData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 更新商品购物车数量
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
updateSkuNumFun(skuId, num) {
|
|
|
|
|
API_Trade.updateSkuNum(skuId, num).then((result) => {
|
|
|
|
|
if (result.statusCode == 200) {
|
|
|
|
|
this.getCardData();
|
|
|
|
|
} else {
|
|
|
|
|
let _this = this;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
_this.getCardData();
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2021-12-23 18:36:00 +08:00
|
|
|
|
// 数据去重一下
|
|
|
|
|
getPromotion(item) {
|
|
|
|
|
return Object.keys(item.promotionMap).map((child) => {
|
|
|
|
|
return child.split("-")[0]
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 获取购物车数据
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
getCardData() {
|
|
|
|
|
if (this.$options.filters.isLogin("auth")) {
|
|
|
|
|
uni.showLoading({
|
2021-06-09 20:12:26 +08:00
|
|
|
|
title: "加载中",
|
2021-05-13 11:03:32 +08:00
|
|
|
|
});
|
|
|
|
|
API_Trade.getCarts()
|
|
|
|
|
.then((result) => {
|
2023-04-11 18:41:34 +08:00
|
|
|
|
this.loading = false;
|
2021-12-25 10:55:25 +08:00
|
|
|
|
uni.stopPullDownRefresh();
|
2021-05-13 11:03:32 +08:00
|
|
|
|
if (result.data.success) {
|
|
|
|
|
this.cartDetail = result.data.result;
|
2023-01-29 18:14:53 +08:00
|
|
|
|
let checkOuted = true;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
for (let i = 0; i < this.cartDetail.cartList.length; i++) {
|
|
|
|
|
let item = this.cartDetail.cartList[i];
|
2021-12-28 19:50:06 +08:00
|
|
|
|
console.log(item);
|
2021-05-17 18:19:26 +08:00
|
|
|
|
// 循环出当前商品是否全选
|
2021-05-13 11:03:32 +08:00
|
|
|
|
if (item.checked == 0) {
|
2023-01-29 18:14:53 +08:00
|
|
|
|
checkOuted = false;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
// 如果有拼团活动顺便删除
|
|
|
|
|
item.skuList &&
|
|
|
|
|
item.skuList.forEach((sku) => {
|
2021-12-28 19:50:06 +08:00
|
|
|
|
if (sku.checked == 0) {
|
2023-01-29 18:14:53 +08:00
|
|
|
|
checkOuted = false;
|
2021-12-28 19:50:06 +08:00
|
|
|
|
}
|
2021-12-23 18:36:00 +08:00
|
|
|
|
if(Object.keys(sku.promotionMap).length != 0)
|
|
|
|
|
{
|
|
|
|
|
Object.keys(sku.promotionMap).forEach((pro, proIndex) => {
|
|
|
|
|
pro = pro.split('-')[0]
|
|
|
|
|
if (pro == "PINTUAN" ) {
|
|
|
|
|
Object.keys(sku.promotionMap).splice(proIndex, 1);
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
2021-12-23 18:36:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-05-13 11:03:32 +08:00
|
|
|
|
});
|
|
|
|
|
}
|
2023-01-29 18:14:53 +08:00
|
|
|
|
this.checkout = checkOuted;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
uni.stopPullDownRefresh();
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-04-11 18:41:34 +08:00
|
|
|
|
.catch((err) => {this.loading = false;});
|
|
|
|
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
2021-05-13 11:03:32 +08:00
|
|
|
|
} else {
|
2023-04-11 18:41:34 +08:00
|
|
|
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 选中某个复选框时,由checkbox时触发
|
|
|
|
|
*/
|
2021-05-13 11:03:32 +08:00
|
|
|
|
checkboxChange(e) {
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
|
e.checked = !e.checked;
|
|
|
|
|
// #endif
|
|
|
|
|
this.updateSkuCheckedFun(e.goodsSku.id, e.checked);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
2021-10-26 15:27:13 +08:00
|
|
|
|
<style lang="scss">
|
|
|
|
|
page {
|
|
|
|
|
background: #f2f2f2;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2021-05-13 11:03:32 +08:00
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
|
@import "./mp-carui.scss";
|
|
|
|
|
// #endif
|
|
|
|
|
.u-image {
|
|
|
|
|
box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05);
|
|
|
|
|
}
|
|
|
|
|
.promotion-notice {
|
2021-12-28 19:50:06 +08:00
|
|
|
|
margin-top: 10px;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
margin-left: 68rpx;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: #333;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
/deep/ .tips {
|
|
|
|
|
margin: 0 8rpx 0 0;
|
|
|
|
|
background: $main-color;
|
|
|
|
|
border-radius: 100px;
|
|
|
|
|
display: block;
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 2rpx 12rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-10-26 15:27:13 +08:00
|
|
|
|
.default-color {
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
2021-05-13 11:03:32 +08:00
|
|
|
|
.goods-row {
|
|
|
|
|
padding: 30rpx 0;
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-26 15:27:13 +08:00
|
|
|
|
.store-name {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
font-weight: bold;
|
2021-12-25 10:55:25 +08:00
|
|
|
|
font-size: 28rpx;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
.invalid {
|
|
|
|
|
filter: grayscale(1);
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-26 15:27:13 +08:00
|
|
|
|
.cart-item {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
border-radius: 0.4em;
|
|
|
|
|
transition: 0.35s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 空白页 */
|
|
|
|
|
/deep/ .u-number-input {
|
|
|
|
|
background: #fff !important;
|
|
|
|
|
border: 1px solid #ededed;
|
|
|
|
|
margin: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .u-icon-minus,
|
|
|
|
|
/deep/ .u-icon-plus {
|
|
|
|
|
background: #ffffff !important;
|
|
|
|
|
border: 1px solid #ededed;
|
|
|
|
|
color: #333 !important;
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.empty {
|
|
|
|
|
position: fixed;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
z-index: 99;
|
2021-09-22 11:31:37 +08:00
|
|
|
|
padding-bottom: var(--window-bottom);
|
2021-05-13 11:03:32 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
width: 240rpx;
|
|
|
|
|
height: 160rpx;
|
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.empty-tips {
|
|
|
|
|
display: flex;
|
|
|
|
|
font-size: $font-sm + 2rpx;
|
|
|
|
|
color: $font-color-disabled;
|
|
|
|
|
|
|
|
|
|
.navigator {
|
|
|
|
|
color: $uni-color-primary;
|
|
|
|
|
margin-left: 16rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-17 18:19:26 +08:00
|
|
|
|
.settlement {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
width: 180rpx;
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
line-height: 70rpx;
|
|
|
|
|
background: linear-gradient(91deg, $light-color 1%, $aider-light-color 99%);
|
|
|
|
|
border-radius: 900rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #fff;
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.price {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
/deep/ .number {
|
|
|
|
|
line-height: 1;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
> span {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box2 {
|
2021-10-26 15:27:13 +08:00
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
padding: 0 16rpx 0;
|
|
|
|
|
margin: 0 16rpx 20rpx;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
.u-checkbox {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
background: #fff;
|
2021-10-26 15:27:13 +08:00
|
|
|
|
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wrapper {
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .u-col {
|
|
|
|
|
padding: 24rpx 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.goods-content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
> p {
|
|
|
|
|
padding-left: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
padding: 20rpx 0 20rpx 0;
|
|
|
|
|
margin-bottom: 80rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.line {
|
|
|
|
|
float: left;
|
|
|
|
|
width: 1px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
border-right: 1px solid $light-color;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.store-line-check,
|
|
|
|
|
.store-line-img,
|
|
|
|
|
.store-line-desc {
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
|
float: left;
|
|
|
|
|
// #endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.store-line {
|
|
|
|
|
// #ifndef MP-WEIXIN
|
|
|
|
|
display: flex;
|
|
|
|
|
// #endif
|
|
|
|
|
overflow: hidden;
|
2023-04-10 11:18:09 +08:00
|
|
|
|
flex:10;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.goods-config {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
/deep/ .invalid {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 80rpx !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.tab {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
2021-10-26 15:27:13 +08:00
|
|
|
|
padding: 30rpx 0 0 0;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-10-26 15:27:13 +08:00
|
|
|
|
.right-col {
|
2023-04-10 11:18:09 +08:00
|
|
|
|
flex:2;
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: 100rpx;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
color: $light-color;
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
|
|
|
|
> span {
|
|
|
|
|
margin-left: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-26 15:27:13 +08:00
|
|
|
|
.right-line {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
width: 3px;
|
|
|
|
|
float: left;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
border-left: 1px solid #eeeeee;
|
|
|
|
|
|
|
|
|
|
/deep/ span {
|
|
|
|
|
margin-left: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box6 {
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
position: fixed;
|
|
|
|
|
// #ifdef APP-PLUS || MP-WEIXIN
|
|
|
|
|
bottom: 0;
|
|
|
|
|
// #endif
|
|
|
|
|
// #ifdef H5
|
2021-10-26 15:27:13 +08:00
|
|
|
|
bottom: var(--window-bottom);
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// #endif
|
|
|
|
|
left: 0;
|
|
|
|
|
border-top: 1px solid #ededed;
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 100rpx;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 100%;
|
|
|
|
|
background: rgba(255, 255, 255, 1);
|
|
|
|
|
color: #333;
|
|
|
|
|
z-index: 99;
|
|
|
|
|
> .navL {
|
|
|
|
|
padding: 0 32rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sp-type {
|
|
|
|
|
color: $u-light-color;
|
|
|
|
|
padding: 10rpx 0;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-26 15:27:13 +08:00
|
|
|
|
|
|
|
|
|
.sp-number {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
> .sp-price {
|
|
|
|
|
/deep/ span:nth-of-type(1) {
|
|
|
|
|
font-size: 38rpx;
|
|
|
|
|
}
|
|
|
|
|
/deep/ span:nth-of-type(2) {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.priceDetail-flowPrice {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
padding-left: 20rpx;
|
|
|
|
|
> span:nth-of-type(1) {
|
|
|
|
|
font-size: 38rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.prices {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
|
|
> .discountPrice {
|
|
|
|
|
align-items: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: rgb(201, 199, 199);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-10-26 15:27:13 +08:00
|
|
|
|
.discount-details {
|
2021-05-13 11:03:32 +08:00
|
|
|
|
margin-left: 10px;
|
|
|
|
|
color: #666;
|
|
|
|
|
padding: 4rpx 10rpx;
|
|
|
|
|
border-radius: 100px;
|
|
|
|
|
background: rgba(201, 199, 199, 0.3);
|
|
|
|
|
}
|
|
|
|
|
.discount-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin: 40rpx 0;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
> span:nth-of-type(1) {
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
> span:nth-of-type(2) {
|
|
|
|
|
color: #333;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.discount-title {
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
.discount-way {
|
|
|
|
|
width: 94%;
|
|
|
|
|
margin: 0 3%;
|
|
|
|
|
}
|
|
|
|
|
.discount-list {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
.promotions-list {
|
|
|
|
|
margin-left: 20rpx;
|
|
|
|
|
> .promotions-item-seckill {
|
|
|
|
|
background: rgba($color: $main-color, $alpha: 0.1);
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: $main-color;
|
|
|
|
|
display: inline;
|
|
|
|
|
padding: 0rpx 10rpx;
|
|
|
|
|
border-radius: 100px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|