master
elf 2 years ago
parent e6a07d6b52
commit c369c06610

@ -155,7 +155,7 @@ function get_img_url($cover_id){
return ""; return "";
} }
$picture = M('Picture')->where(array('status'=>1))->getById($cover_id); $picture = M('Picture')->where(array('status'=>1))->getById($cover_id);
if (C('OSS_STATUS')) { if (C('STORAGE_TYPE')) {
if(!empty($picture['oss_url'])){ if(!empty($picture['oss_url'])){
return $picture['oss_url']; return $picture['oss_url'];
}else{ }else{

@ -331,7 +331,7 @@ class GameSourceService {
public function uploadPackage($localFilePath, $distFilePath, $isDeleteLocal = false) public function uploadPackage($localFilePath, $distFilePath, $isDeleteLocal = false)
{ {
$isChunk = C('PACKAGE_CHUNK_ENABLED') ? true : false; $isChunk = C('PACKAGE_CHUNK_ENABLED') ? true : false;
if (C('OSS_STATUS')) { if (C('STORAGE_TYPE')) {
if ($isChunk) { if ($isChunk) {
return $this->uploadPackageChunk($localFilePath, $distFilePath, $isDeleteLocal); return $this->uploadPackageChunk($localFilePath, $distFilePath, $isDeleteLocal);
} else { } else {

@ -2397,7 +2397,7 @@ function get_child_ids($id){
} }
//获取图片连接 //获取图片连接
function icon_url($value){ function icon_url($value){
if (C('OSS_STATUS')){ if (C('STORAGE_TYPE')){
$url = get_cover($value, 'path'); $url = get_cover($value, 'path');
} else { } else {
$url = 'http://' . $_SERVER['HTTP_HOST'] . get_cover($value, 'path'); $url = 'http://' . $_SERVER['HTTP_HOST'] . get_cover($value, 'path');

@ -1020,7 +1020,7 @@ function get_cover($cover_id, $field = null, $root = 1, $flag = true)
return ""; return "";
} }
$picture = M('Picture')->where(array('status' => 1))->getById($cover_id); $picture = M('Picture')->where(array('status' => 1))->getById($cover_id);
if (C('OSS_STATUS')) { if (C('STORAGE_TYPE')) {
if (!empty($picture['oss_url'])) { if (!empty($picture['oss_url'])) {
return str_replace('http:', 'https:', $picture['oss_url']); return str_replace('http:', 'https:', $picture['oss_url']);
} else { } else {

@ -548,7 +548,7 @@ function get_img_url($cover_id){
return ""; return "";
} }
$picture = M('Picture')->where(array('status'=>1))->getById($cover_id); $picture = M('Picture')->where(array('status'=>1))->getById($cover_id);
if (C('OSS_STATUS')) { if (C('STORAGE_TYPE')) {
if(!empty($picture['oss_url'])){ if(!empty($picture['oss_url'])){
return $picture['oss_url']; return $picture['oss_url'];
}else{ }else{

@ -37,8 +37,8 @@ class QrCodePromotionController extends BaseController
public function uploadQrCodeBackground() public function uploadQrCodeBackground()
{ {
$fileController = new FileController(); $fileController = new FileController();
$ossStatus = C('OSS_STATUS'); $storageType = C('STORAGE_TYPE');
C('OSS_STATUS', false); C('STORAGE_TYPE', null);
/* 调用文件上传组件上传文件 */ /* 调用文件上传组件上传文件 */
$Picture = D('Picture'); $Picture = D('Picture');
$pic_driver = C('PICTURE_UPLOAD_DRIVER'); $pic_driver = C('PICTURE_UPLOAD_DRIVER');
@ -51,7 +51,7 @@ class QrCodePromotionController extends BaseController
$_REQUEST['flag'] $_REQUEST['flag']
); // ); //
C('OSS_STATUS', $ossStatus); C('STORAGE_TYPE', $storageType);
$path = ''; $path = '';
if ($info) { if ($info) {

Loading…
Cancel
Save