更新下单

This commit is contained in:
wwz 2025-03-24 14:03:04 +08:00
parent 5b8100aa64
commit 794e37d66f
7 changed files with 54 additions and 47 deletions

View File

@ -53,9 +53,14 @@
const keyword = ref()
const goBack = () => {
uni.navigateBack({
delta: 1
});
try {
uni.navigateBack({
delta: 1
});
} catch (error) {
uni.pro.switchTab('index/index')
//TODO handle the exception
}
};
const onRightTextClick = () => {
@ -73,10 +78,10 @@
oneStyle: {},
towStyle: {}
});
watchEffect(()=>{
if(store.showSearch>44){
watchEffect(() => {
if (store.showSearch > 44) {
}
})
onMounted(() => {

View File

@ -1,7 +1,7 @@
<template>
<view class="content">
<view class="contentbox"
:style="'background:url('+(shopExtend.index_bg?shopExtend.index_bg.value:'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/shuangbackground.png')+') no-repeat center center / cover' ">
:style="'background:url('+(shopExtend?shopExtend.shopExtendList[0].value:'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/shuangbackground.png')+') no-repeat center center / cover' ">
<view class="contentboxitem flex-between">
<view class="contentboxitemleft flex-colum" @click="scanCodehandle(0)">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/Xdiancan.png" mode="aspectFill">
@ -42,7 +42,7 @@
import {
productStore
} from '@/stores/user.js';
const shopExtend = uni.cache.get('shopUserInfo') ? uni.cache.get('shopUserInfo').shopExtendList[0] : ''
const shopExtend = uni.cache.get('shopId') ? uni.cache.get('shopUserInfo') : 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/shuangbackground.png'
const scanCodehandle = async (i) => {
const store = productStore();
await store.scanCodeactions()

View File

@ -171,15 +171,6 @@
</view>
</view>
</view>
<!-- <view class="cell-item"
v-if="listinfo && listinfo.pointsDiscountAmount && listinfo.pointsDiscountAmount > 0">
<view class="label">积分抵扣</view>
<view class="val">
<view></view>
<view style="font-size: 28rpx;"></view>
<view>{{listinfo.pointsDiscountAmount.toFixed(2)}}</view>
</view>
</view> -->
</block>
<view class="total-wrap">
@ -418,7 +409,10 @@
shopUserId: props.orderVIP.id,
orderAmount: props.listinfo.totalCost
})
emits('clickPointsamount', props.listinfo.pointsDiscountAmount);
emits('clickPointsamount', {
pointsDiscountAmount: props.listinfo.pointsDiscountAmount,
pointsNum: calcUsablePointsData.integral
});
};
// *

View File

@ -178,10 +178,10 @@
}
// id
console.log(mergedArray.value)
console.log(item)
console.log(Selectedlist.value)
console.log(Orderinfo.shoppingCart)
// console.log(mergedArray.value)
// console.log(item)
// console.log(Selectedlist.value)
// console.log(Orderinfo.shoppingCart)
// if (Orderinfo.shoppingCart.length <= Selectedlist.value.length) {
// uni.showToast({
// title: '!',

View File

@ -130,7 +130,7 @@
//
try {
const shopQrcode = ref(uni.cache.get('shopInfo').shopQrcode)
const shopQrcode = ref(uni.cache.get('shopUserInfo').shopInfo)
} catch (error) {
//TODO handle the exception
}
@ -146,7 +146,8 @@
pointsDiscountAmount: 0,
packFeess: 0,
totalPrices: 0,
Seatcharge: 0
Seatcharge: 0,
pointsNum: 0
})
//
@ -254,10 +255,10 @@
const changeFree = (e) => {
console.log(e)
if (e) {
orderInfoAfterRef.value.bwcclear()
uniqueIds.value = [] // id
listinfo.coupondiscountAmount = 0 //
listinfo.Productroll = 0 //
uniqueIds.value = [] // id
listinfo.coupondiscountAmount = 0 //
//
// #ifdef MP-WEIXIN
@ -319,6 +320,7 @@
//
const handleReturnData = async (data) => {
console.log(data, uniqueIds.value, '11')
//
if (data.typeOrder == 1) {
if (data.item) {
@ -342,13 +344,15 @@
};
const learcoupons = (data) => {
console.log('qing')
if (data == 'product') {
uniqueIds.value = [] // id
listinfo.coupondiscountAmount = 0 //
listinfo.Productroll = 0 //
} else {
uniqueIds.value = [] // id
// id
if (listinfo.coupondiscountAmount != 0) {
uniqueIds.value.pop()
}
listinfo.coupondiscountAmount = 0 //
}
}
@ -360,7 +364,7 @@
}
const istoricalorders = async () => {
console.log(paymentmethod.payType, '1212')
return false;
//
let APIhistoryOrderres = await APIhistoryOrder({
tableCode: listinfo.tableCode
@ -397,8 +401,6 @@
// *
const goToPay = async () => {
//
//
if (paymentmethod.payType == 'accountPay') {
if (orderVIP.value.isVip == 0) {
@ -463,7 +465,7 @@
orderAmount: listinfo.totalCost, //
roundAmount: 0, //
pointsDiscountAmount: listinfo.pointsDiscountAmount, //(tb_points_basic_setting)
pointsNum: 0, //( enable_deduction使)
pointsNum: listinfo.pointsNum, //( enable_deduction使)
remark: '', //
}
try {
@ -492,13 +494,13 @@
//
const clickPointsamount = (Pointsamount) => {
listinfo.pointsDiscountAmount = Pointsamount
listinfo.pointsDiscountAmount = Pointsamount.pointsDiscountAmount
listinfo.pointsNum = Pointsamount.pointsNum
}
const payPasswordref = ref(null)
//
const accountPayevent = async (pwd) => {
console.log('输入的密码是:', pwd);
ispws.value = false;
let checkOrderPay = {
userId: uni.cache.get('userInfo').id,
@ -516,7 +518,7 @@
orderAmount: listinfo.totalCost, //
roundAmount: 0, //
pointsDiscountAmount: listinfo.pointsDiscountAmount, //(tb_points_basic_setting)
pointsNum: 0, //( enable_deduction使)
pointsNum: listinfo.pointsNum, //( enable_deduction使)
remark: '', //
}
try {

View File

@ -236,7 +236,7 @@
</shoppingCartes>
<!-- 显示购物车栏 -->
<view class="cart-wrap" v-if="cartLists_count > 0 && !confirmordershow">
<view class="cart-wrap" v-if="cartLists_count > 0 && !confirmordershow && isBusinessTime">
<view class="cart-content">
<view class="left">
<view class="iconBox">
@ -280,7 +280,8 @@
@click="selectSpec(specType, option)"
:class="{ shop_sku_box_item_selected: selectedSpecs[specType] === option }">
{{option}}
<view class="shop_sku_box_item_tip" v-if="specifications.item.isPauseSale == 1">
<view class="shop_sku_box_item_tip"
v-if="specifications.item.result&& specifications.item.result.isPauseSale== 1 && selectedSpecs[specType] === option">
<view>售罄</view>
</view>
</view>
@ -443,7 +444,7 @@
}
}
const shopExtend = uni.cache.get('shopTable').shopExtendMap.index_bg
const shopExtend = uni.cache.get('shopTable').shopExtendMap.shopinfo_bg
//
const navScroll = ref(null)
@ -584,8 +585,12 @@
sku_id: '',
groupSnap: {},
item: {
groupSnap: []
}
groupSnap: [],
result: {
isPauseSale: 0
}
},
})
//
const isDataLoaded = ref(false);
@ -634,13 +639,12 @@
specifications.product_id = result.productId
//
specifications.item.result = result
console.log(specifications.item)
if (result.isPauseSale == 0) {
canSubmit.value = true;
// skuBtnText.value = ''
} else {
canSubmit.value = false;
}
// } catch (error) {
// canSubmit.value = false;
// }
} else {
canSubmit.value = false;
}
@ -898,7 +902,6 @@
//
const singleclick = async (item, i) => {
console.log(item, i)
//
let res = await matchingProduct(item)
websocketsendMessage({
@ -1267,6 +1270,9 @@
//
const isBusinessTime = computed(() => {
if (!shopInfo.businessTime) {
return true;
}
const currentTime = getCurrentTime();
const [startTime, endTime] = shopInfo.businessTime.split('-');
return currentTime >= startTime && currentTime <= endTime;

View File

@ -1,7 +1,7 @@
<template>
<view class="container">
<image class="topBack"
:src="shopExtend?shopExtend.value:'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/myTopBack.png'"
:src="shopExtend?shopExtend.shopExtendList[1].value:'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/myTopBack.png'"
mode="aspectFill"></image>
<view class="myContent">
<view class="my_info flex-between">
@ -105,7 +105,7 @@
// { name: "", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"},
])
const teblist = ref([])
const shopExtend = ref(null)
const shopExtend = uni.cache.get('shopId') ? uni.cache.get('shopUserInfo') : 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/shuangbackground.png'
const userInfo = reactive({})
const ShopId = ref(uni.cache.get('shopId'))