YY 2 năm trước cách đây
mục cha
commit
bf043c51b2
3 tập tin đã thay đổi với 26 bổ sung14 xóa
  1. 2 0
      pagesHome/group/.gitignore
  2. 2 1
      pagesMy/order/all.vue
  3. 22 13
      pagesMy/order/info.vue

+ 2 - 0
pagesHome/group/.gitignore

@@ -0,0 +1,2 @@
+unpackage/
+.hbuilderx/

+ 2 - 1
pagesMy/order/all.vue

@@ -334,8 +334,9 @@
 						url: `/pagesMy/dough/info?id=${item._id}`
 					})
 				} else {
+					console.log(item);
 					uni.navigateTo({
-						url: `/pagesMy/order/info?id=${item._id}&status=${item.status}`
+						url: `/pagesMy/order/info?id=${item._id}&status=${item.status}&is_order=${item.is_order}`
 					})
 				}
 			},

+ 22 - 13
pagesMy/order/info.vue

@@ -243,6 +243,7 @@
 			return {
 				id: '',
 				status: '',
+				is_order: false,
 				info: {},
 				// 售后状态
 				statusList: [],
@@ -252,6 +253,8 @@
 			const that = this;
 			that.$set(that, `id`, e.id);
 			that.$set(that, `status`, e.status);
+			console.log(e.is_order);
+			that.$set(that, `is_order`, e.is_order);
 			await that.searchOther();
 			await that.search()
 		},
@@ -266,21 +269,27 @@
 				let res;
 				// 待付款
 				if (that.id) {
-					if (that.status == '0') {
-						res = await that.$api(`/order/${that.id}`);
+					if (that.is_order) {
+						console.log('1');
 					} else {
-						res = await that.$api(`/orderDetail/${that.id}`);
-					}
-					if (res.errcode == '0') {
-						let status = that.statusList.find(i => i.value == res.data.status)
-						if (status) res.data.zhStatus = status.label;
-						// 运费总数和商品总数相加
-						let total = 0;
-						for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
-						res.data.goods_total = total
-						that.$set(that, `info`, res.data);
-						uni.hideLoading();
+						console.log('2');
 					}
+					// if (that.is_order == true) {
+					// 	res = await that.$api(`/order/${that.id}`);
+					// } else if (that.is_order == false) {
+					// 	res = await that.$api(`/orderDetail/${that.id}`);
+					// }
+					// console.log(res);
+					// if (res.errcode == '0') {
+					// 	let status = that.statusList.find(i => i.value == res.data.status)
+					// 	if (status) res.data.zhStatus = status.label;
+					// 	// 运费总数和商品总数相加
+					// 	let total = 0;
+					// 	for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
+					// 	res.data.goods_total = total
+					// 	that.$set(that, `info`, res.data);
+					// 	uni.hideLoading();
+					// }
 				}
 			},
 			// 查询其他信息