作者 景龙
1 个管道 的构建 通过 耗费 0 秒

修改富文本编辑器图片的域名

@@ -105,6 +105,7 @@ class Ajax extends Backend @@ -105,6 +105,7 @@ class Ajax extends Backend
105 $imagewidth = isset($imgInfo[0]) ? $imgInfo[0] : $imagewidth; 105 $imagewidth = isset($imgInfo[0]) ? $imgInfo[0] : $imagewidth;
106 $imageheight = isset($imgInfo[1]) ? $imgInfo[1] : $imageheight; 106 $imageheight = isset($imgInfo[1]) ? $imgInfo[1] : $imageheight;
107 } 107 }
  108 + $url = 'http://feipin.w.brotop.cn'.$uploadDir . $splInfo->getSaveName();
108 $params = array( 109 $params = array(
109 'admin_id' => (int)$this->auth->id, 110 'admin_id' => (int)$this->auth->id,
110 'user_id' => 0, 111 'user_id' => 0,
@@ -114,7 +115,7 @@ class Ajax extends Backend @@ -114,7 +115,7 @@ class Ajax extends Backend
114 'imagetype' => $suffix, 115 'imagetype' => $suffix,
115 'imageframes' => 0, 116 'imageframes' => 0,
116 'mimetype' => $fileInfo['type'], 117 'mimetype' => $fileInfo['type'],
117 - 'url' => $uploadDir . $splInfo->getSaveName(), 118 + 'url' => $url,
118 'uploadtime' => time(), 119 'uploadtime' => time(),
119 'storage' => 'local', 120 'storage' => 'local',
120 'sha1' => $sha1, 121 'sha1' => $sha1,
@@ -124,7 +125,7 @@ class Ajax extends Backend @@ -124,7 +125,7 @@ class Ajax extends Backend
124 $attachment->save(); 125 $attachment->save();
125 \think\Hook::listen("upload_after", $attachment); 126 \think\Hook::listen("upload_after", $attachment);
126 $this->success(__('Upload successful'), null, [ 127 $this->success(__('Upload successful'), null, [
127 - 'url' => $uploadDir . $splInfo->getSaveName() 128 + 'url' => $url
128 ]); 129 ]);
129 } else { 130 } else {
130 // 上传失败获取错误信息 131 // 上传失败获取错误信息