问题修复
This commit is contained in:
@@ -359,7 +359,7 @@ import TipsPopup from "../components/tips-popup.vue";
|
||||
import commissionPopup from "../components/commission.vue";
|
||||
import rulePopup from "../components/rule.vue";
|
||||
import { desensitizePhone } from "@/utils/util.js";
|
||||
|
||||
import BigNumber from "bignumber.js";
|
||||
import * as distributionApi from "@/common/api/market/distribution.js";
|
||||
import { distributionLtPayOrder } from "@/common/api/order/index.js";
|
||||
import { APIshopUserInfo } from "@/common/api/member.js";
|
||||
@@ -586,10 +586,10 @@ const juNextLvMoney = computed(() => {
|
||||
}
|
||||
let total = 0;
|
||||
if (config.upgradeType == "cost" && state.distributionUser) {
|
||||
total = nextLvMoney.value - (state.distributionUser.consumeAmount || 0);
|
||||
total = new BigNumber(nextLvMoney.value).minus(state.distributionUser.consumeAmount || 0).toNumber();
|
||||
}
|
||||
if (config.upgradeType == "invite" && state.distributionUser) {
|
||||
total = nextLvMoney.value - (config.inviteCount || 0);
|
||||
total = new BigNumber(nextLvMoney.value).minus(config.inviteCount || 0).toNumber();
|
||||
}
|
||||
return Math.max(total, 0);
|
||||
});
|
||||
|
||||
@@ -893,7 +893,7 @@ const goToPay = async (payParams) => {
|
||||
}
|
||||
// 余额支付
|
||||
if (payParams.payType == "accountPay") {
|
||||
if (orderVIP.value.payPwd == "") {
|
||||
if (orderVIP.value.payPwd == "" &&userInfo.usePayPwd) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您还未设置支付密码,是否去设置?",
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
:class="'c' + (index1 + 1)"
|
||||
>TOP{{ index1 + 1 }}</view
|
||||
>
|
||||
<view class="limitDiscount" v-else-if="showLimitDiscount(item1)"
|
||||
<view class="limitDiscount" v-else-if="item1.is_time_discount"
|
||||
>限时折扣</view
|
||||
>
|
||||
<view class="goods_right" style="overflow: hidden">
|
||||
@@ -1962,7 +1962,7 @@ const totalPrices = computed(() => {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (limitTimeDiscountRes.value && limitTimeDiscountRes.value.id) {
|
||||
if (limitTimeDiscountRes.value && limitTimeDiscountRes.value.id && item.is_time_discount==1) {
|
||||
//限时折扣
|
||||
const price = orderUtils.returnPrice({
|
||||
goods: item,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<view class="color-333 font-16 font-700" style="margin-top: 60rpx;">密码支付</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">当前账号</text>
|
||||
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" :disabled="true" />
|
||||
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" :disabled="false" />
|
||||
<view class="top_box_one_texts">
|
||||
<view v-if="datalist.showText == true" class="yzm" @click="CodeRegister">{{ datalist.Recapture }}
|
||||
</view>
|
||||
|
||||
@@ -320,7 +320,9 @@ export const useCartsStore = defineStore("cart", () => {
|
||||
if (Message.operate_type == "init") {
|
||||
console.log("carts init Message", Message);
|
||||
console.log("carts init", msgData);
|
||||
limitTimeDiscount.value = Message.time_dis_info;
|
||||
if(!oldOrder.value.id){
|
||||
limitTimeDiscount.value = Message.time_dis_info;
|
||||
}
|
||||
cartsGoodsInfoInit(msgData);
|
||||
uni.hideLoading();
|
||||
isLoading.value = false;
|
||||
|
||||
@@ -14,7 +14,7 @@ export function returnGoodsPrice(goods, user, shopInfo, limitTimeDiscount) {
|
||||
}
|
||||
//是否可以使用会员价
|
||||
const canUseVipPrice =
|
||||
user && user.isVip && user.isMemberPrice && goods.memberPrice * 1 > 0;
|
||||
user && user.isVip && user.isMemberPrice && goods.memberPrice * 1 > 0 && shopInfo && shopInfo.isMemberPrice;
|
||||
// 商家改价
|
||||
if (goods.discount_sale_amount * 1 > 0) {
|
||||
return goods.salePrice;
|
||||
@@ -98,11 +98,14 @@ export function returnCanDikouGoodsArr(args) {
|
||||
.filter((v) => types.includes(v.type))
|
||||
.reduce((prev, cur) => {
|
||||
// 给每个抵扣商品添加所属优惠券类型
|
||||
const goodsWithType = cur.discount.hasDiscountGoodsArr.map((goods) => ({
|
||||
...goods,
|
||||
couponType: cur.type, // 记录该商品是被哪种类型的优惠券抵扣的
|
||||
}));
|
||||
prev.push(...goodsWithType);
|
||||
if(cur&&cur.discount){
|
||||
const goodsWithType = cur.discount.hasDiscountGoodsArr.map((goods) => ({
|
||||
...goods,
|
||||
couponType: cur.type, // 记录该商品是被哪种类型的优惠券抵扣的
|
||||
}));
|
||||
prev.push(...goodsWithType);
|
||||
}
|
||||
|
||||
return prev;
|
||||
}, []);
|
||||
const arr = _.cloneDeep(canDikouGoodsArr)
|
||||
|
||||
@@ -456,7 +456,7 @@ export function returnCanUseLimitTimeDiscount(
|
||||
}
|
||||
const canUseFoods = (limitTimeDiscount.foods || "").split(",");
|
||||
const goodsCanUse =
|
||||
limitTimeDiscount.foodType == 1 || canUseFoods.includes("" + goods[idKey]);
|
||||
limitTimeDiscount.foodType == 1 || canUseFoods.includes("" + goods[idKey as keyof BaseCartItem]);
|
||||
if (!goodsCanUse) {
|
||||
return false;
|
||||
}
|
||||
@@ -491,7 +491,7 @@ function returnMemberPrice(useVipPrice: boolean, goods: BaseCartItem) {
|
||||
function returnLimitPrice(
|
||||
goods: BaseCartItem,
|
||||
limitTimeDiscount: TimeLimitDiscountConfig | null | undefined,
|
||||
useVipPrice
|
||||
useVipPrice: boolean
|
||||
) {
|
||||
if (!limitTimeDiscount) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user