提交代码

This commit is contained in:
duan
2024-06-12 11:10:59 +08:00
parent 02cbc93a14
commit 06a9c4f2de
8 changed files with 46 additions and 17 deletions

View File

@@ -134,7 +134,7 @@
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100vh;
background-color: #FFFFFF; background-color: #FFFFFF;
} }

View File

@@ -16,12 +16,12 @@ const baseUrl = debug ? proxyApi : "https://wxcashiertest.sxczgkj.cn/cashierServ
const baseUrlwws = 'ws://cashier.sxczgkj.cn/cashierService' const baseUrlwws = 'ws://cashier.sxczgkj.cn/cashierService'
// #endif // #endif
// #ifdef APP || MP-WEIXIN // #ifdef APP || MP-WEIXIN
// const baseUrl = 'https://cashier.sxczgkj.cn/cashierService'// 线上 const baseUrl = 'https://cashier.sxczgkj.cn/cashierService'// 线上
// const baseUrlwws = 'wss://cashier.sxczgkj.cn/cashierService' // 线上 const baseUrlwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
// const baseUrl = 'http://192.168.2.42:9888/cashierService'// 测试-w // const baseUrl = 'http://192.168.2.42:9888/cashierService'// 测试-w
// const baseUrlwws ='wss://192.168.2.42:9999/netty' // 测试-w // const baseUrlwws ='wss://192.168.2.42:9999/netty' // 测试-w
const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试 // const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试
const baseUrlwws ='wss://wxcashiertest.sxczgkj.cn/netty' // 测试 // const baseUrlwws ='wss://wxcashiertest.sxczgkj.cn/netty' // 测试
// #endif // #endif
// import VConsole from "./vConsole.js" // import VConsole from "./vConsole.js"

View File

@@ -510,7 +510,7 @@
if (item.isChild) { if (item.isChild) {
this.form.type = '' //先清空后赋值 this.form.type = '' //先清空后赋值
setTimeout(()=> { setTimeout(() => {
this.showproductlist = true this.showproductlist = true
}, 500); }, 500);
} else { } else {

View File

@@ -289,7 +289,6 @@
uni.reLaunch({ uni.reLaunch({
url: '/pages/order_food/order_food' url: '/pages/order_food/order_food'
}); });
sss
} else { } else {
// uni.cache.set('shopUser', res.data.shopUser); // uni.cache.set('shopUser', res.data.shopUser);
uni.pro.switchTab('index/index') uni.pro.switchTab('index/index')

View File

@@ -35,6 +35,7 @@
} }
}, },
onLoad(e) { onLoad(e) {
console.log(e, '调试2') console.log(e, '调试2')
this.shopId = e.shopId this.shopId = e.shopId
if (e.type == 'list') { //从列表进来的 if (e.type == 'list') { //从列表进来的

View File

@@ -127,6 +127,10 @@
console.log(e) console.log(e)
this.orderId = e.orderId this.orderId = e.orderId
this.orderorderInfo() this.orderorderInfo()
}, },
onShow() { onShow() {
if (this.orderId) { if (this.orderId) {

View File

@@ -230,9 +230,9 @@
}, },
onUnload() { onUnload() {
uni.switchTab({ // uni.switchTab({
url: '/pages/order/order' // url: '/pages/order/order'
}) // })
uni.$off('getMessage') uni.$off('getMessage')
this.ispws = false this.ispws = false
}, },
@@ -396,6 +396,22 @@
}, },
showpopupclickdd() { showpopupclickdd() {
console.log('调试1')
// setTimeout(() => {
uni.requestSubscribeMessage({
tmplIds: ['z0fUG7-jhSfYCrw6poOvSRzh4_hgnPkm_5C7E5s5bCQ'],
success(){
console.log(1)
},
fail(){
console.log(2)
},
complete(){
console.log(3)
},
})
// },1500)
return
// radiovalue1为1是微信支付 // radiovalue1为1是微信支付
if (this.radiovalue1 == 1) { if (this.radiovalue1 == 1) {
this.showpopupclickdds() //微信支付 this.showpopupclickdds() //微信支付
@@ -441,14 +457,17 @@
uni.showToast({ uni.showToast({
title: "支付成功" title: "支付成功"
}) })
let _this = this
uni.cache.set('shopUser', '') //删除shopUser uni.cache.set('shopUser', '') //删除shopUser
this.paymodfiyOrderInfo() this.paymodfiyOrderInfo()
setTimeout(res => {
setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: '/pages/order/order_detail?orderId=' + this url: '/pages/order/order_detail?orderId=' + _this
.listinfo.id, .listinfo.id
}); });
}, 500) }, 700)
}, },
}); });
// #endif // #endif
@@ -469,9 +488,10 @@
// ->4 不是会员, // ->4 不是会员,
if (res.data == 1) { if (res.data == 1) {
this.showToastUppop('支付成功') this.showToastUppop('支付成功')
setTimeout(res => { let _this = this
setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: '/pages/order/order_detail?orderId=' + this url: '/pages/order/order_detail?orderId=' + _this
.listinfo.id .listinfo.id
}); });
}, 700) }, 700)

View File

@@ -339,6 +339,7 @@
return false; return false;
} }
} else { } else {
wx.hideLoading()
switch (msg.type) { switch (msg.type) {
case 'sku': // sku 数量 case 'sku': // sku 数量
this.$set(this, 'amountcartNumber', msg.amount) this.$set(this, 'amountcartNumber', msg.amount)
@@ -406,6 +407,10 @@
} }
}, },
handlemessage() { handlemessage() {
wx.showLoading({
title: '',
})
this.socketTicket ? this.socketTicket.Close() : null //调用前先判断是否有socket正在进行 先关闭后链接 this.socketTicket ? this.socketTicket.Close() : null //调用前先判断是否有socket正在进行 先关闭后链接
this.socketTicket = new webSocketUtils(`${uni.conf.baseUrlwws}`, 5000, { this.socketTicket = new webSocketUtils(`${uni.conf.baseUrlwws}`, 5000, {
tableId: uni.cache.get('tableCode'), tableId: uni.cache.get('tableCode'),