mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-13 11:52:51 +00:00
修复bug
This commit is contained in:
parent
6c2cba8e7c
commit
73cbd85243
@ -400,7 +400,7 @@ class SystemConfig extends AuthController
|
|||||||
* 文件上传
|
* 文件上传
|
||||||
* */
|
* */
|
||||||
public function file_upload(){
|
public function file_upload(){
|
||||||
$res = Upload::instance()->setUploadPath('config/file')->file($this->request->param('file','file'));
|
$res = Upload::instance()->setAutoValidate(true)->setUploadPath('config/file')->file($this->request->param('file','file'));
|
||||||
if(!$res->status) return Json::fail($res->error);
|
if(!$res->status) return Json::fail($res->error);
|
||||||
return Json::successful('上传成功!',['filePath'=>$res->filePath]);
|
return Json::successful('上传成功!',['filePath'=>$res->filePath]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,8 +123,9 @@ class Images extends AuthController
|
|||||||
* @param $att_id
|
* @param $att_id
|
||||||
*/
|
*/
|
||||||
public function deleteimganddata($att_id){
|
public function deleteimganddata($att_id){
|
||||||
$attinfo = SystemAttachmentModel::get($att_id)->toArray();
|
$attinfo = SystemAttachmentModel::get($att_id);
|
||||||
if($attinfo){
|
if($attinfo){
|
||||||
|
$attinfo = $attinfo->toArray();
|
||||||
if($attinfo['image_type'] == 1){
|
if($attinfo['image_type'] == 1){
|
||||||
@unlink(app()->getRootPath().ltrim($attinfo['att_dir'],'.'));
|
@unlink(app()->getRootPath().ltrim($attinfo['att_dir'],'.'));
|
||||||
@unlink(app()->getRootPath().ltrim($attinfo['satt_dir'],'.'));
|
@unlink(app()->getRootPath().ltrim($attinfo['satt_dir'],'.'));
|
||||||
|
|||||||
@ -247,7 +247,7 @@ class UserBillController
|
|||||||
$urlCode = $imageInfo['dir'];
|
$urlCode = $imageInfo['dir'];
|
||||||
} else $urlCode = $imageInfo['att_dir'];
|
} else $urlCode = $imageInfo['att_dir'];
|
||||||
if ($imageInfo['image_type'] == 1) $urlCode = $siteUrl . $urlCode;
|
if ($imageInfo['image_type'] == 1) $urlCode = $siteUrl . $urlCode;
|
||||||
$siteUrl = UtilService::setHttpType($siteUrl, 1);
|
$siteUrl = UtilService::setHttpType($siteUrl, $request->isSsl() ? 0 : 1);
|
||||||
$filelink = [
|
$filelink = [
|
||||||
'Bold' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
'Bold' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
||||||
'Normal' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
'Normal' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
||||||
|
|||||||
@ -378,7 +378,7 @@ class UploadService
|
|||||||
protected function setUploadInfo(string $url, int $imageType, string $name = '', string $thumbPath = '', array $headerArray = [])
|
protected function setUploadInfo(string $url, int $imageType, string $name = '', string $thumbPath = '', array $headerArray = [])
|
||||||
{
|
{
|
||||||
$headerArray = count($headerArray) ? $headerArray : self::getImageHeaders($url);
|
$headerArray = count($headerArray) ? $headerArray : self::getImageHeaders($url);
|
||||||
if (is_array($headerArray['Content-Type']) && count($headerArray['Content-Length']) == 2) {
|
if (is_array($headerArray['Content-Length']) && count($headerArray['Content-Length']) == 2) {
|
||||||
$headerArray['Content-Length'] = $headerArray['Content-Length'][1];
|
$headerArray['Content-Length'] = $headerArray['Content-Length'][1];
|
||||||
}
|
}
|
||||||
if (is_array($headerArray['Content-Type']) && count($headerArray['Content-Type']) == 2) {
|
if (is_array($headerArray['Content-Type']) && count($headerArray['Content-Type']) == 2) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user