소스 검색

修复登录跳转bug

Huanyi 4 일 전
부모
커밋
0fe7126dd9
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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' });
 		}
 	}
 }