From 3c579c10a6d28c00404d2d2d13f062e833d6b192 Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 24 Mar 2021 19:43:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dck=E5=A1=AB=E5=86=99=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=8Cck=E5=88=97=E8=A1=A8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/cookie.ts | 21 +++++++++++++++------ docker/docker-entrypoint.sh | 6 ++++++ shell/rebuild.sh | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/back/services/cookie.ts b/back/services/cookie.ts index 11e4e14e..3836d5f4 100644 --- a/back/services/cookie.ts +++ b/back/services/cookie.ts @@ -266,12 +266,21 @@ export default class CookieService { const result = []; for (const x of data) { const { nickname, status } = await this.getJdInfo(x); - result.push({ - pin: x.match(/pt_pin=(.+?);/)[1], - cookie: x, - status, - nickname: nickname, - }); + if (/pt_pin=(.+?);/.test(x)) { + result.push({ + pin: x.match(/pt_pin=(.+?);/)[1], + cookie: x, + status, + nickname: nickname, + }); + } else { + result.push({ + pin: 'pin未匹配到', + cookie: x, + status, + nickname: nickname, + }); + } } return result; } diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 11ddff53..6316e39f 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -33,6 +33,12 @@ if [ ! -s ${JD_DIR}/config/auth.json ]; then echo fi +if [ -s /etc/nginx/conf.d/default.conf ]; then + echo -e "检测到默认nginx配置文件,删除...\n" + rm -f /etc/nginx/conf.d/default.conf + echo +fi + cp -fv ${JD_DIR}/docker/front.conf /etc/nginx/conf.d/front.conf echo -e "======================2. 启动nginx========================\n" diff --git a/shell/rebuild.sh b/shell/rebuild.sh index 6bd6c59a..dc452892 100644 --- a/shell/rebuild.sh +++ b/shell/rebuild.sh @@ -12,7 +12,7 @@ git reset --mixed echo -e "更新shell完成...\n" echo -e "重新build...\n" -yarn install +yarn install --registry=https://registry.npm.taobao.org yarn build yarn build-back echo -e "重新build完成...\n"