21 Commits

Author SHA1 Message Date
362f3cee96 修复我的页面积分列表换行问题 2025-12-29 15:30:17 +08:00
gyq
ca53618004 Merge branch 'test' of https://newgitea.sxczgkj.cn/czg_team/cashier_wx into test 2025-12-29 13:54:55 +08:00
gyq
cbe27a43de 新增跳转企业微信客服功能 2025-12-29 13:54:53 +08:00
5fcbba0cb4 修复确认订单页面收起按钮消失问题,修复套餐商品添加第二次失效问题 2025-12-29 13:48:37 +08:00
0944635c69 Merge branch 'test' of https://newgitea.sxczgkj.cn/czg_team/cashier_wx into test 2025-12-29 10:11:47 +08:00
067025f532 修复订单列表页面签子问题 2025-12-29 10:11:42 +08:00
gyq
8d917d49ed Merge branch 'test' of https://newgitea.sxczgkj.cn/czg_team/cashier_wx into test 2025-12-26 17:23:21 +08:00
gyq
bcc44a0886 增加跳转企业微信客服示例 2025-12-26 17:23:19 +08:00
811abf935c 修复会员判断问题 2025-12-26 17:22:39 +08:00
bde30fa70c 修复临时菜和数签子显示问题,修复下单页面商品弹窗问题 2025-12-26 16:14:42 +08:00
ac7af51a92 代合合并 2025-12-26 09:48:12 +08:00
75ed724fbb 增加相关商品推荐功能 2025-12-25 19:03:17 +08:00
b5ecab0a03 选择商品弹窗修改 2025-12-25 09:43:02 +08:00
f75f90d34f 商品弹窗代码修改 2025-12-25 09:29:09 +08:00
cf562b28b0 商品弹窗修改 2025-12-24 18:11:57 +08:00
33453ab961 商品弹窗吸怪 2025-12-24 17:52:33 +08:00
65554b043c 增加商品弹窗组件 2025-12-24 17:20:42 +08:00
b3c1ab3b8b 部分代码调整 2025-12-24 15:27:27 +08:00
e1000c6b40 增加确认订单页面菜品折叠,修改商品购物车数量显示 2025-12-24 14:40:29 +08:00
a4580bdd1c Merge branch 'prod' of https://newgitea.sxczgkj.cn/czg_team/cashier_wx into test 2025-12-24 13:44:00 +08:00
3a2d704c4f 修改为测试环境 2025-12-24 10:28:12 +08:00
20 changed files with 2285 additions and 1367 deletions

3
common/api/apiPrve.js Normal file
View File

@@ -0,0 +1,3 @@
export const urlAccount = '/account'
export const urlProduct = '/product'
export const urlOrder = '/order'

View File

@@ -1,8 +1,7 @@
// 引入 request 文件
import request from '@/common/api/request.js'
const urlAccount = '/account'
const urlProduct = '/product'
const urlOrder = '/order'
import {urlAccount,urlProduct,urlOrder} from '@/common/api/apiPrve.js'
//获取商品列表数据
export const APIproductqueryProduct = (data) => {
@@ -46,4 +45,13 @@ export const APIminiAppskuinfo = (data) => {
method: 'get',
data: data
})
}
//获取相关推荐商品
export const productRelated = (data) => {
return request({
url: urlProduct + '/user/product/related/'+data.id,
method: 'get',
data: data
})
}

View File

@@ -7,33 +7,7 @@ export default async (params) => {
let token = uni.cache.get("token") || "";
const shopId = uni.cache.get("shopId") * 1;
const userInfo = uni.cache.get("userInfo") || {};
// #ifdef H5
token = "1b5e8baf0cc1492a858a208f113d0971";
uni.cache.set('userInfo', {
"acQrcodeValidTime": "2026-01-13 13:35:59",
"alipayOpenId": "",
"birthDay": "",
"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-24 11:24:12",
"nickName": "微信用户",
"password": "",
"payPwd": "e10adc3949ba59abbe56e057f20f883e",
"phone": "",
"realName": "",
"sex": null,
"status": 1,
"updateTime": "2025-12-24 11:22:47",
"usePayPwd": 0,
"wechatAcOpenId": "",
"wechatAcQrcode": "http://weixin.qq.com/q/029s5JtP1xfmJ1g_HDxFco",
"wechatOpenId": "or1l86yipGvwyfPhrKIAcQuSfAV8"
})
// #endif
let header = {
version: uni.conf.version,
type: uni.getSystemInfoSync().platform,
@@ -60,7 +34,10 @@ export default async (params) => {
mask: true,
});
}
// #ifdef H5
uni.cache.set('token', '1b5e8baf0cc1492a858a208f113d0971')
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
return new Promise((resolve, reject) => {
const timeoutDuration = params.timeout || 10000; // 可以通过 params 传入超时时间,默认 10 秒
uni.request({

View File

@@ -1,17 +1,19 @@
// const debug = process.env.NODE_ENV == 'development' ? true : false;
const debug = false; // false线上 true本地
// const debug = false; // false线上 true本地
const debug = true; // false线上 true本地
let baseUrl = ''
let baseUrlwws = ''
const version = "100";
const autoRemoveCache = {
count: 100000,
size: 100000,
};
function init(){
function init() {
if (debug) {
baseUrl = 'http://192.168.1.42'
baseUrlwws = "ws://192.168.1.42:2348";
@@ -20,12 +22,12 @@ function init(){
baseUrlwws = "wss://czgeatws.sxczgkj.com/wss";
}
// #ifdef H5
if (debug) {
baseUrl = "/api";
baseUrl = "/testApi";
baseUrlwws = "http://192.168.1.42:2348";
} else {
baseUrl = "/prodApi";
baseUrl = "/prodApi";
baseUrlwws = "https://czgeatws.sxczgkj.com/wss";
}
// #endif
@@ -47,7 +49,7 @@ export const changeEnv = (env) => {
let baseUrl = "http://192.168.1.42"
let baseUrlwws = "ws://192.168.1.42:2348"
// #ifdef H5
baseUrl = "/api"
baseUrl = "/testApi"
baseUrlwws = "http://192.168.1.42:2348"
// #endif
uni.conf = {

View File

@@ -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>

View File

@@ -45,7 +45,7 @@
</view>
</view>
<view>
<view
<!-- <view
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"
>
@@ -53,9 +53,9 @@
<text class="font-16 color-333 font-700" >
{{ 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 class="u-flex justify-between">
<view>

View File

@@ -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;

View File

@@ -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"

View File

@@ -2,11 +2,9 @@
<view class="content min-page bg-f7">
<view class="contentbox">
<template v-if="shopExtend.length">
<image class="bg" :src="shopExtend[0].value" mode="aspectFill"
v-if="!isJsonArrayString(shopExtend[0].value)"></image>
<image class="bg" :src="shopExtend[0].value" mode="aspectFill" v-if="!isJsonArrayString(shopExtend[0].value)"></image>
<swiper class="swiper" autoplay circular v-else>
<swiper-item class="swiper-item" v-for="(item, index) in JSON.parse(shopExtend[0].value)"
:key="index">
<swiper-item class="swiper-item" v-for="(item, index) in JSON.parse(shopExtend[0].value)" :key="index">
<image class="swiper-bg" :src="item"></image>
</swiper-item>
</swiper>
@@ -29,7 +27,6 @@
<image :src="imgs.code" class="code"></image>
</view>
</view>
<view class="new-menus-box">
<view class="new-menus layout2" v-if="allConfig.takeout">
<view class="diner" @click="scanCodehandle(0)">
@@ -60,7 +57,6 @@
<view class="u-font-28 color-999">一键分享快速拼单</view>
</view>
</view>
<view class="points" @click="toIntegralMall">
@@ -122,532 +118,516 @@
</template>
<script setup>
import attractPopup from '@/components/attract-popup.vue';
import {
homeData
} from '@/common/api/market/index.js';
import {
getMemberConfig,
getRechargeConfig
} from '@/common/api/index/index.js';
import {
ref,
reactive,
defineProps,
defineEmits,
onMounted
} from 'vue';
import {
isJsonArrayString
} from '@/utils/util.js';
import attractPopup from '@/components/attract-popup.vue';
import { homeData } from '@/common/api/market/index.js';
import { 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 = {
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',
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',
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',
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',
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',
taocan: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/1eb9aa9b865b47b39ab9d7ac404601a9.png'
};
// 定义接收的属性
const props = defineProps({
shopExtend: {
type: Array,
default: []
}
const imgs = {
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',
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',
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',
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',
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',
taocan: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/4/1eb9aa9b865b47b39ab9d7ac404601a9.png'
};
// 定义接收的属性
const props = defineProps({
shopExtend: {
type: Array,
default: []
}
});
function toGroupBuying() {
uni.navigateTo({
url: '/groupBuying/index/index'
});
}
function toGroupBuying() {
uni.navigateTo({
url: '/groupBuying/index/index'
})
}
function toFenxiao() {
uni.navigateTo({
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({
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({
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
} 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'
// 获取会员配置
const isMember = ref(0);
const isCharge = ref(0);
async function getVipConfig() {
try {
const res1 = await getMemberConfig({
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 res2 = await getRechargeConfig({
shopId: uni.cache.get('shopId')
});
};
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') || {});
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({
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
});
getVipConfig();
getHomeData();
}
defineExpose({
updateData
});
</script>
<style scoped lang="scss">
page {
background: #f6f8fa;
}
page {
background: #f6f8fa;
}
.swiper {
.swiper {
width: 100%;
height: 100%;
.swiper-item {
width: 100%;
height: 100%;
.swiper-item {
.swiper-bg {
width: 100%;
height: 100%;
.swiper-bg {
width: 100%;
height: 100%;
}
}
}
}
.content {
.contentbox {
position: relative;
.content {
.contentbox {
position: relative;
width: 100%;
height: 430rpx;
.bg {
width: 100%;
height: 430rpx;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.contentboxitem {
position: absolute;
bottom: 0;
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;
.contentboxitem {
position: absolute;
bottom: 0;
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 {
width: 50%;
border-right: 2rpx solid #623618;
.contentboxitemleft {
width: 50%;
border-right: 2rpx solid #623618;
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;
}
image {
width: 134rpx;
height: 134rpx;
}
.contentboxitemright {
width: 50%;
padding: 0 34rpx;
.contentboxitemlefttextone {
margin-top: 10rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
.contentboxitemright_item:nth-child(2) {
margin-top: 30rpx;
.contentboxitemlefttexttow {
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 {
image {
width: 96rpx;
height: 96rpx;
.contentboxitemright_itembox {
width: 170rpx;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
.contentboxitemright_itembox {
width: 170rpx;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
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;
}
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 {
width: 90vw;
background-color: #fff;
border-radius: 8px;
.popup-content {
width: 90vw;
background-color: #fff;
border-radius: 8px;
.header-wrap {
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ececec;
padding: 0 28upx;
.header-wrap {
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ececec;
padding: 0 28upx;
.t {
font-size: 32upx;
color: #333;
}
.close {
$size: 60upx;
width: $size;
height: $size;
display: flex;
align-items: center;
justify-content: center;
}
.t {
font-size: 32upx;
color: #333;
}
.btn-content {
height: 86px;
.close {
$size: 60upx;
width: $size;
height: $size;
display: flex;
align-items: center;
justify-content: center;
gap: 60upx;
.btn {
width: 248upx;
}
}
}
.menus {
.btn-content {
height: 86px;
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-self: stretch;
border-radius: 24rpx;
background: #fff;
position: relative;
z-index: 99;
margin-top: -36rpx;
justify-content: center;
gap: 60upx;
.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;
.btn {
width: 248upx;
}
}
}
.new-menus-box {
margin: 0 16rpx 0 16rpx;
.menus {
display: flex;
padding: 32rpx 40rpx;
margin-top: 150rpx;
gap: 20rpx;
.new-menus {
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;
.menu-item {
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;
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;
background-color: #fff;
border-radius: 16rpx;
align-items: center;
justify-content: space-between;
.img {
width: 98px;
height: 98px;
.icon {
width: 79px;
height: 79px;
}
}
.taocan {
.img {
width: 117px;
height: 117px;
&.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 {
}
}
}
.bottom_menus {
display: flex;
gap: 14rpx;
margin-top: 10px;
.item {
flex: 1;
&.layout1 {
padding: 36rpx 40rpx;
justify-content: space-between;
display: flex;
padding: 20rpx;
flex-direction: column;
align-items: center;
border-radius: 18rpx;
background: #fff;
.img {
width: 39px;
height: 39px;
.big_img {
width: 330rpx;
height: 330rpx;
}
.title {
font-size: 32rpx;
font-size: 48rpx;
}
.desc {
margin-top: 8rpx;
margin-top: 20rpx;
font-size: 32rpx;
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>

View File

@@ -7,14 +7,21 @@
<view class="limitDiscount" v-if="showLimitDiscount(item)"
>限时折扣</view
>
<up-image
width="76"
height="76"
radius="6"
:src="item.productImg"
v-if="item.productId != -999"
v-if="item.isTemporary != 1&&item.is_temporary!=1"
></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
width="76"
height="76"
@@ -25,7 +32,7 @@
></up-image>
</view>
<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">{{
item.skuName
}}</text>
@@ -55,18 +62,22 @@
<view class="price">
<view class="priceAmount">
¥
<goodsPrice
v-if="!item.is_temporary&&!item.isTemporary"
:cart="item"
:limitDiscount="limitDiscount"
:shopUserInfo="shopUserInfo"
:shopInfo="shopInfo"
idKey="product_id"
></goodsPrice>
<text v-else>{{item.discount_sale_amount}}</text>
<view class="old-price" v-if="showLimitDiscount(item)"
>¥{{ item.salePrice }}</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 File

@@ -40,9 +40,19 @@
:nowCarts="nowCarts"
:limitDiscount="cartStore.limitTimeDiscount"
></orderItemVue> -->
<orderItemVue :useVipPrice="useVipPrice" v-if="cartStore.allGoods.length" :nowCarts="cartStore.allGoods"
<orderItemVue :useVipPrice="useVipPrice" v-if="nowCarts" :nowCarts="nowCarts"
:shopInfo="cartStore.shopInfo" :shopUserInfo="cartStore.shopUserInfo"
:limitDiscount="cartStore.limitTimeDiscount"></orderItemVue>
<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">
<text>{{showAllGoods?'收起':'展开'}}</text>
<view class="guodu u-m-l-10 u-m-t-2" :class="{rotate:!showAllGoods}">
<up-icon name="arrow-down" size="14"></up-icon>
</view>
</view>
</view>
<template v-if="listinfo.id&&listinfo.status=='done'">
<view class="cell-item" v-if="is_type != 0">
@@ -328,7 +338,9 @@
import {
BigNumber
} from "bignumber.js";
const showAllGoods=ref(false)
let hasCouponCanUse = ref(false);
const usePoints = ref(false);
@@ -852,6 +864,16 @@
await getConsumeDiscount();
getDiscountActivity();
});
const nowCarts=computed(()=>{
if(cartStore.allGoods.length<=0){
return []
}
if(showAllGoods.value){
return cartStore.allGoods
}
return cartStore.allGoods.slice(0,4)
})
</script>
<style lang="scss" scoped>
@@ -1587,4 +1609,11 @@
}
}
}
.guodu{
transition:all .3s linear;
padding-top: 2rpx;
}
.rotate{
transform: rotate(-90deg);
}
</style>

View File

@@ -70,7 +70,10 @@
<view class="item" v-for="item in value" :key="item.id">
<view class="cover">
<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"
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
mode="heightFix" v-else></up-image>
@@ -174,8 +177,8 @@
<view>{{listinfo.packFeess}}</view>
</view>
</view>
<!-- isTableFee == 0是不免除 -->
<view class="cell-item"
v-if="ordershopUserInfo.isTableFee == 0 && is_type == 0 && listinfo.Seatcharge != 0">
@@ -198,7 +201,7 @@
<text class="price"> {{listinfo.payAmount}} </text>
</view>
</view>

View File

@@ -62,8 +62,14 @@
<view class="shop-info">
<view class="shop-item">
<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"
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
mode="heightFix" v-else></u-image>
@@ -130,32 +136,37 @@
import {
useNavbarStore
} from '@/stores/navbarStore';
import {APIshopUserInfo} from '@/common/api/member.js'
import {
APIshopUserInfo
} from '@/common/api/member.js'
const store = useNavbarStore();
async function agignOrder(item){
async function agignOrder(item) {
await APIshopUserInfo({
shopId:item.shopId
}).then(shopUserInfo=>{
if(shopUserInfo){
shopId: item.shopId
}).then(shopUserInfo => {
if (shopUserInfo) {
uni.cache.set("dinersNum", 1);
uni.cache.set("tableCode", shopUserInfo.id);
uni.cache.set("shopId", item.shopId);
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 arr.reduce((prve,cur)=>{
return prve+cur.num
},0)
return arr.reduce((prve, cur) => {
return prve + cur.num
}, 0)
}
function isRemoveOrder(item) {
uni.showModal({
title: '提示',
@@ -578,7 +589,8 @@
.ml-20 {
margin-left: 20rpx;
}
.take_food_number{
.take_food_number {
padding: 20rpx;
background-color: #F8F8F8;
margin-left: 36rpx;

File diff suppressed because it is too large Load Diff

View File

@@ -26,17 +26,18 @@
<view class="limit-discount" v-if="showLimitDiscount(item)">
限时折扣
</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>
<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 class="info">
<view class="name">
{{
item.cartListinfo.is_temporary == 1
? "临时菜"
: item.name
}}
<view class="name" v-if=" item.cartListinfo.is_temporary == 1">
{{item.cartListinfo.product_name||item.cartListinfo.name|| item.name}}
</view>
<view class="name" v-else>{{item.name}}</view>
<view class="select-sku-wrap" v-if="item.type == 'sku'">
<text v-for="i in item.skuList" :key="i.id">
{{ item.cartListinfo.sku_id == i.id ? i.name : "" }}
@@ -206,9 +207,6 @@
limitDiscount: props.limitDiscount.id ? props.limitDiscount : null,
shopUserInfo: shopUserInfo,
});
if (goods.name == "纯生纯生纯生") {
console.log("returnRealPrice", price);
}
return price;
}

View File

@@ -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>
@@ -148,8 +148,10 @@
@click.stop="clickspecifications(item, index, index1)">
<text class="t no-wrap" v-if="item.groupType == '1'">选择套餐</text>
<text class="t" v-else>选规格</text>
<!-- <text class="dot num"
v-if="item.cartNumber > 0">{{ ifcartNumber(item) < 99 ? ifcartNumber(item) : '99+' }}</text> -->
<text class="dot num"
v-if="item.cartNumber > 0">{{ ifcartNumber(item) < 99 ? ifcartNumber(item) : '99+' }}</text>
v-if="returnGoodsImCartNum(item)">{{ returnGoodsImCartNum(item) < 99 ? returnGoodsImCartNum(item) : '99+' }}</text>
</view>
<view class="Controls" v-else>
<view class="btn" v-if="item.cartNumber != '0'">
@@ -158,7 +160,10 @@
<!-- <view class="btnClick"
@tap.stop="$u.throttle(() => singleclick(item, '-'), 500)"></view> -->
</view>
<text class="num">{{ ifcartNumber(item) }}</text>
<!-- <text class="num">{{ ifcartNumber(item) }}</text> -->
<text class="dot num"
v-if="returnGoodsImCartNum(item1)">{{ returnGoodsImCartNum(item1) < 99 ? returnGoodsImCartNum(item1) : '99+' }}</text>
<view class="btn">
<up-icon name="plus-circle-fill" color="#E9AB7A" size="25"></up-icon>
<!-- <view class="btnClick"
@@ -252,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>
@@ -288,8 +293,11 @@
@click.stop="clickspecifications(item1, index, index1)">
<text class="t no-wrap" v-if="item1.groupType == '1'">选择套餐</text>
<text class="t" v-else>选规格</text>
<!-- <text class="dot num"
v-if="item1.cartNumber > 0">{{ ifcartNumber(item1) < 99 ? ifcartNumber(item1) : '99+' }}</text> -->
<text class="dot num"
v-if="item1.cartNumber > 0">{{ ifcartNumber(item1) < 99 ? ifcartNumber(item1) : '99+' }}</text>
v-if="returnGoodsImCartNum(item1)">{{ returnGoodsImCartNum(item1) < 99 ? returnGoodsImCartNum(item1) : '99+' }}</text>
</view>
</view>
<view class="Controls" v-else>
@@ -437,9 +445,39 @@
</view>
</view>
</view>
<!-- 推荐搭配 -->
<view class="u-m-t-48 u-p-30">
<view class="font-bold u-font-32 ">推荐搭配</view>
<view class="u-flex recommand-goods">
<view class=" item" v-for="(item,index) in 6" :key="index">
<up-image width="210rpx" height="210rpx" radius="12rpx"></up-image>
<view class="info">
<view class="u-line-2 name u-m-t-10 u-font-32 font-500">
商品名
</view>
<view class="u-flex u-row-between">
<view class="font-bold">
<text class="u-font-24">¥</text>
<text class="u-font-32">40</text>
</view>
<view class="btn">
<up-icon name="plus-circle-fill" color="#E9AB7A" size="25"></up-icon>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 占位 -->
<view style="height: 42rpx;"></view>
<view class="shop_bottom">
<view class="flex-between">
<view class="price price-sku"
@@ -453,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
}}
@@ -471,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
}}
@@ -536,7 +574,17 @@
<Loading :isLoading="!useSocket.isConnected" />
<ModalList></ModalList>
<recommendGoodsModal v-if="isDataLoaded" @onBuyClick="onBuyClick"></recommendGoodsModal>
<goodsModal></goodsModal>
<view
v-for="(item,index) in goodsModalList" :key="index"
>
<goodsModal :key="index" v-model="item.show" :goods="item.goods" @prveImgs="prveImgs" @close="goodsModalClose(index)"
@websocketsendMessage="websocketsendMessage"
@modalAdd="modalAdd"
:GoodsIDInCartNumMap="GoodsIDInCartNumMap"
></goodsModal>
</view>
<xbSwiperPreview :visable="showPrveImg" :imgs="prveImgsList" @update:visable="updateShowPrveImg">
</xbSwiperPreview>
<!-- 显示选择人数popup -->
@@ -594,7 +642,8 @@
productminiApphotsquery,
APIgroupquery,
APIminiAppinfo,
APIminiAppskuinfo
APIminiAppskuinfo,
productRelated
} from '@/common/api/product/product.js';
import {
@@ -700,6 +749,9 @@
import {
useCartStore
} from '@/stores/order.js';
import {
computed, provide
} from 'vue';
const cartStore = useCartStore();
/**
* store本地存储 end
@@ -710,7 +762,6 @@
proxy
} = getCurrentInstance();
//点单智能推荐
function onBuyClick(item) {
let index = -1;
@@ -750,6 +801,7 @@
/**
* 通用数据合集 start
*/
// 门店信息
const shopInfo = reactive({});
Object.assign(shopInfo, uni.cache.get('shopInfo'));
@@ -804,6 +856,35 @@
// 购物车对应的商品数
const GoodsIDInCartNumMap = computed(() => {
const map = {}
for (let cart of cartStore.carts) {
if (map[cart.product_id]) {
map[cart.product_id] += cart.number * 1
} else {
map[cart.product_id] = cart.number * 1
}
}
return map
})
/**
* 返回购物车对应的商品数量
*/
function returnGoodsImCartNum(goods) {
if(!goods){
return 0
}
if (GoodsIDInCartNumMap.value.hasOwnProperty(goods.id)) {
GoodsIDInCartNumMap.value[goods.id]
}
return 0
}
// 获取商品数据
const shopProductList = reactive({
hots: [],
@@ -1289,6 +1370,15 @@
let res = await APIminiAppinfo(item.id);
prveImgs(res.images);
}
const goodsModalList=ref([])
function goodsModalClose(index){
goodsModalList.value.splice(index,1)
}
function modalAdd(item){
clickspecifications(item)
}
//获取多规格数据
const clickspecifications = async (item, index, indexs, type) => {
@@ -1305,7 +1395,10 @@
// }
if (item.isSoldStock == 1 || (item.isSaleTime == 0 && !item.isSaleTimeshow)) {
return false;
return uni.showToast({
title:'商品已下架或不在可售时间内',
icon:'none'
});
}
shopCartNumber.value = 0;
@@ -1350,7 +1443,11 @@
.filter(([_, value]) => value.length > 0));
// 给默认数量
specifications.item.amountcartNumber = 0;
showShopsku.value = true;
// showShopsku.value = true;
goodsModalList.value.push({
show:true,
goods:specifications.item
})
};
// 判断商品是否在可售时间内
const isProductAvailable = async (sellDaysStr, startTimeStr, endTimeStr) => {
@@ -1592,12 +1689,13 @@
const goodsSkuList = goods ? goods.skuList : []
const findSku = goodsSkuList.find(sku => sku.id == v.sku_id)
const memberPrice = findSku ? findSku.memberPrice : 0
const is_temporary=v.is_temporary||v.isTemporary
const is_time_discount = limitUtils.canUseLimitTimeDiscount({
...v,
memberPrice
}, cartStore.limitTimeDiscount, shopInfo,
shopUserInfo.value, 'product_id');
if (!goods) {
if (!goods&&!is_temporary) {
console.log('删除未匹配到的商品', {
id: v.id,
operate_type: "del",
@@ -3211,7 +3309,6 @@
border-radius: 20rpx;
background: #fff;
box-sizing: border-box;
padding-bottom: 200rpx;
.positionabsolute {
position: absolute;
@@ -3246,9 +3343,7 @@
border-bottom: 2rpx solid #f0f0f0;
}
.shop_sku_box:last-child {
padding-bottom: 140rpx;
}
.shop_sku_box {
padding: 20rpx;
@@ -3334,9 +3429,6 @@
padding: 30rpx 28rpx;
background-color: #fff;
box-shadow: 0rpx -6rpx 14rpx 2rpx rgba(0, 0, 0, 0.1);
position: fixed;
left: 0;
bottom: 0;
.price {
display: flex;
@@ -3712,4 +3804,31 @@
font-size: 12px;
margin-left: 20rpx;
}
.recommand-goods {
display: flex;
flex-wrap: wrap;
margin-top: 24rpx;
.item {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 30rpx;
margin-bottom: 30rpx;
width: 210rpx;
&:nth-child(3n) {
margin-right: 0;
}
.name {
height: 84rpx;
}
.info {
width: 100%;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

10
pnpm-lock.yaml generated
View File

@@ -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

View File

@@ -327,9 +327,13 @@ export const useCartsStore = defineStore("cart", () => {
}
carts.value = arr
.map((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({
id: v.id,
operate_type: "del",
@@ -499,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;
});

View File

@@ -33,11 +33,11 @@ module.exports = defineConfig({
],
server: {
proxy: {
'/api': {
'/testApi': {
// target: 'https://cashier.sxczgkj.com', // 目标服务器地址
target: 'http://192.168.1.42/', // 目标服务器地址
changeOrigin: true, // 是否更改请求源
rewrite: path => path.replace(/^\/api/, '')
rewrite: path => path.replace(/^\/testApi/, '')
},
'/prodApi': {
target: 'https://cashier.sxczgkj.com', // 目标服务器地址