Commit d3fba110 authored by wangjiangze's avatar wangjiangze

更新

parent 15432e9a
...@@ -4,8 +4,8 @@ return array( ...@@ -4,8 +4,8 @@ return array(
'SOOONER_DOMAIN_GSLB_LIVE'=>'gslb.live.soooner.com', //直播gslb域名 'SOOONER_DOMAIN_GSLB_LIVE'=>'gslb.live.soooner.com', //直播gslb域名
'PARAMS_TRANSPORT_KEY' =>'SOOONER.COM', //关键参数传递加密私钥 'PARAMS_TRANSPORT_KEY' =>'SOOONER.COM', //关键参数传递加密私钥
'SYSTEM_INFO'=>array('name'=>'智慧酒店运营服务平台', 'SYSTEM_INFO'=>array('name'=>'智慧酒店运营服务平台',
'logo'=>'logo_unicom.png', 'logo'=>'logo.png',
'favicon'=>'favicon_unicom.ico'), 'favicon'=>'favicon.ico'),
//end //end
'LOG_RECORD' => false, // 开启日志记录 'LOG_RECORD' => false, // 开启日志记录
......
...@@ -5,18 +5,12 @@ class PlaylistAction extends CommonAction{ ...@@ -5,18 +5,12 @@ class PlaylistAction extends CommonAction{
public function index(){ public function index(){
$op = I('op'); $op = I('op');
if($op=="getjson"){ if($op=="getjson"){
$model = D("Region"); $model = D("Hotel");
$userInfo = $_SESSION["_USER_INFO"]; $userInfo = $_SESSION["_USER_INFO"];
$inputs = I(); $inputs = I();
$list = $model->getList("list",$userInfo,$inputs); $list = $model->getList("list",$userInfo,$inputs);
$count = $model->getList("count",$userInfo,$inputs); $count = $model->getList("count",$userInfo,$inputs);
$total = $count[0]["count"]; $total = $count[0]["count"];
foreach ($list as $key=>$value){
if($value['level']!=1)
$list[$key]['_parentId']=$value['pid'];
}
echo "{\"total\":\"".$total."\",\"rows\":".json_encode($list)."}"; echo "{\"total\":\"".$total."\",\"rows\":".json_encode($list)."}";
}else{ }else{
$spModel = D("Sp"); $spModel = D("Sp");
...@@ -31,7 +25,7 @@ class PlaylistAction extends CommonAction{ ...@@ -31,7 +25,7 @@ class PlaylistAction extends CommonAction{
$userInfo = $_SESSION["_USER_INFO"]; $userInfo = $_SESSION["_USER_INFO"];
$id = I('id','',int)?I('id','',int):0; $id = I('id','',int)?I('id','',int):0;
$model = D("Region"); $model = D("Hotel");
$spModel = D("Sp"); $spModel = D("Sp");
$regionModel = D("Region"); $regionModel = D("Region");
...@@ -40,8 +34,8 @@ class PlaylistAction extends CommonAction{ ...@@ -40,8 +34,8 @@ class PlaylistAction extends CommonAction{
$this->info = $info; $this->info = $info;
} }
$sp_lists = $spModel->where("`status`=0")->select(); $sp_lists = $spModel->where("`status`=0")->select();
$region_lists = $regionModel->where("pid = 1 and `status`=0")->select(); $region_lists = $regionModel->where("pid = 1 and level = 2 and `status`=0")->select();
$region_city_lists = $regionModel->where("pid > 1 and `status`=0")->select(); $region_city_lists = $regionModel->where("pid > 1 and level = 3 and `status`=0")->select();
$this->sp_lists = $sp_lists; $this->sp_lists = $sp_lists;
$this->region_lists = $region_lists; $this->region_lists = $region_lists;
$this->region_city_lists = $region_city_lists; $this->region_city_lists = $region_city_lists;
...@@ -49,7 +43,7 @@ class PlaylistAction extends CommonAction{ ...@@ -49,7 +43,7 @@ class PlaylistAction extends CommonAction{
} }
//添加处理 //添加处理
public function addHandle(){ public function addHandle(){
$model = D("Region"); $model = D("Hotel");
$id = I('id','',int); $id = I('id','',int);
$data['sp_id'] = I("sp_id"); $data['sp_id'] = I("sp_id");
...@@ -82,7 +76,7 @@ class PlaylistAction extends CommonAction{ ...@@ -82,7 +76,7 @@ class PlaylistAction extends CommonAction{
//删除处理 //删除处理
public function deleteHandle(){ public function deleteHandle(){
if(D("Region")->where("id=".I("id","",int))->delete()){ if(D("Hotel")->where("id=".I("id","",int))->delete()){
echo 'true'; echo 'true';
}else{ }else{
echo 'false'; echo 'false';
...@@ -91,7 +85,7 @@ class PlaylistAction extends CommonAction{ ...@@ -91,7 +85,7 @@ class PlaylistAction extends CommonAction{
//ajax修改状态 //ajax修改状态
public function updateStatusAjaxHandle(){ public function updateStatusAjaxHandle(){
$model = D("Region"); $model = D("Hotel");
$data = $_POST; $data = $_POST;
$data['updatetime'] = date('Y-m-d H:i:s'); $data['updatetime'] = date('Y-m-d H:i:s');
if($model->save($data)){ if($model->save($data)){
......
<?php
class MediaHotelModel extends RelationModel{
protected $tableName = 'sh_hotel_media_map_1'; //重新定义表名
public function getList($queryType,$userInfo,$inputs){
$p=$inputs["page"]?$inputs["page"]:1;
$n=$inputs["rows"]?$inputs["rows"]:10;
$limit = "limit ".($p-1)*$n.",".$n;
$sort="";
if($inputs["sort"])
$sort = "order by ".$inputs["sort"]." ".$inputs["order"];
//=============
$searchField = $inputs["searchField"]?$inputs["searchField"]:'title';
$searchValue = $inputs["searchValue"]?$inputs["searchValue"]:'';
$searchSp = $inputs["searchSp"]?$inputs["searchSp"]:0;
if($searchValue){
$where = " and (`title` like '%".$searchValue."%' or `code` like '%".$searchValue."%') ";
}
$model = new Model();
//======================
$fields = "count(id) count";
//返回列表(limit分页)
if($queryType=="list"){
$where .= $sort;
$fields = " *,case `_status` when 1 then '<font color=green>上线</font>' when 2 then '<font color=red>下线</font>' when 0 then '<font>未知</font>' end as `status` ";
}
$sql = "select ".$fields." from sh_media_wasu where 1=1 ".$where.";";
return $model->query($sql);
}
}
\ No newline at end of file
...@@ -30,10 +30,7 @@ ...@@ -30,10 +30,7 @@
<option value="{$item.id}">{$item.name}</option> <option value="{$item.id}">{$item.name}</option>
</volist> </volist>
</select> </select>
<select class="select" name="searchRegion"> <input class="input" type="text" placeholder="酒店名称/媒资名称" name="searchValue">
<option value="0">区域</option>
</select>
<input class="input" type="text" placeholder="酒店名称/合作方酒店标识" name="searchValue">
</div> </div>
<input id="submit_search" name="" type="button" value="查询" class="btn_go_s btn_orange" /> <input id="submit_search" name="" type="button" value="查询" class="btn_go_s btn_orange" />
</form> </form>
...@@ -68,11 +65,8 @@ onRowContextMenu : onRowContextMenu ...@@ -68,11 +65,8 @@ onRowContextMenu : onRowContextMenu
"> ">
<thead> <thead>
<tr> <tr>
<th data-options="field:'name',width:30">酒店名称</th> <th data-options="field:'hotel_name',width:30">酒店名称</th>
<th data-options="field:'sp_name',width:20" sortable="true">合作方</th> <th data-options="field:'media_name',width:20" sortable="true">媒资名称</th>
<th data-options="field:'region_name',width:30" sortable="true">区域</th>
<th data-options="field:'code',width:20">合作方酒店标识</th>
<th data-options="field:'remark',width:40">备注</th>
<th data-options="field:'addtime',width:30" sortable="true">创建时间</th> <th data-options="field:'addtime',width:30" sortable="true">创建时间</th>
<th data-options="field:'updatetime',width:30" sortable="true">更新时间</th> <th data-options="field:'updatetime',width:30" sortable="true">更新时间</th>
<th data-options="field:'status'" sortable="true" align="center">状态</th> <th data-options="field:'status'" sortable="true" align="center">状态</th>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>酒店区域添加/修改</title> <title>播单添加/修改</title>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap3.3.7/jquery.min.js"></script> <script type="text/javascript" src="__PUBLIC__/js/bootstrap3.3.7/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap3.3.7/bootstrap.min.js"></script> <script type="text/javascript" src="__PUBLIC__/js/bootstrap3.3.7/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-easyui-1.3.4/jquery.easyui.min.js"></script> <script type="text/javascript" src="__PUBLIC__/js/jquery-easyui-1.3.4/jquery.easyui.min.js"></script>
...@@ -41,7 +41,7 @@ body{padding:20px} ...@@ -41,7 +41,7 @@ body{padding:20px}
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<select class="form-control" id="city_select" name="region_id"> <select class="form-control" id="city_select" name="region_id">
<option value="0" pid="0">请选择城市</option> <option value="0">请选择城市</option>
<volist name="region_city_lists" id="item"> <volist name="region_city_lists" id="item">
<option value="{$item.id}" class="hidden" pid="{$item.pid}">{$item.name}</option> <option value="{$item.id}" class="hidden" pid="{$item.pid}">{$item.name}</option>
</volist> </volist>
...@@ -125,8 +125,8 @@ $().ready(function(){ ...@@ -125,8 +125,8 @@ $().ready(function(){
$("select[id='province_select']").bind("change",function(){ $("select[id='province_select']").bind("change",function(){
var province_id = $(this).val(); var province_id = $(this).val();
$("select[name='region_id'] option").addClass("hidden"); $("select[name='region_id'] option").addClass("hidden");
$("select[name='region_id'] option[pid='0']").removeClass("hidden"); $("select[name='region_id'] option[value='0']").removeClass("hidden");
$("select[name='region_id'] option[value='0']").attr("selected",true); $("select[name='region_id'] option:first").prop("selected","selected");
$("select[name='region_id'] option[pid='"+province_id+"']").removeClass("hidden"); $("select[name='region_id'] option[pid='"+province_id+"']").removeClass("hidden");
}); });
......
SooonerHotel/favicon_unicom.ico

7.08 KB | W: | H:

SooonerHotel/favicon_unicom.ico

4.19 KB | W: | H:

SooonerHotel/favicon_unicom.ico
SooonerHotel/favicon_unicom.ico
SooonerHotel/favicon_unicom.ico
SooonerHotel/favicon_unicom.ico
  • 2-up
  • Swipe
  • Onion skin
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 to comment