切换导航条
此项目
正在载入...
登录
郭盛
/
resource
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郭盛
5 years ago
提交
e72add03ac89d9f9da4f3aa77c12aac98f902280
1 个父辈
5e7b47da
1 个管道 的构建
通过
耗费 0 秒
用户状态
变更
2
构建
2
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
65 行增加
和
21 行删除
app/user/controller/AdminIndexController.php
public/themes/admin_simpleboot3/user/admin_index/account.html
app/user/controller/AdminIndexController.php
查看文件 @
e72add0
...
...
@@ -13,6 +13,7 @@ namespace app\user\controller;
use
cmf\controller\AdminBaseController
;
use
think\Db
;
use
think\Validate
;
/**
* Class AdminIndexController
...
...
@@ -193,10 +194,49 @@ class AdminIndexController extends AdminBaseController
public
function
account
()
{
$id
=
input
(
'param.id'
,
0
,
'intval'
);
$data
=
Db
::
name
(
'account'
)
->
where
(
'user_id'
,
$id
)
->
find
();
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
if
(
$this
->
request
->
isPost
()){
$param
[
'status'
]
=
$this
->
request
->
param
(
'status'
);
if
(
!
empty
(
$param
[
'status'
]))
{
Db
::
name
(
'attestation'
)
->
where
(
'user_id'
,
$id
)
->
update
([
'status'
=>
$param
[
'status'
]]);
}
$data
[
'position'
]
=
$this
->
request
->
param
(
'position'
);
$data
[
'company'
]
=
$this
->
request
->
param
(
'company'
);
$data
[
'content'
]
=
$this
->
request
->
param
(
'content'
);
$data
[
'update_time'
]
=
time
();
$validate
=
new
Validate
([
'position'
=>
'require'
,
'company'
=>
'require'
,
'content'
=>
'require'
,
]);
$validate
->
message
([
'position'
=>
'职位不能为空'
,
'company'
=>
'公司名称不能为空'
,
'content'
=>
'内容不能为空!'
,
]);
if
(
!
$validate
->
check
(
$data
))
{
$this
->
error
(
$validate
->
getError
());
}
Db
::
name
(
'account'
)
->
where
(
'user_id'
,
$id
)
->
update
(
$data
);
$this
->
success
(
'更新成功!'
);
}
else
{
$data
=
Db
::
name
(
'account'
)
->
alias
(
'a'
)
->
join
(
'user u'
,
'a.user_id = u.id'
)
->
field
(
'a.*,u.user_nickname'
)
->
where
(
'user_id'
,
$id
)
->
find
();
$list
=
Db
::
name
(
'attestation'
)
->
where
(
'user_id'
,
$id
)
->
find
();
$this
->
assign
(
'data'
,
$data
);
$this
->
assign
(
'list'
,
$list
);
return
$this
->
fetch
();
}
}
}
...
...
public/themes/admin_simpleboot3/user/admin_index/account.html
查看文件 @
e72add0
...
...
@@ -26,7 +26,6 @@
{$data.user_id}
</td>
</tr>
<tr>
<th
width=
"100"
>
昵称
</th>
<td>
...
...
@@ -36,25 +35,15 @@
<tr>
<th
width=
"100"
>
所在企业
</th>
<td>
<input
class=
"form-control
js-bootstrap-datetime
"
type=
"text"
name=
"company"
<input
class=
"form-control"
type=
"text"
name=
"company"
value=
"{$data.company}"
placeholder=
"请输入所在企业"
/>
</td>
</tr>
<tr>
<th
width=
"100"
>
职位
</th>
<td>
<input
class=
"form-control js-bootstrap-datetime"
type=
"text"
name=
"position"
value=
"{$data.position}"
placeholder=
"请输入职位"
/>
</td>
</tr>
<tr>
<th
width=
"100"
>
发布城市
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
style=
"width:400px;"
value=
"<foreach name='$data.area' item='l'>{$l.name} </foreach>"
placeholder=
"请选择城市"
onclick=
"doSelectLawyer();"
id=
"js-categories-name-input"
readonly
/>
<input
class=
"form-control"
type=
"hidden"
value=
"{$data.city}"
name=
"city"
id=
"js-categories-id-input"
/>
<input
class=
"form-control"
type=
"text"
name=
"position"
value=
"{$data.position}"
placeholder=
"请输入职位"
/>
</td>
</tr>
<tr>
...
...
@@ -63,10 +52,26 @@
<script
type=
"text/plain"
id=
"content"
name=
"content"
>
{
:
cmf_replace_content_file_url
(
htmlspecialchars_decode
(
$data
.
content
))}
</script>
</td>
</tr>
<tr>
<th>
认证状态
</th>
<if
condition=
"$list.status eq 2"
>
<td>
<input
type=
"radio"
name=
"status"
value=
"2"
checked
>
已认证
<input
type=
"radio"
name=
"status"
value=
"3"
>
未认证
</td>
<elseif
condition=
"$list.status eq 3"
/>
<td>
<input
type=
"radio"
name=
"status"
value=
"2"
>
已认证
<input
type=
"radio"
name=
"status"
value=
"3"
checked
>
未认证
</td>
<else
/>
<td>
审核中
</td>
</if>
</tr>
</table>
<div
class=
"form-group"
>
<div
class=
"col-sm-offset-2 col-sm-10"
>
<input
type=
"hidden"
name=
"id"
value=
"{$data.id}"
>
<input
type=
"hidden"
name=
"id"
value=
"{$data.
user_
id}"
>
<button
type=
"submit"
class=
"btn btn-primary js-ajax-submit"
>
{:lang('SAVE')}
</button>
<a
class=
"btn btn-default"
href=
"javascript:history.back(-1);"
>
{:lang('BACK')}
</a>
</div>
...
...
@@ -81,7 +86,6 @@
</script>
<script
type=
"text/javascript"
src=
"__STATIC__/js/ueditor/ueditor.config.js"
></script>
<script
type=
"text/javascript"
src=
"__STATIC__/js/ueditor/ueditor.all.min.js"
></script>
<script
type=
"text/javascript"
src=
"__STATIC__/js/jquery.js"
></script>
<script
type=
"text/javascript"
>
$
(
function
()
{
...
...
请
注册
或
登录
后发表评论