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