Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Commit 23dbb3b

Browse files
committed
url access
1 parent 2ba4f7f commit 23dbb3b

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

src/routes/login/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ import Layout from '../../components/Layout';
33
import LogoutContainer from '../../containers/LogoutContainer';
44

55
const login = {
6-
76
path: '/login',
87

9-
async action() {
8+
async action({ store }) {
9+
if (process.env.BROWSER) {
10+
11+
}
1012
const LoginContainer = await require.ensure([], require => require('../../containers/LoginContainer').default, 'login');
1113
return {
1214
title: '登录',
1315
chunk: 'login',
1416
component: <Layout><LoginContainer /></Layout>,
1517
};
1618
},
19+
1720
};
1821

1922
const logout = {

src/routes/register/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ export default {
55

66
path: '/register',
77

8-
async action() {
8+
async action({store}) {
9+
10+
if (process.env.BROWSER) {
11+
12+
}
13+
914
const RegisterContainer = await require.ensure([], require => require('../../containers/RegisterContainer').default, 'register');
1015
return {
1116
title: '注册',

src/routes/users/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ const users = {
66

77
path: '/users',
88

9-
async action() {
9+
async action({store}) {
10+
if (process.env.BROWSER) {
11+
12+
}
1013
const ChangePasswordContainer = await require.ensure([], require => require('../../containers/ChangePasswordContainer').default, 'changePassword');
1114
return {
1215
title: '修改密码 - 个人设置',
@@ -21,7 +24,10 @@ const settings = {
2124

2225
path: '/users/settings',
2326

24-
async action() {
27+
async action({store}) {
28+
if (process.env.BROWSER) {
29+
30+
}
2531
const ChangePasswordContainer = await require.ensure([], require => require('../../containers/ChangePasswordContainer').default, 'changePassword');
2632
return {
2733
title: '修改密码 - 个人设置',

0 commit comments

Comments
 (0)