diff --git a/.env b/.env index 5b2a8f4..887135d 100644 --- a/.env +++ b/.env @@ -6,10 +6,10 @@ DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql -HOSTNAME = 127.0.0.1 +HOSTNAME = 122.114.59.173 DATABASE = api_junfei_iiixo -USERNAME = root -PASSWORD = root +USERNAME = api_junfei_iiixo +PASSWORD = 7by5aDTwLRTEhatM HOSTPORT = 3306 CHARSET = utf8mb4 DEBUG = true diff --git a/app/admin/controller/Upload.php b/app/admin/controller/Upload.php index 13d4816..1dedbde 100644 --- a/app/admin/controller/Upload.php +++ b/app/admin/controller/Upload.php @@ -23,6 +23,7 @@ * '.:::::' ':'````.. * +---------------------------------------------------------------------- */ + namespace app\admin\controller; use think\App; @@ -56,14 +57,14 @@ class Upload extends Base if (Request::param('from') == 'ckeditor') { // 获取上传文件表单字段名 $fileKey = array_keys(request()->file()); - $path = []; + $path = []; for ($i = 0; $i < count($fileKey); $i++) { // 获取表单上传文件并执行上传操作 $uploadFile = $this->uploadFile($fileKey[$i]); if ($uploadFile['code'] == 1) { - $path[] = $uploadFile['url']; + $path[] = 'http://' . $_SERVER['HTTP_HOST'] . $uploadFile['url']; } else { - $path = []; + $path = []; $error = $uploadFile['msg']; } } @@ -80,13 +81,14 @@ class Upload extends Base } else { // 上传失败 $result['uploaded'] = false; - $result['url'] = ''; - $result['message'] = $error; + $result['url'] = ''; + $result['message'] = $error; return json($result); } } else if ((Request::param('from') == 'ueditor')) { return $this->ueIndex(); } else { + if ($this->uploadType == 'tp') { // webupload [file是webloader固定写入的隐藏文本名称] return json($this->uploadFile('file')); @@ -226,7 +228,7 @@ class Upload extends Base // 获取上传文件名称 $fileName = $file->getOriginalName(); - $oldName = $fileName; + $oldName = $fileName; $fileName = iconv('UTF-8', 'gb2312', $fileName); // 临时上传完整目录信息 @@ -241,7 +243,7 @@ class Upload extends Base $uploadPath = $uploadDir . DIRECTORY_SEPARATOR . $fileName; // Chunking might be enabled - $chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0; + $chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0; $chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 1; // 清空临时目录 @@ -316,7 +318,7 @@ class Upload extends Base rename("{$filePath}_{$chunk}.parttmp", "{$filePath}_{$chunk}.part"); $index = 0; - $done = true; + $done = true; for ($index = 0; $index < $chunks; $index++) { if (!file_exists("{$filePath}_{$index}.part")) { $done = false; @@ -367,7 +369,7 @@ class Upload extends Base return [ 'code' => 1, 'msg' => '上传完毕', - 'url' => $uploadPath, + 'url' => 'http://' . $_SERVER['HTTP_HOST'] . $uploadPath, 'title' => $_FILES["file"]['name'], 'original' => $_FILES["file"]['name'], 'state' => 'SUCCESS', @@ -735,7 +737,7 @@ class Upload extends Base 'http' => array( //'header' => "Referer:$httpReferer", //突破防盗链,不可用 'user_agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36', //突破防盗链 - 'follow_location' => false, // don't follow redirects + 'follow_location' => false, // don't follow redirects ), ]); $res = false; diff --git a/app/api/controller/Content.php b/app/api/controller/Content.php index 628a5eb..88ae0c6 100644 --- a/app/api/controller/Content.php +++ b/app/api/controller/Content.php @@ -82,7 +82,12 @@ class Content extends Base { //联系我们 $_data = Db::name('page')->where('id', 1)->field('content')->find(); - $_data['map'] = Db::name('page')->where('id', 1)->field('content')->find(); +// $_data['map'] = Db::name('page')->where('id', 1)->field('content')->find(); + $_system = Db::name('system')->where('id', 1)->find(); + $_data['address'] = $_system['address']; + $_data['tel'] = $_system['tel']; + $_data['phone'] = Db::name('debris')->where('name', 'contuct')->find()['content']; + $_data['map'] = Db::name('debris')->where('name', 'map')->find()['content']; return $this->result($_data, 1, ''); } @@ -131,7 +136,7 @@ class Content extends Base } /** - * @api {get} /Content/product/id/{id} 05 产品详情 + * @api {get} /Content/detail_product/id/{id} 05 产品详情 * @apiGroup Content * @apiVersion 1.0.0 * @apiDescription 产品详情以及相关推荐接口,返回产品详情以及相关推荐数据 diff --git a/public/uploads/20220811/143085c23c13e2804dafdbd2684b4693.png b/public/uploads/20220811/143085c23c13e2804dafdbd2684b4693.png new file mode 100644 index 0000000..802be5d Binary files /dev/null and b/public/uploads/20220811/143085c23c13e2804dafdbd2684b4693.png differ diff --git a/public/uploads/20220811/31e6b4419248d129157bb9950abd151b.png b/public/uploads/20220811/31e6b4419248d129157bb9950abd151b.png new file mode 100644 index 0000000..25dc593 Binary files /dev/null and b/public/uploads/20220811/31e6b4419248d129157bb9950abd151b.png differ diff --git a/public/uploads/20220811/34fd0cc4d7912b2a956ede31a05cfaf2.png b/public/uploads/20220811/34fd0cc4d7912b2a956ede31a05cfaf2.png new file mode 100644 index 0000000..25dc593 Binary files /dev/null and b/public/uploads/20220811/34fd0cc4d7912b2a956ede31a05cfaf2.png differ diff --git a/public/uploads/20220811/b3c41fd47844c5c51f73b95993276546.png b/public/uploads/20220811/b3c41fd47844c5c51f73b95993276546.png new file mode 100644 index 0000000..25dc593 Binary files /dev/null and b/public/uploads/20220811/b3c41fd47844c5c51f73b95993276546.png differ diff --git a/public/uploads/20220811/d16116fe68eca655a455b669f231eeca.png b/public/uploads/20220811/d16116fe68eca655a455b669f231eeca.png new file mode 100644 index 0000000..0adfff3 Binary files /dev/null and b/public/uploads/20220811/d16116fe68eca655a455b669f231eeca.png differ diff --git a/public/uploads/20220811/d36d284217e517fe1e70c2a578a5afb2.png b/public/uploads/20220811/d36d284217e517fe1e70c2a578a5afb2.png new file mode 100644 index 0000000..0adfff3 Binary files /dev/null and b/public/uploads/20220811/d36d284217e517fe1e70c2a578a5afb2.png differ diff --git a/public/uploads/20220811/d94b713f7a752057600906355d046014.png b/public/uploads/20220811/d94b713f7a752057600906355d046014.png new file mode 100644 index 0000000..6f2cdb0 Binary files /dev/null and b/public/uploads/20220811/d94b713f7a752057600906355d046014.png differ diff --git a/public/uploads/20220811/e185c8ccf4afa8209971816e5a9b9ef4.png b/public/uploads/20220811/e185c8ccf4afa8209971816e5a9b9ef4.png new file mode 100644 index 0000000..25dc593 Binary files /dev/null and b/public/uploads/20220811/e185c8ccf4afa8209971816e5a9b9ef4.png differ diff --git a/public/uploads/20220811/ef13f59b8954ca67ff458ad0862eb848.png b/public/uploads/20220811/ef13f59b8954ca67ff458ad0862eb848.png new file mode 100644 index 0000000..802be5d Binary files /dev/null and b/public/uploads/20220811/ef13f59b8954ca67ff458ad0862eb848.png differ diff --git a/runtime/.gitignore b/runtime/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/runtime/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..817f987 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + var_export($binPath, true), + '__DIR__' => var_export(dirname($binPath), true), + )); + + eval($contents); + exit(0); +} +include $binPath; diff --git a/vendor/bin/jp.php.bat b/vendor/bin/jp.php.bat new file mode 100644 index 0000000..caa0b09 --- /dev/null +++ b/vendor/bin/jp.php.bat @@ -0,0 +1,4 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/../mtdowling/jmespath.php/bin/jp.php +php "%BIN_TARGET%" %* diff --git a/vendor/bin/var-dump-server b/vendor/bin/var-dump-server new file mode 100644 index 0000000..10567b2 --- /dev/null +++ b/vendor/bin/var-dump-server @@ -0,0 +1,97 @@ +#!/usr/bin/env php +handle = fopen($opened_path, $mode); + $this->position = 0; + + // remove all traces of this stream wrapper once it has been used + stream_wrapper_unregister('composer-bin-proxy'); + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return fstat($this->handle); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + } + } + + if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { + include("composer-bin-proxy://" . $binPath); + exit(0); + } +} + +include $binPath; diff --git a/vendor/bin/var-dump-server.bat b/vendor/bin/var-dump-server.bat new file mode 100644 index 0000000..46836b5 --- /dev/null +++ b/vendor/bin/var-dump-server.bat @@ -0,0 +1,4 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/../symfony/var-dumper/Resources/bin/var-dump-server +php "%BIN_TARGET%" %* diff --git a/vendor/services.php b/vendor/services.php new file mode 100644 index 0000000..9844d62 --- /dev/null +++ b/vendor/services.php @@ -0,0 +1,9 @@ + 'think\\captcha\\CaptchaService', + 1 => 'think\\app\\Service', + 2 => 'think\\trace\\Service', + 3 => 'think\\addons\\Service', +); \ No newline at end of file