Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
ELF 5 years ago
commit 261f2f7294

@ -374,7 +374,7 @@ class UserModel extends Model{
$data = array(
'account' => $account,
'password' => $password,
'nickname' => $account,
'nickname' => getChinaChar(rand(2,4)),
'phone' => $phone,
'head_img' =>'',
'promote_id' => $promote_id,

@ -268,20 +268,62 @@ class PromoteController extends BaseController
// 消息列表
public function msg_list($type=56){
public function msg_list($type=56,$p=0){
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$page = $p ? $p : 1; //默认显示第一页数据
if($type==51){
$data_list = M("document","sys_")->limit('0,50')->where("category_id=51 and status=1")->order("update_time desc")->select(); //游戏咨询
$data_list = M("document","sys_")->where("category_id=51 and status=1")->order("update_time desc") ->page($page, $row)->select(); //游戏咨询
$count = M("document","sys_")->where("category_id=51 and status=1")->count();
}elseif ($type==50){
$data_list = null;
$count = 0;
}else{
$data_list = M("document","sys_")->limit('0,50')->where("category_id=56 and status=1")->order("update_time desc")->select(); //游戏公告
$data_list = M("document","sys_")->limit('0,50')->where("category_id=56 and status=1")->order("update_time desc")->page($page, $row)->select(); //游戏公告
$count = M("document","sys_")->where("category_id=56 and status=1")->count();
}
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->meta_title = "公告列表";
$this->assign("type", $type);
$this->assign("data_list", $data_list);
$this->display();
}
/* public function page_show($model,$map,$p=1)
{
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$this->meta_title = "平台币充值";
$page = $p ? $p : 1; //默认显示第一页数据
$data = M($model, 'tab_')
->where($map)
->order('id DESC')
->page($page, $row)
->select();
$count = M($model, "tab_")->where($map)->count();
$parameter = $map;
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign("data_list", $data);
$this->display();
}*/
/**
* 我的基本信息

@ -1,6 +1,6 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/index/index.new.css?v=1" rel="stylesheet" >
<link href="__CSS__/index/index.new.css" rel="stylesheet" >
</block>
<block name="body">
<div class="page-overview promote-index-overview index-overview clearfix poll">
@ -42,7 +42,7 @@
</li>
<li>
<div class="fxui-tab">
<div class="fxui-tab-hand"><span class="fxui-tab-tit">公告</span> <span class="fxui-tab-tit">消息</span> <span class="fxui-tab-tit">游戏活动</span><span class="more"><a href="{:U('msg_list')}">查看更多></a></span></div>
<div class="fxui-tab-hand"><span class="fxui-tab-tit"><a href="#;">公告</a></span> <span class="fxui-tab-tit"><a href="#;">消息</a></span> <span class="fxui-tab-tit"><a href="#;">游戏活动</a></span><span class="more"><a href="{:U('msg_list')}">查看更多></a></span></div>
<div class="fxui-tab-nav">
<empty name="gg_list">
暂无公告

@ -1,6 +1,6 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/index/index.new.css?v=1" rel="stylesheet" >
<link href="__CSS__/index/index.new.css" rel="stylesheet" >
</block>
<block name="body">
@ -10,7 +10,7 @@
<div class="location-container">当前位置:<span>后台首页></span><span>公告列表</span></div>
</div>
</div>
<div class="trunk-content article">
<div class="trunk-list list_normal">
<div class="fxui-tab">
<div class="fxui-tab-hand" style="border-bottom: none">
<span class="fxui-tab-tit <if condition="$type==56">curr</if>"><a href="{:U('msg_list')}&type=56">公告</a></span>
@ -30,7 +30,15 @@
</div>
</div>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
</block>
<block name="script">
<script>
$(function () {
setValue('row', '{:I("row",10)}');
})
</script>
</block>

@ -13,28 +13,28 @@
</div>
</div>
<div class="trunk-content article">
<div class="trunk-list list_normal" style="margin-top: 20px">
<table class="table normal_table">
<tr class="odd">
<th>图标</th>
<th>模块名称</th>
<th>是否添加</th>
<th>操作</th>
</tr>
<empty name="data_list">
<tr><td colspan="8" style="text-align: center;height: 38vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<volist name="data_list" id="data">
<tr>
<td><img src="{$data.icon|get_cover='path'}"></td>
<td>{$data.name}</td>
<td><if condition="$data.exist_id neq ''">已添加<else/>未添加</if></td>
<td><a href="javascript:operation('{$data.id}')"><if condition="$data.exist_id neq ''">移除<else/>添加</if></a></td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="trunk-list list_normal" style="margin-top: 20px">
<table class="table normal_table">
<tr class="odd">
<th>图标</th>
<th>模块名称</th>
<th>是否添加</th>
<th>操作</th>
</tr>
<empty name="data_list">
<tr><td colspan="8" style="text-align: center;height: 38vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<volist name="data_list" id="data">
<tr>
<td><img src="{$data.icon|get_cover='path'}"></td>
<td>{$data.name}</td>
<td><if condition="$data.exist_id neq ''">已添加<else/>未添加</if></td>
<td><a href="javascript:operation('{$data.id}')"><if condition="$data.exist_id neq ''">移除<else/>添加</if></a></td>
</tr>
</volist>
</empty>
</table>
</div>
</div>
</div>
</block>

@ -218,3 +218,36 @@ function get_game_param($game_id,$field="",$type=''){
}
return $find;
}
/**
* 生成随机汉字字符串
* @param $num 数量
* @return [type] [description]
*/
function getChinaChar($num)
{
// $string = '';
// for ($i=0; $i<$num; $i++) {
// // 使用chr()函数拼接双字节汉字前一个chr()为高位字节,后一个为低位字节
// $a = chr(mt_rand(0xB0,0xD0)).chr(mt_rand(0xA1, 0xF0));
// // 转码
// $string .= iconv('GB2312', 'UTF-8', $a);
// }
// return $string;
$char = file_get_contents(APP_PATH.'Sdk/SecretKey/Data/chinaChar.txt');
$str = '';
$length = strlen($char);
for($i = 0;$i < $num;$i++)
{
$rand = rand(0,$length);
for(;$rand >= 0;$rand--)
{
if($rand == 0 || $rand %3 ==0)
{
break;
}
}
$str = $str . substr($char,$rand,3);
}
return $str;
}

@ -0,0 +1 @@
的一了是我不在人们有来他这上着个地到大里说去子得也和那要下看天时过出小么起你都把好还多没为又可家学只以主会样年想能生同老中从自面前头到它后然走很像见两用她国动进成回什边作对开而已些现山民候经发工向事命给长水几义三声于高正妈手知理眼志点心战二问但身方实吃做叫当住听革打呢真党全才四已所敌之最光产情路分总条白话东席次亲如被花口放儿常西气五第使写军吧文运在果怎定许快明行因别飞外树物活部门无往船望新带队先力完间却站代员机更九您每风级跟笑啊孩万少直意夜比阶连车重便斗马哪化太指变社似士者干石满决百原拿群究各六本思解立河爸村八难早论吗根共让相研今其书坐接应关信觉死步反处记将千找争领或师结块跑谁草越字加脚紧爱等习阵怕月青半火法题建赶位唱海七女任件感准张团屋爷离色脸片科倒睛利世病刚且由送切星晚表够整认响雪流未场该并底深刻平伟忙提确近亮轻讲农古黑告界拉名呀土清阳照办史改历转画造嘴此治北必服雨穿父内识验传业菜爬睡兴

@ -42,15 +42,19 @@
.more:hover{color:#26C7DB}
.fxui-tab {font-size: 14px;}
.fxui-tab-hand{height: 45px;line-height: 35px;margin: 10px;border-bottom: 1px solid #ddd}
.fxui-tab-tit {display: block;float: left;font-size: 14px;height: 28px;line-height: 28px;padding: 2px 20px ;cursor: pointer;border: 1px solid #ddd}
.fxui-tab-tit{display: block;float: left;font-size: 14px;height: 35px;line-height: 35px;cursor: pointer;border: 1px solid #ddd;}
.fxui-tab-tit a{display: block;height: 35px;line-height: 35px;padding: 0 20px ;}
.fxui-tab-tit:first-child{border-bottom-left-radius:3px;border-top-left-radius: 3px}
.fxui-tab-tit:last-child{border-bottom-right-radius:3px;border-top-right-radius: 3px}
.fxui-tab-hand .curr {background: #26C7DB;color: #fff;border: 1px solid #26C7DB}
.fxui-tab-nav {padding: 15px;height: 280px;margin-top: -10px}
.fxui-tab-nav p{height: 50px;line-height: 50px;border-bottom: 1px solid #ddd}
.fxui-tab-nav p span:first-child{width: 80%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: inline-block}
.fxui-tab-nav p span:last-child{float: right;width: 15%;display: inline-block}
.fxui-tab-nav p span:last-child{float: right;width: 15%;display: inline-block;text-align: right}
#pagechange{
margin-right: 20px;
}
/*.article-type{vertical-align: middle;padding-right: 10px;}
.article-title{width: 400px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;vertical-align: middle;color: #515974;font-size: 13px;}

Loading…
Cancel
Save