36 lines
1.6 KiB
PHP
Executable File
36 lines
1.6 KiB
PHP
Executable File
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | 宏驰云科技开发团队 版权所有 拥有最终解释权
|
|
// +----------------------------------------------------------------------
|
|
|
|
// | Author: HcyShop-kiki
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
namespace app\api\controller;
|
|
|
|
|
|
use app\common\server\FileServer;
|
|
|
|
class File extends ApiBase
|
|
{
|
|
public $like_not_need_login = ['formImage','test'];
|
|
/**
|
|
* showdoc
|
|
* @catalog 接口/上传文件
|
|
* @title form表单方式上传图片
|
|
* @description 图片上传
|
|
* @method post
|
|
* @url /file/formimage
|
|
* @return param name string 图片名称
|
|
* @return param url string 文件地址
|
|
* @remark
|
|
* @number 1
|
|
* @return {"code":1,"msg":"上传文件成功","data":{"url":"http:\/\/likeb2b2c.yixiangonline.com\/uploads\/images\/user\/20200810\/3cb866f6bb30b7239d91582f7d9822d6.png","name":"2.png"},"show":0,"time":"0.283254","debug":{"request":{"get":[],"post":[],"header":{"content-length":"103132","content-type":"multipart\/form-data; boundary=--------------------------206668736604428806173438","connection":"keep-alive","accept-encoding":"gzip, deflate, br","host":"www.likeb2b2c.com:20002","postman-token":"1f8aa4dd-f53c-4d12-98b4-8d901ac847db","cache-control":"no-cache","accept":"*\/*","user-agent":"PostmanRuntime\/7.26.2"}}}}
|
|
*/
|
|
public function formImage()
|
|
{
|
|
$data = FileServer::userFormImage($this->user_id);
|
|
$this->_success($data['msg'], $data['data'], $data['code']);
|
|
}
|
|
} |