切换导航条
此项目
正在载入...
登录
郭盛
/
resource
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郭盛
5 years ago
提交
5e7b47dac9ddb5a11ae7620cd1b58bdf4fa57461
1 个父辈
51c07049
1 个管道 的构建
通过
耗费 6 秒
首页
变更
4
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
210 行增加
和
12 行删除
api/index/controller/ResourceController.php
app/user/controller/AdminIndexController.php
public/themes/admin_simpleboot3/user/admin_index/account.html
public/themes/admin_simpleboot3/user/admin_index/index.html
api/index/controller/ResourceController.php
查看文件 @
5e7b47d
...
...
@@ -81,8 +81,6 @@ class ResourceController extends RestBaseController
* @url /index/Resource/index
* @method GET
*
* @header name:XX-Token require:1 default: desc:token
*
* @param name:lng type:string require:0 other: desc:当前城市经度(默认为当前城市,如果不授权默认为全国)
* @param name:lat type:string require:0 other: desc:当前城市纬度(默认为当前城市,如果不授权默认为全国)
* @param name:page type:int require:0 other: desc:当前页(默认1)
...
...
@@ -92,11 +90,11 @@ class ResourceController extends RestBaseController
* @return job_type:信息标签类型
* @return job_title:信息标题
* @return create_time:发布日期
* @return city:城市名
*
*/
public
function
index
()
{
$user_id
=
$this
->
getUserId
();
$page
=
$this
->
request
->
param
(
'page'
,
1
,
'intval'
);
$pageNum
=
$this
->
request
->
param
(
'pageNum'
,
10
,
'intval'
);
$param
=
$this
->
request
->
param
();
...
...
@@ -110,6 +108,11 @@ class ResourceController extends RestBaseController
->
find
();
$where
[
'city'
]
=
[
'like'
,
"%
$city[id]%"]
;
}
if(empty(
$city
)){
$c_name
= "
全国
";
}else{
$c_name
=
$city['name']
;
}
$where['delete_time']
= ['eq',0];
$where['job_type']
= ['in',[1,2,3,4]];
$where['status']
= ['eq',1];
...
...
@@ -121,11 +124,11 @@ class ResourceController extends RestBaseController
->page(
$page
,
$pageNum
)
->select()
->toArray();
foreach (
$list
as
$k
=>
$v
){
$list[$k]['create_time']
= date('Y-m-d',
$v['create_time']
);
}
$this->success
('SUCCESS',
$list
);
$this->success
('SUCCESS',array('data'=>
$list
,'city'=>
$c_name
));
}
/**
...
...
app/user/controller/AdminIndexController.php
查看文件 @
5e7b47d
...
...
@@ -73,21 +73,19 @@ class AdminIndexController extends AdminBaseController
$list
=
$usersQuery
->
whereOr
(
$keywordComplex
)
->
where
(
$where
)
->
order
(
"create_time DESC"
)
->
paginate
(
10
);
$arr
=
$list
->
toArray
();
foreach
(
$arr
[
'data'
]
as
$k
=>
$v
){
$data
=
Db
::
name
(
'attestation'
)
->
where
(
'user_id'
,
$v
[
'id'
])
->
find
();
if
(
$data
){
$
list
[
$k
][
'authentication'
]
=
$data
[
'status'
];
$
arr
[
'data'
]
[
$k
][
'authentication'
]
=
$data
[
'status'
];
}
else
{
$
list
[
$k
][
'authentication'
]
=
0
;
$
arr
[
'data'
]
[
$k
][
'authentication'
]
=
0
;
}
}
print_r
(
$arr
);
die
;
// 获取分页显示
$page
=
$list
->
render
();
$this
->
assign
(
'list'
,
$
list
);
$this
->
assign
(
'list'
,
$
arr
);
$this
->
assign
(
'page'
,
$page
);
// 渲染模板输出
return
$this
->
fetch
();
...
...
@@ -146,6 +144,35 @@ class AdminIndexController extends AdminBaseController
}
//本站用户禁止发布
public
function
issue
()
{
$id
=
input
(
'param.id'
,
0
,
'intval'
);
if
(
$id
)
{
$result
=
Db
::
name
(
"user"
)
->
where
([
"id"
=>
$id
,
"user_type"
=>
2
])
->
setField
(
'issue'
,
0
);
if
(
$result
)
{
$this
->
success
(
"会员禁止发布成功!"
,
"adminIndex/index"
);
}
else
{
$this
->
error
(
'会员禁止发布失败,会员不存在,或者是管理员!'
);
}
}
else
{
$this
->
error
(
'数据传入失败!'
);
}
}
//本站用户开启发布
public
function
cancelIssue
()
{
$id
=
input
(
'param.id'
,
0
,
'intval'
);
if
(
$id
)
{
Db
::
name
(
"user"
)
->
where
([
"id"
=>
$id
,
"user_type"
=>
2
])
->
setField
(
'issue'
,
1
);
$this
->
success
(
"会员发布启用成功!"
,
''
);
}
else
{
$this
->
error
(
'数据传入失败!'
);
}
}
//认证详情
public
function
approve
()
{
...
...
@@ -161,4 +188,15 @@ class AdminIndexController extends AdminBaseController
$this
->
error
(
'您还未认证,请先认证'
);
}
}
//账号信息
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
();
}
}
...
...
public/themes/admin_simpleboot3/user/admin_index/account.html
0 → 100644
查看文件 @
5e7b47d
<include
file=
"public@header"
/>
</head>
<body>
<!--<script type="text/html" id="photos-item-tpl">-->
<!--<li id="saved-image{id}">-->
<!--<input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">-->
<!--<input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"-->
<!--style="width: 200px;" title="图片名称">-->
<!--<img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"-->
<!--onclick="imagePreviewDialog(this.src);">-->
<!--<a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>-->
<!--<a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>-->
<!--</li>-->
<!--</script>-->
<div
class=
"wrap js-check-wrap"
>
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"{:url('AdminIndex/index')}"
>
本站用户
</a></li>
<li
class=
"active"
><a
href=
"#"
>
账号信息
</a></li>
</ul>
<form
action=
"{:url('AdminIndex/account')}"
method=
"post"
class=
"form-horizontal js-ajax-form margin-top-20"
>
<div
class=
"row"
>
<table
class=
"table table-bordered"
>
<tr>
<th
width=
"100"
>
用户ID
</th>
<td>
{$data.user_id}
</td>
</tr>
<tr>
<th
width=
"100"
>
昵称
</th>
<td>
{$data.user_nickname}
</td>
</tr>
<tr>
<th
width=
"100"
>
所在企业
</th>
<td>
<input
class=
"form-control js-bootstrap-datetime"
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"
/>
</td>
</tr>
<tr>
<th>
公司简介
</th>
<td>
<script
type=
"text/plain"
id=
"content"
name=
"content"
>
{
:
cmf_replace_content_file_url
(
htmlspecialchars_decode
(
$data
.
content
))}
</script>
</td>
</tr>
</table>
<div
class=
"form-group"
>
<div
class=
"col-sm-offset-2 col-sm-10"
>
<input
type=
"hidden"
name=
"id"
value=
"{$data.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>
</div>
</div>
</form>
</div>
<script
type=
"text/javascript"
src=
"__STATIC__/js/admin.js"
></script>
<script
type=
"text/javascript"
>
//编辑器路径定义
var
editorURL
=
GV
.
WEB_ROOT
;
</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
()
{
editorcontent
=
new
baidu
.
editor
.
ui
.
Editor
();
editorcontent
.
render
(
'content'
);
try
{
editorcontent
.
sync
();
}
catch
(
err
)
{
}
});
function
doSelectLawyer
()
{
var
selectedCategoriesId
=
$
(
'#js-categories-id-input'
).
val
();
openIframeLayer
(
"{:url('provide/area')}?ids="
+
selectedCategoriesId
,
'请选择城市'
,
{
area
:
[
'80%'
,
'80%'
],
btn
:
[
'确定'
,
'取消'
],
yes
:
function
(
index
,
layero
)
{
//do something
var
iframeWin
=
window
[
layero
.
find
(
'iframe'
)[
0
][
'id'
]];
var
selectedCategories
=
iframeWin
.
confirm
();
if
(
selectedCategories
.
selectedCategoriesId
.
length
==
0
)
{
layer
.
msg
(
'请选择城市'
);
return
;
}
else
if
(
selectedCategories
.
selectedCategoriesId
.
length
>
5
){
layer
.
msg
(
'最多选择五个城市'
);
return
;
}
$
(
'#js-categories-id-input'
).
val
(
selectedCategories
.
selectedCategoriesId
.
join
(
','
));
$
(
'#js-categories-name-input'
).
val
(
selectedCategories
.
selectedCategoriesName
.
join
(
' '
));
//console.log(layer.getFrameIndex(index));
layer
.
close
(
index
);
//如果设定了yes回调,需进行手工关闭
}
});
}
</script>
</body>
</html>
...
...
public/themes/admin_simpleboot3/user/admin_index/index.html
查看文件 @
5e7b47d
...
...
@@ -30,6 +30,8 @@
<th>
{:lang('LAST_LOGIN_IP')}
</th>
<th>
认证状态
</th>
<th>
账号状态
</th>
<th>
发布状态
</th>
<th>
发布操作
</th>
<th>
{:lang('ACTIONS')}
</th>
</tr>
</thead>
...
...
@@ -37,7 +39,7 @@
<php>
$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
</php>
<foreach
name=
"list"
item=
"vo"
>
<foreach
name=
"list
.data
"
item=
"vo"
>
<tr>
<td>
{$vo.id}
</td>
<td>
{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
...
...
@@ -49,17 +51,49 @@
<td>
{:date('Y-m-d H:i:s',$vo['create_time'])}
</td>
<td>
{:date('Y-m-d H:i:s',$vo['last_login_time'])}
</td>
<td>
{$vo.last_login_ip}
</td>
<if
condition=
"$vo.authentication eq 1"
>
<td>
审核中
</td>
<elseif
condition=
"$vo.authentication eq 2"
/>
<td
style=
"color: green"
>
已认证
</td>
<elseif
condition=
"$vo.authentication eq 3"
/>
<td
style=
"color: red"
>
未通过
</td>
<else
/>
<td>
未认证
</td>
</if>
<td>
{$user_statuses[$vo['user_status']]}
</td>
<if
condition=
"$vo.issue eq 1"
>
<td
style=
"color: green"
>
正常
</td>
<else
/>
<td
style=
"color: red"
>
禁止
</td>
</if>
<td>
<neq
name=
"vo.id"
value=
"1"
>
<empty
name=
"vo.issue"
>
<!--开启发布-->
<a
href=
"{:url('adminIndex/cancelIssue',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"是否允许该账号发布信息?"
>
开启发布
</a>
<else/>
<!--禁止发布-->
<a
href=
"{:url('adminIndex/issue',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"是否禁止该账号发布信息?"
>
禁止发布
</a>
</empty>
</neq>
</td>
<td>
<neq
name=
"vo.id"
value=
"1"
>
<empty
name=
"vo.user_status"
>
<a
href=
"{:url('adminIndex/approve',array('id'=>$vo['id']))}"
>
认证详情
</a>
<a
href=
"{:url('adminIndex/account',array('id'=>$vo['id']))}"
>
账号信息
</a>
<!--启用-->
<a
href=
"{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}"
>
{:lang('ACTIVATE_USER')}
</a>
<else/>
<a
href=
"{:url('adminIndex/approve',array('id'=>$vo['id']))}"
>
认证详情
</a>
<a
href=
"{:url('adminIndex/account',array('id'=>$vo['id']))}"
>
账号信息
</a>
<!--拉黑-->
<a
href=
"{:url('adminIndex/ban',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"{:lang('BLOCK_USER_CONFIRM_MESSAGE')}"
>
{:lang('BLOCK_USER')}
</a>
</empty>
...
...
请
注册
或
登录
后发表评论