diff --git a/package1/order/orderDetail.vue b/package1/order/orderDetail.vue index f5dfaea..cb0999b 100644 --- a/package1/order/orderDetail.vue +++ b/package1/order/orderDetail.vue @@ -272,14 +272,19 @@ return { pintuan:false, menuButtonInfo: {}, + orderId:'', + orderDetail:{}, codeImg:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg' } }, components: { }, - onLoad() { - + onLoad(option) { + if (option.id) { + this.orderId = option.id + this.getOrderDetail(this.orderId) + } }, onShow() { this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() @@ -288,6 +293,23 @@ openCode(){ this.$refs.imgPopup.open() }, + getOrderDetail(id){ + let that = this + that.tui.request("/mall/order/detail/"+id, "GET", {}, false, true).then((res) => { + if (res.code == 200) { + that.orderDetail = res.result; + if(that.orderDetail.groupInfo){ + //还没有拼团成功拼团状态 0:拼团中 1:拼团成功 2:拼团失败 3:面对面团(不公开) + if(that.orderDetail.groupInfo.status != 1){ + that.pintuan = true; + } + } + } else { + that.tui.toast(res.message) + return + } + }).catch((res) => {}) + }, back() { uni.navigateBack() } diff --git a/package1/order/orderList.vue b/package1/order/orderList.vue index 0489dcd..9c671bb 100644 --- a/package1/order/orderList.vue +++ b/package1/order/orderList.vue @@ -187,6 +187,8 @@ loadStatus: 'more', tab1Checked: 'quanbu', tab2Checked: 'quanbu', + userId:uni.getStorageSync('id'), + userId:JSON.parse(uni.getStorageSync('area')).id, loadStatus: 'more', totalPages: 1, menuButtonInfo: {} @@ -212,6 +214,26 @@ checkTabs2(type) { this.tab2Checked = type }, + getOrderList(){ + this.tui.request("/mall/order/create", "POST", payload, false, false).then(res => { + uni.hideLoading(); + if (res.success && res.result) { + let orderId = res.result.id; + let totalAmount = res.result.totalAmount; + this.backendTotalAmount = totalAmount; + this.currentOrderId = orderId; + this.createdOrderInfo = res.result; + this.$refs.payPopup.open('bottom'); + } else { + uni.showToast({ + title: res.message || '下单失败', + icon: 'none' + }); + } + }).catch(err => { + uni.hideLoading(); + }); + }, back() { uni.navigateBack() }