mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:53:27 +08:00
# 2022-02-24
### 1.3.7 开源社区版: 无 ### 0.2.4 会员专业版: 【新增】数据库sku表【CoreCmsProducts】增加"积分可抵扣金额"【pointsDeduction】字段 【新增】商品sku新增最高抵扣金额功能,可通过积分进行价格抵扣,实现单品使用【积分+价格】的购买模式。与订单积分折扣并存。 【新增】积分新增积分模式功能,分为全局计算和单品计算,【全局计算】是指直接对订单按照使用比例进行计算,【单品计算】是指根据单个商品下sku独立设置的最高可抵扣金额进行计算。 【新增】积分新增显示积分组合兑换价功能,勾选显示,将在商品详情,购物车等界面显示积分加价格的效果。 【新增】积分新增显示名称功能,前端可改名积分显示名称为自定义,如:金豆,衡豆等。 【新增】商品列表页面、购物车界面、下单界面、商品详情界面新增积分新增是否显示组合价功能,如果勾选,将显示【1000积分+25元换购】的内容。 【优化】当添加视频后,默认采用商品封面图作为视频底图,防止视频大小差异出现黑边或预加载中黑屏的问题。 【优化】商品列表展示列表去除padding留白效果。 【优化】优化form表单redio和checkBox选项分行显示的问题。 【修复】修复拼团分享页面倒计时识别失败的问题,修复拼团分享页面分享按钮点击失败的问题。#I4QWDH #I4QWFC
This commit is contained in:
@@ -569,8 +569,17 @@
|
||||
} else {
|
||||
let info = res.data;
|
||||
let products = res.data.product;
|
||||
|
||||
_this.goodsInfo = info;
|
||||
|
||||
if (_this.goodsInfo.album && _this.goodsInfo.video) {
|
||||
var videoObj = {
|
||||
url: _this.goodsInfo.video,
|
||||
poster: _this.goodsInfo.image
|
||||
};
|
||||
_this.goodsInfo.album.unshift(videoObj);
|
||||
_this.autoplay = false;
|
||||
}
|
||||
|
||||
_this.isfav = _this.goodsInfo.isfav;
|
||||
_this.type = _this.goodsInfo.groupType;
|
||||
_this.product = _this.spesClassHandle(products);
|
||||
|
||||
@@ -709,6 +709,16 @@
|
||||
let products = res.data.product;
|
||||
|
||||
_this.goodsInfo = info;
|
||||
|
||||
if (_this.goodsInfo.album && _this.goodsInfo.video) {
|
||||
var videoObj = {
|
||||
url: _this.goodsInfo.video,
|
||||
poster: _this.goodsInfo.image
|
||||
};
|
||||
_this.goodsInfo.album.unshift(videoObj);
|
||||
_this.autoplay = false;
|
||||
}
|
||||
|
||||
_this.discountAmount = parseFloat(info.pinTuanRule.discountAmount).toFixed(2);
|
||||
_this.product = _this.spesClassHandle(products);
|
||||
|
||||
|
||||
@@ -574,6 +574,16 @@
|
||||
let products = res.data.product;
|
||||
|
||||
_this.goodsInfo = info;
|
||||
|
||||
if (_this.goodsInfo.album && _this.goodsInfo.video) {
|
||||
var videoObj = {
|
||||
url: _this.goodsInfo.video,
|
||||
poster: _this.goodsInfo.image
|
||||
};
|
||||
_this.goodsInfo.album.unshift(videoObj);
|
||||
_this.autoplay = false;
|
||||
}
|
||||
|
||||
_this.isfav = _this.goodsInfo.isfav;
|
||||
_this.type = _this.goodsInfo.groupType;
|
||||
_this.product = _this.spesClassHandle(products);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.topBox { position: sticky; z-index: 1; width: 100%; /* #ifdef APP-PLUS */ top: calc(var(--status-bar-height) + 35px); /* #endif */ /* #ifdef H5 */ top: calc(var(--status-bar-height) + 55px); /* #endif */ /* #ifdef MP */ top: calc(var(--status-bar-height) + 62.5px); /* #endif */ }
|
||||
|
||||
.good_box { border-radius: 8px; margin: 5px; background-color: #ffffff; padding: 5px; position: relative; width: calc(100% - 6px); }
|
||||
.good_image { width: 100%; border-radius: 4px; }
|
||||
.goodsBox { display: flex; flex-flow: row wrap; align-content: flex-start; margin-top: 10px; }
|
||||
.good_box { border-radius: 8px; margin: 0 5px 8px 5px; background-color: #ffffff; position: relative; box-sizing: border-box; break-inside: avoid; overflow: auto; width: calc(50% - 10px); }
|
||||
.good_image { width: 100%; border-top-left-radius: 4px; border-top-right-radius: 4px; }
|
||||
.good_title { font-size: 13px; margin-top: 5px; color: $core-main-color; }
|
||||
.good_title-xl { font-size: 14px; margin-top: 5px; color: $core-main-color; }
|
||||
.good-tag-hot { display: flex; margin-top: 5px; position: absolute; top: 7.5px; left: 7.5px; background-color: $core-type-error; color: #FFFFFF; display: flex; align-items: center; padding: 2px 7px; border-radius: 25px; font-size: 10px; line-height: 1; }
|
||||
|
||||
@@ -84,36 +84,44 @@
|
||||
|
||||
|
||||
<!-- 商品列表 -->
|
||||
|
||||
<scroll-view scroll-y="true" :scroll-into-view="toView" class="scroll-Y" @scrolltolower="lower" enable-back-to-top="true" lower-threshold="45">
|
||||
<!-- 表格图片 -->
|
||||
<view v-if="current === 0">
|
||||
<view v-if="goodsList.length > 0" class="goodsBox">
|
||||
<u-grid :col="2" :border="false" align="left">
|
||||
<u-grid-item bg-color="transparent" :custom-style="{padding: '1px'}" v-for="item in goodsList" :key="item.id" @click="goGoodsDetail(item.id)">
|
||||
<view class="good_box">
|
||||
<u--image :src="item.image" :index="item.id" width="100%" height="167px" mode="widthFix" radius="10"></u--image>
|
||||
<view class="good_title u-line-2 coreshop-min-height-34">
|
||||
{{item.name}}
|
||||
<view class="good_box" v-for="item in goodsList" :key="item.id" @click="goGoodsDetail(item.id)">
|
||||
<u--image :src="item.image" :index="item.id" width="100%" height="167px" mode="widthFix"></u--image>
|
||||
<view class="coreshop-padding-5">
|
||||
<view class="good_title u-line-2 coreshop-min-height-34">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="good-price">
|
||||
{{item.price}}元 <span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-15 coreshop-text-gray">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
<view class="good-tag-recommend" v-if="item.isRecommend">
|
||||
推荐
|
||||
</view>
|
||||
<view class="good-tag-hot" v-if="item.isHot">
|
||||
热门
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="good-price">
|
||||
{{item.price}}元 <span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-15 coreshop-text-gray">{{item.mktprice}}元</span>
|
||||
</view>
|
||||
<view class="good-tag-recommend" v-if="item.isRecommend">
|
||||
推荐
|
||||
</view>
|
||||
<view class="good-tag-hot" v-if="item.isHot">
|
||||
热门
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}元
|
||||
</view>
|
||||
</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<u-loadmore :status="loadStatus" :icon-type="loadIconType" :load-text="loadText" margin-top="20" margin-bottom="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-btn-all">
|
||||
<u-loadmore :status="loadStatus" :icon-type="loadIconType" :load-text="loadText" margin-top="20" margin-bottom="20" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 无数据时默认显示 -->
|
||||
<view class="coreshop-emptybox" v-else>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/data.png'" icon-size="150" text="当前列表为空" mode="list"></u-empty>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 列表图片 -->
|
||||
@@ -134,7 +142,7 @@
|
||||
</u-col>
|
||||
<u-col span="8">
|
||||
<view class="contentBody">
|
||||
<view class="good_title-xl u-line-2 coreshop-padding-left-10 coreshop-padding-right-10">
|
||||
<view class="good_title-xl u-line-2 coreshop-padding-left-10 coreshop-padding-right-10">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="good-price coreshop-padding-10">
|
||||
@@ -306,6 +314,13 @@
|
||||
this.getGoods();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pointSwitch() { return this.$store.state.config.pointSwitch },
|
||||
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
|
||||
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
|
||||
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
|
||||
pointShowName() { return this.$store.state.config.pointShowName },
|
||||
},
|
||||
methods: {
|
||||
listGrid() {
|
||||
if (this.current == 0) {
|
||||
|
||||
@@ -18,8 +18,19 @@
|
||||
<view class="coreshop-limited-seckill-box coreshop-bg-red">
|
||||
<text class="coreshop-text-price coreshop-font-20">{{ product.price || '0.00' }}</text>
|
||||
<view class="coreshop-font-xs coreshop-cost-price-num price-4">
|
||||
<view class="coreshop-text-through">原价¥{{ product.mktprice || '0.00'}}</view>
|
||||
<view>{{ goodsInfo.buyCount || '0' }} 人已购买</view>
|
||||
<view v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && product.pointsDeduction > 0">
|
||||
<view class="coreshop-padding-bottom-5 coreshop-font-14">
|
||||
兑换价:{{pointDiscountedProportion * product.pointsDeduction }}{{ pointShowName}}+{{ product.price - product.pointsDeduction}} 元
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-wrap coreshop-flex-direction-row">
|
||||
<view class="coreshop-text-through coreshop-padding-bottom-5">原价¥{{ product.mktprice || '0.00'}}</view>
|
||||
<view class="coreshop-margin-left-10">{{ goodsInfo.buyCount || '0' }} 人已购买</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="coreshop-text-through coreshop-padding-bottom-5">原价¥{{ product.mktprice || '0.00'}}</view>
|
||||
<view>{{ goodsInfo.buyCount || '0' }} 人已购买</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-text-right coreshop-share-right">
|
||||
<u-icon name="share" @click="goShare()" label="分享" size="20" labelSize="11" color="#fff" labelColor="#fff" labelPos="bottom"></u-icon>
|
||||
@@ -436,7 +447,7 @@
|
||||
delivery: [],
|
||||
service: [],
|
||||
},
|
||||
autoplay: true
|
||||
autoplay: true,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -504,6 +515,11 @@
|
||||
this.$store.commit('userInfo', val);
|
||||
}
|
||||
},
|
||||
pointSwitch() { return this.$store.state.config.pointSwitch },
|
||||
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
|
||||
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
|
||||
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
|
||||
pointShowName() { return this.$store.state.config.pointShowName },
|
||||
shopName() {
|
||||
return this.$store.state.config.shopName;
|
||||
},
|
||||
@@ -590,7 +606,11 @@
|
||||
_this.goodsInfo = info;
|
||||
|
||||
if (_this.goodsInfo.album && _this.goodsInfo.video) {
|
||||
_this.goodsInfo.album.unshift(_this.goodsInfo.video);
|
||||
var videoObj = {
|
||||
url: _this.goodsInfo.video,
|
||||
poster: _this.goodsInfo.image
|
||||
};
|
||||
_this.goodsInfo.album.unshift(videoObj);
|
||||
_this.autoplay = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
}
|
||||
.cart-shoppingcard:last-child { margin-bottom: 75px }
|
||||
|
||||
.cart-shoppingcard-checkbtn { width: 100px; margin-left: 25px; flex-shrink: 0; }
|
||||
.cart-shoppingcard-checkbtn { /*width: 100px;*/ margin-left: 15px; flex-shrink: 0; }
|
||||
.cart-shoppingcard-checkout { width: 90px; height: 50px; line-height: 50px; font-size: 14px; text-align: center; flex-shrink: 0; }
|
||||
.cart-bg-gray { background: #A5A7B2 !important; color: #FFFFFF !important; }
|
||||
.cart-badge { border-radius: 19px; height: 19px; line-height: 19px; padding: 0 6.5px; font-size: 11px; }
|
||||
|
||||
@@ -38,10 +38,25 @@
|
||||
<text class="cart-shoppingcard-remove coreshop-text-green" v-if="item.stockNo">库存不足</text>
|
||||
<text class="cart-shoppingcard-remove coreshop-text-green" v-else-if="item.stockTension">库存紧张</text>
|
||||
<text class="cart-shoppingcard-remove " v-else=""></text>
|
||||
<u-icon name="trash" size="14" @click="removeGoods" :index="index" label="删除" labelSize="12"></u-icon>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-justify-between coreshop-margin-top-10">
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-13" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.products.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction }}{{ pointShowName}}+{{ item.products.price - item.products.pointsDeduction}}元
|
||||
</view>
|
||||
</view>
|
||||
<view v-else></view>
|
||||
<u-icon name="trash" size="14" @click="removeGoods" :index="index" label="删除" labelSize="12"></u-icon>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-checkbox-group>
|
||||
|
||||
@@ -61,7 +76,18 @@
|
||||
<u-checkbox name="全选" label="全选" active-color="red"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
<view class="cart-shoppingcard-count coreshop-flex coreshop-flex-direction-row coreshop-justify-between coreshop-align-center">
|
||||
<view class="cart-shoppingcard-count coreshop-flex coreshop-flex-direction-column coreshop-justify-between coreshop-align-left coreshop-margin-right-5" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && pointShowMoney>0">
|
||||
<view>
|
||||
<text class="cart-text">合计 :</text>
|
||||
<text class="coreshop-font-18 coreshop-text-red">¥{{totalprice}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-12">{{ pointShowName}}兑换价:</text>
|
||||
<text class="coreshop-font-12 coreshop-text-red">{{pointShowText}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cart-shoppingcard-count coreshop-flex coreshop-flex-direction-row coreshop-justify-between coreshop-align-center coreshop-margin-right-5" v-else>
|
||||
<text class="cart-text">合计 :</text>
|
||||
<text class="coreshop-font-18 coreshop-text-red">¥{{totalprice}}</text>
|
||||
</view>
|
||||
@@ -84,7 +110,9 @@
|
||||
shoppingCard: {},
|
||||
cartIds: [], //选中ids
|
||||
goSettlement: false, //去结算按钮
|
||||
selectAll: ['全选']
|
||||
selectAll: ['全选'],
|
||||
pointShowText: "",
|
||||
pointShowMoney: 0,
|
||||
}
|
||||
},
|
||||
//页面加载
|
||||
@@ -103,14 +131,18 @@
|
||||
},
|
||||
GoodsStocksWarn() {
|
||||
return this.$store.state.config.goodsStocksWarn;
|
||||
}
|
||||
},
|
||||
pointSwitch() { return this.$store.state.config.pointSwitch },
|
||||
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
|
||||
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
|
||||
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
|
||||
pointShowName() { return this.$store.state.config.pointShowName },
|
||||
},
|
||||
methods: {
|
||||
//数组转字符串
|
||||
arrayToStr: function (array) {
|
||||
return array.toString();
|
||||
},
|
||||
|
||||
//获取购物车数据
|
||||
getCartData: function () {
|
||||
let _this = this;
|
||||
@@ -127,7 +159,6 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//渲染前配置数据
|
||||
showHandle: function (data, flag = true) {
|
||||
let _this = this;
|
||||
@@ -214,16 +245,22 @@
|
||||
}
|
||||
_this.countTotoal();
|
||||
},
|
||||
|
||||
//计算总计函数
|
||||
countTotoal: function () {
|
||||
let _that = this;
|
||||
var total = 0;
|
||||
var pointsMoneySum = 0;
|
||||
var pointsSum = 0;
|
||||
|
||||
for (let i in _that.shoppingCard.list) {
|
||||
if (_that.shoppingCard.list[i].isSelect) {
|
||||
total += Number(_that.shoppingCard.list[i].products.price) * Number(_that.shoppingCard.list[i].nums);
|
||||
_that.pointShowMoney += Number(_that.shoppingCard.list[i].products.pointsDeduction) * Number(_that.shoppingCard.list[i].nums);
|
||||
pointsSum += _that.pointDiscountedProportion * Number(_that.shoppingCard.list[i].products.pointsDeduction) * Number(_that.shoppingCard.list[i].nums);
|
||||
pointsMoneySum += Number(_that.shoppingCard.list[i].products.price - _that.shoppingCard.list[i].products.pointsDeduction) * Number(_that.shoppingCard.list[i].nums);
|
||||
}
|
||||
}
|
||||
_that.pointShowText = pointsSum + _that.pointShowName + '+' + _that.$common.formatMoney(pointsMoneySum, 2, '');
|
||||
_that.totalprice = _that.$common.formatMoney(total, 2, '');
|
||||
},
|
||||
toNumberChange: function (e) {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<!-- 弹出层 -->
|
||||
<view class="coreshop-padding-10">
|
||||
<u-popup mode="bottom" v-model="shareBox" ref="share">
|
||||
<u-popup mode="bottom" :show="shareBox" ref="share">
|
||||
<!-- #ifdef H5 -->
|
||||
<coreshop-share-h5 :shareType='3' :goodsId="goodsInfo.goodsId" :teamId="teamInfo.teamId" :groupId="teamInfo.ruleId"
|
||||
:shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref"
|
||||
@@ -121,33 +121,8 @@
|
||||
} else {
|
||||
this.$u.toast('参数错误');
|
||||
}
|
||||
let teamInfo, orderInfo, goodsInfo
|
||||
|
||||
let pages = getCurrentPages()
|
||||
let pre = pages[pages.length - 2]
|
||||
if (typeof pre != 'undefined') {
|
||||
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
|
||||
teamInfo = pre.teamInfo
|
||||
orderInfo = pre.orderInfo
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
teamInfo = pre.$vm.teamInfo
|
||||
orderInfo = pre.$vm.orderInfo
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY || MP-TOUTIAO
|
||||
teamInfo = pre.data.teamInfo;
|
||||
orderInfo = pre.data.orderInfo
|
||||
// #endif
|
||||
}
|
||||
if (teamInfo && orderInfo) {
|
||||
this.teamInfo = teamInfo;
|
||||
this.orderInfo = orderInfo;
|
||||
this.goodsInfo = orderInfo.items[0];
|
||||
|
||||
} else {
|
||||
this.orderDetail();
|
||||
this.getTeam();
|
||||
}
|
||||
this.orderDetail();
|
||||
this.getTeam();
|
||||
},
|
||||
computed: {
|
||||
shareHref() {
|
||||
@@ -259,20 +234,20 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
goodsInfo: {
|
||||
handler() {
|
||||
this.getShareUrl();
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
teamInfo: {
|
||||
handler() {
|
||||
this.getShareUrl();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
//watch: {
|
||||
// goodsInfo: {
|
||||
// handler() {
|
||||
// this.getShareUrl();
|
||||
// },
|
||||
// deep: true
|
||||
// },
|
||||
// teamInfo: {
|
||||
// handler() {
|
||||
// this.getShareUrl();
|
||||
// },
|
||||
// deep: true
|
||||
// }
|
||||
//},
|
||||
//分享
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
|
||||
@@ -107,10 +107,31 @@
|
||||
<u-tag :text="v.name" mode="light" size="mini" v-for="(v, k) in item.products.promotionList" :key="k" />
|
||||
</view>
|
||||
<view class="goods-price-view">
|
||||
<text class="coreshop-text-price coreshop-text-red coreshop-font-lg">{{ item.products.price || ''}}</text>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row">
|
||||
<text class="coreshop-text-price coreshop-text-red coreshop-font-lg">{{ item.products.price || ''}}</text>
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-10 coreshop-align-center" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.products.pointsDeduction > 0">
|
||||
<view>
|
||||
({{ pointShowName}}兑换价:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction }}{{ pointShowName}}+{{ item.products.price - item.products.pointsDeduction}}元
|
||||
</view>
|
||||
)
|
||||
</view>
|
||||
</view>
|
||||
<view class='coreshop-text-right goods-num'>× {{ item.nums || ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-13 coreshop-margin-top-10" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.products.pointsDeduction > 0">
|
||||
<view>
|
||||
{{ pointShowName}}兑换价合计:
|
||||
</view>
|
||||
<view class="coreshop-text-red">
|
||||
{{pointDiscountedProportion * item.products.pointsDeduction * item.nums }}{{ pointShowName}}+{{(item.products.price - item.products.pointsDeduction)*item.nums }}元
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -162,10 +183,10 @@
|
||||
<view class="coreshop-list-item" v-if="isOpenPoint === 1 && userPointNums > 0">
|
||||
<!--<view class="coreshop-list-item arrow">-->
|
||||
<view class="content">
|
||||
<text class="coreshop-text-black">积分抵扣</text>
|
||||
<text class="coreshop-text-black">{{ pointShowName}}抵扣</text>
|
||||
<view class="coreshop-text-gray coreshop-font-xs flex">
|
||||
<text class="u-line-1">
|
||||
可用{{ canUsePoint}}积分,可抵扣{{ pointMoney}}元,共有{{ userPointNums}}积分
|
||||
可用{{ canUsePoint}}{{ pointShowName}},可抵扣{{ pointMoney}}元,共有{{ userPointNums}}{{ pointShowName}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -468,6 +489,8 @@
|
||||
// 判断是否开启积分抵扣 并且 没有勾选积分使用
|
||||
if (this.isOpenPoint === 1 && !this.isUsePoint) {
|
||||
let money = {
|
||||
cartType: this.orderType,
|
||||
ids: this.params.ids,
|
||||
orderMoney: data.amount
|
||||
}
|
||||
this.$u.api.usablePoint(money).then(res => {
|
||||
@@ -841,7 +864,11 @@
|
||||
//console.log(this.cartData.coupon);
|
||||
return this.cartData.coupon && this.cartData.coupon.length > 0;
|
||||
},
|
||||
|
||||
pointSwitch() { return this.$store.state.config.pointSwitch },
|
||||
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
|
||||
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
|
||||
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
|
||||
pointShowName() { return this.$store.state.config.pointShowName },
|
||||
},
|
||||
watch: {
|
||||
// 监听数据状态(切换收货地址, 是否使用优惠券, 是否使用积分) 重新请求订单数据
|
||||
|
||||
Reference in New Issue
Block a user