首页时间问题修正,快捷菜单10个限制添加

master
zyx 5 years ago
parent 0dbbfb763d
commit 72036e51e3

@ -74,7 +74,8 @@ class PromoteController extends BaseController
$today_start = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$today_end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1;
$today_open_server_list = M("server as sv", "tab_")->where(
$today_open_server_list = M("server as sv", "tab_")
->where(
array("sv.start_time" => array("BETWEEN", array($today_start, $today_end)),
"sv.show_status" => 1))
->join("left join tab_game gm on gm.id=sv.game_id")
@ -249,7 +250,8 @@ class PromoteController extends BaseController
$map['sv.show_status'] = 1;
$count_map['show_status'] = 1;
$open_server_list = M("server as sv", "tab_")->where($map)
$open_server_list = M("server as sv", "tab_")
->where($map)
->join("left join tab_game gm on gm.id=sv.game_id")
->field('sv.*,gm.icon')
->order("sv.start_time desc")
@ -273,7 +275,7 @@ class PromoteController extends BaseController
$open_server_list[$key]['pay_type'] = '安卓、iOS';
}
$open_server_list[$key]['pay_type'];
$open_server_list[$key]['start_time'] = date('Y-m-s h:i', $server['start_time']);
$open_server_list[$key]['start_time'] = date('m-d H:i', $server['start_time']);
}
//$content = $this->fetch('Promote/home_read_data');
$this->ajaxReturn(['status' => 1, 'info' => '调用成功', 'data' => $open_server_list, '_page' => $page], "JSON");
@ -310,6 +312,11 @@ class PromoteController extends BaseController
)->delete();
$this->ajaxReturn(['status' => 1, 'info' => '移除成功'], "JSON");
} else {
$menuData = M("promote_quick_menu ", "tab_")->count();
if ($menuData>=10) {
$this->ajaxReturn(['status' => 1, 'info' => '快捷菜单只能有10个'], "JSON");
}
M("promote_quick_menu ", "tab_")->add(
array("quick_menu_id" => $menu_id,
"promote_id" => get_pid(),

Loading…
Cancel
Save