-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
195 changed files
with
19,124 additions
and
8,795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"quoteProps": "as-needed", | ||
"jsxSingleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"arrowParens": "always", | ||
"printWidth": 180 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createBrowserHistory } from "history"; | ||
let history = createBrowserHistory(); | ||
|
||
export default history; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
import Cookie from 'js-cookie'; | ||
import packageJson from '../../package.json'; | ||
const Cookie = require("js-cookie"); | ||
|
||
const accessTokenKey = 'ywkf_jwt'; | ||
|
||
export default class jwt { | ||
static key = accessTokenKey | ||
// 设定访问令牌 | ||
static setAccessToken(token) { | ||
static setAccessToken(token: { token_type: any; access_token: any; expires_at: number; }) { | ||
Cookie.set(accessTokenKey, token ? `${token.token_type} ${token.access_token}` : '', { | ||
expires: new Date(token.expires_at * 1000), | ||
...(packageJson.appConfig && packageJson.appConfig.cookieConfig ? packageJson.appConfig.cookieConfig : {}) | ||
expires: new Date(token.expires_at * 1000) | ||
}); | ||
} | ||
|
||
// 获取访问令牌 | ||
static getAccessToken() { | ||
static getAccessToken(accessTokenKey: string) { | ||
return Cookie.get(accessTokenKey); | ||
} | ||
|
||
// 清空访问令牌 | ||
static clearAccessToken() { | ||
static clearAccessToken(accessTokenKey: string) { | ||
Cookie.remove(accessTokenKey); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
const Mock = require("mockjs"); | ||
|
||
export default { | ||
'GET /api/admin/user/list': Mock.mock({ | ||
'total|1-100': 10, | ||
'dataSource|1-100': [ | ||
{ | ||
cname: "@cname", | ||
email: "@email", | ||
phone: "@guid", | ||
role: "@character", | ||
}, | ||
] | ||
}), | ||
|
||
'GET /api/admin/userGroup/list': Mock.mock({ | ||
'total|1-100': 10, | ||
'dataSource|1-100': [ | ||
{ | ||
cname: "@cname", | ||
desc: "@character", | ||
ctime: "@datetime('yyyy-MM-dd HH:mm:ss')", | ||
'count|1-100': 1, | ||
powerGroup: "@string(7, 10)", | ||
"id|1-10000": 1, | ||
}, | ||
] | ||
}), | ||
|
||
'GET /api/admin/userGroup/list/filters': Mock.mock({ | ||
'powerGroup': [ | ||
{ value: "1", text: "团队权限组A" }, | ||
{ value: "2", text: "团队权限组B" }, | ||
{ value: "3", text: "团队权限组C" }, | ||
] | ||
}), | ||
|
||
'PUT /api/admin/user/add/member': Mock.mock({ | ||
"form": { | ||
"userGroup": { | ||
"value": [ | ||
{ "value": 1, "label": "团队负责人" }, | ||
{ "value": 2, "label": "团队管理员" }, | ||
{ "value": 3, "label": "团队普通成员" }, | ||
], | ||
} | ||
}, | ||
"row": { | ||
"userGroup": 1 | ||
} | ||
}), | ||
|
||
'POST /api/admin/user/add/member': Mock.mock({ | ||
"data": {} | ||
}), | ||
|
||
'POST /api/admin/userGroup/add/member': Mock.mock({ | ||
"data": {} | ||
}) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.