mirror of https://gitee.com/karson/fastadmin.git
修正本地上传图片显示问题
parent
fae92d1d3f
commit
82cb0ef6d1
|
|
@ -7,9 +7,9 @@ return [
|
|||
*/
|
||||
'uploadurl' => 'ajax/upload',
|
||||
/**
|
||||
* 又拍云或本机的CDN地址
|
||||
* 本机的CDN地址或又拍云http://yourbucketname.b0.upaiyun.com
|
||||
*/
|
||||
'cdnurl' => 'http://yourbucketname.b0.upaiyun.com',
|
||||
'cdnurl' => '',
|
||||
/**
|
||||
* 上传成功后的通知地址
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table', 'config'], function (
|
|||
thumb: function (value, row, index) {
|
||||
//console.log(row);
|
||||
if (row.mimetype.indexOf("image") > -1) {
|
||||
if (Config.upload.bucket.replace(/^\s+|\s+$/gm, '').length === 0) {
|
||||
var reg = /ajax\/upload$/;
|
||||
if (reg.test(Config.upload.uploadurl)) {
|
||||
return '<a href="' + Config.upload.cdnurl + value + '" target="_blank"><img src="' + Config.upload.cdnurl + value + '" alt="" style="max-height:90px;max-width:120px"></a>';
|
||||
} else {
|
||||
return '<a href="' + Config.upload.cdnurl + value + '" target="_blank"><img src="' + Config.upload.cdnurl + value + '!/fwfh/50x50" alt=""></a>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue