瀏覽代碼

修复登录跳转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' });
 		}
 	}
 }