切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
8 years ago
提交
d03b1c5fb0c593240da171aeb79d614e82e3c096
1 个父辈
56df3747
修复后台个人资料的BUG
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
8 行增加
和
12 行删除
application/admin/controller/general/Profile.php
application/admin/view/general/profile/index.html
public/assets/js/backend/general/profile.js
application/admin/controller/general/Profile.php
查看文件 @
d03b1c5
...
...
@@ -3,6 +3,7 @@
namespace
app\admin\controller\general
;
use
app\common\controller\Backend
;
use
fast\Random
;
/**
* 个人配置
...
...
@@ -53,13 +54,13 @@ class Profile extends Backend
unset
(
$v
);
if
(
isset
(
$params
[
'password'
]))
{
$params
[
'salt'
]
=
Random
::
basic
(
4
);
$params
[
'salt'
]
=
Random
::
alnum
(
);
$params
[
'password'
]
=
md5
(
md5
(
$params
[
'password'
])
.
$params
[
'salt'
]);
}
if
(
$params
)
{
model
(
'admin'
)
->
where
(
'id'
,
Auth
::
id
())
->
update
(
$params
);
$this
->
code
=
0
;
model
(
'admin'
)
->
where
(
'id'
,
$this
->
auth
->
id
)
->
update
(
$params
);
$this
->
code
=
1
;
}
}
return
;
...
...
application/admin/view/general/profile/index.html
查看文件 @
d03b1c5
...
...
@@ -5,7 +5,7 @@
{:__('Profile')}
</div>
<div
class=
"panel-body"
>
<form
id=
"update-form"
role=
"form"
data-toggle=
"validator"
method=
"POST"
action=
"
/general_profile/update
"
>
<form
id=
"update-form"
role=
"form"
data-toggle=
"validator"
method=
"POST"
action=
"
{:url('general.profile/update')}
"
>
<div
class=
"form-group"
>
<label
for=
"username"
class=
"control-label"
>
{:__('Username')}:
</label>
<input
type=
"text"
class=
"form-control"
name=
"row[username]"
value=
"{$admin.username}"
disabled
/>
...
...
public/assets/js/backend/general/profile.js
查看文件 @
d03b1c5
...
...
@@ -37,14 +37,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// 为表格绑定事件
Table
.
api
.
bindevent
(
table
);
//当内容渲染完成后
Form
.
api
.
bindevent
(
$
(
"#update-form"
));
$
(
"#update-form"
).
submit
(
function
()
{
Form
.
api
.
submit
(
$
(
"#update-form"
),
null
,
function
()
{
$
(
"input[name='row[password]']"
).
val
(
''
);
return
true
;
});
return
false
;
Form
.
api
.
bindevent
(
$
(
"#update-form"
),
null
,
function
()
{
$
(
"input[name='row[password]']"
).
val
(
''
);
return
true
;
});
}
};
...
...
请
注册
或
登录
后发表评论