File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Set the default behavior, in case people don't have core.autocrlf set.
2
+ * text =auto
3
+
4
+ # Explicitly declare text files you want to always be normalized and converted
5
+ # to native line endings on checkout.
6
+ * .c text
7
+ * .h text
8
+
9
+ # Declare files that will always have CRLF line endings on checkout.
10
+ * .sln text eol =crlf
11
+
12
+ # Denote all files that are truly binary and should not be modified.
13
+ * .png binary
14
+ * .jpg binary
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ lerna-debug.log*
9
9
10
10
node_modules
11
11
dist
12
+ dist.tar.gz
12
13
dist-ssr
13
14
* .local
14
15
stats.html
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ TMP_WEB_PKG="tmp.tar.gz"
7
7
8
8
DEPLOY_SCRIPT=" launch.sh"
9
9
START_FUNC_NAME=" start"
10
+ BUILD_FUNC_NAME=" build"
10
11
INSTALL_FUNC_NAME=" install"
11
12
SERVER_FUNC_NAME=" server"
12
13
@@ -54,11 +55,13 @@ function server() {
54
55
}
55
56
56
57
function start() {
58
+ echo " ---- 开始部署 ----"
57
59
cd ${WORK_DIR_PRO}
58
60
mv ${WEB_PKG} ${WEB_PKG_BK}
59
61
mv ${ADMIN_WORKSPACE} " ${ADMIN_WORKSPACE} _bk"
60
62
mv ${TMP_WEB_PKG} ${WEB_PKG}
61
63
tar -zxvf ${WEB_PKG}
64
+ echo " ---- 部署完成 ----"
62
65
}
63
66
64
67
function deploy() {
@@ -102,6 +105,8 @@ function deploy() {
102
105
103
106
if [ " $1 " = " ${START_FUNC_NAME} " ]; then
104
107
start " $@ "
108
+ elif [ " $1 " = " ${BUILD_FUNC_NAME} " ]; then
109
+ build $1
105
110
elif [ " $1 " = " ${INSTALL_FUNC_NAME} " ]; then
106
111
install $1
107
112
elif [ " $1 " = " ${SERVER_FUNC_NAME} " ]; then
113
118
echo " 安装依赖: ./launch.sh install"
114
119
echo " 本地启动: ./launch.sh server"
115
120
echo " =========== 上传服务器 & 服务器解压使用 =============="
121
+ echo " 打包 dist.tar.gz: ./launch.sh build"
116
122
echo " 打包静态资源并上传到服务器 & 解压执行: ./launch.sh pro"
117
123
echo " 服务器上资源启用: ./launch.sh start"
118
124
fi
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import "./index.less";
14
14
15
15
const LayoutHeader = ( props : any ) => {
16
16
let { userInfo } = props || { } ;
17
- if ( ! userInfo ) {
17
+ if ( ! userInfo || JSON . stringify ( userInfo ) === "{}" ) {
18
18
let fetchUsrInfo = async ( ) => {
19
19
const { status, result } = await loginUserInfo ( ) ;
20
20
if ( status && status . code == 0 && result && result ?. userId > 0 ) {
You can’t perform that action at this time.
0 commit comments