切换导航条
此项目
正在载入...
登录
何书鹏
/
anttest
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
5 years ago
提交
3f4e54d0dd22a12e16461d907926c5b672aae1a5
1 个父辈
ac979886
修复API接口错误提示
优化上传选择器优先逻辑 优化插件离线安装后续限制 优化后台头像无法保存的BUG
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
12 行增加
和
12 行删除
application/admin/view/addon/index.html
application/admin/view/general/profile/index.html
application/api/controller/Common.php
public/assets/js/frontend/user.js
public/assets/js/require-backend.min.js
public/assets/js/require-upload.js
application/admin/view/addon/index.html
查看文件 @
3f4e54d
...
...
@@ -77,7 +77,7 @@
<div
class=
"widget-body no-padding"
>
<div
id=
"toolbar"
class=
"toolbar"
>
{:build_toolbar('refresh')}
<button
type=
"button"
id=
"faupload-addon"
class=
"btn btn-danger faupload"
data-url=
"addon/local"
data-mimetype=
"
application/
zip"
data-multiple=
"false"
><i
class=
"fa fa-upload"
></i>
<button
type=
"button"
id=
"faupload-addon"
class=
"btn btn-danger faupload"
data-url=
"addon/local"
data-mimetype=
"zip"
data-multiple=
"false"
><i
class=
"fa fa-upload"
></i>
{:__('Offline install')}
</button>
{if $Think.config.fastadmin.api_url}
...
...
application/admin/view/general/profile/index.html
查看文件 @
3f4e54d
...
...
@@ -51,9 +51,9 @@
<div
class=
"box-body box-profile"
>
<div
class=
"profile-avatar-container"
>
<img
class=
"profile-user-img img-responsive img-circle
faupload
"
src=
"{$admin.avatar|cdnurl|htmlentities}"
alt=
""
>
<img
class=
"profile-user-img img-responsive img-circle"
src=
"{$admin.avatar|cdnurl|htmlentities}"
alt=
""
>
<div
class=
"profile-avatar-text img-circle"
>
{:__('Click to edit')}
</div>
<button
id=
"faupload-avatar"
class=
"faupload"
data-input-id=
"c-avatar"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button>
<button
type=
"button"
id=
"faupload-avatar"
class=
"faupload"
data-input-id=
"c-avatar"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button>
</div>
<h3
class=
"profile-username text-center"
>
{$admin.username|htmlentities}
</h3>
...
...
application/api/controller/Common.php
查看文件 @
3f4e54d
...
...
@@ -69,7 +69,7 @@ class Common extends Api
}
catch
(
UploadException
$e
)
{
$this
->
error
(
$e
->
getMessage
());
}
$this
->
success
(
__
(
'Uploaded successful'
),
''
,
[
'url'
=>
$attachment
->
url
]);
$this
->
success
(
__
(
'Uploaded successful'
),
[
'url'
=>
$attachment
->
url
]);
}
elseif
(
$method
==
'clean'
)
{
//删除冗余的分片文件
try
{
...
...
@@ -102,7 +102,7 @@ class Common extends Api
$this
->
error
(
$e
->
getMessage
());
}
$this
->
success
(
__
(
'Uploaded successful'
),
''
,
[
'url'
=>
$attachment
->
url
]);
$this
->
success
(
__
(
'Uploaded successful'
),
[
'url'
=>
$attachment
->
url
]);
}
}
...
...
public/assets/js/frontend/user.js
查看文件 @
3f4e54d
...
...
@@ -77,7 +77,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
$
(
"#faupload-avatar"
).
data
(
"upload-success"
,
function
(
data
)
{
var
url
=
Fast
.
api
.
cdnurl
(
data
.
url
);
$
(
".profile-user-img"
).
prop
(
"src"
,
url
);
Toastr
.
success
(
__
(
'Upload successful'
));
Toastr
.
success
(
__
(
'Upload
ed
successful'
));
});
Form
.
api
.
bindevent
(
$
(
"#profile-form"
));
$
(
document
).
on
(
"click"
,
".btn-change"
,
function
()
{
...
...
public/assets/js/require-backend.min.js
查看文件 @
3f4e54d
...
...
@@ -7387,7 +7387,7 @@ define('upload',['jquery', 'bootstrap', 'dropzone', 'template'], function ($, un
}
$
(
this
).
attr
(
"initialized"
,
true
);
var
that
=
this
;
var
id
=
$
(
this
).
prop
(
"id"
);
var
id
=
$
(
this
).
prop
(
"id"
)
||
$
(
this
).
prop
(
"name"
)
||
Dropzone
.
uuidv4
()
;
var
url
=
$
(
this
).
data
(
"url"
);
var
maxsize
=
$
(
this
).
data
(
"maxsize"
);
var
maxcount
=
$
(
this
).
data
(
"maxcount"
);
...
...
@@ -7431,12 +7431,12 @@ define('upload',['jquery', 'bootstrap', 'dropzone', 'template'], function ($, un
return
bytes
/
Math
.
pow
(
1024
,
2
);
}(
maxsize
));
var
options
=
$
(
"#"
+
id
).
data
()
||
{};
var
options
=
$
(
this
).
data
()
||
{};
delete
options
.
success
;
delete
options
.
url
;
multipart
=
$
.
isArray
(
multipart
)
?
{}
:
multipart
;
Upload
.
list
[
id
]
=
new
Dropzone
(
"#"
+
id
,
$
.
extend
({
Upload
.
list
[
id
]
=
new
Dropzone
(
this
,
$
.
extend
({
url
:
url
,
params
:
function
(
files
,
xhr
,
chunk
)
{
var
params
=
multipart
;
...
...
public/assets/js/require-upload.js
查看文件 @
3f4e54d
...
...
@@ -125,7 +125,7 @@ define(['jquery', 'bootstrap', 'dropzone', 'template'], function ($, undefined,
}
$
(
this
).
attr
(
"initialized"
,
true
);
var
that
=
this
;
var
id
=
$
(
this
).
prop
(
"id"
);
var
id
=
$
(
this
).
prop
(
"id"
)
||
$
(
this
).
prop
(
"name"
)
||
Dropzone
.
uuidv4
()
;
var
url
=
$
(
this
).
data
(
"url"
);
var
maxsize
=
$
(
this
).
data
(
"maxsize"
);
var
maxcount
=
$
(
this
).
data
(
"maxcount"
);
...
...
@@ -169,12 +169,12 @@ define(['jquery', 'bootstrap', 'dropzone', 'template'], function ($, undefined,
return
bytes
/
Math
.
pow
(
1024
,
2
);
}(
maxsize
));
var
options
=
$
(
"#"
+
id
).
data
()
||
{};
var
options
=
$
(
this
).
data
()
||
{};
delete
options
.
success
;
delete
options
.
url
;
multipart
=
$
.
isArray
(
multipart
)
?
{}
:
multipart
;
Upload
.
list
[
id
]
=
new
Dropzone
(
"#"
+
id
,
$
.
extend
({
Upload
.
list
[
id
]
=
new
Dropzone
(
this
,
$
.
extend
({
url
:
url
,
params
:
function
(
files
,
xhr
,
chunk
)
{
var
params
=
multipart
;
...
...
请
注册
或
登录
后发表评论