Commit 58a560ed by doszhang

dos

parent a404810d
......@@ -9,7 +9,7 @@ class PrizeController extends AdminController
{
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);
$this->assign('list', $list);
$this->display();
......
......@@ -2,6 +2,20 @@
{: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/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 name="content_title"}
{:/block}
......@@ -20,15 +34,13 @@
<table class="table table-striped table-bordered" id="users_table">
<thead>
<tr>
<th>编号</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
<th>电话</th>
<th>是否参加过马拉松</th>
<th class="order">最好成绩({:$a})</th>
<th>上传图片</th>
<th>提交时间</th>
<th>ID</th>
<th>微信昵称</th>
<th>微信头像</th>
<th>生成的头像</th>
<th>生成头像时间</th>
<th>生成的海报</th>
<th>生成海报时间</th>
</tr>
</thead>
<tbody class="text-left">
......@@ -36,20 +48,25 @@
<tr>
<td>{:$item['id']}</td>
<td>{:$item['name']}</td>
<td>{:$item['sex']}</td>
<td>{:$item['age']}</td>
<td>{:$item['tel']}</td>
<td>{:$item['status']}</td>
<td>{:$item['score']}</td>
<td>{:$item['nickname']}</td>
<td><img class="headimgUrl" style="width:100px;height:100px;object-fit:contain;" src="{:$item['headimgurl']}" /></td>
<td>
{:if $item['imgUrl']}
<img class="imgUrl" style="width:100px;height:100px;object-fit:contain;" src="{:$item['imgUrl']}" />
<span style="display:none">{:$item['imgUrl']}</span>
{:if $item['headposter_url']}
<img class="headposter_url" style="width:100px;height:100px;object-fit:contain;" src="{:$item['headposter_url']}" />
<span style="display:none">{:$item['headposter_url']}</span>
{:/if}
</td>
<td >{:$item.update_time|date_format:'%Y-%m-%d %H:%M:%S'}</td>
<td >{:$item.headposter_times|date_format:'%Y-%m-%d %H:%M:%S'}</td>
<td>
{:if $item['poster_url']}
<img class="poster_url" style="width:100px;height:100px;object-fit:contain;" src="{:$item['poster_url']}" />
<span style="display:none">{:$item['poster_url']}</span>
{:/if}
</td>
<td >{:$item.poster_times|date_format:'%Y-%m-%d %H:%M:%S'}</td>
</tr>
{:/foreach}
</tbody>
......
......@@ -107,6 +107,7 @@ class IndexController extends Controller
{
M('User')->where(['id' => $user['id']])->save([
'poster_url' => $url,
'poster_times' => time()
]);
$this->ajaxReturn(array(
'status' => 1,
......@@ -119,6 +120,7 @@ class IndexController extends Controller
{
M('User')->where(['id' => $user['id']])->save([
'headposter_url' => $url,
'headposter_times' => time()
]);
$this->ajaxReturn(array(
'status' => 1,
......
......@@ -31,6 +31,16 @@ class AdminController extends Controller {
'auth_path' =>'1',
'auth_level' =>'1',
'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 = [];
......
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