Skip to content

Commit

Permalink
feat(all): 使用新版的路由算法
Browse files Browse the repository at this point in the history
1. 使用新版的路由算法
  • Loading branch information
Emma-Alpha committed Aug 8, 2023
1 parent 42d0500 commit a160292
Show file tree
Hide file tree
Showing 195 changed files with 19,124 additions and 8,795 deletions.
13 changes: 13 additions & 0 deletions .prettierrc.json
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
}
Binary file added 358b67c9-0793-4bfc-932d-682db246a8e3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 825fd068-a8c5-4aec-b1ea-02a92dbf95fc.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 9ea30416-711a-4a3f-86ce-9dc6039ecdee.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added b4670c51-2d98-4ff4-97c2-c2432b49f820.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added be3b2e17-f33f-4470-b9f1-0650f5275d66.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions config/history/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { createBrowserHistory } from "history";
let history = createBrowserHistory();

export default history;
12 changes: 5 additions & 7 deletions src/utils/jwt.js → config/jwt/index.ts
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);
}
}
60 changes: 60 additions & 0 deletions config/mock/index.ts
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": {}
})
}
Binary file added config/public/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/aside.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/aside.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/browsers_logo/360.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/browsers_logo/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/browsers_logo/edge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/browsers_logo/firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/browsers_logo/ie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/browsers_logo/opera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/browsers_logo/safari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/customer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/dark__before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/database.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/default_handsome.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/desc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/public/favicon.ico
Binary file not shown.
Binary file added config/public/favicon_bak.ico
Binary file not shown.
Binary file added config/public/favicon_white.ico
Binary file not shown.
File renamed without changes.
File renamed without changes
1 change: 1 addition & 0 deletions config/public/fonts/svg/cmdb.svg
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
1 change: 1 addition & 0 deletions config/public/fonts/svg/database.svg
1 change: 1 addition & 0 deletions config/public/fonts/svg/message.svg
1 change: 1 addition & 0 deletions config/public/fonts/svg/question.svg
File renamed without changes
1 change: 1 addition & 0 deletions config/public/fonts/svg/timeline.svg
Binary file added config/public/footer_dark.png
Binary file added config/public/im.png
Binary file added config/public/login_logo.png
Binary file added config/public/logo.png
Binary file added config/public/logo_foot.png
Binary file added config/public/method-draw-image.png
31 changes: 31 additions & 0 deletions config/public/method-draw-image.svg
Binary file added config/public/monitoring.png
Binary file added config/public/spark.png
17 changes: 17 additions & 0 deletions config/public/system_log.svg
Binary file added config/public/system_logo.png
Binary file added config/public/system_logo_bak.png
Binary file added config/public/system_logo_white.png
Binary file added config/public/work_logo.png
Loading

0 comments on commit a160292

Please sign in to comment.