+
+
+ label="mail"
+ name="username"
+ rules={[{ required: true, message: 'Please input your mail!' }]}
+ >
+
+
+
+
+ label="Password"
+ name="password"
+ rules={[{ required: true, message: 'Please input your password!' }]}
+ >
+
+
+
+ {/*
+ name="remember"
+ valuePropName="checked"
+ wrapperCol={{ offset: 8, span: 16 }}
+ >
+ Remember me
+ */}
+
+
+
+
+
+
+
+ );
+};
+
+export default connect(({ loginModel, loading }) => ({ loginModel, loading }))(View);
diff --git a/client/src/pages/login/model.ts b/client/src/pages/login/model.ts
new file mode 100644
index 000000000..05c1428ed
--- /dev/null
+++ b/client/src/pages/login/model.ts
@@ -0,0 +1,55 @@
+import { message } from 'antd';
+import store from '@/utils/persistStore';
+import { addParam } from '@/utils';
+import loginService from '@/services/loginService';
+
+const Model = {
+ namespace: 'loginModel',
+ state: {
+ list: [],
+ info: {},
+ visible: false,
+ pagination: {},
+ campaignInfo: {}
+ },
+ subscriptions: {
+ setup({ dispatch, history }) {
+ history.listen(location => { });
+ }
+ },
+ effects: {
+ *login({ payload = {} }, { call, put }) {
+ console.log(111)
+ const { code, data, errorMessage } = yield call(loginService.login, payload);
+ setTimeout(() => {
+ window.location.href = '/';
+ }, 300);
+ // if (code === 0) {
+ // message.success('登录成功!');
+ // const name = data.name;
+ // const token = data.token;
+ // const role = data.role;
+ // const title = data.title;
+ // const userInfo = {
+ // role: data.role,
+ // title: data.title,
+ // name: data.name || data.Name,
+ // };
+ // store.token = token;
+ // store.userInfo = userInfo;
+ // setTimeout(() => {
+ // window.location.href = '/file';
+ // }, 300);
+ // }
+ }
+ },
+ reducers: {
+ updateState(state, { payload }) {
+ return {
+ ...state,
+ ...payload
+ };
+ }
+ }
+};
+export default Model;
diff --git a/client/src/pages/setting/index.tsx b/client/src/pages/setting/index.tsx
new file mode 100644
index 000000000..45b7c65f0
--- /dev/null
+++ b/client/src/pages/setting/index.tsx
@@ -0,0 +1,20 @@
+
+import i18n from 'i18next';
+import { Button } from 'antd'
+import { useTranslation, Trans } from 'react-i18next'
+
+function Index() {
+ const changeLang = (val: string) => { // 改变状态里的 语言 进行切换
+ i18n.changeLanguage(val);
+ }
+ const { t } = useTranslation()
+ return (
+