diff --git a/back/loaders/initData.ts b/back/loaders/initData.ts index 65e0126d..2e6e6a62 100644 --- a/back/loaders/initData.ts +++ b/back/loaders/initData.ts @@ -26,7 +26,7 @@ const initData = [ command: `sleep ${randomSchedule( 60, 1, - )} && diy whyour hundun "quanx/jx|quanx/jd" tokens >> $QL_DIR/log/diy_pull.log 2>&1`, + )} && diy https://ghproxy.com/https://github.com/whyour/hundun.git "quanx/jx|quanx/jd" tokens >> $QL_DIR/log/diy_pull.log 2>&1`, schedule: `${randomSchedule(60, 1)} ${randomSchedule( 24, 6, diff --git a/back/services/cookie.ts b/back/services/cookie.ts index 3c1b73a9..76a596ba 100644 --- a/back/services/cookie.ts +++ b/back/services/cookie.ts @@ -122,14 +122,15 @@ export default class CookieService { } public async create(payload: string[]): Promise { - const cookies = await this.cookies('', { postion: 1 }); + const cookies = await this.cookies(''); let position = initCookiePosition; if (cookies && cookies.length > 0) { - position = cookies[0].position / 2; + position = cookies[cookies.length - 1].position; } const tabs = payload.map((x) => { const cookie = new Cookie({ value: x, position }); position = position / 2; + cookie.position = position; return cookie; }); const docs = await this.insert(tabs); diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 501bb54f..59118709 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -3,6 +3,9 @@ set -e echo -e "======================1. 检测配置文件========================\n" [ ! -d ${QL_DIR}/config ] && mkdir -p ${QL_DIR}/config +[ ! -d ${QL_DIR}/log ] && mkdir -p ${QL_DIR}/log +[ ! -d ${QL_DIR}/db ] && mkdir -p ${QL_DIR}/db +[ ! -d ${QL_DIR}/manual_log ] && mkdir -p ${QL_DIR}/manual_log if [ ! -s ${QL_DIR}/config/crontab.list ] then diff --git a/shell/git_diy.sh b/shell/git_diy.sh index e0dd5358..b7df725b 100755 --- a/shell/git_diy.sh +++ b/shell/git_diy.sh @@ -32,7 +32,7 @@ mkdir -p ${diyscriptsdir} if [ ! -d "$diyscriptsdir/${author}_${repo}" ]; then echo -e "${author}本地仓库不存在,从远程拉取ing..." repoTmp=${url##*/} - repo=${repoTmpName%.*} + repo=${repoTmp%.*} tmp=${url%/*} author=${tmp##*/} cd ${diyscriptsdir} && git clone $url ${author}_${repo} diff --git a/shell/git_pull.sh b/shell/git_pull.sh index e445694b..36bb9f35 100755 --- a/shell/git_pull.sh +++ b/shell/git_pull.sh @@ -6,11 +6,8 @@ ShellDir=${QL_DIR:-$( )} [[ $QL_DIR ]] && ShellJs=js LogDir=$ShellDir/log -[ ! -d $LogDir ] && mkdir -p $LogDir DbDir=$ShellDir/db -[ ! -d $DbDir ] && mkdir -p $DbDir ManualLogDir=$ShellDir/manual_log -[ ! -d $ManualLogDir ] && mkdir -p $ManualLogDir ScriptsDir=$ShellDir/scripts ConfigDir=$ShellDir/config FileConf=$ConfigDir/config.sh @@ -177,7 +174,7 @@ Git_Pull_Scripts() { } Git_Pull_Scripts_Next() { - if [[ $ExitStatusShell -eq 0 ]]; then + if [[ $ExitStatusScripts -eq 0 ]]; then echo -e "更新scripts成功...\n" [ ! -d $ScriptsDir/node_modules ] && Npm_Install scripts [ -f $ScriptsDir/package.json ] && ScriptsDependNew=$(cat $ScriptsDir/package.json) diff --git a/src/pages/cookie/index.tsx b/src/pages/cookie/index.tsx index 14fdea01..51420308 100644 --- a/src/pages/cookie/index.tsx +++ b/src/pages/cookie/index.tsx @@ -114,7 +114,9 @@ const Config = () => { const match = record.value.match(/pt_pin=([^; ]+)(?=;?)/); const val = (match && match[1]) || '未匹配用户名'; return ( - {decodeURIComponent(val)} + + {decodeURIComponent(unescape(val))} + ); }, }, @@ -226,7 +228,7 @@ const Config = () => { useEffect(() => { if (value && loading) { - asyncUpdateStatus(); + // asyncUpdateStatus(); } }, [value]);