master
elf 2 years ago
parent e6a07d6b52
commit c369c06610

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

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

@ -2397,7 +2397,7 @@ function get_child_ids($id){
}
//获取图片连接
function icon_url($value){
if (C('OSS_STATUS')){
if (C('STORAGE_TYPE')){
$url = get_cover($value, 'path');
} else {
$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 "";
}
$picture = M('Picture')->where(array('status' => 1))->getById($cover_id);
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
if (!empty($picture['oss_url'])) {
return str_replace('http:', 'https:', $picture['oss_url']);
} else {

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

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

Loading…
Cancel
Save