Ver código fonte

订单链接跳转

fuwei 5 anos atrás
pai
commit
43f1f58380

+ 7 - 6
ghs/src/admin/billing/result.vue

@@ -41,12 +41,13 @@ export default {
 			});
 			});
 		},
 		},
 		gotoOrderList() {
 		gotoOrderList() {
-			uni.navigateTo({
-				url: "/admin/home/order",
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
+			this.$util.pageTo({
+					url: "/admin/home/order",
+					type: 4,
+					query: {
+						tabIndex: 0
+					},
+				});
 		}
 		}
 	}
 	}
 };
 };

+ 16 - 12
ghs/src/admin/home/order.vue

@@ -188,20 +188,27 @@ export default {
 		}
 		}
 	},
 	},
 	computed: {
 	computed: {
-		// ...mapGetters({ categoryData: 'getCategory' }),
-		// ...mapGetters({ usageData: 'getUsage' })
 	},
 	},
 	mounted() {
 	mounted() {
+		console.log(1111,this.option.tabIndex)
 		// getCategory()
 		// getCategory()
 		// getUsage()
 		// getUsage()
 	},
 	},
-	onLoad: function() {},
+	onLoad(option) {
+		let tabIndex = uni.getStorageSync("switchTabQuery") || null;
+		if (tabIndex) {
+		  uni.removeStorageSync("switchTabQuery");
+		  this.tabIndex = parseInt(tabIndex.tabIndex);
+		  this._list();
+		}
+	},
 	onShow() {
 	onShow() {
-		// let tabIndex = uni.getStorageSync("switchTabQuery") || null;
-		// if (tabIndex) {
-		//   uni.removeStorageSync("switchTabQuery");
-		//   this.tabIndex = parseInt(tabIndex.tabIndex);
-		// }
+		let tabIndex = uni.getStorageSync("switchTabQuery") || null;
+		if (tabIndex) {
+		  uni.removeStorageSync("switchTabQuery");
+		  this.tabIndex = parseInt(tabIndex.tabIndex);
+		  this._list();
+		}
 	},
 	},
 	methods: {
 	methods: {
 		statusFormat(status) {
 		statusFormat(status) {
@@ -249,9 +256,6 @@ export default {
 			console.log(val);
 			console.log(val);
 		},
 		},
 		searchFn() {},
 		searchFn() {},
-		init() {
-			this._list();
-		},
 		_list() {
 		_list() {
 			return getListB({
 			return getListB({
 				status: this.tabs[this.tabIndex].id,
 				status: this.tabs[this.tabIndex].id,
@@ -291,7 +295,7 @@ export default {
 				// this.$set(this.list.data[this.operateIndex], "status", 5);
 				// this.$set(this.list.data[this.operateIndex], "status", 5);
 				// this.$set(this.list.data[this.operateIndex], "sendType", 1);
 				// this.$set(this.list.data[this.operateIndex], "sendType", 1);
 				freeShipping({ id: this.operateData.id }).then(res => {
 				freeShipping({ id: this.operateData.id }).then(res => {
-					this.init();
+					this._list();
 					this.$msg("操作成功!");
 					this.$msg("操作成功!");
 					this.modalCancel();
 					this.modalCancel();
 				});
 				});

+ 0 - 6
ghs/src/admin/home/workbench.vue

@@ -339,9 +339,6 @@ export default {
 	computed: {
 	computed: {
 		...mapGetters({ userInfo: "getUser" }),
 		...mapGetters({ userInfo: "getUser" }),
 		...mapGetters({ loginInfo: "getLoginInfo" })
 		...mapGetters({ loginInfo: "getLoginInfo" })
-		// avatarImg() {
-		//   return this.$util.isEmpty(this.loginInfo) ? "" : this.loginInfo.avatar;
-		// }
 	},
 	},
 	onLoad(option) {},
 	onLoad(option) {},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -399,9 +396,6 @@ export default {
 				type: 2
 				type: 2
 			});
 			});
 		}
 		}
-		// goToItem(item) {
-		//   this.$util.pageTo(item);
-		// }
 	}
 	}
 };
 };
 </script>
 </script>