kn-cli 1.0.56 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -1
- package/templates/template_oa/.DS_Store +0 -0
- package/templates/template_oa/build.sh +2 -0
- package/templates/template_oa/cli.config.js +24 -0
- package/templates/template_oa/dev.sh +89 -0
- package/templates/template_oa/frontend_build.sh +83 -0
- package/templates/template_oa/init/prepare-commit-msg +5 -0
- package/templates/template_oa/init.sh +33 -0
- package/templates/template_oa/jsconfig.json +10 -0
- package/templates/template_oa/package-lock.json +1925 -0
- package/templates/template_oa/package.json +24 -0
- package/templates/template_oa/public/.DS_Store +0 -0
- package/templates/template_oa/public/404.html +26 -0
- package/templates/template_oa/public/favicon.ico +0 -0
- package/templates/template_oa/public/favicon.png +0 -0
- package/templates/template_oa/public/index.html +43 -0
- package/templates/template_oa/public/pluginjs/.DS_Store +0 -0
- package/templates/template_oa/public/src/.DS_Store +0 -0
- package/templates/template_oa/public/src/_antd.less +237 -0
- package/templates/template_oa/public/src/_reset.less +131 -0
- package/templates/template_oa/public/src/_variable.less +84 -0
- package/templates/template_oa/public/src/assets/.DS_Store +0 -0
- package/templates/template_oa/public/src/assets/iconfont/.DS_Store +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.eot +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.less +57 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.svg +36 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.ttf +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.woff +0 -0
- package/templates/template_oa/public/src/assets/iconfont/iconfont.woff2 +0 -0
- package/templates/template_oa/public/src/assets/images/.DS_Store +0 -0
- package/templates/template_oa/public/src/assets/images/avatar.png +0 -0
- package/templates/template_oa/public/src/assets/images/loading.svg +40 -0
- package/templates/template_oa/public/src/components/.DS_Store +0 -0
- package/templates/template_oa/public/src/components/Alert/index.jsx +0 -0
- package/templates/template_oa/public/src/components/Alert/index.less +0 -0
- package/templates/template_oa/public/src/components/Auth/index.jsx +44 -0
- package/templates/template_oa/public/src/components/Footer/index.jsx +17 -0
- package/templates/template_oa/public/src/components/Footer/index.less +28 -0
- package/templates/template_oa/public/src/components/IFrame/index.jsx +37 -0
- package/templates/template_oa/public/src/components/IFrame/index.less +4 -0
- package/templates/template_oa/public/src/components/IconFont/index.jsx +10 -0
- package/templates/template_oa/public/src/components/IconFont/index.less +5 -0
- package/templates/template_oa/public/src/components/Layout/.DS_Store +0 -0
- package/templates/template_oa/public/src/components/Layout/Basic/index.jsx +31 -0
- package/templates/template_oa/public/src/components/Layout/Basic/index.less +74 -0
- package/templates/template_oa/public/src/components/Layout/CenterBody/index.jsx +15 -0
- package/templates/template_oa/public/src/components/Layout/CenterBody/index.less +36 -0
- package/templates/template_oa/public/src/components/Layout/FormBlock/index.jsx +23 -0
- package/templates/template_oa/public/src/components/Layout/FormBlock/index.less +34 -0
- package/templates/template_oa/public/src/components/Layout/Provider/index.jsx +12 -0
- package/templates/template_oa/public/src/components/Layout/index.jsx +26 -0
- package/templates/template_oa/public/src/components/Layout/index.less +8 -0
- package/templates/template_oa/public/src/components/Link/index.jsx +24 -0
- package/templates/template_oa/public/src/components/Link/index.less +11 -0
- package/templates/template_oa/public/src/components/Loading/index.jsx +14 -0
- package/templates/template_oa/public/src/components/Loading/index.less +85 -0
- package/templates/template_oa/public/src/components/Nav/index.jsx +121 -0
- package/templates/template_oa/public/src/components/Nav/index.less +38 -0
- package/templates/template_oa/public/src/components/Page/.DS_Store +0 -0
- package/templates/template_oa/public/src/components/Page/PageLoading/index.jsx +30 -0
- package/templates/template_oa/public/src/components/Page/PageLoading/index.less +29 -0
- package/templates/template_oa/public/src/components/Popup/index.jsx +22 -0
- package/templates/template_oa/public/src/components/Popup/index.less +18 -0
- package/templates/template_oa/public/src/components/Toast/index.jsx +60 -0
- package/templates/template_oa/public/src/components/Toast/index.less +43 -0
- package/templates/template_oa/public/src/components/mask/index.jsx +47 -0
- package/templates/template_oa/public/src/components/mask/index.less +32 -0
- package/templates/template_oa/public/src/dictionary/index.js +39 -0
- package/templates/template_oa/public/src/hooks/.DS_Store +0 -0
- package/templates/template_oa/public/src/hooks/index.jsx +20 -0
- package/templates/template_oa/public/src/hooks/useDelay.jsx +29 -0
- package/templates/template_oa/public/src/hooks/useImageLoader.jsx +27 -0
- package/templates/template_oa/public/src/hooks/useLoading.jsx +42 -0
- package/templates/template_oa/public/src/hooks/useLogin.jsx +33 -0
- package/templates/template_oa/public/src/hooks/usePreload.jsx +66 -0
- package/templates/template_oa/public/src/hooks/useScrollTop.jsx +32 -0
- package/templates/template_oa/public/src/hooks/useSearch.jsx +137 -0
- package/templates/template_oa/public/src/hooks/useUpdate.jsx +11 -0
- package/templates/template_oa/public/src/index.jsx +50 -0
- package/templates/template_oa/public/src/mock/auth.js +91 -0
- package/templates/template_oa/public/src/mock/index.js +63 -0
- package/templates/template_oa/public/src/mock/user.js +70 -0
- package/templates/template_oa/public/src/mock/utils.js +33 -0
- package/templates/template_oa/public/src/pages/.DS_Store +0 -0
- package/templates/template_oa/public/src/pages/components/pageTitle/index.jsx +13 -0
- package/templates/template_oa/public/src/pages/components/pageTitle/index.less +20 -0
- package/templates/template_oa/public/src/pages/login/index.jsx +27 -0
- package/templates/template_oa/public/src/pages/login/index.less +44 -0
- package/templates/template_oa/public/src/pages/video/index.jsx +91 -0
- package/templates/template_oa/public/src/pages/video/index.less +12 -0
- package/templates/template_oa/public/src/provider/app.jsx +119 -0
- package/templates/template_oa/public/src/provider/menu.jsx +20 -0
- package/templates/template_oa/public/src/route.jsx +43 -0
- package/templates/template_oa/public/src/services/.DS_Store +0 -0
- package/templates/template_oa/public/src/services/auth.js +121 -0
- package/templates/template_oa/public/src/services/index.js +181 -0
- package/templates/template_oa/public/src/services/user.js +26 -0
- package/templates/template_oa/public/src/services/video.js +33 -0
- package/templates/template_oa/public/src/utils/.DS_Store +0 -0
- package/templates/template_oa/public/src/utils/index.js +66 -0
- package/templates/template_oa/public/static/.DS_Store +0 -0
- package/templates/template_oa/public/static/about.html +1 -0
- package/templates/template_oa/public/static/kssoLogin.html +22 -0
- package/templates/template_oa/readme.md +60 -0
- package/templates/template_oa/release/.DS_Store +0 -0
- package/templates/template_oa/report.sh +68 -0
- package/templates/template_oa/tools/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/dist/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/gulpfile.js +70 -0
- package/templates/template_oa/tools/iconfont/package.json +20 -0
- package/templates/template_oa/tools/iconfont/run.sh +39 -0
- package/templates/template_oa/tools/iconfont/svg/.DS_Store +0 -0
- package/templates/template_oa/tools/iconfont/svg/arrowBack.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/check.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/close.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/down.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/image.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/play.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/refresh.svg +1 -0
- package/templates/template_oa/tools/iconfont/svg/warn.svg +1 -0
- package/templates/template_oa/tools/iconfont/templates/_icons.css +26 -0
- package/templates/template_oa/tools/iconfont/templates/_icons.less +29 -0
- package/templates/template_oa/tools/iconfont/templates/index.html +56 -0
- package/templates/template_oa/tools/tinypng/.DS_Store +0 -0
- package/templates/template_oa/tools/tinypng/img/.DS_Store +0 -0
- package/templates/template_oa/tools/tinypng/package.json +11 -0
- package/templates/template_oa/tools/tinypng/run.sh +15 -0
- package/templates/template_oa/versionPublish.sh +27 -0
- package/templates/template_oa/webpack.api.js +62 -0
- package/templates/template_offcial/.gitignore +6 -0
- package/templates/template_offcial/build.sh +2 -0
- package/templates/template_offcial/cli.config.js +25 -0
- package/templates/template_offcial/dev.sh +89 -0
- package/templates/template_offcial/frontend_build.sh +83 -0
- package/templates/template_offcial/init/prepare-commit-msg +5 -0
- package/templates/template_offcial/init.sh +33 -0
- package/templates/template_offcial/jsconfig.json +10 -0
- package/templates/template_offcial/package.json +23 -0
- package/templates/template_offcial/public/404.html +26 -0
- package/templates/template_offcial/public/favicon.ico +0 -0
- package/templates/template_offcial/public/favicon.png +0 -0
- package/templates/template_offcial/public/index.html +52 -0
- package/templates/template_offcial/public/src/_antd.less +4 -0
- package/templates/template_offcial/public/src/_reset.less +130 -0
- package/templates/template_offcial/public/src/_variable.less +78 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.eot +0 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.less +57 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.svg +36 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.ttf +0 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.woff +0 -0
- package/templates/template_offcial/public/src/assets/iconfont/iconfont.woff2 +0 -0
- package/templates/template_offcial/public/src/assets/images/avatar.png +0 -0
- package/templates/template_offcial/public/src/assets/images/loading.svg +40 -0
- package/templates/template_offcial/public/src/components/Alert/index.jsx +0 -0
- package/templates/template_offcial/public/src/components/Alert/index.less +0 -0
- package/templates/template_offcial/public/src/components/Footer/index.jsx +32 -0
- package/templates/template_offcial/public/src/components/Footer/index.less +8 -0
- package/templates/template_offcial/public/src/components/Header/index.jsx +68 -0
- package/templates/template_offcial/public/src/components/Header/index.less +76 -0
- package/templates/template_offcial/public/src/components/IconFont/index.jsx +10 -0
- package/templates/template_offcial/public/src/components/IconFont/index.less +5 -0
- package/templates/template_offcial/public/src/components/Layout/Provider/index.jsx +12 -0
- package/templates/template_offcial/public/src/components/Layout/index.jsx +20 -0
- package/templates/template_offcial/public/src/components/Layout/index.less +20 -0
- package/templates/template_offcial/public/src/components/Link/index.jsx +24 -0
- package/templates/template_offcial/public/src/components/Link/index.less +11 -0
- package/templates/template_offcial/public/src/components/Page/PageLoading/index.jsx +30 -0
- package/templates/template_offcial/public/src/components/Page/PageLoading/index.less +29 -0
- package/templates/template_offcial/public/src/components/Popup/index.jsx +22 -0
- package/templates/template_offcial/public/src/components/Popup/index.less +18 -0
- package/templates/template_offcial/public/src/components/Toast/index.jsx +60 -0
- package/templates/template_offcial/public/src/components/Toast/index.less +43 -0
- package/templates/template_offcial/public/src/hooks/index.jsx +12 -0
- package/templates/template_offcial/public/src/hooks/useImageLoader.jsx +27 -0
- package/templates/template_offcial/public/src/hooks/useInToView.jsx +55 -0
- package/templates/template_offcial/public/src/hooks/usePreload.jsx +66 -0
- package/templates/template_offcial/public/src/hooks/useScroll.jsx +66 -0
- package/templates/template_offcial/public/src/index.jsx +50 -0
- package/templates/template_offcial/public/src/mock/index.js +63 -0
- package/templates/template_offcial/public/src/mock/user.js +70 -0
- package/templates/template_offcial/public/src/mock/utils.js +33 -0
- package/templates/template_offcial/public/src/pages/index.jsx +23 -0
- package/templates/template_offcial/public/src/pages/index.less +0 -0
- package/templates/template_offcial/public/src/pages/mobile/index.jsx +11 -0
- package/templates/template_offcial/public/src/pages/mobile/index.less +0 -0
- package/templates/template_offcial/public/src/pages/pc/index.jsx +45 -0
- package/templates/template_offcial/public/src/pages/pc/index.less +42 -0
- package/templates/template_offcial/public/src/provider/app.jsx +26 -0
- package/templates/template_offcial/public/src/route.jsx +26 -0
- package/templates/template_offcial/public/src/services/index.js +182 -0
- package/templates/template_offcial/public/src/services/user.js +26 -0
- package/templates/template_offcial/public/src/utils/index.js +109 -0
- package/templates/template_offcial/public/static/about.html +1 -0
- package/templates/template_offcial/readme.md +59 -0
- package/templates/template_offcial/report.sh +68 -0
- package/templates/template_offcial/tools/iconfont/gulpfile.js +70 -0
- package/templates/template_offcial/tools/iconfont/package.json +20 -0
- package/templates/template_offcial/tools/iconfont/run.sh +39 -0
- package/templates/template_offcial/tools/iconfont/svg/arrowBack.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/check.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/close.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/down.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/image.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/play.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/refresh.svg +1 -0
- package/templates/template_offcial/tools/iconfont/svg/warn.svg +1 -0
- package/templates/template_offcial/tools/iconfont/templates/_icons.css +26 -0
- package/templates/template_offcial/tools/iconfont/templates/_icons.less +29 -0
- package/templates/template_offcial/tools/iconfont/templates/index.html +56 -0
- package/templates/template_offcial/tools/tinypng/package.json +11 -0
- package/templates/template_offcial/tools/tinypng/run.sh +15 -0
- package/templates/template_offcial/versionPublish.sh +27 -0
- package/templates/template_offcial/webpack.api.js +36 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import Axios from 'axios';
|
|
2
|
+
import qs from 'qs';
|
|
3
|
+
import { message } from 'antd';
|
|
4
|
+
const axios = Axios.create();
|
|
5
|
+
console.log(`========API_ROOT:${API_HOST}========`);
|
|
6
|
+
|
|
7
|
+
export const API_ROOT = API_HOST;
|
|
8
|
+
|
|
9
|
+
const tokenMode='header';//header,cookie
|
|
10
|
+
const tokenName='Authorization';
|
|
11
|
+
|
|
12
|
+
let Modal = {
|
|
13
|
+
error: (options) => {
|
|
14
|
+
message.error(options.content);
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
let jwt = '';
|
|
19
|
+
let logout = ()=>{}
|
|
20
|
+
|
|
21
|
+
export const setJwt = (value) => {
|
|
22
|
+
if(value==''){
|
|
23
|
+
localStorage.removeItem('jwt');
|
|
24
|
+
jwt='';
|
|
25
|
+
return;
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
localStorage.setItem('jwt', value);
|
|
29
|
+
jwt = value;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
window.setJwt=setJwt;
|
|
33
|
+
export const setLogout=(fn)=>{
|
|
34
|
+
logout=fn;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
axios.interceptors.request.use(function (config) {
|
|
39
|
+
const header = { 'X-Requested-With': 'XMLHttpRequest' };
|
|
40
|
+
if(tokenMode=='header'){
|
|
41
|
+
if (jwt) {
|
|
42
|
+
header[tokenName] = jwt;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (config.headers) {
|
|
46
|
+
config.headers = { ...config.headers, ...header };
|
|
47
|
+
} else {
|
|
48
|
+
config.headers = header;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// 在发送请求之前做些什么
|
|
52
|
+
return config;
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 统一拦截异常消息弹屏报错处理
|
|
57
|
+
* 如果希望某条消息不拦截,可以再发送消息时带上 noInterceptors:true|'all'
|
|
58
|
+
*/
|
|
59
|
+
axios.interceptors.response.use(
|
|
60
|
+
function (response) {
|
|
61
|
+
// setJwt(response?.headers['set-token'] || jwt);
|
|
62
|
+
if (response.config.noInterceptors) {
|
|
63
|
+
return response;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (Number(response.data.code) !== 0) {
|
|
67
|
+
console.log(`${JSON.stringify(response.data)}`);
|
|
68
|
+
Modal.error({ title: `注意`, content: `${response.data.message}(${response.data.code})` });
|
|
69
|
+
}
|
|
70
|
+
return response;
|
|
71
|
+
},
|
|
72
|
+
function (error) {
|
|
73
|
+
if (error.response.config.noInterceptors === 'all') {
|
|
74
|
+
return Promise.reject(error.response);
|
|
75
|
+
}
|
|
76
|
+
// jwt失效
|
|
77
|
+
if (error.response.status === 401) {
|
|
78
|
+
if(logout)logout();
|
|
79
|
+
return;
|
|
80
|
+
} else if (error.response.status === 403) {
|
|
81
|
+
Modal.error({
|
|
82
|
+
title: '提示',
|
|
83
|
+
content: `${error.response.data.message}`,
|
|
84
|
+
});
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
Modal.error({
|
|
88
|
+
title: `网络错误${error.response.status}`,
|
|
89
|
+
content: `${error.response.config.url}`,
|
|
90
|
+
});
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
let buffer = {};
|
|
99
|
+
export async function GET_DEFAULT(url, param, options) {
|
|
100
|
+
if (param) param = qs.stringify(param, { arrayFormat: 'indices' });
|
|
101
|
+
let now = Date.now();
|
|
102
|
+
|
|
103
|
+
let bufferItem;
|
|
104
|
+
if (options?.ttl) {
|
|
105
|
+
if (buffer[url]) {
|
|
106
|
+
bufferItem = buffer[url];
|
|
107
|
+
if (bufferItem.param == param && now <= bufferItem.endTime) {
|
|
108
|
+
return bufferItem?.response?.data || null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
let response = await axios({
|
|
113
|
+
method: 'GET',
|
|
114
|
+
url: param ? `${url}?${param}` : url,
|
|
115
|
+
...options,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
if (options?.ttl) {
|
|
119
|
+
if (!buffer[url]) {
|
|
120
|
+
buffer[url] = {};
|
|
121
|
+
}
|
|
122
|
+
buffer[url].param = param;
|
|
123
|
+
let ttl = options.ttl === true ? 1000 * 2 : options.ttl;
|
|
124
|
+
buffer[url].endTime = Date.now() + ttl;
|
|
125
|
+
buffer[url].response = response;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return response && response.data ? response.data : null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export async function GET_DEFAULT_CROSS(url, param) {
|
|
132
|
+
if (param) param = qs.stringify(param, { arrayFormat: 'indices' });
|
|
133
|
+
|
|
134
|
+
let response = await axios({
|
|
135
|
+
method: 'GET',
|
|
136
|
+
xsrfCookieName: '',
|
|
137
|
+
xsrfHeaderName: '',
|
|
138
|
+
withCredentials: true,
|
|
139
|
+
url: param ? `${url}?${param}` : url,
|
|
140
|
+
});
|
|
141
|
+
return response && response.data ? response.data : null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export async function POST_DEFAULT(url, params, method, options) {
|
|
145
|
+
let data = params;
|
|
146
|
+
// if (params) params = qs.stringify(params, { arrayFormat: 'indices' });
|
|
147
|
+
// if (typeof params === 'string') {
|
|
148
|
+
// data = params;
|
|
149
|
+
// } else {
|
|
150
|
+
// data = { ...params };
|
|
151
|
+
// }
|
|
152
|
+
|
|
153
|
+
let response = await axios({
|
|
154
|
+
method: method || 'POST',
|
|
155
|
+
url: url,
|
|
156
|
+
data,
|
|
157
|
+
...options,
|
|
158
|
+
// headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
159
|
+
});
|
|
160
|
+
return response && response.data ? response.data : null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export async function POST_DEFAULT_CROSS(url, params) {
|
|
164
|
+
let data = {};
|
|
165
|
+
// if (params) params = qs.stringify(params, { arrayFormat: 'indices' });
|
|
166
|
+
|
|
167
|
+
if (typeof params === 'string') {
|
|
168
|
+
data = params;
|
|
169
|
+
} else {
|
|
170
|
+
data = { ...params };
|
|
171
|
+
}
|
|
172
|
+
let response = await axios({
|
|
173
|
+
method: 'POST',
|
|
174
|
+
url: url,
|
|
175
|
+
xsrfCookieName: '',
|
|
176
|
+
xsrfHeaderName: '',
|
|
177
|
+
withCredentials: true,
|
|
178
|
+
data,
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
return response && response.data ? response.data : null;
|
|
182
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {GET_DEFAULT,PUT_DEFAULT,POST_DEFAULT,API_ROOT} from './index.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export function GET_USER(){
|
|
6
|
+
return GET_DEFAULT(`${HOST}/user`);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function SET_USER(params={
|
|
10
|
+
name:'',
|
|
11
|
+
age:''
|
|
12
|
+
}){
|
|
13
|
+
return POST_DEFAULT(`${HOST}/user`,params)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export function GET_USER_LIST(params={
|
|
18
|
+
current:1,
|
|
19
|
+
pageSize:20
|
|
20
|
+
}){
|
|
21
|
+
return GET_DEFAULT(`${API_ROOT}/userList`,params)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function GET_USER_TYPE(){
|
|
25
|
+
return GET_DEFAULT(`${API_ROOT}/userType`)
|
|
26
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export const openLink = (link, target = '_blank') => {
|
|
4
|
+
let domLink = document.createElement('a');
|
|
5
|
+
domLink.href = link;
|
|
6
|
+
domLink.setAttribute('target', target);
|
|
7
|
+
domLink.style.opacity = 0;
|
|
8
|
+
domLink.style.zIndex = -999;
|
|
9
|
+
document.body.appendChild(domLink);
|
|
10
|
+
domLink.click();
|
|
11
|
+
setTimeout(() => {
|
|
12
|
+
document.body.removeChild(domLink);
|
|
13
|
+
}, 200);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const toHref = (url, replace, newWindow) => {
|
|
17
|
+
if(window.knFeishu){
|
|
18
|
+
window.knFeishu.ToHref(url,replace,newWindow);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (newWindow) {
|
|
22
|
+
window.open(url);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (replace) {
|
|
26
|
+
location.replace(url);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
location.href = url;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export const isMobile = () => {
|
|
34
|
+
return navigator.userAgent.match(
|
|
35
|
+
/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const jumpUrl=(url,options={})=>{
|
|
40
|
+
const {replace,newWindow,reload}= options;
|
|
41
|
+
if(reload){
|
|
42
|
+
location.reload();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if(replace){
|
|
46
|
+
location.replace(url);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if(newWindow){
|
|
50
|
+
window.open(url);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
location.href=url;
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
// 关闭页面
|
|
59
|
+
export const closeWindow = () => {
|
|
60
|
+
if (window.knFeishu && window.knFeishu.closeWindow) {
|
|
61
|
+
window.knFeishu.closeWindow();
|
|
62
|
+
} else {
|
|
63
|
+
if (window.close) {
|
|
64
|
+
window.close();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
export function scrollIntoView(node, targetTop) {
|
|
72
|
+
let myReq;
|
|
73
|
+
const totalTime = 1000; // 耗时(毫秒)
|
|
74
|
+
// 当前滚动高度
|
|
75
|
+
let scrollTop = node.scrollTop;
|
|
76
|
+
// 滚动step方法
|
|
77
|
+
const step = function () {
|
|
78
|
+
// 距离目标滚动距离
|
|
79
|
+
let distance = targetTop - scrollTop;
|
|
80
|
+
const diff = getDiff(distance);
|
|
81
|
+
|
|
82
|
+
// 目标需要滚动的距离,也就是只走全部距离的五分之一
|
|
83
|
+
scrollTop = scrollTop + diff;
|
|
84
|
+
if (Math.abs(distance) < 1) {
|
|
85
|
+
node.scrollTo(0, targetTop);
|
|
86
|
+
} else {
|
|
87
|
+
node.scrollTo(0, scrollTop);
|
|
88
|
+
// setTimeout(step, 20);
|
|
89
|
+
myReq = window.requestAnimationFrame(step);
|
|
90
|
+
}
|
|
91
|
+
// 判断滚动到时,取消定时
|
|
92
|
+
if (Math.abs(targetTop - scrollTop) < 5) {
|
|
93
|
+
window.cancelAnimationFrame(myReq);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
step();
|
|
97
|
+
}
|
|
98
|
+
function getDiff(distance) {
|
|
99
|
+
if (distance < 100) {
|
|
100
|
+
return distance / 14; // 分母越大,单位时间内移动距离越小,速度越慢
|
|
101
|
+
}
|
|
102
|
+
if (distance < 300) {
|
|
103
|
+
return distance / 12;
|
|
104
|
+
}
|
|
105
|
+
if (distance < 600) {
|
|
106
|
+
return distance / 10;
|
|
107
|
+
}
|
|
108
|
+
return distance / 8;
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# oa-app
|
|
2
|
+
|
|
3
|
+
### 初始化项目
|
|
4
|
+
git仓库建立完毕后,执行`sh init.sh`
|
|
5
|
+
|
|
6
|
+
### 本地调试
|
|
7
|
+
sh dev.sh
|
|
8
|
+
|
|
9
|
+
### 生产环境部署
|
|
10
|
+
1. 向运维申请CICD环境,申请模板如下:
|
|
11
|
+
```
|
|
12
|
+
标题:应用申请
|
|
13
|
+
|
|
14
|
+
内容:
|
|
15
|
+
应用名称: 自定义名称
|
|
16
|
+
域名:自定义域名
|
|
17
|
+
用途:说明文本
|
|
18
|
+
|
|
19
|
+
仓库地址:项目仓库地址
|
|
20
|
+
环境要求:node 16.18.0
|
|
21
|
+
构建方式:执行仓库下 sh frontend_build.sh
|
|
22
|
+
部署方式:将构建完成的文件夹下的 `release` 内的内容部署到目标服务器
|
|
23
|
+
参考应用:oa-app
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
2. 进入CICD,构建相应环境
|
|
27
|
+
3. 快速发布
|
|
28
|
+
4. 进入域名访问
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### 版本发布Tag
|
|
33
|
+
执行 `sh versionPublish.sh` 给正式发布的版本打tag里程碑,便于查看及回滚
|
|
34
|
+
|
|
35
|
+
### 目录介绍
|
|
36
|
+
|
|
37
|
+
* static: 不参与打包,会在打包后将整个文件夹复制到站点根目录下
|
|
38
|
+
* src: 所有源码放在这个下面
|
|
39
|
+
* assets: 站点内用到的静态资源文件
|
|
40
|
+
* components: 通用性组件
|
|
41
|
+
* dictionary: 字典
|
|
42
|
+
* hooks: 所用的hooks
|
|
43
|
+
* mock: 接口mock配置
|
|
44
|
+
* pages: 所有页面源代码
|
|
45
|
+
* pageName: 每个页面自己名称的文件夹
|
|
46
|
+
* components: 页面自己的组件
|
|
47
|
+
* components: 跨页面使用的组件
|
|
48
|
+
* provider: 全局的provider通信组件
|
|
49
|
+
* services: 所有接口服务
|
|
50
|
+
* utils: 全局通用的工具类
|
|
51
|
+
* _variable.less: 全局通用less变量
|
|
52
|
+
* _reset.less: 站点初始化less配置
|
|
53
|
+
* index.jsx: 站点入口
|
|
54
|
+
* route.jsx: 站点路由配置
|
|
55
|
+
* pluginjs: 第三方静态引入的js库
|
|
56
|
+
* tools: 构建工具
|
|
57
|
+
* iconfont: 构建Iconfont工具
|
|
58
|
+
* tinypng: 压缩png工具
|
|
59
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
if [ -d "${HOME}/.nvm/" ]
|
|
2
|
+
then
|
|
3
|
+
. ${HOME}/.nvm/nvm.sh
|
|
4
|
+
fi
|
|
5
|
+
|
|
6
|
+
node_version="v16.18.0"
|
|
7
|
+
|
|
8
|
+
checkNode(){
|
|
9
|
+
for line in `node -v`
|
|
10
|
+
do
|
|
11
|
+
if [ $line != $node_version ]
|
|
12
|
+
then
|
|
13
|
+
echo "change Node from $line to $node_version"
|
|
14
|
+
nvm use $node_version
|
|
15
|
+
ret=$?
|
|
16
|
+
if [ $ret != 0 ]
|
|
17
|
+
then
|
|
18
|
+
echo "Please run nvm install $node_version"
|
|
19
|
+
exit 3
|
|
20
|
+
else
|
|
21
|
+
return 0
|
|
22
|
+
fi
|
|
23
|
+
else
|
|
24
|
+
return 0
|
|
25
|
+
fi
|
|
26
|
+
done
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
checkResult(){
|
|
30
|
+
ret=$?
|
|
31
|
+
if [ $ret != 0 ]
|
|
32
|
+
then
|
|
33
|
+
echo "[$1]执行失败"
|
|
34
|
+
exit 2
|
|
35
|
+
return 0
|
|
36
|
+
else
|
|
37
|
+
echo "[$1]执行成功"
|
|
38
|
+
return 0
|
|
39
|
+
fi
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
checkKnCli(){
|
|
44
|
+
if ! [ -x "$(command -v kn-cli)" ]
|
|
45
|
+
then
|
|
46
|
+
npm i kn-cli -g
|
|
47
|
+
return 0
|
|
48
|
+
fi
|
|
49
|
+
return 0
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
build(){
|
|
54
|
+
npm config delete registry -g
|
|
55
|
+
npm config delete registry
|
|
56
|
+
|
|
57
|
+
checkKnCli
|
|
58
|
+
checkResult "检查kn-cli"
|
|
59
|
+
|
|
60
|
+
kn-cli --report
|
|
61
|
+
checkResult "kn-cli --report"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
checkNode
|
|
65
|
+
checkResult "检查node"
|
|
66
|
+
|
|
67
|
+
build
|
|
68
|
+
checkResult "build"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var gulp = require('gulp');
|
|
2
|
+
const $ = require('gulp-load-plugins')();
|
|
3
|
+
var fs=require('fs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var srcPath ='.'
|
|
7
|
+
|
|
8
|
+
/*****************************************
|
|
9
|
+
* svg转iconfont 替代iconfont.com的方案
|
|
10
|
+
*****************************************/
|
|
11
|
+
function clean_iconfont(cb){
|
|
12
|
+
return gulp.src(`${srcPath}/dist`,{read:false,allowEmpty:true})
|
|
13
|
+
.pipe($.clean());
|
|
14
|
+
}
|
|
15
|
+
function iconfontLess(cb){
|
|
16
|
+
var fontName = 'iconfont';
|
|
17
|
+
return gulp.src(`${srcPath}/svg/*.svg`)
|
|
18
|
+
.pipe($.iconfontCss({
|
|
19
|
+
fontName: fontName,
|
|
20
|
+
path: `${srcPath}/templates/_icons.less`,
|
|
21
|
+
targetPath: 'iconfont.less',
|
|
22
|
+
fontPath: '~@/assets/iconfont/'
|
|
23
|
+
}))
|
|
24
|
+
.pipe($.iconfont({
|
|
25
|
+
fontName: fontName,
|
|
26
|
+
formats: ['svg', 'ttf', 'eot', 'woff', 'woff2'],
|
|
27
|
+
normalize: true
|
|
28
|
+
}))
|
|
29
|
+
.pipe(gulp.dest(`${srcPath}/dist/less/`));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function iconfontCss(cb){
|
|
33
|
+
var fontName = 'iconfont';
|
|
34
|
+
return gulp.src(`${srcPath}/svg/*.svg`)
|
|
35
|
+
.pipe($.iconfontCss({
|
|
36
|
+
fontName: fontName,
|
|
37
|
+
path: `${srcPath}/templates/_icons.css`,
|
|
38
|
+
targetPath: 'iconfont.css',
|
|
39
|
+
fontPath: `${srcPath}/`
|
|
40
|
+
}))
|
|
41
|
+
.pipe($.iconfont({
|
|
42
|
+
fontName: fontName,
|
|
43
|
+
formats: ['svg', 'ttf', 'eot', 'woff', 'woff2'],
|
|
44
|
+
normalize: true
|
|
45
|
+
}))
|
|
46
|
+
.pipe(gulp.dest(`${srcPath}/dist/css/`));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
function iconfontExample(cb){
|
|
51
|
+
|
|
52
|
+
var files = fs.readdirSync(`${srcPath}/svg/`);
|
|
53
|
+
|
|
54
|
+
let icons=[]
|
|
55
|
+
files.forEach(function(file){
|
|
56
|
+
console.log(file);
|
|
57
|
+
if(/\.svg$/.test(file)){
|
|
58
|
+
icons.push(file.replace(/\.\w+$/, ''))
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return gulp.src(`${srcPath}/templates/index.html`)
|
|
63
|
+
.pipe($.template({icons: icons}))
|
|
64
|
+
.pipe(gulp.dest(`${srcPath}/dist/css/`));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
exports.iconfont = gulp.series(clean_iconfont,iconfontLess,iconfontCss,iconfontExample);
|
|
69
|
+
// exports.iconfontCss = gulp.series(clean_iconfont,iconfontCss,iconfontExample);
|
|
70
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "iconfont",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"node": "10.15.0",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"colors": "^1.4.0",
|
|
9
|
+
"gulp": "^4.0.2",
|
|
10
|
+
"gulp-load-plugins": "^2.0.1",
|
|
11
|
+
"gulp-clean": "^0.4.0",
|
|
12
|
+
"gulp-iconfont": "^11.0.1",
|
|
13
|
+
"gulp-iconfont-css": "^3.0.0",
|
|
14
|
+
"gulp-template": "^5.0.0",
|
|
15
|
+
"lazypipe": "^1.0.2",
|
|
16
|
+
"svgfont2svgicons": "^2.0.0",
|
|
17
|
+
"svgicons2svgfont": "^12.0.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {}
|
|
20
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
if [ -d "${HOME}/.nvm/" ]
|
|
2
|
+
then
|
|
3
|
+
. ${HOME}/.nvm/nvm.sh
|
|
4
|
+
fi
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
checkNode(){
|
|
8
|
+
for line in `node -v`
|
|
9
|
+
do
|
|
10
|
+
if [ $line != "v10.15.0" ]
|
|
11
|
+
then
|
|
12
|
+
nvm use v10.15.0
|
|
13
|
+
ret=$?
|
|
14
|
+
if [ $ret != 0 ]
|
|
15
|
+
then
|
|
16
|
+
echo -e "\033[41;37m Change Node to v10.15.0 (try nvm use v10.15.0)\033[0m"
|
|
17
|
+
return 0
|
|
18
|
+
else
|
|
19
|
+
return 1
|
|
20
|
+
fi
|
|
21
|
+
else
|
|
22
|
+
return 1
|
|
23
|
+
fi
|
|
24
|
+
done
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
run(){
|
|
29
|
+
npm i
|
|
30
|
+
node_modules/.bin/gulp iconfont
|
|
31
|
+
echo '生成完毕,请前往 dist 查看结果'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
checkNode
|
|
35
|
+
ret=$?
|
|
36
|
+
if [ $ret = 1 ]
|
|
37
|
+
then
|
|
38
|
+
run
|
|
39
|
+
fi
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655695159864" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7044" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M319.64 512.016l336.016-336.008 45.248 45.248L364.896 557.28z" p-id="7045"></path><path d="M365.216 466.464l339.976 339.968-45.256 45.256-339.976-339.976z" p-id="7046"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M411.062857 698.514286c16.164571 22.674286 49.883429 22.674286 66.121143 0l269.604571-373.76a10.24 10.24 0 0 0-8.338285-16.310857h-60.050286a40.740571 40.740571 0 0 0-33.133714 17.042285l-201.142857 279.04-91.062858-126.464a40.96 40.96 0 0 0-33.206857-16.969143h-59.977143a10.24 10.24 0 0 0-8.338285 16.237715l159.451428 221.184z" /><path fill="#2c2c2c" d="M983.04 0H40.96A40.96 40.96 0 0 0 0 40.96v942.08c0 22.674286 18.285714 40.96 40.96 40.96h942.08c22.674286 0 40.96-18.285714 40.96-40.96V40.96a40.96 40.96 0 0 0-40.96-40.96z m-51.2 931.84H92.16V92.16h839.68v839.68z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M596.52729 512.000427L1020.889603 20.56617c7.082661-8.191993 1.109332-20.565316-9.898659-20.565317h-129.023892a26.709311 26.709311 0 0 0-19.88265 8.959993L512.04736 414.293841 161.924985 8.960846A26.197312 26.197312 0 0 0 142.042335 0.000853H13.018443c-11.093324 0-17.066652 12.373323-9.898659 20.565317L427.652764 512.000427 3.119784 1003.434684c-7.082661 8.191993-1.109332 20.565316 9.898659 20.565316h129.023892c7.679994 0 14.847988-3.327997 19.88265-8.959993L512.04736 609.707012l350.122375 405.332995a26.197312 26.197312 0 0 0 19.88265 8.959993h129.023892c11.093324 0 17.066652-12.373323 9.898659-20.565316L596.441956 512.000427z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="85.39px" viewBox="0 0 1535 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M1519.737123 0H1368.198572c-10.239091 0-19.966228 5.119546-26.109682 13.18283L767.931846 796.345324 193.774802 13.18283A32.509115 32.509115 0 0 0 167.793108 0H16.254557C3.071727 0-4.607591 14.846682 3.071727 25.341751L715.456503 997.543468a64.890241 64.890241 0 0 0 104.56672 0L1532.663976 25.341751a15.870591 15.870591 0 0 0-12.798864-25.341751z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="96.02px" viewBox="0 0 1365 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M1316.578377 0.011093H48.638906A47.614929 47.614929 0 0 0 0 46.516713v930.96572c0 25.684755 21.75951 46.50562 48.724237 46.505621H1316.663708a47.614929 47.614929 0 0 0 48.724237-46.505621V46.516713A47.614929 47.614929 0 0 0 1316.578377 0.011093z m-61.011961 919.275316H109.736198v-58.025361l211.024585-239.013289 228.688188 258.895509 355.831994-402.593609 350.285451 396.535078v44.201672z m0-188.838417l-340.984327-386.039315a12.458386 12.458386 0 0 0-18.602249 0L549.534302 736.591853l-219.472395-248.314413a12.458386 12.458386 0 0 0-18.602248 0L109.736198 716.624303v-611.826234h1145.830218V730.447992z" /><path fill="#2c2c2c" d="M365.730438 430.508074c74.067667 0 134.05565-57.257378 134.05565-127.99712 0-70.65441-59.987984-127.99712-134.05565-127.997121s-134.140982 57.34271-134.140982 127.997121c0 70.739742 60.073315 127.99712 134.140982 127.99712z m0-168.700205c23.636802 0 42.665707 18.175591 42.665706 40.703085a41.64173 41.64173 0 0 1-42.665706 40.788415 41.64173 41.64173 0 0 1-42.665707-40.788415c0-22.527493 19.028905-40.703084 42.665707-40.703085z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M422.765714 723.968l255.268572-200.557714c7.314286-5.778286 7.314286-16.822857 0-22.674286L422.765714 300.032a14.482286 14.482286 0 0 0-23.405714 11.264v401.261714c0 12.068571 13.897143 18.797714 23.405714 11.410286z" /><path fill="#2c2c2c" d="M983.04 0H40.96A40.96 40.96 0 0 0 0 40.96v942.08c0 22.674286 18.285714 40.96 40.96 40.96h942.08c22.674286 0 40.96-18.285714 40.96-40.96V40.96a40.96 40.96 0 0 0-40.96-40.96z m-51.2 931.84H92.16V92.16h839.68v839.68z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1656403559957" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2942" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M684.032 403.456q-17.408-8.192-15.872-22.016t11.776-22.016q3.072-2.048 19.968-15.872t41.472-33.28q-43.008-49.152-102.4-77.312t-129.024-28.16q-64.512 0-120.832 24.064t-98.304 66.048-66.048 98.304-24.064 120.832q0 63.488 24.064 119.808t66.048 98.304 98.304 66.048 120.832 24.064q53.248 0 100.864-16.896t87.04-47.616 67.584-72.192 41.472-90.624q7.168-23.552 26.624-38.912t46.08-15.36q31.744 0 53.76 22.528t22.016 53.248q0 14.336-5.12 27.648-21.504 71.68-63.488 132.096t-99.84 103.936-128.512 68.096-148.48 24.576q-95.232 0-179.2-35.84t-145.92-98.304-98.304-145.92-36.352-178.688 36.352-179.2 98.304-145.92 145.92-98.304 179.2-36.352q105.472 0 195.584 43.52t153.6 118.272q23.552-17.408 39.424-30.208t19.968-15.872q6.144-5.12 13.312-7.68t13.312 0 10.752 10.752 6.656 24.576q1.024 9.216 2.048 31.232t2.048 51.2 1.024 60.416-1.024 58.88q-1.024 34.816-16.384 50.176-8.192 8.192-24.576 9.216t-34.816-3.072q-27.648-6.144-60.928-13.312t-63.488-14.848-53.248-14.336-29.184-9.728z" p-id="2943"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1656311332811" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2256" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m0 819.2a51.2 51.2 0 1 1 51.2-51.2 51.2 51.2 0 0 1-51.2 51.2z m51.2-153.6H460.8V204.8h102.4z" p-id="2257"></path></svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "<%= fontName %>";
|
|
3
|
+
src: url('<%= fontPath %><%= fontName %>.eot');
|
|
4
|
+
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'),
|
|
5
|
+
url('<%= fontPath %><%= fontName %>.woff') format('woff'),
|
|
6
|
+
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'),
|
|
7
|
+
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.iconfont:before {
|
|
11
|
+
font-family: "<%= fontName %>";
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-variant: normal;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
/* speak: none; only necessary if not using the private unicode range (firstGlyph option) */
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
text-transform: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
<% _.each(glyphs, function(glyph) { %>
|
|
23
|
+
.icon-<%= glyph.fileName %>:before {
|
|
24
|
+
content: "\<%= glyph.codePoint %>";
|
|
25
|
+
}
|
|
26
|
+
<% }); %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
:global{
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: "<%= fontName %>";
|
|
4
|
+
src: url('<%= fontPath %><%= fontName %>.eot');
|
|
5
|
+
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'),
|
|
6
|
+
url('<%= fontPath %><%= fontName %>.woff') format('woff'),
|
|
7
|
+
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'),
|
|
8
|
+
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.iconfont:before {
|
|
12
|
+
font-family: "<%= fontName %>";
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-variant: normal;
|
|
17
|
+
font-weight: normal;
|
|
18
|
+
/* speak: none; only necessary if not using the private unicode range (firstGlyph option) */
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
text-transform: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
<% _.each(glyphs, function(glyph) { %>
|
|
24
|
+
.icon-<%= glyph.fileName %>:before {
|
|
25
|
+
content: "\<%= glyph.codePoint %>";
|
|
26
|
+
}
|
|
27
|
+
<% }); %>
|
|
28
|
+
|
|
29
|
+
}
|