Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fd8f53e87 | ||
|
|
f34a28ecbd | ||
|
|
8ef3e2e802 | ||
|
|
4826b8c758 | ||
|
|
23bb5aea41 |
@@ -0,0 +1,77 @@
|
|||||||
|
ARG ALPINE_VERSION=3.24
|
||||||
|
FROM alpine:${ALPINE_VERSION}
|
||||||
|
# Setup document root
|
||||||
|
WORKDIR /app/www
|
||||||
|
|
||||||
|
# Install packages and remove default server definition
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
nginx \
|
||||||
|
php83 \
|
||||||
|
php83-ctype \
|
||||||
|
php83-curl \
|
||||||
|
php83-dom \
|
||||||
|
php83-fileinfo \
|
||||||
|
php83-fpm \
|
||||||
|
php83-gd \
|
||||||
|
php83-gettext \
|
||||||
|
php83-intl \
|
||||||
|
php83-iconv \
|
||||||
|
php83-mbstring \
|
||||||
|
php83-mysqli \
|
||||||
|
php83-opcache \
|
||||||
|
php83-openssl \
|
||||||
|
php83-phar \
|
||||||
|
php83-sodium \
|
||||||
|
php83-session \
|
||||||
|
php83-simplexml \
|
||||||
|
php83-tokenizer \
|
||||||
|
php83-xml \
|
||||||
|
php83-xmlreader \
|
||||||
|
php83-xmlwriter \
|
||||||
|
php83-zip \
|
||||||
|
php83-pdo \
|
||||||
|
php83-pdo_mysql \
|
||||||
|
php83-pdo_sqlite \
|
||||||
|
supervisor \
|
||||||
|
&& ln -sf /usr/bin/php83 /usr/bin/php
|
||||||
|
|
||||||
|
RUN rm -rf /var/cache/apk/* /tmp/*
|
||||||
|
|
||||||
|
# Configure nginx - http
|
||||||
|
COPY config/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
# Configure PHP-FPM
|
||||||
|
ENV PHP_INI_DIR /etc/php83
|
||||||
|
COPY config/fpm-pool.conf ${PHP_INI_DIR}/php-fpm.d/www.conf
|
||||||
|
COPY config/php.ini ${PHP_INI_DIR}/conf.d/custom.ini
|
||||||
|
|
||||||
|
# Configure supervisord
|
||||||
|
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
# CACHE_BUST 须写进每条相关 RUN,否则 GHA/BuildKit 可能单独命中 composer 相关层缓存,vendor 仍来自旧构建
|
||||||
|
ARG CACHE_BUST=local
|
||||||
|
|
||||||
|
# Add application
|
||||||
|
RUN mkdir -p /usr/src && echo "$CACHE_BUST" >/dev/null && wget --no-cache https://github.com/netcccyun/toolbox/archive/refs/heads/main.zip -O /usr/src/www.zip && unzip /usr/src/www.zip -d /usr/src/ && mv /usr/src/toolbox-main /usr/src/www && rm -f /usr/src/www.zip
|
||||||
|
|
||||||
|
# Install composer(与下面 install 一并随 CACHE_BUST 失效)
|
||||||
|
RUN echo "$CACHE_BUST" >/dev/null && wget https://getcomposer.org/download/latest-stable/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer
|
||||||
|
|
||||||
|
RUN echo "$CACHE_BUST" >/dev/null && composer install -d /usr/src/www --no-interaction --no-dev --optimize-autoloader --no-cache
|
||||||
|
|
||||||
|
RUN adduser -D -s /sbin/nologin -g www www && chown -R www:www /usr/src/www /var/lib/nginx /var/log/nginx
|
||||||
|
|
||||||
|
# copy entrypoint script
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["sh", "/entrypoint.sh"]
|
||||||
|
|
||||||
|
# Expose the port nginx is reachable on
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Let supervisord start nginx & php-fpm
|
||||||
|
CMD /usr/sbin/crond && /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
# Configure a healthcheck to validate that everything is up&running
|
||||||
|
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1/fpm-ping || exit 1
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[global]
|
||||||
|
error_log = /dev/stderr
|
||||||
|
|
||||||
|
[www]
|
||||||
|
listen = /run/php-fpm.sock
|
||||||
|
listen.backlog = 8192
|
||||||
|
listen.allowed_clients = 127.0.0.1
|
||||||
|
listen.owner = www
|
||||||
|
listen.group = www
|
||||||
|
listen.mode = 0666
|
||||||
|
user = www
|
||||||
|
group = www
|
||||||
|
pm.status_path = /fpm-status
|
||||||
|
pm = ondemand
|
||||||
|
pm.max_children = 100
|
||||||
|
pm.process_idle_timeout = 60s;
|
||||||
|
pm.max_requests = 1000
|
||||||
|
clear_env = no
|
||||||
|
catch_workers_output = yes
|
||||||
|
decorate_workers_output = no
|
||||||
|
ping.path = /fpm-ping
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
user www;
|
||||||
|
worker_processes auto;
|
||||||
|
error_log stderr warn;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
# Threat files with a unknown filetype as binary
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# Define custom log format to include reponse times
|
||||||
|
log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for" '
|
||||||
|
'$request_time $upstream_response_time $pipe $upstream_cache_status';
|
||||||
|
|
||||||
|
access_log /dev/stdout main_timed;
|
||||||
|
error_log /dev/stderr crit;
|
||||||
|
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
|
# Enable gzip compression by default
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1k;
|
||||||
|
gzip_buffers 4 16k;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
|
||||||
|
# Include server configs
|
||||||
|
server {
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
listen 80 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
absolute_redirect off;
|
||||||
|
|
||||||
|
root /app/www/public;
|
||||||
|
index index.php index.html;
|
||||||
|
|
||||||
|
# Pass the PHP scripts to PHP-FPM listening on php-fpm.sock
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass unix:/run/php-fpm.sock;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rewrite rule for pretty urls
|
||||||
|
location / {
|
||||||
|
if (!-e $request_filename){
|
||||||
|
rewrite ^(.*)$ /index.php?s=$1 last; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the cache-control headers on assets to cache for 5 days
|
||||||
|
location ~* \.(jpg|jpeg|gif|png|ico|bmp)$ {
|
||||||
|
access_log off;
|
||||||
|
expires 30d;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(css|js)$ {
|
||||||
|
access_log off;
|
||||||
|
expires 12h;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deny access to . files, for security
|
||||||
|
location ~ /\. {
|
||||||
|
log_not_found off;
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Allow fpm ping and status from localhost
|
||||||
|
location ~ ^/(fpm-status|fpm-ping)$ {
|
||||||
|
access_log off;
|
||||||
|
allow 127.0.0.1;
|
||||||
|
deny all;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_pass unix:/run/php-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[PHP]
|
||||||
|
short_open_tag = On
|
||||||
|
expose_php = Off
|
||||||
|
max_execution_time = 300
|
||||||
|
post_max_size = 50M
|
||||||
|
upload_max_filesize = 50M
|
||||||
|
[Date]
|
||||||
|
date.timezone = PRC
|
||||||
|
[Opcache]
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.memory_consumption=128
|
||||||
|
opcache.interned_strings_buffer=32
|
||||||
|
opcache.max_accelerated_files=10000
|
||||||
|
opcache.revalidate_freq=30
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
logfile=/dev/null
|
||||||
|
logfile_maxbytes=0
|
||||||
|
pidfile=/run/supervisord.pid
|
||||||
|
|
||||||
|
[program:php-fpm]
|
||||||
|
command=php-fpm83 -F
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=false
|
||||||
|
startretries=0
|
||||||
|
|
||||||
|
[program:nginx]
|
||||||
|
command=nginx -g 'daemon off;'
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=false
|
||||||
|
startretries=0
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -f /app/www/public/index.php ] || [ ! -f /app/firstrun ]; then
|
||||||
|
echo 'Copying new files'
|
||||||
|
\cp -a /usr/src/www /app/
|
||||||
|
|
||||||
|
if [ -d /app/www/runtime/cache ]; then
|
||||||
|
rm -rf /app/www/runtime/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www:www /app/www
|
||||||
|
|
||||||
|
touch /app/firstrun
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
# 手动触发:构建多架构镜像(amd64 / arm64),仅推送 latest 至 Docker Hub 与华为云 SWR。
|
||||||
|
# Dockerfile 与构建上下文位于 .github/docker/ 目录。
|
||||||
|
#
|
||||||
|
# 需在仓库 Settings → Secrets 中配置:
|
||||||
|
# DOCKERHUB_USERNAME / DOCKERHUB_TOKEN(Docker Hub 访问令牌)
|
||||||
|
# HUAWEI_SWR_USERNAME / HUAWEI_SWR_PASSWORD(华为云 SWR 登录凭证,与本地 docker login swr.cn-east-3.myhuaweicloud.com 一致)
|
||||||
|
|
||||||
|
name: Docker Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to Huawei SWR
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: swr.cn-east-3.myhuaweicloud.com
|
||||||
|
username: ${{ secrets.HUAWEI_SWR_USERNAME }}
|
||||||
|
password: ${{ secrets.HUAWEI_SWR_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push (Docker Hub + Huawei SWR, latest only)
|
||||||
|
uses: docker/build-push-action@v7
|
||||||
|
with:
|
||||||
|
context: .github/docker
|
||||||
|
file: .github/docker/Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
outputs: type=registry,oci-mediatypes=false
|
||||||
|
# 每次运行唯一,打破「下载源码 + composer」等层的缓存,否则会一直用首次构建时的层
|
||||||
|
build-args: |
|
||||||
|
CACHE_BUST=${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
# 避免向仓库推送 attestations;部分镜像仓库(含部分 SWR 场景)无法解析导致 “fail to parse manifest.json”
|
||||||
|
provenance: false
|
||||||
|
sbom: false
|
||||||
|
tags: |
|
||||||
|
netcccyun/toolbox:latest
|
||||||
|
swr.cn-east-3.myhuaweicloud.com/netcccyun/toolbox:latest
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
### 🎊 环境要求
|
### 🎊 环境要求
|
||||||
|
|
||||||
* `PHP` >= 7.4
|
* `PHP` >= 8.2
|
||||||
* `MySQL` >= 5.6
|
* `MySQL` >= 5.6
|
||||||
* `fileinfo`扩展
|
* `fileinfo`扩展
|
||||||
* 使用`Redis`缓存需安装`Redis`扩展
|
* 使用`Redis`缓存需安装`Redis`扩展
|
||||||
@@ -72,6 +72,12 @@ location / {
|
|||||||
docker run --name toolbox -dit -p 8081:80 -v /var/toolbox:/app/www netcccyun/toolbox
|
docker run --name toolbox -dit -p 8081:80 -v /var/toolbox:/app/www netcccyun/toolbox
|
||||||
```
|
```
|
||||||
|
|
||||||
|
从国内镜像地址拉取:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker pull swr.cn-east-3.myhuaweicloud.com/netcccyun/toolbox:latest
|
||||||
|
```
|
||||||
|
|
||||||
#### 🍓 鸣谢
|
#### 🍓 鸣谢
|
||||||
|
|
||||||
* [aoaostar](https://github.com/aoaostar/toolbox)
|
* [aoaostar](https://github.com/aoaostar/toolbox)
|
||||||
|
|||||||
@@ -4,5 +4,9 @@ namespace app;
|
|||||||
// 应用请求对象类
|
// 应用请求对象类
|
||||||
class Request extends \think\Request
|
class Request extends \think\Request
|
||||||
{
|
{
|
||||||
|
/** @var bool 用户是否登录 */
|
||||||
|
public $islogin = false;
|
||||||
|
|
||||||
|
/** @var array|null 当前登录用户 */
|
||||||
|
public $user = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class Index extends Base
|
|||||||
$list = [];
|
$list = [];
|
||||||
|
|
||||||
$history = cookie('tools');
|
$history = cookie('tools');
|
||||||
if(strlen($history)>0){
|
if(!empty($history)){
|
||||||
$history = array_reverse(array_unique(explode(',',$history)));
|
$history = array_reverse(array_unique(explode(',',$history)));
|
||||||
$tool = Db::name('plugin')->cache('plugins', self::CACHE_TIME)->field('id,title,alias,keyword,request_count,category_id,level')->where('enable', 1)->order('weight','desc')->select();
|
$tool = Db::name('plugin')->cache('plugins', self::CACHE_TIME)->field('id,title,alias,keyword,request_count,category_id,level')->where('enable', 1)->order('weight','desc')->select();
|
||||||
$newtool = [];
|
$newtool = [];
|
||||||
|
|||||||
+106
-35
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace app\lib;
|
namespace app\lib;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 极验3.0 lib
|
* 极验3.0 lib
|
||||||
*/
|
*/
|
||||||
@@ -11,21 +13,24 @@ class GeetestLib
|
|||||||
private $geetest_id;
|
private $geetest_id;
|
||||||
private $geetest_key;
|
private $geetest_key;
|
||||||
|
|
||||||
public function __construct($geetest_id, $geetest_key) {
|
public function __construct($geetest_id, $geetest_key)
|
||||||
|
{
|
||||||
$this->geetest_id = $geetest_id;
|
$this->geetest_id = $geetest_id;
|
||||||
$this->geetest_key = $geetest_key;
|
$this->geetest_key = $geetest_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
//验证初始化
|
//验证初始化
|
||||||
public function pre_process($params) {
|
public function pre_process($params)
|
||||||
if(!empty($this->geetest_id) && !empty($this->geetest_key)){
|
{
|
||||||
|
if (!empty($this->geetest_id) && !empty($this->geetest_key)) {
|
||||||
return $this->pre_process_api($params);
|
return $this->pre_process_api($params);
|
||||||
}else{
|
} else {
|
||||||
return $this->pre_process_demo($params);
|
return $this->pre_process_demo($params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function pre_process_api($params) {
|
private function pre_process_api($params)
|
||||||
|
{
|
||||||
$public_params = [
|
$public_params = [
|
||||||
'digestmod' => 'md5',
|
'digestmod' => 'md5',
|
||||||
'gt' => $this->geetest_id,
|
'gt' => $this->geetest_id,
|
||||||
@@ -35,58 +40,65 @@ class GeetestLib
|
|||||||
$params = array_merge($params, $public_params);
|
$params = array_merge($params, $public_params);
|
||||||
$url = 'http://api.geetest.com/register.php?' . http_build_query($params);
|
$url = 'http://api.geetest.com/register.php?' . http_build_query($params);
|
||||||
$res = get_curl($url);
|
$res = get_curl($url);
|
||||||
$arr = json_decode($res, true);
|
if ($res) {
|
||||||
if($arr && isset($arr['challenge'])){
|
$arr = json_decode($res, true);
|
||||||
return $this->success_process($arr['challenge']);
|
if (isset($arr['challenge'])) {
|
||||||
}else{
|
return $this->success_process($arr['challenge']);
|
||||||
return $this->failback_process();
|
}
|
||||||
}
|
}
|
||||||
|
return $this->failback_process();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function success_process($challenge) {
|
private function success_process($challenge)
|
||||||
|
{
|
||||||
$challenge = md5($challenge . $this->geetest_key);
|
$challenge = md5($challenge . $this->geetest_key);
|
||||||
$result = array(
|
$result = array(
|
||||||
'success' => 1,
|
'success' => 1,
|
||||||
'gt' => $this->geetest_id,
|
'gt' => $this->geetest_id,
|
||||||
'challenge' => $challenge,
|
'challenge' => $challenge,
|
||||||
'new_captcha'=>true
|
'new_captcha' => true
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function failback_process() {
|
private function failback_process()
|
||||||
|
{
|
||||||
$challenge = md5(uniqid(mt_rand(), true) . microtime());
|
$challenge = md5(uniqid(mt_rand(), true) . microtime());
|
||||||
$result = array(
|
$result = array(
|
||||||
'success' => 0,
|
'success' => 0,
|
||||||
'gt' => $this->geetest_id,
|
'gt' => !empty($this->geetest_id) ? $this->geetest_id : 'e10adc3949ba59abbe56e057f20f883e',
|
||||||
'challenge' => $challenge,
|
'challenge' => $challenge,
|
||||||
'new_captcha'=>true
|
'new_captcha' => true
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function pre_process_demo($params) {
|
private function pre_process_demo($params)
|
||||||
|
{
|
||||||
$url = 'https://www.geetest.com/demo/gt/register-fullpage?t=' . time() . "123";
|
$url = 'https://www.geetest.com/demo/gt/register-fullpage?t=' . time() . "123";
|
||||||
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
||||||
$data = get_curl($url, 0, $referer);
|
$data = get_curl($url, 0, $referer);
|
||||||
$arr = json_decode($data, true);
|
if ($data) {
|
||||||
if($arr && isset($arr['challenge'])){
|
$arr = json_decode($data, true);
|
||||||
return $arr;
|
if (isset($arr['challenge'])) {
|
||||||
}else{
|
return $arr;
|
||||||
return $this->failback_process();
|
}
|
||||||
}
|
}
|
||||||
|
return $this->failback_process();
|
||||||
}
|
}
|
||||||
|
|
||||||
//正常流程下(即验证初始化成功),二次验证
|
//正常流程下(即验证初始化成功),二次验证
|
||||||
public function success_validate($challenge, $validate, $seccode, $params) {
|
public function success_validate($challenge, $validate, $seccode, $params)
|
||||||
if(!empty($this->geetest_id) && !empty($this->geetest_key)){
|
{
|
||||||
|
if (!empty($this->geetest_id) && !empty($this->geetest_key)) {
|
||||||
return $this->success_validate_api($challenge, $validate, $seccode, $params);
|
return $this->success_validate_api($challenge, $validate, $seccode, $params);
|
||||||
}else{
|
} else {
|
||||||
return $this->success_validate_demo($challenge, $validate, $seccode);
|
return $this->success_validate_demo($challenge, $validate, $seccode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function success_validate_api($challenge, $validate, $seccode, $params) {
|
private function success_validate_api($challenge, $validate, $seccode, $params)
|
||||||
|
{
|
||||||
if (!$this->check_validate($challenge, $validate)) {
|
if (!$this->check_validate($challenge, $validate)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -101,15 +113,16 @@ class GeetestLib
|
|||||||
$url = 'http://api.geetest.com/validate.php';
|
$url = 'http://api.geetest.com/validate.php';
|
||||||
$res = get_curl($url, http_build_query($params));
|
$res = get_curl($url, http_build_query($params));
|
||||||
$arr = json_decode($res, true);
|
$arr = json_decode($res, true);
|
||||||
if($arr && isset($arr['seccode'])){
|
if ($arr && isset($arr['seccode'])) {
|
||||||
if($arr['seccode'] == md5($seccode)){
|
if ($arr['seccode'] == md5($seccode)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function check_validate($challenge, $validate) {
|
private function check_validate($challenge, $validate)
|
||||||
|
{
|
||||||
if (strlen($validate) != 32) {
|
if (strlen($validate) != 32) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -119,7 +132,8 @@ class GeetestLib
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function success_validate_demo($challenge, $validate, $seccode) {
|
private function success_validate_demo($challenge, $validate, $seccode)
|
||||||
|
{
|
||||||
$params = [
|
$params = [
|
||||||
'geetest_challenge' => $challenge,
|
'geetest_challenge' => $challenge,
|
||||||
'geetest_validate' => $validate,
|
'geetest_validate' => $validate,
|
||||||
@@ -128,19 +142,76 @@ class GeetestLib
|
|||||||
$url = 'https://www.geetest.com/demo/gt/validate-fullpage';
|
$url = 'https://www.geetest.com/demo/gt/validate-fullpage';
|
||||||
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
||||||
$data = get_curl($url, http_build_query($params), $referer);
|
$data = get_curl($url, http_build_query($params), $referer);
|
||||||
$arr = json_decode($data, true);
|
if ($data) {
|
||||||
if($arr && $arr['status'] == 'success'){
|
$arr = json_decode($data, true);
|
||||||
return true;
|
if (isset($arr['status']) && $arr['status'] == 'success') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//异常流程下(即验证初始化失败,宕机模式),二次验证
|
//异常流程下(即验证初始化失败,宕机模式),二次验证
|
||||||
public function fail_validate($challenge, $validate, $seccode) {
|
public function fail_validate($challenge, $validate, $seccode)
|
||||||
if(md5($challenge) == $validate){
|
{
|
||||||
|
if (md5($challenge) == $validate) {
|
||||||
return true;
|
return true;
|
||||||
}else{
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function gt4_validate($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output)
|
||||||
|
{
|
||||||
|
if (!empty($this->geetest_id) && !empty($this->geetest_key)) {
|
||||||
|
return $this->gt4_validate_api($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output);
|
||||||
|
} else {
|
||||||
|
return $this->gt4_validate_demo($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function gt4_validate_api($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output)
|
||||||
|
{
|
||||||
|
$url = 'http://gcaptcha4.geetest.com/validate?captcha_id=' . $captcha_id;
|
||||||
|
$param = [
|
||||||
|
'lot_number' => $lot_number,
|
||||||
|
'pass_token' => $pass_token,
|
||||||
|
'gen_time' => $gen_time,
|
||||||
|
'captcha_output' => $captcha_output
|
||||||
|
];
|
||||||
|
$param['sign_token'] = hash_hmac('sha256', $param['lot_number'], $this->geetest_key);
|
||||||
|
$data = get_curl($url, http_build_query($param));
|
||||||
|
if ($data) {
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if (isset($arr['status']) && $arr['status'] == 'success') {
|
||||||
|
if (isset($arr['result']) && $arr['result'] == 'success') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function gt4_validate_demo($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output)
|
||||||
|
{
|
||||||
|
$url = 'http://gt4.geetest.com/demov4/demo/login';
|
||||||
|
$param = [
|
||||||
|
'captcha_id' => $captcha_id,
|
||||||
|
'lot_number' => $lot_number,
|
||||||
|
'pass_token' => $pass_token,
|
||||||
|
'gen_time' => $gen_time,
|
||||||
|
'captcha_output' => $captcha_output
|
||||||
|
];
|
||||||
|
$referer = 'http://gt4.geetest.com/demov4/invisible-bind-zh.html';
|
||||||
|
$httpheader[] = "X-Real-IP: " . request()->clientip;
|
||||||
|
$httpheader[] = "X-Forwarded-For: " . request()->clientip;
|
||||||
|
$data = get_curl($url . '?' . http_build_query($param), 0, $referer, 0, 0, 0, 0, $httpheader);
|
||||||
|
if ($data) {
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if (isset($arr['result']) && $arr['result'] == 'success') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ class AuthAdmin
|
|||||||
$islogin = false;
|
$islogin = false;
|
||||||
$cookie = cookie('admin_token');
|
$cookie = cookie('admin_token');
|
||||||
if($cookie){
|
if($cookie){
|
||||||
$token=authcode($cookie, 'DECODE', config_get('syskey'));
|
$token=authcode($cookie, 'DECODE', config_get('syskey', ''));
|
||||||
if($token){
|
if($token){
|
||||||
list($user, $sid, $expiretime) = explode("\t", $token);
|
list($user, $sid, $expiretime) = explode("\t", $token);
|
||||||
$session=md5(config_get('admin_username').config_get('admin_password'));
|
$session=md5(config_get('admin_username').config_get('admin_password'));
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class AuthUser
|
|||||||
$cookie = cookie('user_token');
|
$cookie = cookie('user_token');
|
||||||
$user = null;
|
$user = null;
|
||||||
if($cookie){
|
if($cookie){
|
||||||
$token=authcode($cookie, 'DECODE', config_get('syskey'));
|
$token=authcode($cookie, 'DECODE', config_get('syskey', ''));
|
||||||
if($token){
|
if($token){
|
||||||
list($uid, $sid, $expiretime) = explode("\t", $token);
|
list($uid, $sid, $expiretime) = explode("\t", $token);
|
||||||
$user = Db::name('user')->where('id', $uid)->find();
|
$user = Db::name('user')->where('id', $uid)->find();
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ namespace app\middleware;
|
|||||||
|
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use think\facade\Config;
|
use think\facade\Config;
|
||||||
|
use think\facade\Cache;
|
||||||
|
use think\helper\Str;
|
||||||
|
|
||||||
class LoadConfig
|
class LoadConfig
|
||||||
{
|
{
|
||||||
@@ -22,6 +24,12 @@ class LoadConfig
|
|||||||
}
|
}
|
||||||
|
|
||||||
$res = Db::name('config')->cache('configs',0)->column('value','key');
|
$res = Db::name('config')->cache('configs',0)->column('value','key');
|
||||||
|
if (empty($res['syskey'])) {
|
||||||
|
$syskey = Str::random(16);
|
||||||
|
config_set('syskey', $syskey);
|
||||||
|
Cache::delete('configs');
|
||||||
|
$res['syskey'] = $syskey;
|
||||||
|
}
|
||||||
Config::set($res, 'sys');
|
Config::set($res, 'sys');
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|||||||
+12
-7
@@ -9,22 +9,27 @@
|
|||||||
"homepage": "http://tool.cccyun.cc/",
|
"homepage": "http://tool.cccyun.cc/",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3.5",
|
"php": ">=8.2.0",
|
||||||
"topthink/framework": "^6.0.0",
|
"topthink/framework": "^8.1.0",
|
||||||
"topthink/think-orm": "^2.0",
|
"topthink/think-orm": "^3.0|^4.0",
|
||||||
"topthink/think-view": "^1.0",
|
"topthink/think-filesystem": "^2.0|^3.0",
|
||||||
|
"topthink/think-view": "^2.0",
|
||||||
"topthink/think-migration": "^3.0",
|
"topthink/think-migration": "^3.0",
|
||||||
"cccyun/think-captcha": "^3.0",
|
"cccyun/think-captcha": "^3.0",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
"ext-gd": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"ext-openssl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-zip": "*",
|
"ext-zip": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
"khanamiryan/qrcode-detector-decoder": "1.0.5.2"
|
"cccyun/php-whois": "^1.2",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/var-dumper": "^4.2",
|
"topthink/think-dumper": "^1.0",
|
||||||
"topthink/think-trace": "^1.0"
|
"topthink/think-trace": "^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
Generated
+840
-296
@@ -4,20 +4,80 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "90b52d33a495d2606004dc98c6c983ae",
|
"content-hash": "2460d31b05b74ff525434e1be3eff065",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "cccyun/think-captcha",
|
"name": "cccyun/php-whois",
|
||||||
"version": "3.0.11",
|
"version": "1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/netcccyun/think-captcha.git",
|
"url": "https://github.com/netcccyun/php-whois.git",
|
||||||
"reference": "40012811bf27b41011b1b60bcfadf16ad339931c"
|
"reference": "f02627ba0bef005aa9e336d63541f9fd288675b5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/netcccyun/think-captcha/zipball/40012811bf27b41011b1b60bcfadf16ad339931c",
|
"url": "https://api.github.com/repos/netcccyun/php-whois/zipball/f02627ba0bef005aa9e336d63541f9fd288675b5",
|
||||||
"reference": "40012811bf27b41011b1b60bcfadf16ad339931c",
|
"reference": "f02627ba0bef005aa9e336d63541f9fd288675b5",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"php": ">=7.2",
|
||||||
|
"symfony/polyfill-intl-idn": "^1.27"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Iodev\\": "src/Iodev/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "caihong",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 5.4+ and 7+ compatible ",
|
||||||
|
"homepage": "https://github.com/netcccyun/php-whois",
|
||||||
|
"keywords": [
|
||||||
|
"asn",
|
||||||
|
"domain",
|
||||||
|
"info",
|
||||||
|
"lookup",
|
||||||
|
"parser",
|
||||||
|
"php",
|
||||||
|
"query",
|
||||||
|
"routes",
|
||||||
|
"tld",
|
||||||
|
"whois",
|
||||||
|
"црщшы"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/netcccyun/php-whois/tree/1.3"
|
||||||
|
},
|
||||||
|
"time": "2026-02-12T05:56:18+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cccyun/think-captcha",
|
||||||
|
"version": "3.0.12",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/netcccyun/think-captcha.git",
|
||||||
|
"reference": "e20974d9f86a7e3039ead56a66995c396109a757"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/netcccyun/think-captcha/zipball/e20974d9f86a7e3039ead56a66995c396109a757",
|
||||||
|
"reference": "e20974d9f86a7e3039ead56a66995c396109a757",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -54,29 +114,32 @@
|
|||||||
],
|
],
|
||||||
"description": "captcha package for thinkphp",
|
"description": "captcha package for thinkphp",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/netcccyun/think-captcha/tree/3.0.11"
|
"source": "https://github.com/netcccyun/think-captcha/tree/3.0.12"
|
||||||
},
|
},
|
||||||
"time": "2025-04-26T08:37:18+00:00"
|
"time": "2026-06-23T15:30:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "khanamiryan/qrcode-detector-decoder",
|
"name": "khanamiryan/qrcode-detector-decoder",
|
||||||
"version": "1.0.5.2",
|
"version": "2.0.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git",
|
"url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git",
|
||||||
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1"
|
"reference": "17c570bb39f641cc1c4c41a46177ac491393a01d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1",
|
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/17c570bb39f641cc1c4c41a46177ac491393a01d",
|
||||||
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1",
|
"reference": "17c570bb39f641cc1c4c41a46177ac491393a01d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6"
|
"php": ">=8.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5.7 | ^7.5 | ^8.0 | ^9.0"
|
"phpunit/phpunit": "^7.5 | ^8.0 | ^9.0",
|
||||||
|
"rector/rector": "^1.0.4",
|
||||||
|
"symplify/easy-coding-standard": "^11.0",
|
||||||
|
"vimeo/psalm": "^4.24"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -109,28 +172,221 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/khanamiryan/php-qrcode-detector-decoder/issues",
|
"issues": "https://github.com/khanamiryan/php-qrcode-detector-decoder/issues",
|
||||||
"source": "https://github.com/khanamiryan/php-qrcode-detector-decoder/tree/1.0.5.2"
|
"source": "https://github.com/khanamiryan/php-qrcode-detector-decoder/tree/2.0.3"
|
||||||
},
|
},
|
||||||
"time": "2021-07-13T18:46:38+00:00"
|
"time": "2025-06-10T08:44:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/container",
|
"name": "league/flysystem",
|
||||||
"version": "1.1.2",
|
"version": "3.35.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/container.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
|
"reference": "b277b5dc3d56650b68904117124e79c851e12376"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b277b5dc3d56650b68904117124e79c851e12376",
|
||||||
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
|
"reference": "b277b5dc3d56650b68904117124e79c851e12376",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"league/flysystem-local": "^3.0.0",
|
||||||
|
"league/mime-type-detection": "^1.0.0",
|
||||||
|
"php": "^8.0.2"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"async-aws/core": "<1.19.0",
|
||||||
|
"async-aws/s3": "<1.14.0",
|
||||||
|
"aws/aws-sdk-php": "3.209.31 || 3.210.0",
|
||||||
|
"guzzlehttp/guzzle": "<7.0",
|
||||||
|
"guzzlehttp/ringphp": "<1.1.1",
|
||||||
|
"phpseclib/phpseclib": "3.0.15",
|
||||||
|
"symfony/http-client": "<5.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"async-aws/s3": "^1.5 || ^2.0",
|
||||||
|
"async-aws/simple-s3": "^1.1 || ^2.0",
|
||||||
|
"aws/aws-sdk-php": "^3.295.10",
|
||||||
|
"composer/semver": "^3.0",
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"ext-ftp": "*",
|
||||||
|
"ext-mongodb": "^1.3|^2",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.5",
|
||||||
|
"google/cloud-storage": "^1.23",
|
||||||
|
"guzzlehttp/psr7": "^2.6",
|
||||||
|
"microsoft/azure-storage-blob": "^1.1",
|
||||||
|
"mongodb/mongodb": "^1.2|^2",
|
||||||
|
"phpseclib/phpseclib": "^3.0.36",
|
||||||
|
"phpstan/phpstan": "^1.10",
|
||||||
|
"phpunit/phpunit": "^9.5.11|^10.0",
|
||||||
|
"sabre/dav": "^4.6.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\Flysystem\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "File storage abstraction for PHP",
|
||||||
|
"keywords": [
|
||||||
|
"WebDAV",
|
||||||
|
"aws",
|
||||||
|
"cloud",
|
||||||
|
"file",
|
||||||
|
"files",
|
||||||
|
"filesystem",
|
||||||
|
"filesystems",
|
||||||
|
"ftp",
|
||||||
|
"s3",
|
||||||
|
"sftp",
|
||||||
|
"storage"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||||
|
"source": "https://github.com/thephpleague/flysystem/tree/3.35.2"
|
||||||
|
},
|
||||||
|
"time": "2026-07-06T14:42:07+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "league/flysystem-local",
|
||||||
|
"version": "3.31.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thephpleague/flysystem-local.git",
|
||||||
|
"reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/2f669db18a4c20c755c2bb7d3a7b0b2340488079",
|
||||||
|
"reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"league/flysystem": "^3.0.0",
|
||||||
|
"league/mime-type-detection": "^1.0.0",
|
||||||
|
"php": "^8.0.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\Flysystem\\Local\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Local filesystem adapter for Flysystem.",
|
||||||
|
"keywords": [
|
||||||
|
"Flysystem",
|
||||||
|
"file",
|
||||||
|
"files",
|
||||||
|
"filesystem",
|
||||||
|
"local"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/thephpleague/flysystem-local/tree/3.31.0"
|
||||||
|
},
|
||||||
|
"time": "2026-01-23T15:30:45+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "league/mime-type-detection",
|
||||||
|
"version": "1.17.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||||
|
"reference": "f5f47eff7c48ed1003069a2ca67f316fb4021c76"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/f5f47eff7c48ed1003069a2ca67f316fb4021c76",
|
||||||
|
"reference": "f5f47eff7c48ed1003069a2ca67f316fb4021c76",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"php": "^7.4 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.2",
|
||||||
|
"phpstan/phpstan": "^0.12.68",
|
||||||
|
"phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0 || ^11.0 || ^12.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\MimeTypeDetection\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Mime-type detection for Flysystem",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||||
|
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.17.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/frankdejonge",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-07-09T11:49:27+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/container",
|
||||||
|
"version": "2.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/container.git",
|
||||||
|
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
|
||||||
|
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.4.0"
|
"php": ">=7.4.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Container\\": "src/"
|
"Psr\\Container\\": "src/"
|
||||||
@@ -157,22 +413,22 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/php-fig/container/issues",
|
"issues": "https://github.com/php-fig/container/issues",
|
||||||
"source": "https://github.com/php-fig/container/tree/1.1.2"
|
"source": "https://github.com/php-fig/container/tree/2.0.2"
|
||||||
},
|
},
|
||||||
"time": "2021-11-05T16:50:12+00:00"
|
"time": "2021-11-05T16:47:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-message",
|
"name": "psr/http-message",
|
||||||
"version": "1.1",
|
"version": "2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/http-message.git",
|
"url": "https://github.com/php-fig/http-message.git",
|
||||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
|
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -181,7 +437,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.1.x-dev"
|
"dev-master": "2.0.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -196,7 +452,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "PHP-FIG",
|
"name": "PHP-FIG",
|
||||||
"homepage": "http://www.php-fig.org/"
|
"homepage": "https://www.php-fig.org/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Common interface for HTTP messages",
|
"description": "Common interface for HTTP messages",
|
||||||
@@ -210,36 +466,36 @@
|
|||||||
"response"
|
"response"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/php-fig/http-message/tree/1.1"
|
"source": "https://github.com/php-fig/http-message/tree/2.0"
|
||||||
},
|
},
|
||||||
"time": "2023-04-04T09:50:52+00:00"
|
"time": "2023-04-04T09:54:51+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/log",
|
"name": "psr/log",
|
||||||
"version": "1.1.4",
|
"version": "3.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/log.git",
|
"url": "https://github.com/php-fig/log.git",
|
||||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
"url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0"
|
"php": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.1.x-dev"
|
"dev-master": "3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Log\\": "Psr/Log/"
|
"Psr\\Log\\": "src"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
@@ -260,31 +516,31 @@
|
|||||||
"psr-3"
|
"psr-3"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/php-fig/log/tree/1.1.4"
|
"source": "https://github.com/php-fig/log/tree/3.0.2"
|
||||||
},
|
},
|
||||||
"time": "2021-05-03T11:20:27+00:00"
|
"time": "2024-09-11T13:17:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/simple-cache",
|
"name": "psr/simple-cache",
|
||||||
"version": "1.0.1",
|
"version": "3.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/simple-cache.git",
|
"url": "https://github.com/php-fig/simple-cache.git",
|
||||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865",
|
||||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0"
|
"php": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "3.0.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -299,7 +555,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "PHP-FIG",
|
"name": "PHP-FIG",
|
||||||
"homepage": "http://www.php-fig.org/"
|
"homepage": "https://www.php-fig.org/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Common interfaces for simple caching",
|
"description": "Common interfaces for simple caching",
|
||||||
@@ -311,40 +567,215 @@
|
|||||||
"simple-cache"
|
"simple-cache"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/php-fig/simple-cache/tree/master"
|
"source": "https://github.com/php-fig/simple-cache/tree/3.0.0"
|
||||||
},
|
},
|
||||||
"time": "2017-10-23T01:57:42+00:00"
|
"time": "2021-10-29T13:26:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/framework",
|
"name": "symfony/polyfill-intl-idn",
|
||||||
"version": "v6.1.5",
|
"version": "v1.38.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/framework.git",
|
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||||
"reference": "57d1950a1844ef8d3098ea290032aeb92e2e32c3"
|
"reference": "dc21118016c039a66235cf93d96b435ffb282412"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/framework/zipball/57d1950a1844ef8d3098ea290032aeb92e2e32c3",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/dc21118016c039a66235cf93d96b435ffb282412",
|
||||||
"reference": "57d1950a1844ef8d3098ea290032aeb92e2e32c3",
|
"reference": "dc21118016c039a66235cf93d96b435ffb282412",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
"php": ">=7.2",
|
||||||
|
"symfony/polyfill-intl-normalizer": "^1.10"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Laurent Bassin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Trevor Rowbotham",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"idn",
|
||||||
|
"intl",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.38.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-05-25T15:22:23+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-intl-normalizer",
|
||||||
|
"version": "v1.38.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||||
|
"reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b",
|
||||||
|
"reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for intl's Normalizer class and related functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"intl",
|
||||||
|
"normalizer",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-05-25T13:48:31+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/framework",
|
||||||
|
"version": "v8.1.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/framework.git",
|
||||||
|
"reference": "8e7b2b2364047cbf71a38c4e397a9ca0d4ef2b01"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/framework/zipball/8e7b2b2364047cbf71a38c4e397a9ca0d4ef2b01",
|
||||||
|
"reference": "8e7b2b2364047cbf71a38c4e397a9ca0d4ef2b01",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-ctype": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"php": ">=7.2.5",
|
"php": ">=8.0.0",
|
||||||
"psr/container": "~1.0",
|
"psr/http-message": "^1.0|^2.0",
|
||||||
"psr/http-message": "^1.0",
|
"psr/log": "^1.0|^2.0|^3.0",
|
||||||
"psr/log": "~1.0",
|
"psr/simple-cache": "^1.0|^2.0|^3.0",
|
||||||
"psr/simple-cache": "^1.0",
|
"topthink/think-container": "^3.0",
|
||||||
"topthink/think-helper": "^3.1.1",
|
"topthink/think-helper": "^3.1",
|
||||||
"topthink/think-orm": "^2.0|^3.0"
|
"topthink/think-orm": "^3.0|^4.0",
|
||||||
|
"topthink/think-validate": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.92",
|
||||||
"guzzlehttp/psr7": "^2.1.0",
|
"guzzlehttp/psr7": "^2.1.0",
|
||||||
"mikey179/vfsstream": "^1.6",
|
"mikey179/vfsstream": "^1.6",
|
||||||
"mockery/mockery": "^1.2",
|
"mockery/mockery": "^1.2",
|
||||||
"phpunit/phpunit": "^7.0"
|
"phpunit/phpunit": "^9.5"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -376,22 +807,115 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/top-think/framework/issues",
|
"issues": "https://github.com/top-think/framework/issues",
|
||||||
"source": "https://github.com/top-think/framework/tree/v6.1.5"
|
"source": "https://github.com/top-think/framework/tree/v8.1.4"
|
||||||
},
|
},
|
||||||
"time": "2024-04-16T02:01:19+00:00"
|
"time": "2026-01-15T02:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-helper",
|
"name": "topthink/think-container",
|
||||||
"version": "v3.1.11",
|
"version": "v3.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-helper.git",
|
"url": "https://github.com/top-think/think-container.git",
|
||||||
"reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c"
|
"reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-helper/zipball/1d6ada9b9f3130046bf6922fe1bd159c8d88a33c",
|
"url": "https://api.github.com/repos/top-think/think-container/zipball/b2df244be1e7399ad4c8be1ccc40ed57868f730a",
|
||||||
"reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c",
|
"reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0",
|
||||||
|
"psr/container": "^2.0",
|
||||||
|
"topthink/think-helper": "^3.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Container & Facade Manager",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-container/issues",
|
||||||
|
"source": "https://github.com/top-think/think-container/tree/v3.0.2"
|
||||||
|
},
|
||||||
|
"time": "2025-04-07T03:21:51+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-filesystem",
|
||||||
|
"version": "v3.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-filesystem.git",
|
||||||
|
"reference": "7a1231a65bca278de9b7f9236767eef9741dfe5c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-filesystem/zipball/7a1231a65bca278de9b7f9236767eef9741dfe5c",
|
||||||
|
"reference": "7a1231a65bca278de9b7f9236767eef9741dfe5c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"league/flysystem": "^3.0",
|
||||||
|
"php": "^8.2",
|
||||||
|
"topthink/framework": "^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mikey179/vfsstream": "^1.6",
|
||||||
|
"mockery/mockery": "^1.2",
|
||||||
|
"phpunit/phpunit": "^11.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The ThinkPHP6.1 Filesystem Package",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-filesystem/issues",
|
||||||
|
"source": "https://github.com/top-think/think-filesystem/tree/v3.0.0"
|
||||||
|
},
|
||||||
|
"time": "2024-12-10T06:23:28+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-helper",
|
||||||
|
"version": "v3.1.12",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-helper.git",
|
||||||
|
"reference": "fe277121112a8f1c872e169a733ca80bb11c4acb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-helper/zipball/fe277121112a8f1c872e169a733ca80bb11c4acb",
|
||||||
|
"reference": "fe277121112a8f1c872e169a733ca80bb11c4acb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -422,9 +946,9 @@
|
|||||||
"description": "The ThinkPHP6 Helper Package",
|
"description": "The ThinkPHP6 Helper Package",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/top-think/think-helper/issues",
|
"issues": "https://github.com/top-think/think-helper/issues",
|
||||||
"source": "https://github.com/top-think/think-helper/tree/v3.1.11"
|
"source": "https://github.com/top-think/think-helper/tree/v3.1.12"
|
||||||
},
|
},
|
||||||
"time": "2025-04-07T06:55:59+00:00"
|
"time": "2025-12-26T09:58:29+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-migration",
|
"name": "topthink/think-migration",
|
||||||
@@ -485,32 +1009,37 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-orm",
|
"name": "topthink/think-orm",
|
||||||
"version": "v2.0.62",
|
"version": "v4.0.51",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-orm.git",
|
"url": "https://github.com/top-think/think-orm.git",
|
||||||
"reference": "e53bfea572a133039ad687077120de5521af617f"
|
"reference": "46abe2f824eb3bcb117d4c0ce93b203b592b79f7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/e53bfea572a133039ad687077120de5521af617f",
|
"url": "https://api.github.com/repos/top-think/think-orm/zipball/46abe2f824eb3bcb117d4c0ce93b203b592b79f7",
|
||||||
"reference": "e53bfea572a133039ad687077120de5521af617f",
|
"reference": "46abe2f824eb3bcb117d4c0ce93b203b592b79f7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"php": ">=7.1.0",
|
"php": ">=8.0.0",
|
||||||
"psr/log": "^1.0|^2.0",
|
"psr/log": ">=1.0",
|
||||||
"psr/simple-cache": "^1.0|^2.0",
|
"psr/simple-cache": "^3.0",
|
||||||
"topthink/think-helper": "^3.1"
|
"topthink/think-helper": "^3.1",
|
||||||
|
"topthink/think-validate": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^7|^8|^9.5"
|
"phpunit/phpunit": "^9.6|^10"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-mongodb": "provide mongodb support"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
|
"src/helper.php",
|
||||||
"stubs/load_stubs.php"
|
"stubs/load_stubs.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -527,34 +1056,34 @@
|
|||||||
"email": "[email protected]"
|
"email": "[email protected]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "think orm",
|
"description": "the PHP Database&ORM Framework",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"database",
|
"database",
|
||||||
"orm"
|
"orm"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/top-think/think-orm/issues",
|
"issues": "https://github.com/top-think/think-orm/issues",
|
||||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.62"
|
"source": "https://github.com/top-think/think-orm/tree/v4.0.51"
|
||||||
},
|
},
|
||||||
"time": "2024-09-22T06:17:47+00:00"
|
"time": "2025-12-18T13:11:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-template",
|
"name": "topthink/think-template",
|
||||||
"version": "v2.0.10",
|
"version": "v3.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-template.git",
|
"url": "https://github.com/top-think/think-template.git",
|
||||||
"reference": "2b28c9f787c94f6c22312c9fe97dd3d926c03e1c"
|
"reference": "0b88bd449f0f7626dd75b05f557c8bc208c08b0c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-template/zipball/2b28c9f787c94f6c22312c9fe97dd3d926c03e1c",
|
"url": "https://api.github.com/repos/top-think/think-template/zipball/0b88bd449f0f7626dd75b05f557c8bc208c08b0c",
|
||||||
"reference": "2b28c9f787c94f6c22312c9fe97dd3d926c03e1c",
|
"reference": "0b88bd449f0f7626dd75b05f557c8bc208c08b0c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1.0",
|
"php": ">=8.0.0",
|
||||||
"psr/simple-cache": "^1.0"
|
"psr/simple-cache": ">=1.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -575,27 +1104,71 @@
|
|||||||
"description": "the php template engine",
|
"description": "the php template engine",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/top-think/think-template/issues",
|
"issues": "https://github.com/top-think/think-template/issues",
|
||||||
"source": "https://github.com/top-think/think-template/tree/v2.0.10"
|
"source": "https://github.com/top-think/think-template/tree/v3.0.2"
|
||||||
},
|
},
|
||||||
"time": "2024-08-12T05:48:57+00:00"
|
"time": "2024-10-16T03:41:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-view",
|
"name": "topthink/think-validate",
|
||||||
"version": "v1.0.14",
|
"version": "v3.0.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-view.git",
|
"url": "https://github.com/top-think/think-validate.git",
|
||||||
"reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d"
|
"reference": "85063f6d4ef8ed122f17a36179dc3e0949b30988"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d",
|
"url": "https://api.github.com/repos/top-think/think-validate/zipball/85063f6d4ef8ed122f17a36179dc3e0949b30988",
|
||||||
"reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d",
|
"reference": "85063f6d4ef8ed122f17a36179dc3e0949b30988",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1.0",
|
"php": ">=8.0",
|
||||||
"topthink/think-template": "^2.0"
|
"topthink/think-container": ">=3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helper.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "think validate",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-validate/issues",
|
||||||
|
"source": "https://github.com/top-think/think-validate/tree/v3.0.7"
|
||||||
|
},
|
||||||
|
"time": "2025-06-11T05:51:40+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-view",
|
||||||
|
"version": "v2.0.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-view.git",
|
||||||
|
"reference": "b42009b98199b5a3833d3d6fd18c8a55aa511fad"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-view/zipball/b42009b98199b5a3833d3d6fd18c8a55aa511fad",
|
||||||
|
"reference": "b42009b98199b5a3833d3d6fd18c8a55aa511fad",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0",
|
||||||
|
"topthink/think-template": "^3.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -616,24 +1189,95 @@
|
|||||||
"description": "thinkphp template driver",
|
"description": "thinkphp template driver",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/top-think/think-view/issues",
|
"issues": "https://github.com/top-think/think-view/issues",
|
||||||
"source": "https://github.com/top-think/think-view/tree/v1.0.14"
|
"source": "https://github.com/top-think/think-view/tree/v2.0.5"
|
||||||
},
|
},
|
||||||
"time": "2019-11-06T11:40:13+00:00"
|
"time": "2025-03-19T07:04:19+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v1.33.0",
|
"version": "v3.7.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
|
"reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d",
|
||||||
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
|
"reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/contracts",
|
||||||
|
"name": "symfony/contracts"
|
||||||
|
},
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "3.7-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"function.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-06-05T06:23:12+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-mbstring",
|
||||||
|
"version": "v1.38.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
|
"reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6",
|
||||||
|
"reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -685,7 +1329,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0"
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -705,191 +1349,36 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-12-23T08:48:59+00:00"
|
"time": "2026-05-27T06:59:30+00:00"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "symfony/polyfill-php72",
|
|
||||||
"version": "v1.31.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
|
||||||
"reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce",
|
|
||||||
"reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.2"
|
|
||||||
},
|
|
||||||
"type": "metapackage",
|
|
||||||
"extra": {
|
|
||||||
"thanks": {
|
|
||||||
"url": "https://github.com/symfony/polyfill",
|
|
||||||
"name": "symfony/polyfill"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Nicolas Grekas",
|
|
||||||
"email": "[email protected]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"keywords": [
|
|
||||||
"compatibility",
|
|
||||||
"polyfill",
|
|
||||||
"portable",
|
|
||||||
"shim"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.31.0"
|
|
||||||
},
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"url": "https://symfony.com/sponsor",
|
|
||||||
"type": "custom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/fabpot",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
|
||||||
"type": "tidelift"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2024-09-09T11:45:10+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "symfony/polyfill-php80",
|
|
||||||
"version": "v1.33.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
|
||||||
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
|
|
||||||
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.2"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"thanks": {
|
|
||||||
"url": "https://github.com/symfony/polyfill",
|
|
||||||
"name": "symfony/polyfill"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"files": [
|
|
||||||
"bootstrap.php"
|
|
||||||
],
|
|
||||||
"psr-4": {
|
|
||||||
"Symfony\\Polyfill\\Php80\\": ""
|
|
||||||
},
|
|
||||||
"classmap": [
|
|
||||||
"Resources/stubs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Ion Bazan",
|
|
||||||
"email": "[email protected]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Nicolas Grekas",
|
|
||||||
"email": "[email protected]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"keywords": [
|
|
||||||
"compatibility",
|
|
||||||
"polyfill",
|
|
||||||
"portable",
|
|
||||||
"shim"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0"
|
|
||||||
},
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"url": "https://symfony.com/sponsor",
|
|
||||||
"type": "custom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/fabpot",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/nicolas-grekas",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
|
||||||
"type": "tidelift"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2025-01-02T08:10:11+00:00"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v4.4.47",
|
"version": "v7.4.14",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
"reference": "1069c7a3fca74578022fab6f81643248d02f8e63"
|
"reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63",
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358",
|
||||||
"reference": "1069c7a3fca74578022fab6f81643248d02f8e63",
|
"reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1.3",
|
"php": ">=8.2",
|
||||||
"symfony/polyfill-mbstring": "~1.0",
|
"symfony/deprecation-contracts": "^2.5|^3",
|
||||||
"symfony/polyfill-php72": "~1.5",
|
"symfony/polyfill-mbstring": "~1.0"
|
||||||
"symfony/polyfill-php80": "^1.16"
|
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
|
"symfony/console": "<6.4"
|
||||||
"symfony/console": "<3.4"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-iconv": "*",
|
"symfony/console": "^6.4|^7.0|^8.0",
|
||||||
"symfony/console": "^3.4|^4.0|^5.0",
|
"symfony/http-kernel": "^6.4|^7.0|^8.0",
|
||||||
"symfony/process": "^4.4|^5.0",
|
"symfony/process": "^6.4|^7.0|^8.0",
|
||||||
"twig/twig": "^1.43|^2.13|^3.0.4"
|
"symfony/uid": "^6.4|^7.0|^8.0",
|
||||||
},
|
"twig/twig": "^3.12"
|
||||||
"suggest": {
|
|
||||||
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
|
|
||||||
"ext-intl": "To show region name in time zone dump",
|
|
||||||
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
|
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
"Resources/bin/var-dump-server"
|
"Resources/bin/var-dump-server"
|
||||||
@@ -927,7 +1416,7 @@
|
|||||||
"dump"
|
"dump"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.47"
|
"source": "https://github.com/symfony/var-dumper/tree/v7.4.14"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -938,31 +1427,83 @@
|
|||||||
"url": "https://github.com/fabpot",
|
"url": "https://github.com/fabpot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-10-03T15:15:11+00:00"
|
"time": "2026-06-08T20:24:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-trace",
|
"name": "topthink/think-dumper",
|
||||||
"version": "v1.6",
|
"version": "v1.0.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-trace.git",
|
"url": "https://github.com/top-think/think-dumper.git",
|
||||||
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142"
|
"reference": "1bd79783bf9551330c7cf55c9ef49c82b3a2e110"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
|
"url": "https://api.github.com/repos/top-think/think-dumper/zipball/1bd79783bf9551330c7cf55c9ef49c82b3a2e110",
|
||||||
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
|
"reference": "1bd79783bf9551330c7cf55c9ef49c82b3a2e110",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1.0",
|
"php": ">=8.0.2",
|
||||||
|
"symfony/var-dumper": ">=6.0",
|
||||||
"topthink/framework": "^6.0|^8.0"
|
"topthink/framework": "^6.0|^8.0"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^11.4"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helper.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\dumper\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Dumper extend for thinkphp",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-dumper/issues",
|
||||||
|
"source": "https://github.com/top-think/think-dumper/tree/v1.0.7"
|
||||||
|
},
|
||||||
|
"time": "2026-05-29T04:34:25+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-trace",
|
||||||
|
"version": "v2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-trace.git",
|
||||||
|
"reference": "4ba6da2945b37931d61900a6e55dc02b05e5a63f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-trace/zipball/4ba6da2945b37931d61900a6e55dc02b05e5a63f",
|
||||||
|
"reference": "4ba6da2945b37931d61900a6e55dc02b05e5a63f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0",
|
||||||
|
"topthink/framework": "^8.1"
|
||||||
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
@@ -992,24 +1533,27 @@
|
|||||||
"description": "thinkphp debug trace",
|
"description": "thinkphp debug trace",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/top-think/think-trace/issues",
|
"issues": "https://github.com/top-think/think-trace/issues",
|
||||||
"source": "https://github.com/top-think/think-trace/tree/v1.6"
|
"source": "https://github.com/top-think/think-trace/tree/v2.0"
|
||||||
},
|
},
|
||||||
"time": "2023-02-07T08:36:32+00:00"
|
"time": "2025-06-12T09:18:19+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": ">=7.3.5",
|
"php": ">=8.2.0",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
"ext-gd": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"ext-openssl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-zip": "*",
|
"ext-zip": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"ext-iconv": "*"
|
"ext-iconv": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": {},
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.9.0"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -32,6 +32,6 @@ return [
|
|||||||
// 定义404错误的模板文件地址
|
// 定义404错误的模板文件地址
|
||||||
404 => \think\facade\App::getRootPath() . 'public/404.html',
|
404 => \think\facade\App::getRootPath() . 'public/404.html',
|
||||||
],
|
],
|
||||||
'version' => '1.11',
|
'version' => '1.12',
|
||||||
'ver' => 1092
|
'ver' => 1093
|
||||||
];
|
];
|
||||||
|
|||||||
+1
-1
@@ -194,7 +194,7 @@ CREATE TABLE `toolbox_querycache` (
|
|||||||
`content` text,
|
`content` text,
|
||||||
`uptime` datetime NOT NULL,
|
`uptime` datetime NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `cachekey` (`key`,`type`),
|
UNIQUE KEY `cachekey` (`key`,`subkey`,`type`),
|
||||||
KEY `cachekey2` (`subkey`,`type`)
|
KEY `cachekey2` (`subkey`,`type`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
|||||||
@@ -52,4 +52,18 @@ class App extends Plugin
|
|||||||
return msg();
|
return msg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function bind_device(){
|
||||||
|
$userid = input('post.userid');
|
||||||
|
$token = input('post.token');
|
||||||
|
if(!$userid || !$token) return msg('error','参数不能为空');
|
||||||
|
|
||||||
|
try{
|
||||||
|
$sport = new XiaomiSport();
|
||||||
|
$data = $sport->bind($userid, $token);
|
||||||
|
return msg('ok','success',$data);
|
||||||
|
}catch(Exception $e){
|
||||||
|
return msg('error',$e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,9 @@ class XiaomiSport
|
|||||||
|
|
||||||
$response = $this->curl($url, $data, $token);
|
$response = $this->curl($url, $data, $token);
|
||||||
$arr = json_decode($response['body'], true);
|
$arr = json_decode($response['body'], true);
|
||||||
if(!$arr){
|
if($response['code'] == 401){
|
||||||
|
throw new Exception('Token已失效,请重新登录');
|
||||||
|
}elseif(!$arr){
|
||||||
throw new Exception('修改步数接口请求失败');
|
throw new Exception('修改步数接口请求失败');
|
||||||
}elseif(isset($arr['code']) && $arr['code']==1){
|
}elseif(isset($arr['code']) && $arr['code']==1){
|
||||||
return true;
|
return true;
|
||||||
@@ -92,6 +94,95 @@ class XiaomiSport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getDeviceList($userid, $token){
|
||||||
|
$url = 'https://api-mifit-cn.huami.com/v1/device/lists.json';
|
||||||
|
$time = time();
|
||||||
|
$data = [
|
||||||
|
't' => $time,
|
||||||
|
'callid' => $time,
|
||||||
|
'userid' => $userid,
|
||||||
|
'device' => 'android_35',
|
||||||
|
'device_type' => 'android_phone',
|
||||||
|
'enableMultiDevice' => 'false',
|
||||||
|
'v' => '2.0',
|
||||||
|
'lang' => 'zh_CN',
|
||||||
|
'channel' => 'Normal',
|
||||||
|
'country' => 'CN',
|
||||||
|
'timezone' => 'Asia/Shanghai',
|
||||||
|
'cv' => '50813_6.14.0',
|
||||||
|
];
|
||||||
|
$url .= '?'.http_build_query($data);
|
||||||
|
$response = $this->curl($url, null, $token);
|
||||||
|
$arr = json_decode($response['body'], true);
|
||||||
|
if($response['code'] == 401){
|
||||||
|
throw new Exception('Token已失效,请重新登录');
|
||||||
|
}elseif(!$arr){
|
||||||
|
throw new Exception('获取设备列表请求失败');
|
||||||
|
}elseif(isset($arr['code']) && $arr['code']==1){
|
||||||
|
return $arr['data'];
|
||||||
|
}else{
|
||||||
|
throw new Exception('获取设备列表失败'.(isset($arr['message'])?$arr['message']:$response['body']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function bindDeviceToAccount($userid, $token, $device_mac, $device_id){
|
||||||
|
$url = 'https://api-mifit-cn.huami.com/v1/device/binds.json';
|
||||||
|
$time = time();
|
||||||
|
$data = [
|
||||||
|
'app_time' => $time,
|
||||||
|
'code' => '0',
|
||||||
|
'activeStatus' => '0',
|
||||||
|
'bind_timezone' => '32',
|
||||||
|
'device_type' => '0',
|
||||||
|
'crcedUserId' => '0',
|
||||||
|
'userid' => $userid,
|
||||||
|
'device' => 'android_29',
|
||||||
|
'deviceid' => $device_id,
|
||||||
|
'enableMultiDevice' => 'true',
|
||||||
|
'mac' => $device_mac,
|
||||||
|
'productVersion' => '256',
|
||||||
|
'brandType' => '-1',
|
||||||
|
'productId' => '61', //小米手环 5 NFC版
|
||||||
|
'device_source' => '58',
|
||||||
|
'brand' => 'XiaoMi',
|
||||||
|
'fw_version' => 'V1.0.0.04',
|
||||||
|
'hardwareVersion' => 'V0.44.131.18',
|
||||||
|
'soft_version' => '6.13.1',
|
||||||
|
'sys_model' => 'Xiaomi 10 Pro',
|
||||||
|
'sys_version' => 'Android_35',
|
||||||
|
'v' => '2.0',
|
||||||
|
'lang' => 'zh_CN',
|
||||||
|
'channel' => 'Normal',
|
||||||
|
'country' => 'CN',
|
||||||
|
'timezone' => 'Asia/Shanghai',
|
||||||
|
'cv' => '50813_6.14.0',
|
||||||
|
];
|
||||||
|
$response = $this->curl($url, $data, $token);
|
||||||
|
$arr = json_decode($response['body'], true);
|
||||||
|
if($response['code'] == 401){
|
||||||
|
throw new Exception('Token已失效,请重新登录');
|
||||||
|
}elseif(!$arr){
|
||||||
|
throw new Exception('绑定设备请求失败');
|
||||||
|
}elseif(isset($arr['code']) && $arr['code']==1){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
throw new Exception('绑定设备失败'.(isset($arr['message'])?$arr['message']:$response['body']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bind($userid, $token){
|
||||||
|
$list = $this->getDeviceList($userid, $token);
|
||||||
|
if(!empty($list)){
|
||||||
|
$device = $list[0];
|
||||||
|
return ['code'=>1, 'userid' => $userid, 'device_id' => $device['deviceid'], 'device_mac' => $device['mac']];
|
||||||
|
}
|
||||||
|
|
||||||
|
$mac = strtoupper(substr(md5(uniqid(microtime(true),true)),0,12));
|
||||||
|
$mac = implode(':', str_split($mac, 2));
|
||||||
|
$device_id = substr(md5(uniqid(microtime(true),true)),0,16);
|
||||||
|
$this->bindDeviceToAccount($userid, $token, $mac, $device_id);
|
||||||
|
return ['code'=>0, 'userid' => $userid, 'device_id' => $device_id, 'device_mac' => $mac];
|
||||||
|
}
|
||||||
|
|
||||||
private function curl($url, $data=null, $app_token=null, $ekv = false){
|
private function curl($url, $data=null, $app_token=null, $ekv = false){
|
||||||
$ch=curl_init();
|
$ch=curl_init();
|
||||||
@@ -122,7 +213,9 @@ class XiaomiSport
|
|||||||
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||||
$header = substr($ret, 0, $headerSize);
|
$header = substr($ret, 0, $headerSize);
|
||||||
$body = substr($ret, $headerSize);
|
$body = substr($ret, $headerSize);
|
||||||
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
$ret['code'] = $httpCode;
|
||||||
$ret['header'] = $header;
|
$ret['header'] = $header;
|
||||||
$ret['body'] = $body;
|
$ret['body'] = $body;
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<input type="number" class="form-control" name="step" value="" placeholder="请输入要修改的步数" v-model="step" min="1" max="98000" required>
|
<input type="number" class="form-control" name="step" value="" placeholder="请输入要修改的步数" v-model="step" min="1" max="98000" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-info">每日步数最大98000,超过将无法增加</div>
|
<div class="alert alert-info">每日步数最大98000,超过将无法增加。若提示未绑定手环设备,可以<a href="javascript:" @click="bind_device">点此绑定虚拟手环</a>。</div>
|
||||||
<button class="btn btn-dim btn-outline-primary btn-block" @click="submit">
|
<button class="btn btn-dim btn-outline-primary btn-block" @click="submit">
|
||||||
提交步数
|
提交步数
|
||||||
</button>
|
</button>
|
||||||
@@ -106,6 +106,20 @@ new Vue({
|
|||||||
layer.alert('提交步数成功!请稍后查看同步情况',{icon:1});
|
layer.alert('提交步数成功!请稍后查看同步情况',{icon:1});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
bind_device() {
|
||||||
|
var that = this;
|
||||||
|
if(that.userid == '' || that.token == ''){alert('请先登录');return;}
|
||||||
|
httpPost('/api/{$plugin.alias}/bind_device', {
|
||||||
|
userid: that.userid,
|
||||||
|
token: that.token
|
||||||
|
}, function(data){
|
||||||
|
if(data.code == 1){
|
||||||
|
layer.alert('已绑定过设备!',{icon:1});
|
||||||
|
}else{
|
||||||
|
layer.alert('绑定设备成功!',{icon:1});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
back(){
|
back(){
|
||||||
this.haslogin = false;
|
this.haslogin = false;
|
||||||
}
|
}
|
||||||
|
|||||||
+130
-51
@@ -21,8 +21,9 @@ class App extends Plugin
|
|||||||
|
|
||||||
public function query(){
|
public function query(){
|
||||||
$domain = input('post.domain', null, 'trim');
|
$domain = input('post.domain', null, 'trim');
|
||||||
|
$type = input('post.type', 'web', 'trim');
|
||||||
if(!$domain) return msg('error','no domain');
|
if(!$domain) return msg('error','no domain');
|
||||||
if(!checkdomain($domain)){
|
if(strpos($domain,'.') && !checkdomain($domain)){
|
||||||
return msg('error', '域名格式不正确!');
|
return msg('error', '域名格式不正确!');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,70 +32,148 @@ class App extends Plugin
|
|||||||
return msg('error', '验证失败,请重新验证');
|
return msg('error', '验证失败,请重新验证');
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache = Db::name('querycache')->where('type', 'icp')->where('key', $domain)->find();
|
$cache = Db::name('querycache')->where('type', $type.'list')->where('key|subkey', $domain)->find();
|
||||||
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
||||||
$array = json_decode($cache['content'], true);
|
$array = json_decode($cache['content'], true);
|
||||||
return msg('ok','success',$array);
|
$data = Db::name('querycache')->where('type', $type.'item')->whereIn('id', implode(',',$array['list']))->select();
|
||||||
|
$list = [];
|
||||||
|
foreach($data as $row){
|
||||||
|
$list[] = json_decode($row['content'], true);
|
||||||
|
}
|
||||||
|
return msg('ok','success',['total'=>$array['total'], 'list'=>$list]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$cache = Db::name('querycache')->where('type', $type.'item')->where('key|subkey', $domain)->find();
|
||||||
|
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
||||||
|
$array = json_decode($cache['content'], true);
|
||||||
|
return msg('ok','success',['total'=>1, 'list'=>[$array]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$result = $this->queryapi($domain);
|
$result = $this->execapi($type, $domain);
|
||||||
if(!$result){
|
|
||||||
return msg('ok','success',null);
|
|
||||||
}
|
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
return msg('error', $e->getMessage());
|
return msg('error', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Db::name('querycache')->duplicate([
|
if($result['total'] > 1 && count($result['data']) > 1){
|
||||||
'type' => 'icp',
|
$i = 0;
|
||||||
'key' => $result['Domain'],
|
foreach($result['data'] as $row){
|
||||||
'content' => json_encode($result),
|
$id = Db::name('querycache')->duplicate([
|
||||||
'uptime' => date('Y-m-d H:i:s')
|
'content' => json_encode($row),
|
||||||
])->insert([
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
'type' => 'icp',
|
])->insertGetId([
|
||||||
'key' => $result['Domain'],
|
'type' => $type.'item',
|
||||||
'content' => json_encode($result),
|
'key' => $row['domain'],
|
||||||
'uptime' => date('Y-m-d H:i:s')
|
'subkey' => $row['webLicence'],
|
||||||
]);
|
'content' => json_encode($row),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
$result['data'][$i++]['id'] = $id;
|
||||||
|
$ids[] = $id;
|
||||||
|
}
|
||||||
|
Db::name('querycache')->duplicate([
|
||||||
|
'content' => json_encode(['total'=>$result['total'], 'list'=>$ids]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
])->insert([
|
||||||
|
'type' => $type.'list',
|
||||||
|
'key' => $domain == $result['data'][0]['domain'] ? $result['data'][0]['domain'] : $result['data'][0]['unitName'],
|
||||||
|
'subkey' => $domain == $result['data'][0]['domain'] ? $result['data'][0]['webLicence'] : $result['data'][0]['mainLicence'],
|
||||||
|
'content' => json_encode(['total'=>$result['total'], 'list'=>$ids]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
}elseif($result['total'] == 1 && count($result['data']) > 0){
|
||||||
|
$id = Db::name('querycache')->duplicate([
|
||||||
|
'content' => json_encode($result['data'][0]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
])->insertGetId([
|
||||||
|
'type' => $type.'item',
|
||||||
|
'key' => $result['data'][0]['domain'],
|
||||||
|
'subkey' => $result['data'][0]['webLicence'],
|
||||||
|
'content' => json_encode($result['data'][0]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
$result['data'][0]['id'] = $id;
|
||||||
|
}
|
||||||
|
|
||||||
return msg('ok','success',$result);
|
return msg('ok','success',['total'=>$result['total'], 'list'=>$result['data']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function queryapi($domain){
|
public function item(){
|
||||||
if(config_get('qqapi_url')){
|
$id = input('post.id');
|
||||||
$url = config_get('qqapi_url').'api.php?act=icpquery';
|
if(!$id) return msg('error','no id');
|
||||||
$post = 'key='.config_get('qqapi_key').'&domain='.$domain;
|
$cache = Db::name('querycache')->where('id', $id)->find();
|
||||||
$data = get_curl($url, $post);
|
if($cache){
|
||||||
$arr = json_decode($data, true);
|
$array = json_decode($cache['content'], true);
|
||||||
if(isset($arr['code']) && $arr['code']==0){
|
return msg('ok','success',['total'=>1, 'list'=>[$array]]);
|
||||||
return $arr['data'];
|
|
||||||
}elseif(isset($arr['msg'])){
|
|
||||||
throw new Exception($arr['msg']);
|
|
||||||
}else{
|
|
||||||
throw new Exception('接口请求失败');
|
|
||||||
}
|
|
||||||
}elseif(config_get('yapi_token')){
|
|
||||||
$url = 'https://api.makuo.cc/api/get.other.icp?url='.urlencode($domain);
|
|
||||||
$header = ['Authorization: '.config_get('yapi_token')];
|
|
||||||
$data = get_curl($url, 0, 0, 0, 0, 0, 0, $header);
|
|
||||||
$arr = json_decode($data, true);
|
|
||||||
if(isset($arr['code']) && $arr['code']==200){
|
|
||||||
return [
|
|
||||||
'Domain' => $arr['data']['domain'],
|
|
||||||
'DomainIcpNum' => $arr['data']['icp'],
|
|
||||||
'CompanyName' => $arr['data']['unitName'],
|
|
||||||
'CompanyType' => $arr['data']['natureName'],
|
|
||||||
'AuditTime' => $arr['data']['updateRecordTime'],
|
|
||||||
];
|
|
||||||
}elseif(isset($arr['msg'])){
|
|
||||||
throw new Exception('接口请求失败,'.$arr['msg']);
|
|
||||||
}else{
|
|
||||||
throw new Exception('接口请求失败');
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
throw new Exception('请先配置API接口参数');
|
return msg('ok','success',['total'=>0, 'list'=>[]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://github.com/HG-ha/ICP_Query
|
||||||
|
*/
|
||||||
|
private function execapi($type, $domain){
|
||||||
|
$url = 'http://172.17.0.1:16181/query/'.$type.'?search='.urlencode($domain);
|
||||||
|
$response = get_curl($url);
|
||||||
|
$arr = json_decode($response, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
$list = [];
|
||||||
|
if(isset($arr['params']['list'])){
|
||||||
|
foreach($arr['params']['list'] as $row){
|
||||||
|
$list[] = ['domain'=>isset($row['domain'])?$row['domain']:$row['serviceName'], 'mainLicence'=>$row['mainLicence'], 'webLicence'=>$row['serviceLicence'], 'unitName'=>$row['unitName'], 'unitType'=>$row['natureName'], 'updateTime'=>$row['updateRecordTime'], 'contentTypeName'=>$row['contentTypeName']];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ['code'=>0, 'total'=>isset($arr['params']['total']) ? $arr['params']['total'] : 0, 'data'=>$list];
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception($arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('查询接口请求失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function execapi2($domain){
|
||||||
|
$timeStamp = time();
|
||||||
|
$authKey = md5("testtest" . $timeStamp);
|
||||||
|
$referer = 'https://beian.miit.gov.cn/';
|
||||||
|
$headers = ['Origin: https://beian.miit.gov.cn'];
|
||||||
|
$url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/auth';
|
||||||
|
$post = 'authKey='.$authKey.'&timeStamp='.$timeStamp;
|
||||||
|
$response = get_curl($url, $post, $referer, 0, 1, 0, 0, $headers);
|
||||||
|
$body = substr($response, strpos($response, '{"'));
|
||||||
|
$arr = json_decode($body, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
$cookie = '';
|
||||||
|
preg_match_all('/set-cookie: (.*?);/i', $response, $matchs);
|
||||||
|
foreach ($matchs[1] as $val) {
|
||||||
|
if(substr($val,-1)=='=')continue;
|
||||||
|
$cookie.=$val.'; ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$token = $arr['params']['bussiness'];
|
||||||
|
|
||||||
|
$url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/icpAbbreviateInfo/queryByCondition';
|
||||||
|
$post = json_encode(['pageNum'=>'','pageSize'=>'','unitName'=>$domain,'serviceType'=>1]);
|
||||||
|
$headers[] = 'Content-Type: application/json; charset=UTF-8';
|
||||||
|
$headers[] = 'token: '.$token;
|
||||||
|
$response = get_curl($url, $post, $referer, $cookie, 0, 0, 0, $headers);
|
||||||
|
$arr = json_decode($response, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
$list = [];
|
||||||
|
foreach($arr['params']['list'] as $row){
|
||||||
|
$list[] = ['domain'=>$row['domain'], 'mainLicence'=>$row['mainLicence'], 'webLicence'=>$row['serviceLicence'], 'unitName'=>$row['unitName'], 'unitType'=>$row['natureName'], 'updateTime'=>$row['updateRecordTime'], 'limitAccess'=>$row['limitAccess'], 'contentTypeName'=>$row['contentTypeName'], 'dataId'=>$row['dataId']];
|
||||||
|
}
|
||||||
|
return ['code'=>0, 'total'=>$arr['params']['total'], 'data'=>$list];
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception($arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('查询接口(query)请求失败');
|
||||||
|
}
|
||||||
|
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception($arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('查询接口(auth)请求失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+93
-25
@@ -2,19 +2,33 @@
|
|||||||
{block name="title"}{$plugin.title} - {:config_get('title')}{/block}
|
{block name="title"}{$plugin.title} - {:config_get('title')}{/block}
|
||||||
{block name="main"}
|
{block name="main"}
|
||||||
<style>
|
<style>
|
||||||
td{text-align: center;}
|
.query-title {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.table-title th{word-break: keep-all;}
|
||||||
</style>
|
</style>
|
||||||
<div class="container-xl" id="app">
|
<div class="container-xl" id="app">
|
||||||
<div class="col-sm-12 col-md-10 col-xl-8 center-block">
|
<div class="col-md-12 col-xl-10 center-block">
|
||||||
<div class="card card-preview">
|
<div class="card card-preview">
|
||||||
<div class="card-inner mt-3">
|
<div class="card-inner mt-3">
|
||||||
<div class="nya-title nk-ibx-action-item progress-rating">
|
<div class="nya-title nk-ibx-action-item progress-rating">
|
||||||
<span class="nk-menu-text font-weight-bold">ICP备案查询</span>
|
<span class="nk-menu-text font-weight-bold">ICP备案查询</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label class="form-label">输入域名:</label>
|
<div class="col-12 col-sm-4 col-md-3">
|
||||||
|
<label class="form-label">查询类型:</label>
|
||||||
|
<select id="query-type" class="form-control form-control-lg" v-model="query_type">
|
||||||
|
<option value="web">域名</option>
|
||||||
|
<option value="app">App</option>
|
||||||
|
<option value="mapp">小程序</option>
|
||||||
|
<option value="kapp">快应用</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-8 col-md-9 mt-3 mt-sm-0">
|
||||||
|
<label class="form-label">查询内容:</label>
|
||||||
<div class="form-control-wrap">
|
<div class="form-control-wrap">
|
||||||
<input type="text" v-model="input" placeholder="请输入域名查询,请勿使用子域名或者带http://www等字符的网址查询" class="form-control form-control-lg" @keyup.enter="query" ref="input" autocomplete="off">
|
<input type="text" v-model="input" placeholder="请输入域名、程序名称、备案主体或备案号" class="form-control form-control-lg" @keyup.enter="query" ref="input" autocomplete="off">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-dim btn-outline-primary btn-block card-link mb-3" @click="query" :disabled="query_disabled">
|
<button class="btn btn-dim btn-outline-primary btn-block card-link mb-3" @click="query" :disabled="query_disabled">
|
||||||
@@ -27,20 +41,47 @@ td{text-align: center;}
|
|||||||
<div class="nya-title nk-ibx-action-item progress-rating">
|
<div class="nya-title nk-ibx-action-item progress-rating">
|
||||||
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-warning text-center" v-if="result_code==0"><h6><em class="icon ni ni-info"></em> 没有查询到备案信息</h6></div>
|
<div class="alert alert-warning text-center" v-if="result_total==0"><h6><em class="icon ni ni-info"></em> 没有查询到备案记录</h6></div>
|
||||||
<div class="col-sm-12 col-md-10 col-xl-8 center-block" v-if="result_code==1">
|
<div v-if="result_total==1">
|
||||||
|
<h6>域名 <span class="text-primary">{{result_info.domain}}</span> 的信息:</h6>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-hover table-bordered">
|
<table class="table table-hover table-bordered">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td class="query-title">域名</td><td>{{result_info.Domain}}</td></tr>
|
<tr><td class="query-title">{{service_name}}</td><td>{{result_info.domain}}</td></tr>
|
||||||
<tr><td class="query-title">备案号</td><td>{{result_info.DomainIcpNum}}</td></tr>
|
<tr><td class="query-title">ICP备案/许可证号</td><td>{{result_info.webLicence}}</td></tr>
|
||||||
<tr><td class="query-title">主办单位名称</td><td>{{result_info.CompanyName}}</td></tr>
|
<tr><td class="query-title">主办单位名称</td><td>{{result_info.unitName}}</td></tr>
|
||||||
<tr><td class="query-title">主办单位性质</td><td>{{result_info.CompanyType}}</td></tr>
|
<tr><td class="query-title">主办单位性质</td><td>{{result_info.unitType}}</td></tr>
|
||||||
<tr><td class="query-title">审核日期</td><td>{{result_info.AuditTime}}</td></tr>
|
<tr><td class="query-title">审核日期</td><td>{{result_info.updateTime}}</td></tr>
|
||||||
</tbody>
|
<tr><td class="query-title">网站前置审批项</td><td>{{result_info.contentTypeName}}</td></tr>
|
||||||
</table>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="result_total>1">
|
||||||
|
<h6><span class="text-primary">{{result_input}}</span> 共查询到 <span class="text-primary">{{result_total}}</span> 条备案信息:</h6>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-bordered">
|
||||||
|
<thead class="table-title">
|
||||||
|
<th>{{service_name}}</th><th>ICP备案/许可证号</th><th>主办单位名称</th><th>审核日期</th><th>操作</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(item,index) in result_list" :key="index">
|
||||||
|
<td>{{item.domain}}</td><td>{{item.webLicence}}</td><td>{{item.unitName}}</td><td>{{item.updateTime}}</td><td><button class="btn btn-dim btn-outline-info btn-xs" @click="show_item(index)">详情</button></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<p v-if="result_total>10" class="text-info">当前只支持查询最新10条记录,剩余记录请使用域名或程序名称进行精确查询。</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card card-preview">
|
||||||
|
<div class="card-inner">
|
||||||
|
<h6><em class="icon ni ni-info"></em> 简介</h6>
|
||||||
|
<div class="accordion-inner">
|
||||||
|
<p>支持输入域名、程序名称、网站备案号、主体备案号、单位名称(个人姓名、企业名称)进行查询</p>
|
||||||
|
<p>此ICP查询工具直接对接工信部官网,非第三方接口。采用开源项目<a href="https://github.com/HG-ha/ICP_Query" target="_blank">ICP_Query</a></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,9 +96,22 @@ new Vue({
|
|||||||
data: {
|
data: {
|
||||||
query_disabled: true,
|
query_disabled: true,
|
||||||
input: '',
|
input: '',
|
||||||
|
query_type: 'web',
|
||||||
|
result_input: '',
|
||||||
showresult: false,
|
showresult: false,
|
||||||
result_info: [],
|
result_info: {
|
||||||
result_code: 0,
|
id: '',
|
||||||
|
domain: '',
|
||||||
|
mainLicence: '',
|
||||||
|
webLicence: '',
|
||||||
|
unitName: '',
|
||||||
|
unitType: '',
|
||||||
|
updateTime: '',
|
||||||
|
contentTypeName: '',
|
||||||
|
},
|
||||||
|
service_name: '网站域名',
|
||||||
|
result_list: [],
|
||||||
|
result_total: 0,
|
||||||
captcha: null
|
captcha: null
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -83,7 +137,7 @@ new Vue({
|
|||||||
layer.closeAll();
|
layer.closeAll();
|
||||||
return alert('请先完成验证');
|
return alert('请先完成验证');
|
||||||
}
|
}
|
||||||
var data = {domain: that.input};
|
var data = {domain: that.input, type: that.query_type};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/api/{$plugin.alias}/query',
|
url: '/api/{$plugin.alias}/query',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
@@ -93,12 +147,22 @@ new Vue({
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
layer.closeAll();
|
layer.closeAll();
|
||||||
if(data.status=='ok'){
|
if(data.status=='ok'){
|
||||||
|
var data = data.data;
|
||||||
|
that.result_input = that.input;
|
||||||
that.showresult = true;
|
that.showresult = true;
|
||||||
if(data.data == null){
|
that.result_total = data.total;
|
||||||
that.result_code = 0;
|
that.result_list = data.list;
|
||||||
}else{
|
if(data.list.length > 0){
|
||||||
that.result_code = 1;
|
that.result_info = data.list[0];
|
||||||
that.result_info = data.data;
|
}
|
||||||
|
if(that.query_type=='web' || that.query_type=='bweb'){
|
||||||
|
that.service_name = '网站域名';
|
||||||
|
}else if(that.query_type=='app' || that.query_type=='bapp'){
|
||||||
|
that.service_name = 'App名称';
|
||||||
|
}else if(that.query_type=='mapp' || that.query_type=='bmapp'){
|
||||||
|
that.service_name = '小程序名称';
|
||||||
|
}else if(that.query_type=='kapp' || that.query_type=='bkapp'){
|
||||||
|
that.service_name = '快应用名称';
|
||||||
}
|
}
|
||||||
captcha.reset();
|
captcha.reset();
|
||||||
}else{
|
}else{
|
||||||
@@ -140,11 +204,15 @@ new Vue({
|
|||||||
},
|
},
|
||||||
query() {
|
query() {
|
||||||
this.checkURL();
|
this.checkURL();
|
||||||
if(this.input.trim() == ''){
|
if(this.input == ''){
|
||||||
alert('查询内容不能为空');return;
|
alert('查询内容不能为空');return;
|
||||||
}
|
}
|
||||||
layer.load(0, {shade:0.1});
|
layer.load(0, {shade:0.1});
|
||||||
this.captcha.showCaptcha();
|
this.captcha.showCaptcha();
|
||||||
|
},
|
||||||
|
show_item(index){
|
||||||
|
this.result_info = this.result_list[index];
|
||||||
|
this.result_total = 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,13 +6,19 @@
|
|||||||
namespace plugin\web\whois;
|
namespace plugin\web\whois;
|
||||||
|
|
||||||
use app\Plugin;
|
use app\Plugin;
|
||||||
|
use think\facade\Db;
|
||||||
|
use Iodev\Whois\Factory;
|
||||||
|
use Iodev\Whois\Exceptions\ConnectionException;
|
||||||
|
use Iodev\Whois\Exceptions\ServerMismatchException;
|
||||||
|
use Iodev\Whois\Exceptions\WhoisException;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
class App extends Plugin
|
class App extends Plugin
|
||||||
{
|
{
|
||||||
|
const CACHE_TIME = 172800;
|
||||||
|
|
||||||
// https://help.aliyun.com/document_detail/35793.html
|
// https://help.aliyun.com/document_detail/35793.html
|
||||||
const status_name = ['ok'=>'正常状态', 'addPeriod'=>'域名新注册期', 'clientDeleteProhibited'=>'注册商设置禁止删除', 'serverDeleteProhibited'=>'注册局设置禁止删除', 'clientUpdateProhibited'=>'注册商设置禁止更新', 'serverUpdateProhibited'=>'注册局设置禁止更新', 'clientTransferProhibited'=>'注册商设置禁止转移', 'serverTransferProhibited'=>'注册局设置禁止转移', 'pendingVerification'=>'注册信息审核期', 'clientHold'=>'注册商设置暂停解析', 'serverHold'=>'注册局设置暂停解析', 'inactive'=>'非激活状态', 'clientRenewProhibited'=>'注册商设置禁止续费', 'serverRenewProhibited'=>'注册局设置禁止续费', 'pendingTransfer'=>'转移过程中', 'redemptionPeriod'=>'赎回期', 'pendingDelete'=>'待删除'];
|
const status_name = ['ok'=>'正常状态', 'active'=>'正常状态', 'addPeriod'=>'域名新注册期', 'clientDeleteProhibited'=>'注册商设置禁止删除', 'serverDeleteProhibited'=>'注册局设置禁止删除', 'clientUpdateProhibited'=>'注册商设置禁止更新', 'serverUpdateProhibited'=>'注册局设置禁止更新', 'clientTransferProhibited'=>'注册商设置禁止转移', 'serverTransferProhibited'=>'注册局设置禁止转移', 'pendingVerification'=>'注册信息审核期', 'clientHold'=>'注册商设置暂停解析', 'serverHold'=>'注册局设置暂停解析', 'inactive'=>'非激活状态', 'clientRenewProhibited'=>'注册商设置禁止续费', 'serverRenewProhibited'=>'注册局设置禁止续费', 'pendingTransfer'=>'转移过程中', 'redemptionPeriod'=>'赎回期', 'pendingDelete'=>'待删除'];
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
@@ -35,13 +41,58 @@ class App extends Plugin
|
|||||||
return msg('error', '验证失败,请重新验证');
|
return msg('error', '验证失败,请重新验证');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(self::CACHE_TIME > 0){
|
||||||
|
$cache = Db::name('querycache')->where('type', 'whois')->where('key', $domain)->find();
|
||||||
|
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
||||||
|
$array = json_decode($cache['content'], true);
|
||||||
|
return msg('ok','success',$array);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$url = 'https://whois.aite.xyz/?ajax&domain='.urlencode($domain);
|
try {
|
||||||
$data = get_curl($url,0,'https://whois.aite.xyz/');
|
$whois = Factory::get()->createWhois();
|
||||||
if(!$data) return msg('error', '查询失败,接口返回内容错误');
|
$info = $whois->loadDomainInfo($domain);
|
||||||
|
} catch (ConnectionException $e) {
|
||||||
|
return msg('error', '查询失败,Whois服务器连接失败');
|
||||||
|
} catch (ServerMismatchException $e) {
|
||||||
|
return msg('error', '查询失败,Whois服务器不存在');
|
||||||
|
} catch (WhoisException $e) {
|
||||||
|
return msg('error', '查询失败,'.$e->getMessage());
|
||||||
|
}
|
||||||
|
if(!$info){
|
||||||
|
return msg('ok','success',null);
|
||||||
|
}
|
||||||
|
|
||||||
if(strpos($data,'For more information on')){
|
$data = ['domainName'=>$info->domainName, 'whoisServer'=>$info->whoisServer, 'creationDate'=>$info->creationDate ? date('Y-m-d H:i:s', $info->creationDate) : null, 'expirationDate'=>$info->expirationDate ? date('Y-m-d H:i:s', $info->expirationDate) : null, 'updatedDate'=>$info->updatedDate ? date('Y-m-d H:i:s', $info->updatedDate) : $info->updatedDate, 'nameServers'=>$info->nameServers, 'states'=>$info->states, 'owner'=>$info->owner, 'registrar'=>$info->registrar, 'dnssec'=>$info->dnssec, 'rawData'=>$info->getResponse()->text];
|
||||||
$data = substr($data, 0, strpos($data,'For more information on'));
|
|
||||||
|
if(strpos($data['rawData'],'For more information on')){
|
||||||
|
$data['rawData'] = substr($data['rawData'], 0, strpos($data['rawData'],'For more information on'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$status_name = array_change_key_case(self::status_name, CASE_LOWER);
|
||||||
|
if(!empty($data['states'])){
|
||||||
|
$status = [];
|
||||||
|
foreach($data['states'] as $state){
|
||||||
|
$name = null;
|
||||||
|
$key = str_replace(' ', '', strtolower($state));
|
||||||
|
if(isset($status_name[$key]))
|
||||||
|
$name = $status_name[$key];
|
||||||
|
if(!$name) {$name = $state;$state = null;}
|
||||||
|
$status[] = ['value'=>$state, 'name'=>$name];
|
||||||
|
}
|
||||||
|
$data['states'] = $status;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(self::CACHE_TIME > 0){
|
||||||
|
Db::name('querycache')->duplicate([
|
||||||
|
'content' => json_encode($data),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
])->insertGetId([
|
||||||
|
'type' => 'whois',
|
||||||
|
'key' => $domain,
|
||||||
|
'content' => json_encode($data),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return msg('ok','success',$data);
|
return msg('ok','success',$data);
|
||||||
|
|||||||
@@ -5,6 +5,27 @@
|
|||||||
.query-title {
|
.query-title {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
.whois-badge {
|
||||||
|
display: block;
|
||||||
|
padding: 3px 10px;
|
||||||
|
margin: 3px 0 3px 0;
|
||||||
|
background: #f0f4ff;
|
||||||
|
color: #364a63;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.whois-raw-data {
|
||||||
|
background: #f5f6fa;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 15px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #364a63;
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="container-xl" id="app">
|
<div class="container-xl" id="app">
|
||||||
<div class="col-sm-12 col-md-10 col-xl-8 center-block">
|
<div class="col-sm-12 col-md-10 col-xl-8 center-block">
|
||||||
@@ -29,7 +50,24 @@
|
|||||||
<div class="nya-title nk-ibx-action-item progress-rating">
|
<div class="nya-title nk-ibx-action-item progress-rating">
|
||||||
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="border p-2" v-html="result_info" style="white-space: nowrap;overflow-x: scroll;word-break: break-all;">
|
<div class="alert alert-warning text-center" v-if="!result_info"><h6><em class="icon ni ni-info"></em> 没有查询到该域名Whois信息</h6></div>
|
||||||
|
<div class="col-sm-12 col-md-10 col-xl-8 center-block" v-if="result_info">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-bordered">
|
||||||
|
<tbody>
|
||||||
|
<tr><td class="query-title">域名</td><td>{{whoisData.domainName}}</td></tr>
|
||||||
|
<tr><td class="query-title">域名所有者</td><td>{{whoisData.owner || '-'}}</td></tr>
|
||||||
|
<tr><td class="query-title">注册商</td><td>{{whoisData.registrar}}</td></tr>
|
||||||
|
<tr><td class="query-title">Whois服务器</td><td>{{whoisData.whoisServer}}</td></tr>
|
||||||
|
<tr><td class="query-title">注册时间</td><td>{{whoisData.creationDate}}</td></tr>
|
||||||
|
<tr><td class="query-title">到期时间</td><td>{{whoisData.expirationDate}}</td></tr>
|
||||||
|
<tr><td class="query-title">更新时间</td><td>{{whoisData.updatedDate}}</td></tr>
|
||||||
|
<tr><td class="query-title">域名状态</td><td><div v-for="(item, index) in whoisData.states" :key="index">{{item.name}}<span class="text-muted" v-if="item.value">({{item.value}})</span></div></td></tr>
|
||||||
|
<tr><td class="query-title">DNS服务器</td><td><span class="whois-badge" v-for="(ns, index) in whoisData.nameServers" :key="index">{{ns}}</span></td></tr>
|
||||||
|
<tr><td class="query-title">原始信息</td><td class="whois-raw-data">{{whoisData.rawData}}</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,7 +84,21 @@ new Vue({
|
|||||||
query_disabled: true,
|
query_disabled: true,
|
||||||
input: '',
|
input: '',
|
||||||
showresult: false,
|
showresult: false,
|
||||||
result_info: '',
|
result_info: false,
|
||||||
|
whoisData: {
|
||||||
|
cacheTime: '',
|
||||||
|
domainName: '',
|
||||||
|
whoisServer: '',
|
||||||
|
creationDate: '',
|
||||||
|
expirationDate: '',
|
||||||
|
updatedDate: '',
|
||||||
|
nameServers: [],
|
||||||
|
states: [],
|
||||||
|
owner: '',
|
||||||
|
registrar: '',
|
||||||
|
dnssec: '',
|
||||||
|
rawData: '',
|
||||||
|
},
|
||||||
captcha: null
|
captcha: null
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -82,8 +134,28 @@ new Vue({
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
layer.closeAll();
|
layer.closeAll();
|
||||||
if(data.status=='ok'){
|
if(data.status=='ok'){
|
||||||
|
if(data.data == null){
|
||||||
|
that.result_info = false;
|
||||||
|
that.showresult = true;
|
||||||
|
captcha.reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
that.result_info = true;
|
||||||
|
that.whoisData = {
|
||||||
|
cacheTime: data.data.cacheTime || '',
|
||||||
|
domainName: data.data.domainName || '',
|
||||||
|
whoisServer: data.data.whoisServer || '',
|
||||||
|
creationDate: data.data.creationDate || '',
|
||||||
|
expirationDate: data.data.expirationDate || '',
|
||||||
|
updatedDate: data.data.updatedDate || '',
|
||||||
|
nameServers: Array.isArray(data.data.nameServers) ? data.data.nameServers : [],
|
||||||
|
states: Array.isArray(data.data.states) ? data.data.states : [],
|
||||||
|
owner: data.data.owner !== undefined ? data.data.owner : '',
|
||||||
|
registrar: data.data.registrar || '',
|
||||||
|
dnssec: data.data.dnssec || '',
|
||||||
|
rawData: data.data.rawData || '',
|
||||||
|
};
|
||||||
that.showresult = true;
|
that.showresult = true;
|
||||||
that.result_info = data.data;
|
|
||||||
captcha.reset();
|
captcha.reset();
|
||||||
}else{
|
}else{
|
||||||
alert(data.message);
|
alert(data.message);
|
||||||
|
|||||||
+7
-2
@@ -8,9 +8,14 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: liu21st <[email protected]>
|
// | Author: liu21st <[email protected]>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// [ 应用入口文件 ]
|
|
||||||
namespace think;
|
|
||||||
|
|
||||||
|
use think\App;
|
||||||
|
|
||||||
|
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
|
||||||
|
die('require PHP >= 8.0 !');
|
||||||
|
}
|
||||||
|
|
||||||
|
// [ 应用入口文件 ]
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
// 执行HTTP应用并响应
|
// 执行HTTP应用并响应
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: liu21st <[email protected]>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
|
||||||
|
|
||||||
|
require __DIR__ . "/index.php";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user