Commit 58a560ed by doszhang

dos

parent a404810d
...@@ -9,7 +9,7 @@ class PrizeController extends AdminController ...@@ -9,7 +9,7 @@ class PrizeController extends AdminController
{ {
public function index() public function index()
{ {
$sql = "select p.id,u.name,u.tel,u.address,p.add_time,p.prize_name from prize as p,user as u where p.uid=u.id and p.is_get=1"; $sql = "select id,nickname,headimgurl,poster_url,headposter_url from user where poster_url is not NULL or headposter_url is not NULL";
$list = M()->query($sql); $list = M()->query($sql);
$this->assign('list', $list); $this->assign('list', $list);
$this->display(); $this->display();
......
...@@ -2,6 +2,20 @@ ...@@ -2,6 +2,20 @@
{:block name="header_css" append} {:block name="header_css" append}
<link rel="stylesheet" href="/Public/static/admin/lib/DataTables-1.10.12/media/css/dataTables.bootstrap4.min.css"> <link rel="stylesheet" href="/Public/static/admin/lib/DataTables-1.10.12/media/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="/Public/static/admin/lib/DataTables-1.10.12/extensions/Buttons/css/buttons.bootstrap4.css"> <link rel="stylesheet" href="/Public/static/admin/lib/DataTables-1.10.12/extensions/Buttons/css/buttons.bootstrap4.css">
<style type="text/css">
.headimgUrl {
width: 300px;
height: 300px;
}
.headposter_url {
width: 300px;
height: 300px;
}
.poster_url {
width: 309px;
height: 500px;
}
</style>
{:/block} {:/block}
{:block name="content_title"} {:block name="content_title"}
{:/block} {:/block}
...@@ -20,15 +34,13 @@ ...@@ -20,15 +34,13 @@
<table class="table table-striped table-bordered" id="users_table"> <table class="table table-striped table-bordered" id="users_table">
<thead> <thead>
<tr> <tr>
<th>编号</th> <th>ID</th>
<th>姓名</th> <th>微信昵称</th>
<th>性别</th> <th>微信头像</th>
<th>年龄</th> <th>生成的头像</th>
<th>电话</th> <th>生成头像时间</th>
<th>是否参加过马拉松</th> <th>生成的海报</th>
<th class="order">最好成绩({:$a})</th> <th>生成海报时间</th>
<th>上传图片</th>
<th>提交时间</th>
</tr> </tr>
</thead> </thead>
<tbody class="text-left"> <tbody class="text-left">
...@@ -36,20 +48,25 @@ ...@@ -36,20 +48,25 @@
<tr> <tr>
<td>{:$item['id']}</td> <td>{:$item['id']}</td>
<td>{:$item['name']}</td> <td>{:$item['nickname']}</td>
<td>{:$item['sex']}</td> <td><img class="headimgUrl" style="width:100px;height:100px;object-fit:contain;" src="{:$item['headimgurl']}" /></td>
<td>{:$item['age']}</td> <td>
<td>{:$item['tel']}</td> {:if $item['headposter_url']}
<td>{:$item['status']}</td> <img class="headposter_url" style="width:100px;height:100px;object-fit:contain;" src="{:$item['headposter_url']}" />
<td>{:$item['score']}</td> <span style="display:none">{:$item['headposter_url']}</span>
{:/if}
</td>
<td >{:$item.headposter_times|date_format:'%Y-%m-%d %H:%M:%S'}</td>
<td> <td>
{:if $item['imgUrl']} {:if $item['poster_url']}
<img class="imgUrl" style="width:100px;height:100px;object-fit:contain;" src="{:$item['imgUrl']}" /> <img class="poster_url" style="width:100px;height:100px;object-fit:contain;" src="{:$item['poster_url']}" />
<span style="display:none">{:$item['imgUrl']}</span> <span style="display:none">{:$item['poster_url']}</span>
{:/if} {:/if}
</td> </td>
<td >{:$item.update_time|date_format:'%Y-%m-%d %H:%M:%S'}</td> <td >{:$item.poster_times|date_format:'%Y-%m-%d %H:%M:%S'}</td>
</tr> </tr>
{:/foreach} {:/foreach}
</tbody> </tbody>
......
...@@ -107,6 +107,7 @@ class IndexController extends Controller ...@@ -107,6 +107,7 @@ class IndexController extends Controller
{ {
M('User')->where(['id' => $user['id']])->save([ M('User')->where(['id' => $user['id']])->save([
'poster_url' => $url, 'poster_url' => $url,
'poster_times' => time()
]); ]);
$this->ajaxReturn(array( $this->ajaxReturn(array(
'status' => 1, 'status' => 1,
...@@ -119,6 +120,7 @@ class IndexController extends Controller ...@@ -119,6 +120,7 @@ class IndexController extends Controller
{ {
M('User')->where(['id' => $user['id']])->save([ M('User')->where(['id' => $user['id']])->save([
'headposter_url' => $url, 'headposter_url' => $url,
'headposter_times' => time()
]); ]);
$this->ajaxReturn(array( $this->ajaxReturn(array(
'status' => 1, 'status' => 1,
......
...@@ -31,6 +31,16 @@ class AdminController extends Controller { ...@@ -31,6 +31,16 @@ class AdminController extends Controller {
'auth_path' =>'1', 'auth_path' =>'1',
'auth_level' =>'1', 'auth_level' =>'1',
'auth_src' => '0' 'auth_src' => '0'
],
[
'auth_id' =>'2',
'auth_name' =>'用户信息',
'auth_pid' =>'0',
'auth_c' =>'Info',
'auth_a' =>'index',
'auth_path' =>'1',
'auth_level' =>'1',
'auth_src' => '0'
] ]
]; ];
$menu = []; $menu = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment