Compare commits
16 Commits
ac7af51a92
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| 402f85d61f | |||
| 575e6d22b0 | |||
| dfc67e12c5 | |||
| 42fc09815b | |||
| 3064007137 | |||
| d8c2aef83e | |||
| 362f3cee96 | |||
| ca53618004 | |||
| cbe27a43de | |||
| 5fcbba0cb4 | |||
| 0944635c69 | |||
| 067025f532 | |||
| 8d917d49ed | |||
| bcc44a0886 | |||
| 811abf935c | |||
| bde30fa70c |
@@ -35,8 +35,8 @@ export default async (params) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.cache.set('token', 'b61c8b0f1c9d47ad924e33c48b496ce6')
|
uni.cache.set('token', '1b5e8baf0cc1492a858a208f113d0971')
|
||||||
uni.cache.set('userInfo',{"acQrcodeValidTime":"2025-11-17 17:57:16","alipayOpenId":"","birthDay":"2025-10-17","createTime":"2024-07-06 11:30:16","distributionAmount":0,"headImg":"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132","id":"36434","idCard":"612401199810058031","isAc":0,"lastLoginTime":"2025-12-25 11:41:15","nickName":"微信用户","password":"","payPwd":"e10adc3949ba59abbe56e057f20f883e","phone":"18049104914","realName":"叶明飞","sex":1,"status":1,"updateTime":"2025-12-25 09:41:58","usePayPwd":0,"wechatAcOpenId":"1111","wechatAcQrcode":"","wechatOpenId":"or1l86yipGvwyfPhrKIAcQuSfAV8"})
|
uni.cache.set('userInfo',{"acQrcodeValidTime":"2026-01-13 13:35:59","alipayOpenId":"","birthDay":"2025-12-25","createTime":"2024-03-13 10:56:40","distributionAmount":0,"headImg":"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132","id":"36689","idCard":"","isAc":0,"lastLoginTime":"2025-12-26 10:01:12","nickName":"微信用户","password":"","payPwd":"e10adc3949ba59abbe56e057f20f883e","phone":"18049104914","realName":"","sex":1,"status":1,"updateTime":"2025-12-26 09:59:31","usePayPwd":0,"wechatAcOpenId":"","wechatAcQrcode":"http://weixin.qq.com/q/029s5JtP1xfmJ1g_HDxFco","wechatOpenId":"or1l86yipGvwyfPhrKIAcQuSfAV8"})
|
||||||
// #endif
|
// #endif
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const timeoutDuration = params.timeout || 10000; // 可以通过 params 传入超时时间,默认 10 秒
|
const timeoutDuration = params.timeout || 10000; // 可以通过 params 传入超时时间,默认 10 秒
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// const debug = process.env.NODE_ENV == 'development' ? true : false;
|
// const debug = process.env.NODE_ENV == 'development' ? true : false;
|
||||||
const debug = true; // false线上 true本地
|
// const debug = false; // false线上 true本地
|
||||||
|
const debug = false; // false线上 true本地
|
||||||
let baseUrl = ''
|
let baseUrl = ''
|
||||||
let baseUrlwws = ''
|
let baseUrlwws = ''
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
{{ cart.memberPrice }}
|
{{ cart.memberPrice }}
|
||||||
</text>
|
</text>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<text v-else class="salePrice">{{ cart.salePrice }}</text>
|
<text v-else class="salePrice">{{ cart.salePrice }}</text>
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view
|
<!-- <view
|
||||||
class="u-p-t-16 u-p-b-20 u-flex u-p-l-28 u-p-r-28"
|
class="u-p-t-16 u-p-b-20 u-flex u-p-l-28 u-p-r-28"
|
||||||
style="align-items: baseline; justify-content: flex-end"
|
style="align-items: baseline; justify-content: flex-end"
|
||||||
>
|
>
|
||||||
@@ -53,9 +53,9 @@
|
|||||||
<text class="font-16 color-333 font-700" >
|
<text class="font-16 color-333 font-700" >
|
||||||
{{ totalIncome }}</text
|
{{ totalIncome }}</text
|
||||||
>
|
>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="list">
|
<view class="list u-m-t-32">
|
||||||
<view v-for="(item, index) in state.records" :key="index" class="item">
|
<view v-for="(item, index) in state.records" :key="index" class="item">
|
||||||
<view class="u-flex justify-between">
|
<view class="u-flex justify-between">
|
||||||
<view>
|
<view>
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
<view class="content min-page bg-f7">
|
<view class="content min-page bg-f7">
|
||||||
<view class="contentbox">
|
<view class="contentbox">
|
||||||
<template v-if="shopExtend.length">
|
<template v-if="shopExtend.length">
|
||||||
<image class="bg" :src="shopExtend[0].value" mode="aspectFill"
|
<image class="bg" :src="shopExtend[0].value" mode="aspectFill" v-if="!isJsonArrayString(shopExtend[0].value)"></image>
|
||||||
v-if="!isJsonArrayString(shopExtend[0].value)"></image>
|
|
||||||
<swiper class="swiper" autoplay circular v-else>
|
<swiper class="swiper" autoplay circular v-else>
|
||||||
<swiper-item class="swiper-item" v-for="(item, index) in JSON.parse(shopExtend[0].value)"
|
<swiper-item class="swiper-item" v-for="(item, index) in JSON.parse(shopExtend[0].value)" :key="index">
|
||||||
:key="index">
|
|
||||||
<image class="swiper-bg" :src="item"></image>
|
<image class="swiper-bg" :src="item"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -29,7 +27,6 @@
|
|||||||
<image :src="imgs.code" class="code"></image>
|
<image :src="imgs.code" class="code"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="new-menus-box">
|
<view class="new-menus-box">
|
||||||
<view class="new-menus layout2" v-if="allConfig.takeout">
|
<view class="new-menus layout2" v-if="allConfig.takeout">
|
||||||
<view class="diner" @click="scanCodehandle(0)">
|
<view class="diner" @click="scanCodehandle(0)">
|
||||||
@@ -60,7 +57,6 @@
|
|||||||
|
|
||||||
<view class="u-font-28 color-999">一键分享,快速拼单</view>
|
<view class="u-font-28 color-999">一键分享,快速拼单</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="points" @click="toIntegralMall">
|
<view class="points" @click="toIntegralMall">
|
||||||
@@ -122,532 +118,516 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import attractPopup from '@/components/attract-popup.vue';
|
import attractPopup from '@/components/attract-popup.vue';
|
||||||
import {
|
import { homeData } from '@/common/api/market/index.js';
|
||||||
homeData
|
import { getMemberConfig, getRechargeConfig } from '@/common/api/index/index.js';
|
||||||
} from '@/common/api/market/index.js';
|
import { ref, reactive, defineProps, defineEmits, onMounted } from 'vue';
|
||||||
import {
|
import { isJsonArrayString } from '@/utils/util.js';
|
||||||
getMemberConfig,
|
|
||||||
getRechargeConfig
|
|
||||||
} from '@/common/api/index/index.js';
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
reactive,
|
|
||||||
defineProps,
|
|
||||||
defineEmits,
|
|
||||||
onMounted
|
|
||||||
} from 'vue';
|
|
||||||
import {
|
|
||||||
isJsonArrayString
|
|
||||||
} from '@/utils/util.js';
|
|
||||||
|
|
||||||
const attractPopupRef = ref(null);
|
const attractPopupRef = ref(null);
|
||||||
|
|
||||||
const imgs = {
|
const imgs = {
|
||||||
recharge: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/2f22c0ced494497e8d6f981832b191c9.png',
|
recharge: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/2f22c0ced494497e8d6f981832b191c9.png',
|
||||||
share: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/bcb8d461e96d445ba40256079da775b3.png',
|
share: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/bcb8d461e96d445ba40256079da775b3.png',
|
||||||
vip: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/cfc3bf5ba12747c6ada4d5a388aceca3.png',
|
vip: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/cfc3bf5ba12747c6ada4d5a388aceca3.png',
|
||||||
orderFood: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/7c54a22d56f44813bf3f76c1a82a34f3.png',
|
orderFood: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/7c54a22d56f44813bf3f76c1a82a34f3.png',
|
||||||
big_orderFood: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/b3c7f6139eff4a7d81482cf533ec79fa.png',
|
big_orderFood: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/b3c7f6139eff4a7d81482cf533ec79fa.png',
|
||||||
takeout: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/3623cbf425d845a993acb4309404a7b9.png',
|
takeout: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/3623cbf425d845a993acb4309404a7b9.png',
|
||||||
groupBuying: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/117745e0f3db48b489f9d4e5c5967043.png',
|
groupBuying: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/117745e0f3db48b489f9d4e5c5967043.png',
|
||||||
points: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/df0758f7b86449f89f882e50226e17c7.png',
|
points: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/df0758f7b86449f89f882e50226e17c7.png',
|
||||||
code: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/044dcaf913054f03a9db7983f048b1e6.png',
|
code: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/044dcaf913054f03a9db7983f048b1e6.png',
|
||||||
defaultAvatar: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/b98d2c7110e847f996e8d7ba4342f0a5.png',
|
defaultAvatar: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/b98d2c7110e847f996e8d7ba4342f0a5.png',
|
||||||
taocan: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/1eb9aa9b865b47b39ab9d7ac404601a9.png'
|
taocan: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/1eb9aa9b865b47b39ab9d7ac404601a9.png'
|
||||||
};
|
};
|
||||||
// 定义接收的属性
|
// 定义接收的属性
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
shopExtend: {
|
shopExtend: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function toGroupBuying() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/groupBuying/index/index'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function toGroupBuying() {
|
function toFenxiao() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/groupBuying/index/index'
|
url: '/distribution/shop-detail/index?shopId=' + uni.cache.get('shopId')
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toFenxiao() {
|
function toIntegralMall() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/scoreShop/index/index?shopId=' + uni.cache.get('shopId')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
import { productStore } from '@/stores/user.js';
|
||||||
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
// 显示弹窗
|
||||||
|
const popupShow = ref(false);
|
||||||
|
const scanCodehandle = (i) => {
|
||||||
|
popupShow.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 预点单
|
||||||
|
function beforehandOrderHandle() {
|
||||||
|
popupShow.value = false;
|
||||||
|
uni.cache.set('dinersNum', 1);
|
||||||
|
uni.cache.set('tableCode', shopUserInfo.id);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/product/index?type=beforehand'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 扫码点餐
|
||||||
|
async function scanOrderHandle() {
|
||||||
|
popupShow.value = false;
|
||||||
|
const store = productStore();
|
||||||
|
await store.scanCodeactions();
|
||||||
|
}
|
||||||
|
|
||||||
|
function toTaocan() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/userPackage/index/index'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const memberindex = (url) => {
|
||||||
|
uni.pro.navigateTo(url, {
|
||||||
|
shopId: uni.cache.get('shopId'),
|
||||||
|
type: 'index'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const shopUserInfo = reactive({});
|
||||||
|
Object.assign(shopUserInfo, uni.cache.get('shopUserInfo') || {});
|
||||||
|
|
||||||
|
function tomember() {
|
||||||
|
if (isMember.value) {
|
||||||
|
const shopId = uni.cache.get('shopId');
|
||||||
|
if (!shopUserInfo.isVip) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/user/vip/buy-vip?shopId=' + shopId
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/distribution/shop-detail/index?shopId=' + uni.cache.get('shopId')
|
url: '/user/vip/vip?shopId=' + shopId
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂未开放',
|
||||||
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toIntegralMall() {
|
function toCharge() {
|
||||||
|
if (isCharge.value) {
|
||||||
|
const shopId = uni.cache.get('shopId');
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/scoreShop/index/index?shopId=' + uni.cache.get('shopId')
|
url: '/pages/user/member/czzx?shopId=' + shopId
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂未开放',
|
||||||
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
const getQueryString = (url, name) => {
|
||||||
|
//解码
|
||||||
|
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i');
|
||||||
|
var r = url.substr(1).match(reg);
|
||||||
|
if (r != null) {
|
||||||
|
return r[2];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
import {
|
// 获取会员配置
|
||||||
productStore
|
const isMember = ref(0);
|
||||||
} from '@/stores/user.js';
|
const isCharge = ref(0);
|
||||||
import {
|
async function getVipConfig() {
|
||||||
onShow
|
try {
|
||||||
} from '@dcloudio/uni-app';
|
const res1 = await getMemberConfig({
|
||||||
|
shopId: uni.cache.get('shopId')
|
||||||
// 显示弹窗
|
|
||||||
const popupShow = ref(false);
|
|
||||||
const scanCodehandle = (i) => {
|
|
||||||
popupShow.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 预点单
|
|
||||||
function beforehandOrderHandle() {
|
|
||||||
popupShow.value = false;
|
|
||||||
uni.cache.set('dinersNum', 1);
|
|
||||||
uni.cache.set('tableCode', shopUserInfo.id);
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/product/index?type=beforehand'
|
|
||||||
});
|
});
|
||||||
}
|
const res2 = await getRechargeConfig({
|
||||||
|
shopId: uni.cache.get('shopId')
|
||||||
// 扫码点餐
|
|
||||||
async function scanOrderHandle() {
|
|
||||||
popupShow.value = false;
|
|
||||||
const store = productStore();
|
|
||||||
await store.scanCodeactions();
|
|
||||||
}
|
|
||||||
|
|
||||||
function toTaocan() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/userPackage/index/index'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const memberindex = (url) => {
|
|
||||||
uni.pro.navigateTo(url, {
|
|
||||||
shopId: uni.cache.get('shopId'),
|
|
||||||
type: 'index'
|
|
||||||
});
|
});
|
||||||
};
|
|
||||||
const shopUserInfo = reactive({});
|
isMember.value = +res1.memberConfig.isOpen;
|
||||||
|
isCharge.value = +res2.isEnable;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const allConfig = reactive({
|
||||||
|
takeout: 0,
|
||||||
|
group: 0,
|
||||||
|
pointsMall: 0,
|
||||||
|
distribution: 0,
|
||||||
|
couponNum: 0,
|
||||||
|
pointNum: 0
|
||||||
|
});
|
||||||
|
|
||||||
|
function getHomeData() {
|
||||||
|
homeData().then((res) => {
|
||||||
|
Object.assign(allConfig, res);
|
||||||
|
imgs.defaultAvatar = res.userAvatar ? res.userAvatar : imgs.defaultAvatar;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
updateData();
|
||||||
|
});
|
||||||
|
|
||||||
|
function updateData() {
|
||||||
Object.assign(shopUserInfo, uni.cache.get('shopUserInfo') || {});
|
Object.assign(shopUserInfo, uni.cache.get('shopUserInfo') || {});
|
||||||
|
getVipConfig();
|
||||||
function tomember() {
|
getHomeData();
|
||||||
if (isMember.value) {
|
}
|
||||||
const shopId = uni.cache.get('shopId');
|
defineExpose({
|
||||||
if (!shopUserInfo.isVip) {
|
updateData
|
||||||
uni.navigateTo({
|
});
|
||||||
url: '/user/vip/buy-vip?shopId=' + shopId
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/user/vip/vip?shopId=' + shopId
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '暂未开放',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toCharge() {
|
|
||||||
if (isCharge.value) {
|
|
||||||
const shopId = uni.cache.get('shopId');
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/user/member/czzx?shopId=' + shopId
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '暂未开放',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const getQueryString = (url, name) => {
|
|
||||||
//解码
|
|
||||||
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i');
|
|
||||||
var r = url.substr(1).match(reg);
|
|
||||||
if (r != null) {
|
|
||||||
return r[2];
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取会员配置
|
|
||||||
const isMember = ref(0);
|
|
||||||
const isCharge = ref(0);
|
|
||||||
async function getVipConfig() {
|
|
||||||
try {
|
|
||||||
const res1 = await getMemberConfig({
|
|
||||||
shopId: uni.cache.get('shopId')
|
|
||||||
});
|
|
||||||
const res2 = await getRechargeConfig({
|
|
||||||
shopId: uni.cache.get('shopId')
|
|
||||||
});
|
|
||||||
|
|
||||||
isMember.value = +res1.memberConfig.isOpen;
|
|
||||||
isCharge.value = +res2.isEnable;
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const allConfig = reactive({
|
|
||||||
takeout: 0,
|
|
||||||
group: 0,
|
|
||||||
pointsMall: 0,
|
|
||||||
distribution: 0,
|
|
||||||
couponNum: 0,
|
|
||||||
pointNum: 0
|
|
||||||
});
|
|
||||||
|
|
||||||
function getHomeData() {
|
|
||||||
homeData().then((res) => {
|
|
||||||
Object.assign(allConfig, res);
|
|
||||||
imgs.defaultAvatar = res.userAvatar ? res.userAvatar : imgs.defaultAvatar
|
|
||||||
});
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
|
||||||
updateData();
|
|
||||||
});
|
|
||||||
|
|
||||||
function updateData() {
|
|
||||||
Object.assign(shopUserInfo, uni.cache.get('shopUserInfo') || {});
|
|
||||||
getVipConfig();
|
|
||||||
getHomeData();
|
|
||||||
}
|
|
||||||
defineExpose({
|
|
||||||
updateData
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
page {
|
page {
|
||||||
background: #f6f8fa;
|
background: #f6f8fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper {
|
.swiper {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.swiper-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.swiper-item {
|
.swiper-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.swiper-bg {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
.contentbox {
|
.contentbox {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 430rpx;
|
||||||
|
|
||||||
|
.bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 430rpx;
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
.bg {
|
.contentboxitem {
|
||||||
width: 100%;
|
position: absolute;
|
||||||
height: 100%;
|
bottom: 0;
|
||||||
position: absolute;
|
width: 90%;
|
||||||
top: 0;
|
left: 50%;
|
||||||
left: 0;
|
transform: translate(-50%, 50%);
|
||||||
z-index: -1;
|
padding: 38rpx 0 26rpx 0;
|
||||||
}
|
background: rgba(255, 255, 255, 0.98);
|
||||||
|
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||||
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||||
|
|
||||||
.contentboxitem {
|
.contentboxitemleft {
|
||||||
position: absolute;
|
width: 50%;
|
||||||
bottom: 0;
|
border-right: 2rpx solid #623618;
|
||||||
width: 90%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, 50%);
|
|
||||||
padding: 38rpx 0 26rpx 0;
|
|
||||||
background: rgba(255, 255, 255, 0.98);
|
|
||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
|
||||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
|
||||||
|
|
||||||
.contentboxitemleft {
|
image {
|
||||||
width: 50%;
|
width: 134rpx;
|
||||||
border-right: 2rpx solid #623618;
|
height: 134rpx;
|
||||||
|
|
||||||
image {
|
|
||||||
width: 134rpx;
|
|
||||||
height: 134rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contentboxitemlefttextone {
|
|
||||||
margin-top: 10rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contentboxitemlefttexttow {
|
|
||||||
margin-top: 2rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentboxitemright {
|
.contentboxitemlefttextone {
|
||||||
width: 50%;
|
margin-top: 10rpx;
|
||||||
padding: 0 34rpx;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
.contentboxitemright_item:nth-child(2) {
|
.contentboxitemlefttexttow {
|
||||||
margin-top: 30rpx;
|
margin-top: 2rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentboxitemright {
|
||||||
|
width: 50%;
|
||||||
|
padding: 0 34rpx;
|
||||||
|
|
||||||
|
.contentboxitemright_item:nth-child(2) {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentboxitemright_item {
|
||||||
|
image {
|
||||||
|
width: 96rpx;
|
||||||
|
height: 96rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentboxitemright_item {
|
.contentboxitemright_itembox {
|
||||||
image {
|
width: 170rpx;
|
||||||
width: 96rpx;
|
|
||||||
height: 96rpx;
|
text:nth-child(1) {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentboxitemright_itembox {
|
text:nth-child(2) {
|
||||||
width: 170rpx;
|
margin-top: 2rpx;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
text:nth-child(1) {
|
font-weight: 400;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-size: 24rpx;
|
||||||
font-weight: 400;
|
color: #999999;
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
text:nth-child(2) {
|
|
||||||
margin-top: 2rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.popup-content {
|
.popup-content {
|
||||||
width: 90vw;
|
width: 90vw;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
.header-wrap {
|
.header-wrap {
|
||||||
height: 64px;
|
height: 64px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-bottom: 1px solid #ececec;
|
border-bottom: 1px solid #ececec;
|
||||||
padding: 0 28upx;
|
padding: 0 28upx;
|
||||||
|
|
||||||
.t {
|
.t {
|
||||||
font-size: 32upx;
|
font-size: 32upx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
|
||||||
|
|
||||||
.close {
|
|
||||||
$size: 60upx;
|
|
||||||
width: $size;
|
|
||||||
height: $size;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-content {
|
.close {
|
||||||
height: 86px;
|
$size: 60upx;
|
||||||
|
width: $size;
|
||||||
|
height: $size;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 60upx;
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 248upx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.menus {
|
.btn-content {
|
||||||
|
height: 86px;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 32rpx 40rpx;
|
|
||||||
margin-top: 150rpx;
|
|
||||||
gap: 20rpx;
|
|
||||||
|
|
||||||
.menu-item {
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
text-align: center;
|
|
||||||
padding: 32rpx 28rpx;
|
|
||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfo {
|
|
||||||
display: flex;
|
|
||||||
padding: 22rpx 24rpx;
|
|
||||||
margin: 0 4rpx;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
align-self: stretch;
|
justify-content: center;
|
||||||
border-radius: 24rpx;
|
gap: 60upx;
|
||||||
background: #fff;
|
|
||||||
position: relative;
|
|
||||||
z-index: 99;
|
|
||||||
margin-top: -36rpx;
|
|
||||||
|
|
||||||
.vip {
|
.btn {
|
||||||
background: #fa720a;
|
width: 248upx;
|
||||||
font-size: 24rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
padding: 6rpx 10rpx;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
border-radius: 20rpx 20rpx 20rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code {
|
|
||||||
width: 33px;
|
|
||||||
height: 33px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.new-menus-box {
|
.menus {
|
||||||
margin: 0 16rpx 0 16rpx;
|
display: flex;
|
||||||
|
padding: 32rpx 40rpx;
|
||||||
|
margin-top: 150rpx;
|
||||||
|
gap: 20rpx;
|
||||||
|
|
||||||
.new-menus {
|
.menu-item {
|
||||||
display: flex;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
width: 79px;
|
|
||||||
height: 79px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.layout2 {
|
|
||||||
padding: 29px 0;
|
|
||||||
|
|
||||||
.diner,
|
|
||||||
.takeout {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line {
|
|
||||||
width: 2rpx;
|
|
||||||
height: 156rpx;
|
|
||||||
background: #ededed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.takeout {}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.layout1 {
|
|
||||||
padding: 36rpx 40rpx;
|
|
||||||
justify-content: space-between;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.big_img {
|
|
||||||
width: 330rpx;
|
|
||||||
height: 330rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 48rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.groupBuying {
|
|
||||||
padding: 16rpx 38rpx;
|
|
||||||
border-top: 2rpx solid #ededed;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.img {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
color: #333333;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
|
||||||
margin-top: 16rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.points {
|
|
||||||
margin-top: 10px;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 16rpx 68rpx;
|
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 32rpx 28rpx;
|
||||||
|
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.userInfo {
|
||||||
|
display: flex;
|
||||||
|
padding: 22rpx 24rpx;
|
||||||
|
margin: 0 4rpx;
|
||||||
|
align-items: center;
|
||||||
|
align-self: stretch;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
background: #fff;
|
||||||
|
position: relative;
|
||||||
|
z-index: 99;
|
||||||
|
margin-top: -36rpx;
|
||||||
|
|
||||||
|
.vip {
|
||||||
|
background: #fa720a;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 6rpx 10rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
border-radius: 20rpx 20rpx 20rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
width: 33px;
|
||||||
|
height: 33px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-menus-box {
|
||||||
|
margin: 0 16rpx 0 16rpx;
|
||||||
|
|
||||||
|
.new-menus {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.img {
|
.icon {
|
||||||
width: 98px;
|
width: 79px;
|
||||||
height: 98px;
|
height: 79px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.taocan {
|
&.layout2 {
|
||||||
.img {
|
padding: 29px 0;
|
||||||
width: 117px;
|
|
||||||
height: 117px;
|
.diner,
|
||||||
|
.takeout {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 2rpx;
|
||||||
|
height: 156rpx;
|
||||||
|
background: #ededed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.takeout {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.bottom_menus {
|
&.layout1 {
|
||||||
display: flex;
|
padding: 36rpx 40rpx;
|
||||||
gap: 14rpx;
|
justify-content: space-between;
|
||||||
margin-top: 10px;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 18rpx;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
.img {
|
.big_img {
|
||||||
width: 39px;
|
width: 330rpx;
|
||||||
height: 39px;
|
height: 330rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 48rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc {
|
.desc {
|
||||||
margin-top: 8rpx;
|
margin-top: 20rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 24rpx;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
|
|
||||||
|
.groupBuying {
|
||||||
|
padding: 16rpx 38rpx;
|
||||||
|
border-top: 2rpx solid #ededed;
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.points {
|
||||||
|
margin-top: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 16rpx 68rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: 98px;
|
||||||
|
height: 98px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.taocan {
|
||||||
|
.img {
|
||||||
|
width: 117px;
|
||||||
|
height: 117px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_menus {
|
||||||
|
display: flex;
|
||||||
|
gap: 14rpx;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 18rpx;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: 39px;
|
||||||
|
height: 39px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
margin-top: 8rpx;
|
||||||
|
color: #999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -7,14 +7,21 @@
|
|||||||
<view class="limitDiscount" v-if="showLimitDiscount(item)"
|
<view class="limitDiscount" v-if="showLimitDiscount(item)"
|
||||||
>限时折扣</view
|
>限时折扣</view
|
||||||
>
|
>
|
||||||
|
|
||||||
<up-image
|
<up-image
|
||||||
width="76"
|
width="76"
|
||||||
height="76"
|
height="76"
|
||||||
radius="6"
|
radius="6"
|
||||||
:src="item.productImg"
|
:src="item.productImg"
|
||||||
v-if="item.productId != -999"
|
v-if="item.isTemporary != 1&&item.is_temporary!=1"
|
||||||
></up-image>
|
></up-image>
|
||||||
|
<up-image
|
||||||
|
v-else-if="(item.isTemporary||item.is_temporary) &&(item.product_name=='签子'||item.productName=='签子')"
|
||||||
|
width="76"
|
||||||
|
height="76"
|
||||||
|
radius="6"
|
||||||
|
src="https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/b97054debd83486ab7ad8e20ca6a360a.png"
|
||||||
|
mode="heightFix"
|
||||||
|
></up-image>
|
||||||
<up-image
|
<up-image
|
||||||
width="76"
|
width="76"
|
||||||
height="76"
|
height="76"
|
||||||
@@ -25,7 +32,7 @@
|
|||||||
></up-image>
|
></up-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="productName">{{ item.productName }}</text>
|
<text class="productName">{{ item.productName||item.product_name }}</text>
|
||||||
<text class="productSkuName" v-if="item.skuName">{{
|
<text class="productSkuName" v-if="item.skuName">{{
|
||||||
item.skuName
|
item.skuName
|
||||||
}}</text>
|
}}</text>
|
||||||
@@ -55,18 +62,22 @@
|
|||||||
<view class="price">
|
<view class="price">
|
||||||
<view class="priceAmount">
|
<view class="priceAmount">
|
||||||
¥
|
¥
|
||||||
|
|
||||||
<goodsPrice
|
<goodsPrice
|
||||||
|
v-if="!item.is_temporary&&!item.isTemporary"
|
||||||
:cart="item"
|
:cart="item"
|
||||||
:limitDiscount="limitDiscount"
|
:limitDiscount="limitDiscount"
|
||||||
:shopUserInfo="shopUserInfo"
|
:shopUserInfo="shopUserInfo"
|
||||||
:shopInfo="shopInfo"
|
:shopInfo="shopInfo"
|
||||||
idKey="product_id"
|
idKey="product_id"
|
||||||
></goodsPrice>
|
></goodsPrice>
|
||||||
|
<text v-else>{{item.discount_sale_amount}}</text>
|
||||||
<view class="old-price" v-if="showLimitDiscount(item)"
|
<view class="old-price" v-if="showLimitDiscount(item)"
|
||||||
>¥{{ item.salePrice }}</view
|
>¥{{ item.salePrice }}</view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="num">x{{ item.num }}</view>
|
<view class="num" v-if="!item.is_temporary&&!item.isTemporary">x{{ item.num }}</view>
|
||||||
|
<view class="num" v-else>x{{ item.number }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -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.length>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}">
|
||||||
|
|||||||
@@ -70,7 +70,10 @@
|
|||||||
<view class="item" v-for="item in value" :key="item.id">
|
<view class="item" v-for="item in value" :key="item.id">
|
||||||
<view class="cover">
|
<view class="cover">
|
||||||
<up-image width="76" height="76" radius="16" :src="item.productImg"
|
<up-image width="76" height="76" radius="16" :src="item.productImg"
|
||||||
v-if="item.productId!=-999"></up-image>
|
v-if="!item.isTemporary"></up-image>
|
||||||
|
<u-image width="56" height="56" radius="10"
|
||||||
|
v-else-if="item.isTemporary &&item.productName=='签子'"
|
||||||
|
src="https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/b97054debd83486ab7ad8e20ca6a360a.png"></u-image>
|
||||||
<up-image width="76" height="76" radius="16"
|
<up-image width="76" height="76" radius="16"
|
||||||
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
|
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
|
||||||
mode="heightFix" v-else></up-image>
|
mode="heightFix" v-else></up-image>
|
||||||
@@ -174,8 +177,8 @@
|
|||||||
<view>{{listinfo.packFeess}}</view>
|
<view>{{listinfo.packFeess}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- isTableFee == 0是不免除 -->
|
<!-- isTableFee == 0是不免除 -->
|
||||||
<view class="cell-item"
|
<view class="cell-item"
|
||||||
v-if="ordershopUserInfo.isTableFee == 0 && is_type == 0 && listinfo.Seatcharge != 0">
|
v-if="ordershopUserInfo.isTableFee == 0 && is_type == 0 && listinfo.Seatcharge != 0">
|
||||||
@@ -198,7 +201,7 @@
|
|||||||
<text class="price"> {{listinfo.payAmount}} </text>
|
<text class="price"> {{listinfo.payAmount}} </text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -62,8 +62,14 @@
|
|||||||
<view class="shop-info">
|
<view class="shop-info">
|
||||||
<view class="shop-item">
|
<view class="shop-item">
|
||||||
<view class="cover" v-for="(item1,index1) in item.goods" :key="index1">
|
<view class="cover" v-for="(item1,index1) in item.goods" :key="index1">
|
||||||
<u-image width="56" height="56" radius="10" :src='item1.productImg'
|
|
||||||
v-if="item1.productId!=-999"></u-image>
|
<u-image width="56" height="56" radius="10" :src="item1.productImg"
|
||||||
|
v-if="!item1.isTemporary"></u-image>
|
||||||
|
|
||||||
|
<u-image width="56" height="56" radius="10"
|
||||||
|
v-else-if="item1.isTemporary &&item1.productName=='签子'"
|
||||||
|
src="https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/b97054debd83486ab7ad8e20ca6a360a.png"
|
||||||
|
></u-image>
|
||||||
<u-image width="112" height="112" radius="20"
|
<u-image width="112" height="112" radius="20"
|
||||||
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
|
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
|
||||||
mode="heightFix" v-else></u-image>
|
mode="heightFix" v-else></u-image>
|
||||||
@@ -130,32 +136,37 @@
|
|||||||
import {
|
import {
|
||||||
useNavbarStore
|
useNavbarStore
|
||||||
} from '@/stores/navbarStore';
|
} from '@/stores/navbarStore';
|
||||||
import {APIshopUserInfo} from '@/common/api/member.js'
|
import {
|
||||||
|
APIshopUserInfo
|
||||||
|
} from '@/common/api/member.js'
|
||||||
const store = useNavbarStore();
|
const store = useNavbarStore();
|
||||||
|
|
||||||
async function agignOrder(item){
|
async function agignOrder(item) {
|
||||||
await APIshopUserInfo({
|
await APIshopUserInfo({
|
||||||
shopId:item.shopId
|
shopId: item.shopId
|
||||||
}).then(shopUserInfo=>{
|
}).then(shopUserInfo => {
|
||||||
if(shopUserInfo){
|
if (shopUserInfo) {
|
||||||
uni.cache.set("dinersNum", 1);
|
uni.cache.set("dinersNum", 1);
|
||||||
uni.cache.set("tableCode", shopUserInfo.id);
|
uni.cache.set("tableCode", shopUserInfo.id);
|
||||||
uni.cache.set("shopId", item.shopId);
|
uni.cache.set("shopId", item.shopId);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/product/index?type=beforehand&order_id="+item.id+'&one_more_order=1',
|
url: "/pages/product/index?type=beforehand&order_id=" + item.id +
|
||||||
|
'&one_more_order=1',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
function totalGoodsNum(arr){
|
|
||||||
if(!arr){
|
function totalGoodsNum(arr) {
|
||||||
|
if (!arr) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return arr.reduce((prve,cur)=>{
|
return arr.reduce((prve, cur) => {
|
||||||
return prve+cur.num
|
return prve + cur.num
|
||||||
},0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRemoveOrder(item) {
|
function isRemoveOrder(item) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -578,7 +589,8 @@
|
|||||||
.ml-20 {
|
.ml-20 {
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
}
|
}
|
||||||
.take_food_number{
|
|
||||||
|
.take_food_number {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
margin-left: 36rpx;
|
margin-left: 36rpx;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<up-popup :show="visible" :round="20" mode="bottom" @close="close" :close-on-click-overlay="true">
|
<up-popup :show="visible" :round="20" mode="bottom" @close="close" :close-on-click-overlay="true">
|
||||||
<view class="" style="height: calc(100vh - 70px);">
|
<view class="u-flex u-flex-col box" :style="{maxHeight:boxHeight+'px'}">
|
||||||
<view class="shop_sku" >
|
<view class="shop_sku">
|
||||||
|
|
||||||
<scroll-view scroll-y style="height: calc(100vh - 240px); width: 100%">
|
<scroll-view scroll-y class="scroll-view" :style="{maxHeight:boxHeight +'px'}">
|
||||||
<!-- <view class="positionabsolute">
|
<!-- <view class="positionabsolute">
|
||||||
<up-icon name="arrow-down" @click="close" color="#333" size="22"></up-icon>
|
<up-icon name="arrow-down" @click="close" color="#333" size="22"></up-icon>
|
||||||
</view> -->
|
</view> -->
|
||||||
@@ -13,13 +13,14 @@
|
|||||||
<up-swiper :list="goods.images" @change="swiperChange" :current="swiperCurrent" radius="6px"
|
<up-swiper :list="goods.images" @change="swiperChange" :current="swiperCurrent" radius="6px"
|
||||||
height="250" @click="prveImgs(goods.images, goods.images[swiperCurrent])">
|
height="250" @click="prveImgs(goods.images, goods.images[swiperCurrent])">
|
||||||
</up-swiper>
|
</up-swiper>
|
||||||
|
|
||||||
<view class="shop_sku_name">{{ goods.name }}</view>
|
<view class="shop_sku_name">{{ goods.name }}</view>
|
||||||
<view class="shop_sku_description" v-if="isSkuGoods">
|
<view class="shop_sku_description" v-if="isSkuGoods">
|
||||||
{{ goods.shortTitle ? goods.shortTitle : '' }}
|
{{ goods.shortTitle ? goods.shortTitle : '' }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="goods.type != 'package'">
|
<view v-if="goods.type != 'package'">
|
||||||
<view class="shop_sku_box" v-for="(specOptions, specType) in goods.selectSpecInfo" :key="specType">
|
<view class="shop_sku_box" v-for="(specOptions, specType) in goods.selectSpecInfo"
|
||||||
|
:key="specType">
|
||||||
<view class="shop_sku_box_name">
|
<view class="shop_sku_box_name">
|
||||||
{{ specType }}
|
{{ specType }}
|
||||||
</view>
|
</view>
|
||||||
@@ -45,11 +46,15 @@
|
|||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="shop_sku_box">
|
<view class="shop_sku_box">
|
||||||
<view v-for="(setmenu, setmenuindex) in goods.groupSnap" :key="setmenuindex">
|
<view v-for="(setmenu, setmenuindex) in goods.groupSnap" :key="setmenuindex">
|
||||||
<view class="shop_sku_box_name">{{ setmenu.title }} {{ setmenu.count }}
|
<view class="shop_sku_box_name" v-if="goods.groupType!=0">{{ setmenu.title }}
|
||||||
选{{ setmenu.number }}</view>
|
{{ setmenu.count }}
|
||||||
|
选{{ setmenu.number }}
|
||||||
|
</view>
|
||||||
|
<view class="shop_sku_box_name" v-else>{{ setmenu.title }} {{ setmenu.count }}件商品</view>
|
||||||
<view class="flex-start">
|
<view class="flex-start">
|
||||||
<view class="shop_sku_box_item" v-for="(option, goodsid) in setmenu.goods"
|
<view class="shop_sku_box_item" v-for="(option, goodsid) in setmenu.goods"
|
||||||
:key="goodsid" @click="goodsidClick(setmenuindex, option, goodsid)" :class="{
|
:key="goodsid" @click="goodsidClick(setmenuindex, option, goodsid,setmenu)"
|
||||||
|
:class="{
|
||||||
shop_sku_box_item_selected: isOptionSelected(setmenuindex, option)
|
shop_sku_box_item_selected: isOptionSelected(setmenuindex, option)
|
||||||
}" :disabled="isMaxSelected(setmenuindex) && !isOptionSelected(setmenuindex, option)">
|
}" :disabled="isMaxSelected(setmenuindex) && !isOptionSelected(setmenuindex, option)">
|
||||||
{{ option.proName }}
|
{{ option.proName }}
|
||||||
@@ -62,7 +67,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 推荐搭配 -->
|
<!-- 推荐搭配 -->
|
||||||
<view class="u-m-t-48 u-p-30" v-if="goods.relatedRecommendJson.length">
|
<view class="u-m-t-48 u-p-30" v-if="goods.relatedRecommendJson.length">
|
||||||
<view class="font-bold u-font-32 ">推荐搭配</view>
|
<view class="font-bold u-font-32 ">推荐搭配</view>
|
||||||
@@ -92,13 +97,13 @@
|
|||||||
<view class="u-line-2 name u-m-t-10 u-font-32 font-500">
|
<view class="u-line-2 name u-m-t-10 u-font-32 font-500">
|
||||||
{{product.name}}
|
{{product.name}}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-flex u-row-between">
|
<view class="u-flex u-row-between">
|
||||||
<view class="font-bold u-flex u-col-baseline">
|
<view class="font-bold u-flex u-col-baseline">
|
||||||
<text class="u-font-24">¥</text>
|
<text class="u-font-24">¥</text>
|
||||||
|
|
||||||
<view class="u-font-32">
|
<view class="u-font-32">
|
||||||
|
|
||||||
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount"
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount"
|
||||||
:cart="returnFirstSku(product)" :shopUserInfo="shopUserInfo"
|
:cart="returnFirstSku(product)" :shopUserInfo="shopUserInfo"
|
||||||
:shopInfo="shopInfo"></GoodsPrice>
|
:shopInfo="shopInfo"></GoodsPrice>
|
||||||
@@ -111,17 +116,81 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 占位不用管下面代码也不要删除 -->
|
||||||
|
<view class="shop_bottom" style="opacity: 0;">
|
||||||
|
<view class="flex-between">
|
||||||
|
<view class="price price-sku" v-if="goods.type != 'package' && goods.result">
|
||||||
|
<text class="i">¥</text>
|
||||||
|
<view class="num">
|
||||||
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="selSku"
|
||||||
|
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<text class="num" v-if="false">
|
||||||
|
{{
|
||||||
|
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
||||||
|
? goods.result.memberPrice || goods.result.salePrice
|
||||||
|
: goods.result.salePrice
|
||||||
|
}}
|
||||||
|
</text>
|
||||||
|
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
|
||||||
|
<text
|
||||||
|
v-if="goods.result.suitNum > 1">「{{ goods.result.suitNum }}{{ goods.result.unitName }}起点」</text>
|
||||||
|
</view>
|
||||||
|
<view class="price price-package" v-else>
|
||||||
|
<text class="i">¥</text>
|
||||||
|
<view class="num">
|
||||||
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="goods"
|
||||||
|
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
||||||
|
</view>
|
||||||
|
<text class="num" v-if="false">
|
||||||
|
{{
|
||||||
|
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
||||||
|
? goods.memberPrice || goods.salePrice
|
||||||
|
: goods.salePrice
|
||||||
|
}}
|
||||||
|
</text>
|
||||||
|
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
|
||||||
|
<text v-if="goods.suitNum > 1">「{{ goods.suitNum }}{{ goods.unitName }}起点」</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="operation-wrap" v-if="goods.type != 'package'&&stockNumberIsFull(goods)">
|
||||||
|
<view class="btn">
|
||||||
|
<up-icon name="minus-circle-fill" color="#E9AB7A" size="25"
|
||||||
|
v-if="shopCartNumber > 0"></up-icon>
|
||||||
|
<view class="btnClick"></view>
|
||||||
|
</view>
|
||||||
|
<text class="num">{{ shopCartNumber }}</text>
|
||||||
|
<view class="btn">
|
||||||
|
<up-icon name="plus-circle-fill" color="#E9AB7A" size="25"></up-icon>
|
||||||
|
<view class="btnClick"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="shop_skuselect flex-start" v-if="selectedSpecsStr">
|
||||||
|
<view class="shop_skuselectname">{{ selectedSpecsStr }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="addShopping">
|
||||||
|
库存不足
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view style="width: 100%;height: 123px;"></view> -->
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="shop_bottom">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="shop_bottom" style="position: absolute;bottom: 0;">
|
||||||
<view class="flex-between">
|
<view class="flex-between">
|
||||||
<view class="price price-sku" v-if="goods.type != 'package' && goods.result">
|
<view class="price price-sku" v-if="goods.type != 'package' && goods.result">
|
||||||
<text class="i">¥</text>
|
<text class="i">¥</text>
|
||||||
@@ -129,7 +198,7 @@
|
|||||||
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="selSku"
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="selSku"
|
||||||
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<text class="num" v-if="false">
|
<text class="num" v-if="false">
|
||||||
{{
|
{{
|
||||||
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
||||||
@@ -141,24 +210,52 @@
|
|||||||
<text
|
<text
|
||||||
v-if="goods.result.suitNum > 1">「{{ goods.result.suitNum }}{{ goods.result.unitName }}起点」</text>
|
v-if="goods.result.suitNum > 1">「{{ goods.result.suitNum }}{{ goods.result.unitName }}起点」</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="price price-package" v-else>
|
<view class="price single-and-staticPackage "
|
||||||
|
v-else-if="goods.type=='single'||(goods.type=='package'&&goods.groupType==0)">
|
||||||
|
|
||||||
<text class="i">¥</text>
|
<text class="i">¥</text>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="goods"
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="goods"
|
||||||
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
||||||
</view>
|
</view>
|
||||||
<text class="num" v-if="false">
|
|
||||||
{{
|
|
||||||
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
|
||||||
? goods.memberPrice || goods.salePrice
|
|
||||||
: goods.salePrice
|
|
||||||
}}
|
|
||||||
</text>
|
|
||||||
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
|
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
|
||||||
<text v-if="goods.suitNum > 1">「{{ goods.suitNum }}{{ goods.unitName }}起点」</text>
|
<text v-if="selSku&&selSku.suitNum > 1">「{{ selSku.suitNum }}{{ selSku.unitName }}起点」</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="price choosePackage "
|
||||||
<view class="operation-wrap" v-if="goods.type != 'package'&&stockNumberIsFull(goods)">
|
v-else-if="goods.type=='package'&&goods.groupType==1">
|
||||||
|
|
||||||
|
<text class="i">¥</text>
|
||||||
|
<view class="num">
|
||||||
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="goods"
|
||||||
|
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
||||||
|
</view>
|
||||||
|
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
|
||||||
|
<text v-if="selSku&&selSku.suitNum > 1">「{{ selSku.suitNum }}{{ selSku.unitName }}起点」</text>
|
||||||
|
</view>
|
||||||
|
<view class="price sku" v-else-if="goods.type=='sku'">
|
||||||
|
|
||||||
|
<text class="i">¥</text>
|
||||||
|
<view class="num">
|
||||||
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="selSku"
|
||||||
|
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
||||||
|
</view>
|
||||||
|
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
|
||||||
|
<text v-if="selSku&&selSku.suitNum > 1">「{{ selSku.suitNum }}{{ selSku.unitName }}起点」</text>
|
||||||
|
</view>
|
||||||
|
<view class="price price-package " v-else>
|
||||||
|
|
||||||
|
<text class="i">¥</text>
|
||||||
|
<view class="num">
|
||||||
|
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="selSku"
|
||||||
|
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
|
||||||
|
</view>
|
||||||
|
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
|
||||||
|
<text v-if="selSku&&selSku.suitNum > 1">「{{ selSku.suitNum }}{{ selSku.unitName }}起点」</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="goods.type == 'package'&&goods.groupType==1">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="operation-wrap" v-else-if="stockNumberIsFull(goods)">
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<up-icon name="minus-circle-fill" color="#E9AB7A" size="25"
|
<up-icon name="minus-circle-fill" color="#E9AB7A" size="25"
|
||||||
v-if="shopCartNumber > 0"></up-icon>
|
v-if="shopCartNumber > 0"></up-icon>
|
||||||
@@ -181,11 +278,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="isSkuGoods">
|
<template v-if="isSkuGoods">
|
||||||
<view v-if="goods.type == 'package'" class="addShopping package"
|
<view v-if="goods.type == 'package' && goods.groupType!=0" class="addShopping package"
|
||||||
:class=" allConditionsSatisfied ? 'active' : ''" @click="submitSelection(goods)">
|
:class=" allConditionsSatisfied ? 'active' : ''" @click="submitSelection(goods)">
|
||||||
添加到购物车
|
添加到购物车
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="sku addShopping" :class="shopCartNumber > 0 && canSubmit ? 'active' : ''"
|
|
||||||
|
<view v-else class="sku addShopping"
|
||||||
|
:class="shopCartNumber > 0 && canSubmit ? 'active' : ''"
|
||||||
@click="submitSelection(goods)">
|
@click="submitSelection(goods)">
|
||||||
添加到购物车
|
添加到购物车
|
||||||
</view>
|
</view>
|
||||||
@@ -197,12 +296,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</up-popup>
|
</up-popup>
|
||||||
</template>
|
</template>
|
||||||
@@ -236,6 +333,7 @@
|
|||||||
import {
|
import {
|
||||||
computed,
|
computed,
|
||||||
inject,
|
inject,
|
||||||
|
onMounted,
|
||||||
ref,
|
ref,
|
||||||
watch
|
watch
|
||||||
} from "vue";
|
} from "vue";
|
||||||
@@ -266,7 +364,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// / 选择规格的方法
|
// / 选择规格的方法
|
||||||
const goodsidClick = (setmenuindex, option, goodsid) => {
|
const goodsidClick = (setmenuindex, option, goodsid, setmenu) => {
|
||||||
|
if (props.goods.groupType == 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!selectedOptions.value[setmenuindex]) {
|
if (!selectedOptions.value[setmenuindex]) {
|
||||||
// 如果 selectedOptions.value[setmenuindex] 不存在,初始化一个空数组
|
// 如果 selectedOptions.value[setmenuindex] 不存在,初始化一个空数组
|
||||||
selectedOptions.value[setmenuindex] = [];
|
selectedOptions.value[setmenuindex] = [];
|
||||||
@@ -278,11 +379,14 @@
|
|||||||
} else if (!isMaxSelected(setmenuindex)) {
|
} else if (!isMaxSelected(setmenuindex)) {
|
||||||
// 如果未达到最大选择数量,添加到选中列表
|
// 如果未达到最大选择数量,添加到选中列表
|
||||||
selectedOptions.value[setmenuindex].push(option);
|
selectedOptions.value[setmenuindex].push(option);
|
||||||
|
} else if (isMaxSelected(setmenuindex) && setmenu.number == 1) {
|
||||||
|
selectedOptions.value[setmenuindex] = [option]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 计算所有选中条件是否都符合
|
// 计算所有选中条件是否都符合
|
||||||
const allConditionsSatisfied = computed(() => {
|
const allConditionsSatisfied = computed(() => {
|
||||||
|
console.log('props.goods', props.goods);
|
||||||
// 检查 specifications.item.groupSnap 是否存在
|
// 检查 specifications.item.groupSnap 是否存在
|
||||||
if (!props.goods?.groupSnap) {
|
if (!props.goods?.groupSnap) {
|
||||||
return false;
|
return false;
|
||||||
@@ -306,6 +410,8 @@
|
|||||||
const selSku = ref(null)
|
const selSku = ref(null)
|
||||||
// 处理规格选择的方法
|
// 处理规格选择的方法
|
||||||
const selectSpec = async (specType, option) => {
|
const selectSpec = async (specType, option) => {
|
||||||
|
console.log('specType', specType)
|
||||||
|
console.log('option', option)
|
||||||
// 规格清零
|
// 规格清零
|
||||||
shopCartNumber.value = 0;
|
shopCartNumber.value = 0;
|
||||||
|
|
||||||
@@ -373,7 +479,12 @@
|
|||||||
const swiperCurrent = ref(0);
|
const swiperCurrent = ref(0);
|
||||||
|
|
||||||
function returnFirstSku(product) {
|
function returnFirstSku(product) {
|
||||||
return product.skuList[0]
|
console.log('returnFirstSku', product.skuList[0]);
|
||||||
|
return {
|
||||||
|
...product.skuList[0],
|
||||||
|
sku_id: product.skuList[0].id,
|
||||||
|
id: product.id,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//返回是否是多规格商品
|
//返回是否是多规格商品
|
||||||
function returnIsSkuGoods(item) {
|
function returnIsSkuGoods(item) {
|
||||||
@@ -407,6 +518,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function stockNumberIsFull(item) {
|
function stockNumberIsFull(item) {
|
||||||
if (item.isStock && item.stockNumber < item.suitNum) {
|
if (item.isStock && item.stockNumber < item.suitNum) {
|
||||||
return false
|
return false
|
||||||
@@ -542,13 +656,18 @@
|
|||||||
if (goods.type != 'package' && shopCartNumber.value <= 0) {
|
if (goods.type != 'package' && shopCartNumber.value <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (goods.type == 'package' && !allConditionsSatisfied.value) {
|
if (goods.type == 'package' && goods.groupType != 0 && !allConditionsSatisfied.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((goods.type == 'package' && allConditionsSatisfied.value) || (goods.type ==
|
if ((goods.type == 'package' && allConditionsSatisfied.value) || (goods.type ==
|
||||||
'sku' && canSubmit.value)) {
|
'sku' && canSubmit.value)) {
|
||||||
let res = cartStore.carts.find(cart => cart.product_id == goods.id && cart.sku_id == selSku.value.id)
|
let res = null;
|
||||||
|
if (goods.type == 'package') {
|
||||||
|
res = null
|
||||||
|
} else {
|
||||||
|
res = cartStore.carts.find(cart => cart.product_id == goods.id && cart.sku_id == selSku.value.id)
|
||||||
|
}
|
||||||
let suitNum = 1;
|
let suitNum = 1;
|
||||||
let sku_id = ''
|
let sku_id = ''
|
||||||
// 是否是套餐 有就传
|
// 是否是套餐 有就传
|
||||||
@@ -649,16 +768,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const boxHeight = ref(500)
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||||
|
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
const statusBarHeight = systemInfo.statusBarHeight;
|
||||||
|
// 计算标题的垂直偏移量
|
||||||
|
const verticalOffset = menuButtonInfo.top;
|
||||||
|
|
||||||
|
const titleHeight = menuButtonInfo.height;
|
||||||
|
console.log('systemInfo', systemInfo);
|
||||||
|
boxHeight.value = systemInfo.windowHeight - verticalOffset - menuButtonInfo.height - systemInfo
|
||||||
|
.safeAreaInsets.bottom - 4
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
height: 100vh;
|
background: transparent;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.top {
|
.scroll-view {}
|
||||||
width: 750rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.shop_sku {
|
.shop_sku {
|
||||||
@@ -668,7 +801,11 @@
|
|||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.positionabsolute {
|
.positionabsolute {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30rpx;
|
top: 30rpx;
|
||||||
@@ -803,6 +940,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0rpx -6rpx 14rpx 2rpx rgba(0, 0, 0, 0.1);
|
box-shadow: 0rpx -6rpx 14rpx 2rpx rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
|||||||
@@ -26,17 +26,18 @@
|
|||||||
<view class="limit-discount" v-if="showLimitDiscount(item)">
|
<view class="limit-discount" v-if="showLimitDiscount(item)">
|
||||||
限时折扣
|
限时折扣
|
||||||
</view>
|
</view>
|
||||||
<up-image :src="item.coverImg" width="124rpx" height="124rpx" mode="aspectFill"
|
<up-image v-if="!item.cartListinfo.is_temporary" :src="item.coverImg" width="124rpx" height="124rpx" mode="aspectFill"
|
||||||
radius="10"></up-image>
|
radius="10"></up-image>
|
||||||
|
<up-image v-else-if="item.cartListinfo.is_temporary&&item.cartListinfo.product_name=='签子'" src="https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/b97054debd83486ab7ad8e20ca6a360a.png" width="124rpx" height="124rpx" mode="aspectFill"
|
||||||
|
radius="10"></up-image>
|
||||||
|
<up-image v-else width="124rpx" height="124rpx" mode="aspectFill"
|
||||||
|
radius="10"></up-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name">
|
<view class="name" v-if=" item.cartListinfo.is_temporary == 1">
|
||||||
{{
|
{{item.cartListinfo.product_name||item.cartListinfo.name|| item.name}}
|
||||||
item.cartListinfo.is_temporary == 1
|
|
||||||
? "临时菜"
|
|
||||||
: item.name
|
|
||||||
}}
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="name" v-else>{{item.name}}</view>
|
||||||
<view class="select-sku-wrap" v-if="item.type == 'sku'">
|
<view class="select-sku-wrap" v-if="item.type == 'sku'">
|
||||||
<text v-for="i in item.skuList" :key="i.id">
|
<text v-for="i in item.skuList" :key="i.id">
|
||||||
{{ item.cartListinfo.sku_id == i.id ? i.name : "" }}
|
{{ item.cartListinfo.sku_id == i.id ? i.name : "" }}
|
||||||
@@ -206,9 +207,6 @@
|
|||||||
limitDiscount: props.limitDiscount.id ? props.limitDiscount : null,
|
limitDiscount: props.limitDiscount.id ? props.limitDiscount : null,
|
||||||
shopUserInfo: shopUserInfo,
|
shopUserInfo: shopUserInfo,
|
||||||
});
|
});
|
||||||
if (goods.name == "纯生纯生纯生") {
|
|
||||||
console.log("returnRealPrice", price);
|
|
||||||
}
|
|
||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -161,9 +161,8 @@
|
|||||||
@tap.stop="$u.throttle(() => singleclick(item, '-'), 500)"></view> -->
|
@tap.stop="$u.throttle(() => singleclick(item, '-'), 500)"></view> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- <text class="num">{{ ifcartNumber(item) }}</text> -->
|
<!-- <text class="num">{{ ifcartNumber(item) }}</text> -->
|
||||||
|
|
||||||
<text class="dot num"
|
<text class="dot num"
|
||||||
v-if="returnGoodsImCartNum(item1)">{{ returnGoodsImCartNum(item1) < 99 ? returnGoodsImCartNum(item1) : '99+' }}</text>
|
v-if="returnGoodsImCartNum(item)">{{ returnGoodsImCartNum(item) < 99 ? returnGoodsImCartNum(item) : '99+' }}</text>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<up-icon name="plus-circle-fill" color="#E9AB7A" size="25"></up-icon>
|
<up-icon name="plus-circle-fill" color="#E9AB7A" size="25"></up-icon>
|
||||||
<!-- <view class="btnClick"
|
<!-- <view class="btnClick"
|
||||||
@@ -257,7 +256,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 +490,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 +508,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
|
||||||
}}
|
}}
|
||||||
@@ -750,7 +749,7 @@
|
|||||||
useCartStore
|
useCartStore
|
||||||
} from '@/stores/order.js';
|
} from '@/stores/order.js';
|
||||||
import {
|
import {
|
||||||
computed
|
computed, provide
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
/**
|
/**
|
||||||
@@ -762,7 +761,6 @@
|
|||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance();
|
} = getCurrentInstance();
|
||||||
|
|
||||||
|
|
||||||
//点单智能推荐
|
//点单智能推荐
|
||||||
function onBuyClick(item) {
|
function onBuyClick(item) {
|
||||||
let index = -1;
|
let index = -1;
|
||||||
@@ -802,7 +800,6 @@
|
|||||||
/**
|
/**
|
||||||
* 通用数据合集 start
|
* 通用数据合集 start
|
||||||
*/
|
*/
|
||||||
const showGoodsModal = ref(false)
|
|
||||||
|
|
||||||
// 门店信息
|
// 门店信息
|
||||||
const shopInfo = reactive({});
|
const shopInfo = reactive({});
|
||||||
@@ -881,7 +878,7 @@
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
if (GoodsIDInCartNumMap.value.hasOwnProperty(goods.id)) {
|
if (GoodsIDInCartNumMap.value.hasOwnProperty(goods.id)) {
|
||||||
GoodsIDInCartNumMap.value[goods.id]
|
return GoodsIDInCartNumMap.value[goods.id]
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -1450,7 +1447,6 @@
|
|||||||
show:true,
|
show:true,
|
||||||
goods:specifications.item
|
goods:specifications.item
|
||||||
})
|
})
|
||||||
// showGoodsModal.value=true
|
|
||||||
};
|
};
|
||||||
// 判断商品是否在可售时间内
|
// 判断商品是否在可售时间内
|
||||||
const isProductAvailable = async (sellDaysStr, startTimeStr, endTimeStr) => {
|
const isProductAvailable = async (sellDaysStr, startTimeStr, endTimeStr) => {
|
||||||
@@ -1692,12 +1688,13 @@
|
|||||||
const goodsSkuList = goods ? goods.skuList : []
|
const goodsSkuList = goods ? goods.skuList : []
|
||||||
const findSku = goodsSkuList.find(sku => sku.id == v.sku_id)
|
const findSku = goodsSkuList.find(sku => sku.id == v.sku_id)
|
||||||
const memberPrice = findSku ? findSku.memberPrice : 0
|
const memberPrice = findSku ? findSku.memberPrice : 0
|
||||||
|
const is_temporary=v.is_temporary||v.isTemporary
|
||||||
const is_time_discount = limitUtils.canUseLimitTimeDiscount({
|
const is_time_discount = limitUtils.canUseLimitTimeDiscount({
|
||||||
...v,
|
...v,
|
||||||
memberPrice
|
memberPrice
|
||||||
}, cartStore.limitTimeDiscount, shopInfo,
|
}, cartStore.limitTimeDiscount, shopInfo,
|
||||||
shopUserInfo.value, 'product_id');
|
shopUserInfo.value, 'product_id');
|
||||||
if (!goods) {
|
if (!goods&&!is_temporary) {
|
||||||
console.log('删除未匹配到的商品', {
|
console.log('删除未匹配到的商品', {
|
||||||
id: v.id,
|
id: v.id,
|
||||||
operate_type: "del",
|
operate_type: "del",
|
||||||
|
|||||||
1117
pages/user/user.vue
1117
pages/user/user.vue
File diff suppressed because it is too large
Load Diff
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
|
||||||
|
|||||||
@@ -327,9 +327,13 @@ export const useCartsStore = defineStore("cart", () => {
|
|||||||
}
|
}
|
||||||
carts.value = arr
|
carts.value = arr
|
||||||
.map((v) => {
|
.map((v) => {
|
||||||
|
|
||||||
const item = getProductDetails(v);
|
const item = getProductDetails(v);
|
||||||
if (!item) {
|
const is_temporary=v.is_temporary||v.isTemporary
|
||||||
|
if(is_temporary){
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
if (!item&&!is_temporary) {
|
||||||
socketSendMsg({
|
socketSendMsg({
|
||||||
id: v.id,
|
id: v.id,
|
||||||
operate_type: "del",
|
operate_type: "del",
|
||||||
@@ -499,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