浏览代码

Merge branch 'master' of http://git.cc-lotus.info/pointToNetwork/point-app

zs 2 年之前
父节点
当前提交
4757566085
共有 2 个文件被更改,包括 16 次插入9 次删除
  1. 3 3
      config.js
  2. 13 6
      pagesMy/order/index.vue

+ 3 - 3
config.js

@@ -49,21 +49,21 @@ export default {
 	my_orderList: [ //
 	my_orderList: [ //
 		{
 		{
 			icon: 'icon-daifukuan',
 			icon: 'icon-daifukuan',
-			title: '待付款',
+			title: '未支付',
 			status: '0',
 			status: '0',
 			type: 'order',
 			type: 'order',
 			route: "pagesMy/order/index",
 			route: "pagesMy/order/index",
 		},
 		},
 		{
 		{
 			icon: 'icon-daishouhuo',
 			icon: 'icon-daishouhuo',
-			title: '待发货',
+			title: '已支付',
 			status: '1',
 			status: '1',
 			type: 'order',
 			type: 'order',
 			route: "pagesMy/order/index",
 			route: "pagesMy/order/index",
 		},
 		},
 		{
 		{
 			icon: 'icon-daipinglun',
 			icon: 'icon-daipinglun',
-			title: '待收货',
+			title: '发货中',
 			status: '2',
 			status: '2',
 			type: 'order',
 			type: 'order',
 			route: "pagesMy/order/index",
 			route: "pagesMy/order/index",

+ 13 - 6
pagesMy/order/index.vue

@@ -181,7 +181,8 @@
 		},
 		},
 		onLoad: function(e) {
 		onLoad: function(e) {
 			const that = this;
 			const that = this;
-			that.$set(that, `status`, e.status || '0');
+			that.$set(that, `status`, e.status || '');
+			that.$set(that.tabs, `active`, e.status || '');
 			that.searchConfig();
 			that.searchConfig();
 			that.searchOther();
 			that.searchOther();
 			that.watchlogin();
 			that.watchlogin();
@@ -250,6 +251,7 @@
 					for (let val of list) {
 					for (let val of list) {
 						val.zhStatus = that.searchStatus(val.status)
 						val.zhStatus = that.searchStatus(val.status)
 					}
 					}
+					console.log(list);
 					that.$set(that, `list`, list);
 					that.$set(that, `list`, list);
 					that.$set(that, `total`, res.total)
 					that.$set(that, `total`, res.total)
 				} else {
 				} else {
@@ -315,7 +317,7 @@
 							});
 							});
 							if (arr.errcode == '0') {
 							if (arr.errcode == '0') {
 								uni.showToast({
 								uni.showToast({
-									title: '取消订单成',
+									title: '申请取消订单成',
 									icon: 'none'
 									icon: 'none'
 								})
 								})
 								that.clearPage();
 								that.clearPage();
@@ -398,15 +400,20 @@
 					content: '确定取消订单吗?',
 					content: '确定取消订单吗?',
 					success: async function(res) {
 					success: async function(res) {
 						if (res.confirm) {
 						if (res.confirm) {
-							let arr = that.$api(`/afterSale`, 'POST', {
+							let arr = await that.$api(`/afterSale`, 'POST', {
 								order_detail: e._id,
 								order_detail: e._id,
 								type: '4'
 								type: '4'
 							})
 							})
-							if (res.errcode == '0') {
-								console.log(res);
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '申请取消订单完成',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
 							} else {
 							} else {
 								uni.showToast({
 								uni.showToast({
-									title: res.errmsg,
+									title: arr.errmsg,
 									icon: 'none'
 									icon: 'none'
 								})
 								})
 							}
 							}