更换正式环境,测试修改

This commit is contained in:
GaoHao
2025-03-25 21:49:33 +08:00
parent f01bc839f7
commit 7fe5d028e4
71 changed files with 930 additions and 2016 deletions

View File

@@ -85,7 +85,6 @@
})
onLoad((opt) => {
Object.assign(options, opt)
console.log("opt===",options);
getShopInfoData()
})
onShow(() => {
@@ -109,24 +108,27 @@
*/
async function getOrderDetail () {
let res = await getHistoryOrder({orderId: options.id})
console.log("订单详情===",res)
// console.log("订单详情===",res)
if(res.userId){
shopUserDetail({userId:res.userId}).then(res=>{
if(res){
user.value = res
}
})
let resUser = await shopUserDetail({userId:res.userId})
user.value = resUser
}
orderDetail.seatFee = {
seatNum: res.seatNum,
seatAmount: res.seatAmount,
}
orderDetail.goodsList = Object.entries(res.detailMap).map(([key, value]) => ({
info: value,
placeNum: key
}))
orderDetail.goodsList.map(item=>{
item.info.map(item=>{
item.unitPrice = uni.$utils.isGoodsPrice(item,user.value)
})
})
orderDetail.info = res
console.log("orderDetail===",orderDetail);
}
function onSeatFeeTuicai(seatFee) {
@@ -195,7 +197,9 @@
if (res.confirm) {
try {
const res = await printOrder({
id: orderDetail.info.id
id: orderDetail.info.id,
type: orderDetail.info.status == 'unpaid' ? 1 : 0
})
infoBox.showToast('已发送打印请求')
} catch (e) {
@@ -213,6 +217,7 @@
return
}
if (Array.isArray(goods)) {
go.to('PAGES_ORDER_TUIKUAN', {
orderInfo: JSON.stringify(orderDetail.info),
goodsList:JSON.stringify(goods)
@@ -221,8 +226,9 @@
} else {
goods.number = 0
goods.skuName = goods.skuName || ''
goods.priceAmount = goods.priceAmount ? goods.priceAmount : (goods.num*goods.unitPrice).toFixed(2)
goods.unitPrice = goods.unitPrice
goods.priceAmount = goods.priceAmount ? goods.priceAmount : (goods.num*uni.$utils.isGoodsPrice(goods,user.value)).toFixed(2)
console.log(goods)
goods.unitPrice = uni.$utils.isGoodsPrice(goods,user.value)
goods.userCouponId = goods.userCouponId ? goods.userCouponId:''
go.to('PAGES_ORDER_TUIKUAN', {
orderInfo: JSON.stringify(orderDetail.info),