問(wèn)題說(shuō)明:后臺(tái)、門(mén)店、供應(yīng)商掃碼上傳圖片不顯示
修改文件:app/controller/admin/v1/system/attachment/SystemAttachment.php
修改方法:scanUploadQrcode()
public function scanUploadQrcode(CacheServices $services)
{
[$pid] = $this->request->getMore([
['pid', 0]
], true);
$uploadToken = md5(time());
$upload_file_size_max = config('upload.filesize');//文件上傳大小kb
$services->setDbCache('scan_upload', $uploadToken, 68400);
$url = sys_config('site_url') . '/app/upload?pid=' . $pid . '&cache=scan_upload&type=0&relation_id=0&upload_file_size_max=' . $upload_file_size_max . '&token=' . $uploadToken;
return app('json')->success(['url' => $url]);
}
修改文件:app/controller/store/file/SystemAttachment.php
修改方法:scanUploadQrcode()
public function scanUploadQrcode(CacheServices $services)
{
[$pid] = $this->request->getMore([
['pid', 0]
], true);
$uploadToken = md5(time());
$upload_file_size_max = config('upload.filesize');//文件上傳大小kb
$services->setDbCache($this->storeId .'_store_scan_upload', $uploadToken, 68400);
$url = sys_config('site_url') . '/app/upload?pid=' . $pid . '&cache='. $this->storeId .'_store_scan_upload&type=1&relation_id='. $this->storeId . '&upload_file_size_max=' . $upload_file_size_max . '&token=' . $uploadToken;
return app('json')->success(['url' => $url]);
}
修改文件:app/controller/supplier/file/SystemAttachment.php
修改方法:scanUploadQrcode()
public function scanUploadQrcode(CacheServices $services)
{
[$pid] = $this->request->getMore([
['pid', 0]
], true);
$uploadToken = md5(time());
$upload_file_size_max = config('upload.filesize');//文件上傳大小kb
$services->setDbCache($this->supplierId.'_supplier_scan_upload', $uploadToken, 68400);
$url = sys_config('site_url') . '/app/upload?pid=' . $pid . '&cache='. $this->supplierId .'_supplier_scan_upload&type=2&relation_id='. $this->supplierId . '&upload_file_size_max=' . $upload_file_size_max . '&token=' . $uploadToken;
return app('json')->success(['url' => $url]);
}