From 5eaae6d97edfaf27f32a134bec3097a46207f192 Mon Sep 17 00:00:00 2001 From: chenkainan Date: Thu, 19 Jun 2025 09:46:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 7 + pages/index/index.vue | 2 +- pages/login/login.vue | 13 +- pages/user/user.vue | 2 +- subPackages/homestay/order.vue | 9 +- subPackages/order/orderDetail.vue | 272 ++++++ subPackages/order/trades.vue | 1430 +++++++++++++++-------------- 7 files changed, 1053 insertions(+), 682 deletions(-) create mode 100644 subPackages/order/orderDetail.vue diff --git a/pages.json b/pages.json index 821bde7..801c5d6 100644 --- a/pages.json +++ b/pages.json @@ -199,6 +199,13 @@ "navigationBarTitleText": "全部订单" } }, + { + "path": "order/orderDetail", + "style": { + "navigationBarTitleText": "订单详情", + "navigationStyle": "custom" + } + }, { "path": "homestay/index", "style": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 997a87c..7e9c3cc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -124,7 +124,7 @@ this.gotoDetailByType(item.product_model) break; case 2: - this.gotoPath(item.tdata.url) + this.gotoPath(item.front_model.inside) break; case 3: this.gotoWebUrl(item.tdata.url) diff --git a/pages/login/login.vue b/pages/login/login.vue index 5ab064a..549692a 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -27,6 +27,7 @@ export default { data() { return { isAgreed: false, + openid: '' }; }, onLoad(options) { @@ -46,10 +47,10 @@ export default { code: e.detail.code, encryptedData: e.detail.encryptedData, iv: e.detail.iv, - token: uni.getStorageSync('token1') - }, '/api/mini_program/bindPhoneNumber') + openid: this.openid + }, '/api/uservice/user/bindPhoneNumber') .then(res => { - this.$store.commit('changeUserInfo', res.data.userinfo); + this.$store.commit('changeUserInfo', res.data); this.navigateBasedOnPath(); }) .catch(error => { @@ -107,11 +108,11 @@ export default { loginType: 3 }, '/api/uservice/user/wxLogin') .then(resTwo => { - this.$store.commit('changeUserInfo', resTwo.data.userinfo); - if (resTwo.data.userinfo.mobile) { + this.$store.commit('changeUserInfo', resTwo.data); + if (resTwo.data.isBindMobile) { this.navigateBasedOnPath(); } else { - uni.setStorageSync('token1', resTwo.data.userinfo.token); + this.openid = resTwo.data.openid this.$refs.popup.open('bottom'); } }) diff --git a/pages/user/user.vue b/pages/user/user.vue index ec2bca9..a2a76a6 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -10,7 +10,7 @@ class="headImg" v-else> {{userInfo.nickname}} - 请登录/注册 > + 请登录/注册 > 个人信息 diff --git a/subPackages/homestay/order.vue b/subPackages/homestay/order.vue index 2889b00..38bb9ba 100644 --- a/subPackages/homestay/order.vue +++ b/subPackages/homestay/order.vue @@ -309,6 +309,8 @@ } ] } + + console.log('data',data) this.Post({ method: 'POST', @@ -316,13 +318,12 @@ }, '/api/order/create').then(res => { console.log('成功'); if (res.code == 1) { - return; uni.removeStorageSync('hotelOrderInfo') this.Post({ order_id: res.data.order_id, - type: "miniprogram", - platform: 'miniprogram' - }, '/api/pay/unify').then(res => { + pay_platform: "miniprogram", + pay_method: 'abc' + }, '/api/order/pay').then(res => { if (res.data) { uni.requestPayment({ nonceStr: res.data.nonceStr, diff --git a/subPackages/order/orderDetail.vue b/subPackages/order/orderDetail.vue new file mode 100644 index 0000000..c703612 --- /dev/null +++ b/subPackages/order/orderDetail.vue @@ -0,0 +1,272 @@ + + + + + \ No newline at end of file diff --git a/subPackages/order/trades.vue b/subPackages/order/trades.vue index b66a2c0..7954d0d 100644 --- a/subPackages/order/trades.vue +++ b/subPackages/order/trades.vue @@ -1,678 +1,768 @@ \ No newline at end of file From d03c931732e154057bd8b27df9c60bbbb8056c4d Mon Sep 17 00:00:00 2001 From: chenkainan Date: Fri, 20 Jun 2025 09:13:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/CommonFunction.js | 4 +- subPackages/line/order.vue | 4 +- subPackages/line/orders.vue | 8 +- subPackages/order/orderDetail.vue | 489 +++++++++++++++++++++++++++--- subPackages/techan/order.vue | 11 +- subPackages/ticket/order.vue | 15 +- 6 files changed, 461 insertions(+), 70 deletions(-) diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index 8a7dc85..06d7dcb 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -251,7 +251,7 @@ Vue.prototype.gotoWebUrl = url => { Vue.prototype.gotoDetailByType = item => { let url = '' if(item.is_package) { - url = '/subPackages/food/detail?id=' + item.id + url = '/subPackages/food/detail?id=' + item.product_id Vue.prototype.gotoPath(url) return; @@ -267,7 +267,7 @@ Vue.prototype.gotoDetailByType = item => { url = '/subPackages/ticket/detail?id=' + (item.scene_id || item.id) break; case 'post': - url = '/subPackages/techan/detail?id=' + item.id + url = '/subPackages/techan/detail?id=' + (item.product_id || item.id) break; default: break; diff --git a/subPackages/line/order.vue b/subPackages/line/order.vue index 15c6dd7..33eb19e 100644 --- a/subPackages/line/order.vue +++ b/subPackages/line/order.vue @@ -218,11 +218,13 @@ return; } const info = this.getPriceInfo(selectMonth, day); - if (info && info.product_price && info.product_price !== null && info.stock !== 0) { + console.log(info) + if (info && info.stock !== 0) { info.selectMonth = selectMonth; info.selectDate = day; this.selectDate = info; } + this.$forceUpdate() }, // 减少数量 minus(index) { diff --git a/subPackages/line/orders.vue b/subPackages/line/orders.vue index 3918ef3..32ffc9d 100644 --- a/subPackages/line/orders.vue +++ b/subPackages/line/orders.vue @@ -254,8 +254,6 @@ data: JSON.stringify(data), method: 'POST', },'/api/order/create').then(res => { - console.log(res) - return; if(res.code == 1) { let order_id = res.data.order_id this.$store.commit("changeLineInfo", null); @@ -263,9 +261,9 @@ this.Post({ order_id: order_id, - type: "miniprogram", - platform: 'miniprogram' - }, '/api/pay/unify').then(res => { + pay_platform: "miniprogram", + pay_method: 'abc' + }, '/api/order/pay').then(res => { if (res.data) { uni.requestPayment({ nonceStr: res.data.nonceStr, diff --git a/subPackages/order/orderDetail.vue b/subPackages/order/orderDetail.vue index c703612..8534a4a 100644 --- a/subPackages/order/orderDetail.vue +++ b/subPackages/order/orderDetail.vue @@ -1,33 +1,84 @@