tianyi 3 weeks ago
parent
commit
17f077a19d
  1. 26
      package1/order/orderDetail.vue
  2. 22
      package1/order/orderList.vue

26
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()
}

22
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()
}

Loading…
Cancel
Save