Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d917d49ed | |||
| bcc44a0886 | |||
| 811abf935c | |||
| bde30fa70c | |||
| ac7af51a92 | |||
| 75ed724fbb | |||
| b5ecab0a03 | |||
| f75f90d34f | |||
| cf562b28b0 | |||
| 33453ab961 | |||
| 65554b043c | |||
| b3c1ab3b8b | |||
| e1000c6b40 | |||
| a4580bdd1c | |||
| 3a2d704c4f |
3
common/api/apiPrve.js
Normal file
3
common/api/apiPrve.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export const urlAccount = '/account'
|
||||||
|
export const urlProduct = '/product'
|
||||||
|
export const urlOrder = '/order'
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
// 引入 request 文件
|
// 引入 request 文件
|
||||||
import request from '@/common/api/request.js'
|
import request from '@/common/api/request.js'
|
||||||
const urlAccount = '/account'
|
|
||||||
const urlProduct = '/product'
|
import {urlAccount,urlProduct,urlOrder} from '@/common/api/apiPrve.js'
|
||||||
const urlOrder = '/order'
|
|
||||||
|
|
||||||
//获取商品列表数据
|
//获取商品列表数据
|
||||||
export const APIproductqueryProduct = (data) => {
|
export const APIproductqueryProduct = (data) => {
|
||||||
@@ -47,3 +46,12 @@ export const APIminiAppskuinfo = (data) => {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取相关推荐商品
|
||||||
|
export const productRelated = (data) => {
|
||||||
|
return request({
|
||||||
|
url: urlProduct + '/user/product/related/'+data.id,
|
||||||
|
method: 'get',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -7,33 +7,7 @@ export default async (params) => {
|
|||||||
let token = uni.cache.get("token") || "";
|
let token = uni.cache.get("token") || "";
|
||||||
const shopId = uni.cache.get("shopId") * 1;
|
const shopId = uni.cache.get("shopId") * 1;
|
||||||
const userInfo = uni.cache.get("userInfo") || {};
|
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 = {
|
let header = {
|
||||||
version: uni.conf.version,
|
version: uni.conf.version,
|
||||||
type: uni.getSystemInfoSync().platform,
|
type: uni.getSystemInfoSync().platform,
|
||||||
@@ -60,7 +34,10 @@ export default async (params) => {
|
|||||||
mask: true,
|
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) => {
|
return new Promise((resolve, reject) => {
|
||||||
const timeoutDuration = params.timeout || 10000; // 可以通过 params 传入超时时间,默认 10 秒
|
const timeoutDuration = params.timeout || 10000; // 可以通过 params 传入超时时间,默认 10 秒
|
||||||
uni.request({
|
uni.request({
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ let baseUrlwws = ''
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const version = "100";
|
const version = "100";
|
||||||
const autoRemoveCache = {
|
const autoRemoveCache = {
|
||||||
count: 100000,
|
count: 100000,
|
||||||
size: 100000,
|
size: 100000,
|
||||||
};
|
};
|
||||||
|
|
||||||
function init(){
|
function init() {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
baseUrl = 'http://192.168.1.42'
|
baseUrl = 'http://192.168.1.42'
|
||||||
baseUrlwws = "ws://192.168.1.42:2348";
|
baseUrlwws = "ws://192.168.1.42:2348";
|
||||||
@@ -22,10 +23,10 @@ function init(){
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
baseUrl = "/api";
|
baseUrl = "/testApi";
|
||||||
baseUrlwws = "http://192.168.1.42:2348";
|
baseUrlwws = "http://192.168.1.42:2348";
|
||||||
} else {
|
} else {
|
||||||
baseUrl = "/prodApi";
|
baseUrl = "/prodApi";
|
||||||
baseUrlwws = "https://czgeatws.sxczgkj.com/wss";
|
baseUrlwws = "https://czgeatws.sxczgkj.com/wss";
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
@@ -47,7 +48,7 @@ export const changeEnv = (env) => {
|
|||||||
let baseUrl = "http://192.168.1.42"
|
let baseUrl = "http://192.168.1.42"
|
||||||
let baseUrlwws = "ws://192.168.1.42:2348"
|
let baseUrlwws = "ws://192.168.1.42:2348"
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
baseUrl = "/api"
|
baseUrl = "/testApi"
|
||||||
baseUrlwws = "http://192.168.1.42:2348"
|
baseUrlwws = "http://192.168.1.42:2348"
|
||||||
// #endif
|
// #endif
|
||||||
uni.conf = {
|
uni.conf = {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||||
|
|||||||
@@ -40,10 +40,20 @@
|
|||||||
:nowCarts="nowCarts"
|
:nowCarts="nowCarts"
|
||||||
:limitDiscount="cartStore.limitTimeDiscount"
|
:limitDiscount="cartStore.limitTimeDiscount"
|
||||||
></orderItemVue> -->
|
></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"
|
: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" v-if="cartStore.allGoods>4">
|
||||||
|
<view class="u-flex u-col-baseline" @click="showAllGoods=!showAllGoods">
|
||||||
|
<text>{{showAllGoods?'收起':'展开'}}</text>
|
||||||
|
<view class="guodu u-m-l-10 u-m-t-2" :class="{rotate:!showAllGoods}">
|
||||||
|
<up-icon name="arrow-down" size="14"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
<template v-if="listinfo.id&&listinfo.status=='done'">
|
<template v-if="listinfo.id&&listinfo.status=='done'">
|
||||||
<view class="cell-item" v-if="is_type != 0">
|
<view class="cell-item" v-if="is_type != 0">
|
||||||
<view class="label">打包费</view>
|
<view class="label">打包费</view>
|
||||||
@@ -329,6 +339,8 @@
|
|||||||
BigNumber
|
BigNumber
|
||||||
} from "bignumber.js";
|
} from "bignumber.js";
|
||||||
|
|
||||||
|
|
||||||
|
const showAllGoods=ref(false)
|
||||||
let hasCouponCanUse = ref(false);
|
let hasCouponCanUse = ref(false);
|
||||||
|
|
||||||
const usePoints = ref(false);
|
const usePoints = ref(false);
|
||||||
@@ -852,6 +864,16 @@
|
|||||||
await getConsumeDiscount();
|
await getConsumeDiscount();
|
||||||
getDiscountActivity();
|
getDiscountActivity();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const nowCarts=computed(()=>{
|
||||||
|
if(cartStore.allGoods.length<=0){
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
if(showAllGoods.value){
|
||||||
|
return cartStore.allGoods
|
||||||
|
}
|
||||||
|
return cartStore.allGoods.slice(0,4)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -1587,4 +1609,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.guodu{
|
||||||
|
transition:all .3s linear;
|
||||||
|
padding-top: 2rpx;
|
||||||
|
}
|
||||||
|
.rotate{
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -63,7 +63,11 @@
|
|||||||
<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'
|
<u-image width="56" height="56" radius="10" :src='item1.productImg'
|
||||||
v-if="item1.productId!=-999"></u-image>
|
v-if="!item.isTemporary"></u-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>
|
||||||
<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 +134,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 +587,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;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||||
|
<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>
|
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>
|
||||||
@@ -148,8 +148,10 @@
|
|||||||
@click.stop="clickspecifications(item, index, index1)">
|
@click.stop="clickspecifications(item, index, index1)">
|
||||||
<text class="t no-wrap" v-if="item.groupType == '1'">选择套餐</text>
|
<text class="t no-wrap" v-if="item.groupType == '1'">选择套餐</text>
|
||||||
<text class="t" v-else>选规格</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"
|
<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>
|
||||||
<view class="Controls" v-else>
|
<view class="Controls" v-else>
|
||||||
<view class="btn" v-if="item.cartNumber != '0'">
|
<view class="btn" v-if="item.cartNumber != '0'">
|
||||||
@@ -158,7 +160,10 @@
|
|||||||
<!-- <view class="btnClick"
|
<!-- <view class="btnClick"
|
||||||
@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"
|
||||||
|
v-if="returnGoodsImCartNum(item1)">{{ returnGoodsImCartNum(item1) < 99 ? returnGoodsImCartNum(item1) : '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"
|
||||||
@@ -252,7 +257,7 @@
|
|||||||
<view class="money">
|
<view class="money">
|
||||||
<view>¥</view>
|
<view>¥</view>
|
||||||
<text class="money_num" style="margin-right: 10rpx">
|
<text class="money_num" style="margin-right: 10rpx">
|
||||||
{{ shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1 ? item1.memberPrice || item1.salePrice : item1.salePrice }}
|
{{ shopUserInfo.isVip == 1 && shopUserInfo.isMemberPrice == 1 ? item1.memberPrice || item1.salePrice : item1.salePrice }}
|
||||||
</text>
|
</text>
|
||||||
<text v-if="item1.unitName">/{{ item1.unitName }}</text>
|
<text v-if="item1.unitName">/{{ item1.unitName }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -288,8 +293,11 @@
|
|||||||
@click.stop="clickspecifications(item1, index, index1)">
|
@click.stop="clickspecifications(item1, index, index1)">
|
||||||
<text class="t no-wrap" v-if="item1.groupType == '1'">选择套餐</text>
|
<text class="t no-wrap" v-if="item1.groupType == '1'">选择套餐</text>
|
||||||
<text class="t" v-else>选规格</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"
|
<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>
|
</view>
|
||||||
<view class="Controls" v-else>
|
<view class="Controls" v-else>
|
||||||
@@ -437,9 +445,39 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</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>
|
</scroll-view>
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
<view style="height: 42rpx;"></view>
|
|
||||||
<view class="shop_bottom">
|
<view class="shop_bottom">
|
||||||
<view class="flex-between">
|
<view class="flex-between">
|
||||||
<view class="price price-sku"
|
<view class="price price-sku"
|
||||||
@@ -453,7 +491,7 @@
|
|||||||
|
|
||||||
<text class="num" v-if="false">
|
<text class="num" v-if="false">
|
||||||
{{
|
{{
|
||||||
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
shopUserInfo.isVip == 1 && shopUserInfo.isMemberPrice == 1
|
||||||
? specifications.item.result.memberPrice || specifications.item.result.salePrice
|
? specifications.item.result.memberPrice || specifications.item.result.salePrice
|
||||||
: specifications.item.result.salePrice
|
: specifications.item.result.salePrice
|
||||||
}}
|
}}
|
||||||
@@ -471,7 +509,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<text class="num" v-if="false">
|
<text class="num" v-if="false">
|
||||||
{{
|
{{
|
||||||
shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1
|
shopUserInfo.isVip == 1 && shopUserInfo.isMemberPrice == 1
|
||||||
? specifications.item.memberPrice || specifications.item.salePrice
|
? specifications.item.memberPrice || specifications.item.salePrice
|
||||||
: specifications.item.salePrice
|
: specifications.item.salePrice
|
||||||
}}
|
}}
|
||||||
@@ -536,7 +574,17 @@
|
|||||||
<Loading :isLoading="!useSocket.isConnected" />
|
<Loading :isLoading="!useSocket.isConnected" />
|
||||||
<ModalList></ModalList>
|
<ModalList></ModalList>
|
||||||
<recommendGoodsModal v-if="isDataLoaded" @onBuyClick="onBuyClick"></recommendGoodsModal>
|
<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 :visable="showPrveImg" :imgs="prveImgsList" @update:visable="updateShowPrveImg">
|
||||||
</xbSwiperPreview>
|
</xbSwiperPreview>
|
||||||
<!-- 显示选择人数popup -->
|
<!-- 显示选择人数popup -->
|
||||||
@@ -594,7 +642,8 @@
|
|||||||
productminiApphotsquery,
|
productminiApphotsquery,
|
||||||
APIgroupquery,
|
APIgroupquery,
|
||||||
APIminiAppinfo,
|
APIminiAppinfo,
|
||||||
APIminiAppskuinfo
|
APIminiAppskuinfo,
|
||||||
|
productRelated
|
||||||
} from '@/common/api/product/product.js';
|
} from '@/common/api/product/product.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -700,6 +749,9 @@
|
|||||||
import {
|
import {
|
||||||
useCartStore
|
useCartStore
|
||||||
} from '@/stores/order.js';
|
} from '@/stores/order.js';
|
||||||
|
import {
|
||||||
|
computed, provide
|
||||||
|
} from 'vue';
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
/**
|
/**
|
||||||
* store本地存储 end
|
* store本地存储 end
|
||||||
@@ -710,7 +762,6 @@
|
|||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance();
|
} = getCurrentInstance();
|
||||||
|
|
||||||
|
|
||||||
//点单智能推荐
|
//点单智能推荐
|
||||||
function onBuyClick(item) {
|
function onBuyClick(item) {
|
||||||
let index = -1;
|
let index = -1;
|
||||||
@@ -750,6 +801,7 @@
|
|||||||
/**
|
/**
|
||||||
* 通用数据合集 start
|
* 通用数据合集 start
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 门店信息
|
// 门店信息
|
||||||
const shopInfo = reactive({});
|
const shopInfo = reactive({});
|
||||||
Object.assign(shopInfo, uni.cache.get('shopInfo'));
|
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({
|
const shopProductList = reactive({
|
||||||
hots: [],
|
hots: [],
|
||||||
@@ -1290,6 +1371,15 @@
|
|||||||
prveImgs(res.images);
|
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) => {
|
const clickspecifications = async (item, index, indexs, type) => {
|
||||||
console.log('clickspecifications', item);
|
console.log('clickspecifications', item);
|
||||||
@@ -1305,7 +1395,10 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if (item.isSoldStock == 1 || (item.isSaleTime == 0 && !item.isSaleTimeshow)) {
|
if (item.isSoldStock == 1 || (item.isSaleTime == 0 && !item.isSaleTimeshow)) {
|
||||||
return false;
|
return uni.showToast({
|
||||||
|
title:'商品已下架或不在可售时间内',
|
||||||
|
icon:'none'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
shopCartNumber.value = 0;
|
shopCartNumber.value = 0;
|
||||||
@@ -1350,7 +1443,11 @@
|
|||||||
.filter(([_, value]) => value.length > 0));
|
.filter(([_, value]) => value.length > 0));
|
||||||
// 给默认数量
|
// 给默认数量
|
||||||
specifications.item.amountcartNumber = 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) => {
|
const isProductAvailable = async (sellDaysStr, startTimeStr, endTimeStr) => {
|
||||||
@@ -1592,12 +1689,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",
|
||||||
@@ -3211,7 +3309,6 @@
|
|||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: 200rpx;
|
|
||||||
|
|
||||||
.positionabsolute {
|
.positionabsolute {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -3246,9 +3343,7 @@
|
|||||||
border-bottom: 2rpx solid #f0f0f0;
|
border-bottom: 2rpx solid #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shop_sku_box:last-child {
|
|
||||||
padding-bottom: 140rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shop_sku_box {
|
.shop_sku_box {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
@@ -3334,9 +3429,6 @@
|
|||||||
padding: 30rpx 28rpx;
|
padding: 30rpx 28rpx;
|
||||||
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);
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -3712,4 +3804,31 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-left: 20rpx;
|
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>
|
</style>
|
||||||
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
|
||||||
|
|||||||
@@ -329,7 +329,11 @@ export const useCartsStore = defineStore("cart", () => {
|
|||||||
.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;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ module.exports = defineConfig({
|
|||||||
],
|
],
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/testApi': {
|
||||||
// target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
// target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||||
target: 'http://192.168.1.42/', // 目标服务器地址
|
target: 'http://192.168.1.42/', // 目标服务器地址
|
||||||
changeOrigin: true, // 是否更改请求源
|
changeOrigin: true, // 是否更改请求源
|
||||||
rewrite: path => path.replace(/^\/api/, '')
|
rewrite: path => path.replace(/^\/testApi/, '')
|
||||||
},
|
},
|
||||||
'/prodApi': {
|
'/prodApi': {
|
||||||
target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||||
|
|||||||
Reference in New Issue
Block a user