修复会员判断问题
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<block v-if="limitDiscount && limitDiscount.id" class="limit-price">
|
||||
<text>
|
||||
<block v-if="limitDiscount && limitDiscount.id" >
|
||||
<text class="limit-price">
|
||||
{{ returnPrice() }}
|
||||
</text>
|
||||
</block>
|
||||
|
||||
@@ -566,7 +566,7 @@ export function calcSingleGoodsRealPrice(
|
||||
>
|
||||
) : number {
|
||||
const { isMember, memberDiscountRate, limitTimeDiscount: activity } = config;
|
||||
|
||||
console.log('isMember',isMember);
|
||||
//如果是增菜价格为0
|
||||
if (goods.is_gift || goods.isGift) {
|
||||
return 0;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"lodash": "^4.17.21",
|
||||
"pinia": "^2.3.1",
|
||||
"pinia-plugin-unistorage": "^0.1.2",
|
||||
"ysk-utils": "^1.0.81"
|
||||
"ysk-utils": "^1.0.83"
|
||||
},
|
||||
"devDependencies": {
|
||||
"unplugin-auto-import": "^0.16.7"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
:shopInfo="cartStore.shopInfo" :shopUserInfo="cartStore.shopUserInfo"
|
||||
:limitDiscount="cartStore.limitTimeDiscount"></orderItemVue>
|
||||
|
||||
<view class="u-flex u-row-center u-m-t-16 u-font-28">
|
||||
<view class="u-flex u-row-center u-m-t-16 u-font-28" v-if="cartStore.allGoods>4">
|
||||
<view class="u-flex u-col-baseline" @click="showAllGoods=!showAllGoods">
|
||||
<text>{{showAllGoods?'收起':'展开'}}</text>
|
||||
<view class="guodu u-m-l-10 u-m-t-2" :class="{rotate:!showAllGoods}">
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
:class="shopInfo.isVip == 0 || shopInfo.isMemberPrice == 0 ? 'lineThrough' : ''">¥</text>
|
||||
<!-- 会员价与价格 -->
|
||||
<text class="price">
|
||||
{{ shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1 ? item.memberPrice || item.salePrice : item.salePrice }}
|
||||
{{ shopUserInfo.isVip == 1 && shopUserInfo.isMemberPrice == 1 ? item.memberPrice || item.salePrice : item.salePrice }}
|
||||
</text>
|
||||
<!-- 单位 -->
|
||||
<text class="unit" v-if="item.unitName">/{{ item.unitName }}</text>
|
||||
@@ -257,7 +257,7 @@
|
||||
<view class="money">
|
||||
<view>¥</view>
|
||||
<text class="money_num" style="margin-right: 10rpx">
|
||||
{{ shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1 ? item1.memberPrice || item1.salePrice : item1.salePrice }}
|
||||
{{ shopUserInfo.isVip == 1 && shopUserInfo.isMemberPrice == 1 ? item1.memberPrice || item1.salePrice : item1.salePrice }}
|
||||
</text>
|
||||
<text v-if="item1.unitName">/{{ item1.unitName }}</text>
|
||||
</view>
|
||||
@@ -491,7 +491,7 @@
|
||||
|
||||
<text class="num" v-if="false">
|
||||
{{
|
||||
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
||||
shopUserInfo.isVip == 1 && shopUserInfo.isMemberPrice == 1
|
||||
? specifications.item.result.memberPrice || specifications.item.result.salePrice
|
||||
: specifications.item.result.salePrice
|
||||
}}
|
||||
@@ -509,7 +509,7 @@
|
||||
</view>
|
||||
<text class="num" v-if="false">
|
||||
{{
|
||||
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
||||
shopUserInfo.isVip == 1 && shopUserInfo.isMemberPrice == 1
|
||||
? specifications.item.memberPrice || specifications.item.salePrice
|
||||
: specifications.item.salePrice
|
||||
}}
|
||||
|
||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -30,8 +30,8 @@ importers:
|
||||
specifier: ^0.1.2
|
||||
version: 0.1.2
|
||||
ysk-utils:
|
||||
specifier: ^1.0.81
|
||||
version: 1.0.81
|
||||
specifier: ^1.0.83
|
||||
version: 1.0.83
|
||||
devDependencies:
|
||||
unplugin-auto-import:
|
||||
specifier: ^0.16.7
|
||||
@@ -357,8 +357,8 @@ packages:
|
||||
webpack-virtual-modules@0.6.2:
|
||||
resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==}
|
||||
|
||||
ysk-utils@1.0.81:
|
||||
resolution: {integrity: sha512-c6SOfOaw43aDDuyXgEv24Vo561EfFoa1gfGbY+p1EfXHoGPOE6tQLekbWW9bn37KAse0Gdef7VCbdv0Dr6ltaw==}
|
||||
ysk-utils@1.0.83:
|
||||
resolution: {integrity: sha512-48KLQJXQtF8nLaaFHR1hAFx/QGS848fg7n37BpZEtwliD+D5ZHQFPOCZNaM68jiwDTWhNg41rHpZzhAUQXe+/Q==}
|
||||
|
||||
snapshots:
|
||||
|
||||
@@ -684,7 +684,7 @@ snapshots:
|
||||
|
||||
webpack-virtual-modules@0.6.2: {}
|
||||
|
||||
ysk-utils@1.0.81:
|
||||
ysk-utils@1.0.83:
|
||||
dependencies:
|
||||
bignumber.js: 9.3.1
|
||||
loadsh: 0.0.4
|
||||
|
||||
@@ -503,10 +503,10 @@ export const useCartsStore = defineStore("cart", () => {
|
||||
return false;
|
||||
}
|
||||
const isUse =
|
||||
shopUserInfo.value.isVip && shopUserInfo.value.isMemberPrice && shopInfo.value
|
||||
.isMemberPrice == 1 ?
|
||||
shopUserInfo.value.isVip && shopUserInfo.value.isMemberPrice ?
|
||||
true :
|
||||
false;
|
||||
console.log('useVipPrice',isUse);
|
||||
return isUse;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user