kn-cli 1.0.63 → 1.0.65
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 +2 -1
- package/readme.md +6 -0
- package/src/create.js +2 -0
- package/templates/template_oa/public/src/components/IFrame/index.jsx +3 -0
- package/templates/template_oa/readme.md +6 -1
- package/templates/template_oa/webpack.api.js +7 -3
- package/templates/template_oa_jwt/.gitignore +6 -0
- package/templates/template_oa_jwt/build.sh +7 -0
- package/templates/template_oa_jwt/cli.config.js +30 -0
- package/templates/template_oa_jwt/dev.sh +89 -0
- package/templates/template_oa_jwt/frontend_build.sh +88 -0
- package/templates/template_oa_jwt/init/prepare-commit-msg +5 -0
- package/templates/template_oa_jwt/init.sh +33 -0
- package/templates/template_oa_jwt/jsconfig.json +10 -0
- package/templates/template_oa_jwt/package.json +25 -0
- package/templates/template_oa_jwt/public/404.html +26 -0
- package/templates/template_oa_jwt/public/favicon.ico +0 -0
- package/templates/template_oa_jwt/public/index.html +44 -0
- package/templates/template_oa_jwt/public/src/_antd.less +216 -0
- package/templates/template_oa_jwt/public/src/_reset.less +134 -0
- package/templates/template_oa_jwt/public/src/_variable.less +84 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.eot +0 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.less +57 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.svg +36 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.ttf +0 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.woff +0 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.woff2 +0 -0
- package/templates/template_oa_jwt/public/src/assets/images/NY-pop-bg.png +0 -0
- package/templates/template_oa_jwt/public/src/assets/images/avatar.png +0 -0
- package/templates/template_oa_jwt/public/src/assets/images/loading.svg +40 -0
- package/templates/template_oa_jwt/public/src/components/Alert/index.jsx +0 -0
- package/templates/template_oa_jwt/public/src/components/Alert/index.less +0 -0
- package/templates/template_oa_jwt/public/src/components/Auth/index.jsx +44 -0
- package/templates/template_oa_jwt/public/src/components/Dialog/index.jsx +150 -0
- package/templates/template_oa_jwt/public/src/components/Dialog/index.less +123 -0
- package/templates/template_oa_jwt/public/src/components/Empty/index.jsx +23 -0
- package/templates/template_oa_jwt/public/src/components/Empty/index.less +6 -0
- package/templates/template_oa_jwt/public/src/components/Footer/index.jsx +17 -0
- package/templates/template_oa_jwt/public/src/components/Footer/index.less +28 -0
- package/templates/template_oa_jwt/public/src/components/FormRow/index.jsx +39 -0
- package/templates/template_oa_jwt/public/src/components/FormRow/index.less +67 -0
- package/templates/template_oa_jwt/public/src/components/FormTable/index.jsx +137 -0
- package/templates/template_oa_jwt/public/src/components/FormTable/index.less +18 -0
- package/templates/template_oa_jwt/public/src/components/IFrame/index.jsx +44 -0
- package/templates/template_oa_jwt/public/src/components/IFrame/index.less +4 -0
- package/templates/template_oa_jwt/public/src/components/IconFont/index.jsx +10 -0
- package/templates/template_oa_jwt/public/src/components/IconFont/index.less +5 -0
- package/templates/template_oa_jwt/public/src/components/Layout/Basic/index.jsx +52 -0
- package/templates/template_oa_jwt/public/src/components/Layout/Basic/index.less +82 -0
- package/templates/template_oa_jwt/public/src/components/Layout/CenterBody/index.jsx +15 -0
- package/templates/template_oa_jwt/public/src/components/Layout/CenterBody/index.less +36 -0
- package/templates/template_oa_jwt/public/src/components/Layout/FormBlock/index.jsx +23 -0
- package/templates/template_oa_jwt/public/src/components/Layout/FormBlock/index.less +37 -0
- package/templates/template_oa_jwt/public/src/components/Layout/Provider/index.jsx +12 -0
- package/templates/template_oa_jwt/public/src/components/Layout/index.jsx +27 -0
- package/templates/template_oa_jwt/public/src/components/Layout/index.less +8 -0
- package/templates/template_oa_jwt/public/src/components/Link/index.jsx +24 -0
- package/templates/template_oa_jwt/public/src/components/Link/index.less +11 -0
- package/templates/template_oa_jwt/public/src/components/Loading/index.jsx +16 -0
- package/templates/template_oa_jwt/public/src/components/Loading/index.less +96 -0
- package/templates/template_oa_jwt/public/src/components/Nav/index.jsx +184 -0
- package/templates/template_oa_jwt/public/src/components/Nav/index.less +38 -0
- package/templates/template_oa_jwt/public/src/components/Page/PageLoading/index.jsx +30 -0
- package/templates/template_oa_jwt/public/src/components/Page/PageLoading/index.less +29 -0
- package/templates/template_oa_jwt/public/src/components/Popup/index.jsx +22 -0
- package/templates/template_oa_jwt/public/src/components/Popup/index.less +18 -0
- package/templates/template_oa_jwt/public/src/components/Select/DepSelect/index.jsx +47 -0
- package/templates/template_oa_jwt/public/src/components/Select/StaffSelect/index.jsx +97 -0
- package/templates/template_oa_jwt/public/src/components/Select/StaffSelect/index.less +24 -0
- package/templates/template_oa_jwt/public/src/components/Toast/index.jsx +60 -0
- package/templates/template_oa_jwt/public/src/components/Toast/index.less +43 -0
- package/templates/template_oa_jwt/public/src/components/Upload/index.jsx +358 -0
- package/templates/template_oa_jwt/public/src/components/title/index.jsx +12 -0
- package/templates/template_oa_jwt/public/src/components/title/index.less +21 -0
- package/templates/template_oa_jwt/public/src/dictionary/index.js +20 -0
- package/templates/template_oa_jwt/public/src/hooks/index.jsx +21 -0
- package/templates/template_oa_jwt/public/src/hooks/useDelay.jsx +29 -0
- package/templates/template_oa_jwt/public/src/hooks/useImageLoader.jsx +27 -0
- package/templates/template_oa_jwt/public/src/hooks/useLoading.jsx +42 -0
- package/templates/template_oa_jwt/public/src/hooks/useLogin.jsx +33 -0
- package/templates/template_oa_jwt/public/src/hooks/usePreload.jsx +66 -0
- package/templates/template_oa_jwt/public/src/hooks/useScrollTop.jsx +32 -0
- package/templates/template_oa_jwt/public/src/hooks/useSearch.jsx +137 -0
- package/templates/template_oa_jwt/public/src/hooks/useUpdate.jsx +11 -0
- package/templates/template_oa_jwt/public/src/index.jsx +50 -0
- package/templates/template_oa_jwt/public/src/mock/common.js +484 -0
- package/templates/template_oa_jwt/public/src/mock/index.js +63 -0
- package/templates/template_oa_jwt/public/src/mock/user.js +70 -0
- package/templates/template_oa_jwt/public/src/mock/utils.js +33 -0
- package/templates/template_oa_jwt/public/src/pages/components/pageTitle/index.jsx +13 -0
- package/templates/template_oa_jwt/public/src/pages/components/pageTitle/index.less +20 -0
- package/templates/template_oa_jwt/public/src/pages/components/totalRecord/index.jsx +21 -0
- package/templates/template_oa_jwt/public/src/pages/components/totalRecord/index.less +16 -0
- package/templates/template_oa_jwt/public/src/pages/demo/detail/index.jsx +14 -0
- package/templates/template_oa_jwt/public/src/pages/demo/index.jsx +399 -0
- package/templates/template_oa_jwt/public/src/pages/demo/index.less +15 -0
- package/templates/template_oa_jwt/public/src/pages/login/index.jsx +29 -0
- package/templates/template_oa_jwt/public/src/pages/login/index.less +44 -0
- package/templates/template_oa_jwt/public/src/pages/redirect/index.jsx +31 -0
- package/templates/template_oa_jwt/public/src/provider/app.jsx +66 -0
- package/templates/template_oa_jwt/public/src/route.jsx +45 -0
- package/templates/template_oa_jwt/public/src/services/common.js +133 -0
- package/templates/template_oa_jwt/public/src/services/demo.js +41 -0
- package/templates/template_oa_jwt/public/src/services/index.js +266 -0
- package/templates/template_oa_jwt/public/src/services/token.js +132 -0
- package/templates/template_oa_jwt/public/src/utils/index.js +115 -0
- package/templates/template_oa_jwt/public/static/about.html +1 -0
- package/templates/template_oa_jwt/public/static/kssoLogin.html +22 -0
- package/templates/template_oa_jwt/public/static/noAuth.html +217 -0
- package/templates/template_oa_jwt/public/static/noAuth.png +0 -0
- package/templates/template_oa_jwt/readme.md +71 -0
- package/templates/template_oa_jwt/report.sh +68 -0
- package/templates/template_oa_jwt/tools/iconfont/gulpfile.js +70 -0
- package/templates/template_oa_jwt/tools/iconfont/package.json +20 -0
- package/templates/template_oa_jwt/tools/iconfont/run.sh +39 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/arrowBack.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/check.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/close.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/down.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/image.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/play.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/refresh.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/warn.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/templates/_icons.css +26 -0
- package/templates/template_oa_jwt/tools/iconfont/templates/_icons.less +29 -0
- package/templates/template_oa_jwt/tools/iconfont/templates/index.html +56 -0
- package/templates/template_oa_jwt/tools/tinypng/package.json +11 -0
- package/templates/template_oa_jwt/tools/tinypng/run.sh +15 -0
- package/templates/template_oa_jwt/versionPublish.sh +27 -0
- package/templates/template_oa_jwt/webpack.api.js +61 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kn-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"templates/template_admin/",
|
|
14
14
|
"templates/template_oa/",
|
|
15
15
|
"templates/template_offcial/",
|
|
16
|
+
"templates/template_oa_jwt/",
|
|
16
17
|
"build"
|
|
17
18
|
],
|
|
18
19
|
"bin": {
|
package/readme.md
CHANGED
package/src/create.js
CHANGED
|
@@ -25,6 +25,7 @@ module.exports=async ()=> {
|
|
|
25
25
|
'pc管理系统',
|
|
26
26
|
'官网',
|
|
27
27
|
'OA管理系统',
|
|
28
|
+
'OA管理系统-KssoJwt授权'
|
|
28
29
|
// '移动端H5活动(未开放)',
|
|
29
30
|
// 'pc官网(未开放)',
|
|
30
31
|
// 'pc管理系统',
|
|
@@ -39,6 +40,7 @@ module.exports=async ()=> {
|
|
|
39
40
|
case 'pc管理系统':{templateName='template_admin'}break;
|
|
40
41
|
case '官网':{templateName='template_offcial'}break;
|
|
41
42
|
case 'OA管理系统':{templateName='template_oa'}break;
|
|
43
|
+
case 'OA管理系统-KssoJwt授权':{templateName='template_oa_jwt'}
|
|
42
44
|
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -14,6 +14,9 @@ const Iframe=(props)=>{
|
|
|
14
14
|
}
|
|
15
15
|
}else if(e?.data?.msg==='link'){
|
|
16
16
|
location.href=e.data.url;
|
|
17
|
+
}else if(e?.data?.msg==='server'){
|
|
18
|
+
const url = `${OA_KSSO_HOST}?target=${encodeURIComponent(location.href)}`;
|
|
19
|
+
location.href=url;
|
|
17
20
|
}else{
|
|
18
21
|
// console.log(e?.data);
|
|
19
22
|
}
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
git仓库建立完毕后,执行`sh init.sh`
|
|
5
5
|
|
|
6
6
|
### 本地调试
|
|
7
|
-
|
|
7
|
+
1、sh dev.sh
|
|
8
|
+
2、打开 `http://192.168.90.250:8886/` 才测试环境登录账号成功后将它的cookie的 oa_session 复制到本站cookie内
|
|
9
|
+
|
|
10
|
+
> 借助chrome-oa插件 https://gitlab.ops.kingnet.com/changx/chrome-plugin-oa-test-helper 可以在本站内右键直接将oa cookie导入
|
|
8
11
|
|
|
9
12
|
### 生产环境部署
|
|
10
13
|
1. 向运维申请CICD环境,申请模板如下:
|
|
@@ -35,6 +38,8 @@ kn-cli --dev
|
|
|
35
38
|
3. 快速发布
|
|
36
39
|
4. 进入域名访问
|
|
37
40
|
|
|
41
|
+
> 注意需要在测试和生产环境的OA系统内 增加本站域名的跨域支持
|
|
42
|
+
|
|
38
43
|
|
|
39
44
|
|
|
40
45
|
### 版本发布Tag
|
|
@@ -4,21 +4,25 @@ const configs = {
|
|
|
4
4
|
API_HOST: '/api',
|
|
5
5
|
OA_HOST: '/oaApi',
|
|
6
6
|
OA_MENU_HOST:'//192.168.90.250:8020/oa-menu/?mock=1',
|
|
7
|
-
LOGIN_URL: 'http://192.168.90.250:8886'
|
|
7
|
+
LOGIN_URL: 'http://192.168.90.250:8886',
|
|
8
|
+
OA_KSSO_HOST:'http://192.168.90.250:8886/ksso/auto_redirect',
|
|
9
|
+
|
|
8
10
|
},
|
|
9
11
|
// cicd构建时研发环境
|
|
10
12
|
dev: {
|
|
11
13
|
API_HOST: 'http://dev-drama-admin-api.skitoon.com',
|
|
12
14
|
OA_HOST: 'http://192.168.90.250:8886',
|
|
13
15
|
OA_MENU_HOST:'//192.168.90.250:8020/oa-menu/',
|
|
14
|
-
LOGIN_URL: 'http://192.168.90.250:8886'
|
|
16
|
+
LOGIN_URL: 'http://192.168.90.250:8886',
|
|
17
|
+
OA_KSSO_HOST:'http://192.168.90.250:8886/ksso/auto_redirect',
|
|
15
18
|
},
|
|
16
19
|
// cicd构建时生产环境
|
|
17
20
|
prod: {
|
|
18
21
|
API_HOST: 'http://dev-drama-admin-api.skitoon.com',
|
|
19
22
|
OA_HOST: 'https://oa.kingnet.com',
|
|
20
23
|
OA_MENU_HOST:'//micro-front.kingnet.com/oa-menu/',
|
|
21
|
-
LOGIN_URL: 'https://oa.kingnet.com'
|
|
24
|
+
LOGIN_URL: 'https://oa.kingnet.com',
|
|
25
|
+
OA_KSSO_HOST:'https://oa.kingnet.com/ksso/auto_redirect',
|
|
22
26
|
},
|
|
23
27
|
};
|
|
24
28
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
module.exports = {
|
|
3
|
+
name:'template-oa-jwt',
|
|
4
|
+
registryType:'npm',//npm镜像源,taobao|npm
|
|
5
|
+
less:{
|
|
6
|
+
javascriptEnabled:true,//是否开启less js
|
|
7
|
+
},
|
|
8
|
+
rules:{
|
|
9
|
+
compileNpmPackage:['kn-hooks'],//需要参与编译的npm包
|
|
10
|
+
},
|
|
11
|
+
cssModule: (resourcePath) => {
|
|
12
|
+
console.log(resourcePath)
|
|
13
|
+
// antd.less编译的时候使用global模式
|
|
14
|
+
if (/antd.less$/i.test(resourcePath)) {
|
|
15
|
+
return 'global'
|
|
16
|
+
}
|
|
17
|
+
return "local";
|
|
18
|
+
},
|
|
19
|
+
devServer:{
|
|
20
|
+
// 不用本地IP,因为需要配跨域
|
|
21
|
+
// host:'0.0.0.0',//指定调试地址IP
|
|
22
|
+
port: 8534,
|
|
23
|
+
// useLocalIp: true,//是否使用本地IP地址代替localhost
|
|
24
|
+
}
|
|
25
|
+
// 自定义多入口
|
|
26
|
+
// entry:{
|
|
27
|
+
// 'home/index': 'src/jsx/home/index.jsx',
|
|
28
|
+
// },
|
|
29
|
+
// copyFolder:['images','plugins'],//完整复制的文件夹
|
|
30
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
|
|
44
|
+
|
|
45
|
+
# 智能检测并安装/升级CLI的版本
|
|
46
|
+
checkKnCli(){
|
|
47
|
+
# dev只需要保持安装了就行,版本通过开发自己控制
|
|
48
|
+
if ! [ -x "$(command -v kn-cli)" ]
|
|
49
|
+
then
|
|
50
|
+
echo "安装kn-cli"
|
|
51
|
+
npm i kn-cli -g
|
|
52
|
+
return 0
|
|
53
|
+
fi
|
|
54
|
+
# for line in `npm view kn-cli version`
|
|
55
|
+
# do
|
|
56
|
+
# for line2 in `kn-cli -v`
|
|
57
|
+
# do
|
|
58
|
+
# if [ $line != $line2 ]
|
|
59
|
+
# then
|
|
60
|
+
# echo "升级kn-cli"
|
|
61
|
+
# npm upgrade kn-cli -g
|
|
62
|
+
# return 0
|
|
63
|
+
# fi
|
|
64
|
+
# done
|
|
65
|
+
# done
|
|
66
|
+
# return 0
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
build(){
|
|
72
|
+
npm config delete registry -g
|
|
73
|
+
npm config delete registry
|
|
74
|
+
|
|
75
|
+
checkKnCli
|
|
76
|
+
checkResult "检查kn-cli"
|
|
77
|
+
# dev_mode=watch 代表使用 webpack -w模式将文件编译后生成到磁盘上进行监听更新
|
|
78
|
+
# 默认情况下为 webpack-dev-server模式,将资源编译后放入内存监听
|
|
79
|
+
# export dev_mode=watch
|
|
80
|
+
|
|
81
|
+
kn-cli --dev
|
|
82
|
+
checkResult "kn-cli --dev"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
checkNode
|
|
86
|
+
checkResult "检查node"
|
|
87
|
+
|
|
88
|
+
build
|
|
89
|
+
checkResult "build"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
if [ -d "${HOME}/.nvm/" ]
|
|
2
|
+
then
|
|
3
|
+
. ${HOME}/.nvm/nvm.sh
|
|
4
|
+
fi
|
|
5
|
+
|
|
6
|
+
export mock=0
|
|
7
|
+
export noSkipNpmInstall=1
|
|
8
|
+
node_version="v16.18.0"
|
|
9
|
+
|
|
10
|
+
checkNode(){
|
|
11
|
+
for line in `node -v`
|
|
12
|
+
do
|
|
13
|
+
if [ $line != $node_version ]
|
|
14
|
+
then
|
|
15
|
+
echo "change Node from $line to $node_version"
|
|
16
|
+
nvm use $node_version
|
|
17
|
+
ret=$?
|
|
18
|
+
if [ $ret != 0 ]
|
|
19
|
+
then
|
|
20
|
+
echo "Please run nvm install $node_version"
|
|
21
|
+
exit 3
|
|
22
|
+
else
|
|
23
|
+
return 0
|
|
24
|
+
fi
|
|
25
|
+
else
|
|
26
|
+
return 0
|
|
27
|
+
fi
|
|
28
|
+
done
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
checkKnCli(){
|
|
33
|
+
if ! [ -x "$(command -v kn-cli)" ]
|
|
34
|
+
then
|
|
35
|
+
npm i kn-cli -g
|
|
36
|
+
return 0
|
|
37
|
+
fi
|
|
38
|
+
return 0
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
checkResult(){
|
|
43
|
+
ret=$?
|
|
44
|
+
if [ $ret != 0 ]
|
|
45
|
+
then
|
|
46
|
+
echo "[$1]执行失败"
|
|
47
|
+
exit 2
|
|
48
|
+
return 0
|
|
49
|
+
else
|
|
50
|
+
echo "[$1]执行成功"
|
|
51
|
+
return 0
|
|
52
|
+
fi
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
build(){
|
|
56
|
+
npm config delete registry -g
|
|
57
|
+
npm config delete registry
|
|
58
|
+
|
|
59
|
+
checkKnCli
|
|
60
|
+
checkResult "检查kn-cli"
|
|
61
|
+
|
|
62
|
+
# npm i kn-cli@1.0.2 -g
|
|
63
|
+
# checkResult "npm kn-cli"
|
|
64
|
+
|
|
65
|
+
kn-cli --build
|
|
66
|
+
checkResult "kn-cli --build"
|
|
67
|
+
|
|
68
|
+
rm -rf release
|
|
69
|
+
checkResult "清理release"
|
|
70
|
+
|
|
71
|
+
mv public/dist release/
|
|
72
|
+
checkResult "打包结果同步至release"
|
|
73
|
+
|
|
74
|
+
cp public/favicon.png release/favicon.png
|
|
75
|
+
cp public/favicon.ico release/favicon.ico
|
|
76
|
+
checkResult "cp favicon"
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
checkNode
|
|
81
|
+
checkResult "检查node"
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
build
|
|
85
|
+
checkResult "build"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
checkResult(){
|
|
2
|
+
ret=$?
|
|
3
|
+
if [ $ret != 0 ]
|
|
4
|
+
then
|
|
5
|
+
echo "[$1]执行失败"
|
|
6
|
+
exit 2
|
|
7
|
+
return 0
|
|
8
|
+
else
|
|
9
|
+
echo "[$1]执行成功"
|
|
10
|
+
return 0
|
|
11
|
+
fi
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
echo "安装git提交钩子脚本 cp prepare-commit-msg ./.git/hooks/prepare-commit-msg"
|
|
15
|
+
ls -A ./.git/
|
|
16
|
+
ret=$?
|
|
17
|
+
if [ $ret != 0 ]
|
|
18
|
+
then
|
|
19
|
+
echo "缺少.git文件夹"
|
|
20
|
+
exit 2
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
ls -A ./.git/hooks/
|
|
24
|
+
ret=$?
|
|
25
|
+
if [ $ret != 0 ]
|
|
26
|
+
then
|
|
27
|
+
mkdir ./.git/hooks
|
|
28
|
+
checkResult '创建hooks文件夹'
|
|
29
|
+
fi
|
|
30
|
+
cp ./init/prepare-commit-msg ./.git/hooks/prepare-commit-msg
|
|
31
|
+
checkResult '复制prepare-commit-msg'
|
|
32
|
+
chmod u+x ./.git/hooks/prepare-commit-msg
|
|
33
|
+
checkResult '权限变更prepare-commit-msg'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "template-oa-jwt",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "lib/index",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"clean": "rm -rf ./dist"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"antd": "~4.24.8",
|
|
11
|
+
"axios": "~1.1.3",
|
|
12
|
+
"js-uuid": "^0.0.6",
|
|
13
|
+
"kn-hooks": "~0.0.30",
|
|
14
|
+
"moment": "~2.29.4",
|
|
15
|
+
"react": "~17.0.2",
|
|
16
|
+
"react-dom": "~17.0.2",
|
|
17
|
+
"react-router": "~6.3.0",
|
|
18
|
+
"react-router-dom": "~6.3.0",
|
|
19
|
+
"unstated-next": "~1.1.0",
|
|
20
|
+
"vconsole": "~3.9.5"
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": "16.18.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
7
|
+
<title>404</title>
|
|
8
|
+
<style>
|
|
9
|
+
body{
|
|
10
|
+
background-color:#444;
|
|
11
|
+
font-size:14px;
|
|
12
|
+
}
|
|
13
|
+
h3{
|
|
14
|
+
font-size:60px;
|
|
15
|
+
color:#eee;
|
|
16
|
+
text-align:center;
|
|
17
|
+
padding-top:30px;
|
|
18
|
+
font-weight:normal;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body>
|
|
24
|
+
<h3>404,您请求的文件不存在!</h3>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
|
Binary file
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no,viewport-fit=cover" />
|
|
8
|
+
<meta name="format-detection" content="telephone=no,email=no,adress=no">
|
|
9
|
+
<meta name="apple-touch-fullscreen" content="yes">
|
|
10
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
11
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
12
|
+
|
|
13
|
+
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
|
14
|
+
<link rel="icon" href="favicon.png" type="image/png">
|
|
15
|
+
<title>管理系统</title>
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body>
|
|
19
|
+
<div id="main-view" />
|
|
20
|
+
<script src="//activity-static.kingnet.com/js/knFeishu.js?v=20230504" type="text/javascript"></script>
|
|
21
|
+
<script>
|
|
22
|
+
var docEl = document.documentElement;
|
|
23
|
+
function setRemUnit(type) {
|
|
24
|
+
let w = Math.max(window.innerWidth, docEl.clientWidth, docEl.offsetWidth);
|
|
25
|
+
let defaultWidth = 375;//填入设计稿上的宽度
|
|
26
|
+
w = w > defaultWidth ? defaultWidth : w;
|
|
27
|
+
var rem = w / defaultWidth * 100;
|
|
28
|
+
docEl.style.fontSize = rem + 'px'
|
|
29
|
+
}
|
|
30
|
+
setRemUnit('init');
|
|
31
|
+
if (document.readyState === 'interactive') {
|
|
32
|
+
setRemUnit('init');
|
|
33
|
+
} else {
|
|
34
|
+
window.addEventListener('DOMContentLoaded', function () {
|
|
35
|
+
setRemUnit('init');
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
window.addEventListener("resize", function () {
|
|
39
|
+
setRemUnit('resize');
|
|
40
|
+
});
|
|
41
|
+
</script>
|
|
42
|
+
</body>
|
|
43
|
+
|
|
44
|
+
</html>
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
@import '~antd/dist/antd.less';
|
|
2
|
+
|
|
3
|
+
// 这里可以重写antd的主题样式变量,参考 https://4x.ant.design/docs/react/customize-theme-cn
|
|
4
|
+
|
|
5
|
+
@primary-color:#2a96fc;
|
|
6
|
+
|
|
7
|
+
@checkbox-size:18px;
|
|
8
|
+
@height-base: 28px;
|
|
9
|
+
@btn-height-base: 28px;
|
|
10
|
+
@input-height-base: 28px;
|
|
11
|
+
@font-size-base: 14px;
|
|
12
|
+
@border-radius-base: 4px;
|
|
13
|
+
|
|
14
|
+
@pagination-item-size:26px;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
:global{
|
|
19
|
+
@colorTable: #32a3fa;
|
|
20
|
+
|
|
21
|
+
.ant-upload-list-picture-card .ant-upload-list-item-info:before{
|
|
22
|
+
left:0;
|
|
23
|
+
}
|
|
24
|
+
//Anchor
|
|
25
|
+
.ant-anchor-link{
|
|
26
|
+
position: static !important;
|
|
27
|
+
}
|
|
28
|
+
.ant-anchor-ink-ball{
|
|
29
|
+
width:1px;
|
|
30
|
+
border-radius: 0;
|
|
31
|
+
border-width: 1px;
|
|
32
|
+
height:19px;
|
|
33
|
+
margin-top:-5px;
|
|
34
|
+
}
|
|
35
|
+
.ant-anchor-wrapper{
|
|
36
|
+
box-shadow: 3px 4px 5px #ccc;
|
|
37
|
+
padding:10px 5px
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//Table
|
|
41
|
+
.ant-table tbody > tr > td {
|
|
42
|
+
padding:10px;
|
|
43
|
+
}
|
|
44
|
+
.ant-table-tbody>.ant-table-row:nth-child(even) td {
|
|
45
|
+
background: #f9fafa
|
|
46
|
+
}
|
|
47
|
+
.ant-table thead > tr > th {
|
|
48
|
+
padding:0 8px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ant-table-content{
|
|
52
|
+
thead>tr>th{
|
|
53
|
+
height: 45px;
|
|
54
|
+
font-weight: 700;
|
|
55
|
+
color: @colorTable;
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
background: #f9faf9!important;
|
|
58
|
+
background: -webkit-linear-gradient(top, #f9faf9 0, #f0f0ef 100%)!important;
|
|
59
|
+
}
|
|
60
|
+
.ant-table-cell{
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
a[data-oper]{
|
|
63
|
+
margin-right: 10px;
|
|
64
|
+
&:last-child{
|
|
65
|
+
margin-right: 0;;
|
|
66
|
+
}
|
|
67
|
+
&[data-edit]{
|
|
68
|
+
color:@colorTable;
|
|
69
|
+
font-size: inherit;
|
|
70
|
+
}
|
|
71
|
+
&[data-view]{
|
|
72
|
+
color:@colorTable;
|
|
73
|
+
font-size: inherit;
|
|
74
|
+
}
|
|
75
|
+
&[data-cancel]{
|
|
76
|
+
color:#2a96fc;
|
|
77
|
+
font-size: inherit;
|
|
78
|
+
}
|
|
79
|
+
&:disabled{
|
|
80
|
+
color:#ccc;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//Pagination
|
|
87
|
+
.ant-pagination-item-active{
|
|
88
|
+
background-color: #108ee9;
|
|
89
|
+
a,
|
|
90
|
+
&:hover a,
|
|
91
|
+
&:focus a{
|
|
92
|
+
color:#fff;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.ant-pagination-next,
|
|
96
|
+
.ant-pagination-prev{
|
|
97
|
+
svg{font-size:10px;padding-bottom:2px;}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
//Input
|
|
101
|
+
.ant-input-group-addon{
|
|
102
|
+
border:0;
|
|
103
|
+
background:transparent;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
span.anticon.anticon-down.ant-input-number-handler-down-inner *,
|
|
109
|
+
span.anticon.anticon-up.ant-input-number-handler-up-inner *{
|
|
110
|
+
font-size:12px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
//Checkbox
|
|
117
|
+
.ant-checkbox-inner ,
|
|
118
|
+
.ant-checkbox-checked:after{
|
|
119
|
+
border-radius:0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ant-checkbox-checked .ant-checkbox-inner{
|
|
123
|
+
background-color:#108ee9;
|
|
124
|
+
border-color:#108ee9;
|
|
125
|
+
}
|
|
126
|
+
.ant-checkbox-group-item {
|
|
127
|
+
// margin-bottom: .08rem;
|
|
128
|
+
}
|
|
129
|
+
.ant-checkbox + span {font-weight:700;font-size:12px;}
|
|
130
|
+
|
|
131
|
+
.ant-checkbox-wrapper+.ant-checkbox-wrapper{
|
|
132
|
+
margin-left:0;
|
|
133
|
+
}
|
|
134
|
+
.ant-checkbox-wrapper:not(:last-child){
|
|
135
|
+
margin-right:8px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//Select
|
|
139
|
+
.ant-select-arrow .anticon.anticon-down,
|
|
140
|
+
.ant-select-open .ant-select-arrow .anticon.anticon-down {
|
|
141
|
+
transform-origin: 50% 30% ;
|
|
142
|
+
transition:none;
|
|
143
|
+
}
|
|
144
|
+
.ant-select-selection-search-input{
|
|
145
|
+
border-radius: 4px;
|
|
146
|
+
}
|
|
147
|
+
.ant-select-multiple .ant-select-selection-item-remove svg{
|
|
148
|
+
font-size:8px;
|
|
149
|
+
top:-2px;
|
|
150
|
+
}
|
|
151
|
+
.ant-select-arrow .anticon > svg {
|
|
152
|
+
font-size:8px;
|
|
153
|
+
top:1px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
.ant-btn.ant-btn-primary[data-submit] {
|
|
162
|
+
color: #fff;
|
|
163
|
+
background-color: #3ab925;
|
|
164
|
+
border-color: #3ab925;
|
|
165
|
+
}
|
|
166
|
+
.ant-btn.ant-btn-primary{
|
|
167
|
+
// background:#2a96fc;
|
|
168
|
+
&:hover{
|
|
169
|
+
opacity: .9;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
//Upload
|
|
174
|
+
.ant-upload-list-item-card-actions{
|
|
175
|
+
right:-14px;
|
|
176
|
+
}
|
|
177
|
+
.ant-upload-list-item-name{
|
|
178
|
+
color:#219efd;
|
|
179
|
+
}
|
|
180
|
+
.ant-upload-list{
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
flex-wrap: wrap;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
//Form.Item
|
|
187
|
+
//取消Form.Item下面会空一行的问题
|
|
188
|
+
.ant-form-item{
|
|
189
|
+
margin-bottom:0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
//label占1rem,控件占2.5rem的样式
|
|
193
|
+
.FORM_STYLE_08_25{
|
|
194
|
+
.ant-form-item{
|
|
195
|
+
width:370px;
|
|
196
|
+
.ant-form-item-label{
|
|
197
|
+
flex: 0 0 90px
|
|
198
|
+
}
|
|
199
|
+
.ant-form-item-control{
|
|
200
|
+
flex:1 1 auto;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
.FORM_STYLE_1_25{
|
|
205
|
+
.ant-form-item{
|
|
206
|
+
width:350px;
|
|
207
|
+
.ant-form-item-label{
|
|
208
|
+
flex: 0 0 100px;
|
|
209
|
+
}
|
|
210
|
+
.ant-form-item-control{
|
|
211
|
+
flex:1 1 auto;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
}
|