From 4e1a5c4e4cd54c4cbf49a21c91c890c602c88777 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 3 Feb 2021 18:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AA=E5=88=9B=E5=BB=BAru?= =?UTF-8?q?ntime/db=E6=96=87=E4=BB=B6=E5=A4=B9=E5=AF=BC=E8=87=B4=E5=8F=8D?= =?UTF-8?q?=E5=A4=8D=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/Config.php | 3 + app/domain/Crontab.php | 6 +- app/functions.php | 2 +- docker/AMD64/Dockerfile | 1 + docker/Arm64v8/Dockerfile | 1 + public/index.html | 198 +++++++-------- public/page/{ => setting}/user-password.html | 0 public/page/user-setting.html | 65 ----- public/page/welcome.html | 248 +++++++++---------- src/Reseed/Oauth.php | 2 + 10 files changed, 233 insertions(+), 293 deletions(-) rename public/page/{ => setting}/user-password.html (100%) delete mode 100644 public/page/user-setting.html diff --git a/app/common/Config.php b/app/common/Config.php index ff89e92..30e0245 100644 --- a/app/common/Config.php +++ b/app/common/Config.php @@ -119,6 +119,9 @@ class Config public static function createFilePath(string $name = '', string $type = 'array'):string { $ext = isset(self::extMap[$type]) ? self::extMap[$type] : self::extMap['object']; + clearstatcache(); + is_dir(db_path()) or mkdir(db_path(), 0777, true); + return db_path() . DIRECTORY_SEPARATOR . $name . $ext; } } diff --git a/app/domain/Crontab.php b/app/domain/Crontab.php index ad2f975..99c258d 100644 --- a/app/domain/Crontab.php +++ b/app/domain/Crontab.php @@ -228,10 +228,8 @@ class Crontab { clearstatcache(); $_dir = cron_path() . DIRECTORY_SEPARATOR . $dir; - if(!is_dir($_dir)) - { - mkdir($_dir, 0777, true); - } + is_dir($_dir) or mkdir($_dir, 0777, true); + return $_dir . DIRECTORY_SEPARATOR . $filename . $suffix; } diff --git a/app/functions.php b/app/functions.php index 1cfa525..dfeea5d 100644 --- a/app/functions.php +++ b/app/functions.php @@ -41,7 +41,7 @@ function getUUID(int $pid = 0):string if (function_exists('posix_getpid')) { $pid = posix_getpid(); } - return sprintf('pid%d_%d_%s', $pid, mt_rand(1, 9999), uniqid()); + return sprintf('pid%d_%s', $pid, uniqid()); } /** diff --git a/docker/AMD64/Dockerfile b/docker/AMD64/Dockerfile index a3b8101..6c755e7 100644 --- a/docker/AMD64/Dockerfile +++ b/docker/AMD64/Dockerfile @@ -28,6 +28,7 @@ ENV APP_ENV=${app_env:-"prod"} \ RUN set -ex \ # change apk source repo #&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \ + #&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \ && apk update \ && apk add --no-cache \ # Install base packages ('ca-certificates' will install 'nghttp2-libs') diff --git a/docker/Arm64v8/Dockerfile b/docker/Arm64v8/Dockerfile index d320499..ef9b89b 100644 --- a/docker/Arm64v8/Dockerfile +++ b/docker/Arm64v8/Dockerfile @@ -26,6 +26,7 @@ ENV APP_ENV=${app_env:-"prod"} \ RUN set -ex \ # change apk source repo #&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \ + #&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \ && apk update \ && apk add --no-cache \ # Install base packages ('ca-certificates' will install 'nghttp2-libs') diff --git a/public/index.html b/public/index.html index e35c331..4dcc1aa 100644 --- a/public/index.html +++ b/public/index.html @@ -1,118 +1,118 @@ - - IYUUAutoReseed PLUS - - - - - - - - - - - - - - - - - + + IYUUAutoReseed PLUS + + + + + + + + + + + + + + + + +
-
- +
+ -
- -
-
+
+ +
+
- -
    -
+ +
    +
- - + + -
+
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + admin +
    +
    + 基本资料 +
    +
    + 修改密码 +
    +
    +
    +
    +
    + +
    +
    +
  • +
  • + +
  • + +
    +
    + + +
    +
    + + +
    +
    +
    + + +
    + + +
    + +
    + + - -
    +
    - -
    -
    -
    - - -
    - - -
    - -
    - - - -
    -
    - -
    +
    diff --git a/public/page/user-password.html b/public/page/setting/user-password.html similarity index 100% rename from public/page/user-password.html rename to public/page/setting/user-password.html diff --git a/public/page/user-setting.html b/public/page/user-setting.html deleted file mode 100644 index 9295cc5..0000000 --- a/public/page/user-setting.html +++ /dev/null @@ -1,65 +0,0 @@ - -
    -
    - -
    -
    - -
    - - 填写自己管理账号的名称。 -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    -
    - \ No newline at end of file diff --git a/public/page/welcome.html b/public/page/welcome.html index f632053..b5cceaa 100644 --- a/public/page/welcome.html +++ b/public/page/welcome.html @@ -1,25 +1,25 @@
    @@ -232,8 +232,8 @@ 下载地址 - gitee:gitee
    - github:github + gitee:IYUUPlus | IYUUAutoReseed
    + github:IYUUPlus | IYUUAutoReseed @@ -267,8 +267,9 @@

    + 问答社区:问答社区

    + 爱语飞飞:爱语飞飞

    + 大卫博客:大卫博客

    -

    + layui开发文档地址:layui文档

    -

    + LayuiMini开发文档:LayuiMini开发文档

    +

    + webman开发文档:webman

    +

    + layui开发文档:layui

    +

    + LayuiMini开发文档:LayuiMini

    @@ -277,106 +278,105 @@
    diff --git a/src/Reseed/Oauth.php b/src/Reseed/Oauth.php index 52561e9..7861541 100644 --- a/src/Reseed/Oauth.php +++ b/src/Reseed/Oauth.php @@ -18,6 +18,8 @@ class Oauth */ public static function init($config = []) { + $dir = dirname(self::SiteLoginCache); + is_dir($dir) or mkdir($dir, 0777, true); self::$conf = $config; }