Browse Source

骏飞微信小程序API 1.0.0版本

路径更换为域名全路径
关于我们新增公司地址 地图坐标等数据
master
ahbmz 4 years ago
parent
commit
38a67318b2
  1. 6
      .env
  2. 22
      app/admin/controller/Upload.php
  3. 9
      app/api/controller/Content.php
  4. BIN
      public/uploads/20220811/143085c23c13e2804dafdbd2684b4693.png
  5. BIN
      public/uploads/20220811/31e6b4419248d129157bb9950abd151b.png
  6. BIN
      public/uploads/20220811/34fd0cc4d7912b2a956ede31a05cfaf2.png
  7. BIN
      public/uploads/20220811/b3c41fd47844c5c51f73b95993276546.png
  8. BIN
      public/uploads/20220811/d16116fe68eca655a455b669f231eeca.png
  9. BIN
      public/uploads/20220811/d36d284217e517fe1e70c2a578a5afb2.png
  10. BIN
      public/uploads/20220811/d94b713f7a752057600906355d046014.png
  11. BIN
      public/uploads/20220811/e185c8ccf4afa8209971816e5a9b9ef4.png
  12. BIN
      public/uploads/20220811/ef13f59b8954ca67ff458ad0862eb848.png
  13. 2
      runtime/.gitignore
  14. 7
      vendor/autoload.php
  15. 24
      vendor/bin/jp.php
  16. 4
      vendor/bin/jp.php.bat
  17. 97
      vendor/bin/var-dump-server
  18. 4
      vendor/bin/var-dump-server.bat
  19. 9
      vendor/services.php

6
.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

22
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;

9
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 产品详情以及相关推荐接口,返回产品详情以及相关推荐数据

BIN
public/uploads/20220811/143085c23c13e2804dafdbd2684b4693.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

BIN
public/uploads/20220811/31e6b4419248d129157bb9950abd151b.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
public/uploads/20220811/34fd0cc4d7912b2a956ede31a05cfaf2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
public/uploads/20220811/b3c41fd47844c5c51f73b95993276546.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
public/uploads/20220811/d16116fe68eca655a455b669f231eeca.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
public/uploads/20220811/d36d284217e517fe1e70c2a578a5afb2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
public/uploads/20220811/d94b713f7a752057600906355d046014.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/uploads/20220811/e185c8ccf4afa8209971816e5a9b9ef4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
public/uploads/20220811/ef13f59b8954ca67ff458ad0862eb848.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

2
runtime/.gitignore

@ -0,0 +1,2 @@
*
!.gitignore

7
vendor/autoload.php

@ -0,0 +1,7 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit53794ed0c79a444f8545feeb6d80c286::getLoader();

24
vendor/bin/jp.php

@ -0,0 +1,24 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../mtdowling/jmespath.php/bin/jp.php) using eval to remove the shebang if present
*
* @generated
*/
$binPath = realpath(__DIR__ . "/" . '../mtdowling/jmespath.php/bin/jp.php');
$contents = file_get_contents($binPath);
$contents = preg_replace('{^#!/.+\r?\n<\?(php)?}', '', $contents, 1, $replaced);
if ($replaced) {
$contents = strtr($contents, array(
'__FILE__' => var_export($binPath, true),
'__DIR__' => var_export(dirname($binPath), true),
));
eval($contents);
exit(0);
}
include $binPath;

4
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%" %*

97
vendor/bin/var-dump-server

@ -0,0 +1,97 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../symfony/var-dumper/Resources/bin/var-dump-server) using ob_start to remove the shebang if present
* to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$binPath = __DIR__ . "/" . '../symfony/var-dumper/Resources/bin/var-dump-server';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 21);
$opened_path = realpath($opened_path) ?: $opened_path;
$this->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;

4
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%" %*

9
vendor/services.php

@ -0,0 +1,9 @@
<?php
// This file is automatically generated at:2022-05-23 20:40:40
declare (strict_types = 1);
return array (
0 => 'think\\captcha\\CaptchaService',
1 => 'think\\app\\Service',
2 => 'think\\trace\\Service',
3 => 'think\\addons\\Service',
);
Loading…
Cancel
Save