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