Jelajahi Sumber

修复登录跳转bug

Huanyi 3 hari lalu
induk
melakukan
0fe7126dd9
2 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 1 1
      pages/login/components/AccountLogin.vue
  2. 1 1
      pages/login/index.vue

+ 1 - 1
pages/login/components/AccountLogin.vue

@@ -144,7 +144,7 @@ export default {
 					uni.setStorageSync('isLogin', true);
 					uni.showToast({ title: '登录成功', icon: 'success' });
 					setTimeout(() => {
-						uni.reLaunch({ url: '/pages/order/index' });
+						this.$emit('login-success');
 					}, 800);
 				} else {
 					uni.showToast({ title: '登录失败,请检查账号密码', icon: 'none' });

+ 1 - 1
pages/login/index.vue

@@ -29,7 +29,7 @@ export default {
 	},
 	methods: {
 		onLoginSuccess() {
-			uni.reLaunch({ url: '/pages/order/index' });
+			uni.reLaunch({ url: '/pages/index/index' });
 		}
 	}
 }