Commit 8256ba90 by felix

每日一更

parent 9af48fab
<?php
require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
require_once(PLUGIN_DIR . 'Tools/Image.php');
class House {
public static function init_view(){
wp_enqueue_script('jquery-ui');
......@@ -7,16 +8,26 @@ class House {
wp_enqueue_style('jquery-ui_css');
wp_enqueue_style('bootstrapcss');
if(isset($_GET["updated"])){
echo "updated success";
}else{
global $wpdb;
$type = $_POST["type"];
if($type==1){
$wpdb->query("START TRANSACTION");
$result = House::data_insert();
if($result != 200){
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
echo "新增房源失败";
}else{
$wpdb->query("COMMIT");
echo "新增房源成功";
}
exit;
}else{
$context = array();
$context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty();
$context["room"] = SearchDao::searchRoom();
$context["photoType"] = SearchDao::searchPhotoType();
House::data_insert();
Timber::render("newhouse.html",$context);
}
}
......@@ -30,7 +41,7 @@ class House {
$data = $_POST["data"];
//获取新房信息,存入tospur_house表
$insert_tospur_house_array = array(
'name' => $_POST['name'],
'name' => $_POST['housename'],
'average_price' => $_POST['average_price'],
'latest_news' => $_POST['event'],
'address' => $_POST['address'],
......@@ -38,7 +49,6 @@ class House {
'periphery' => $_POST['periphery'],
'developer' => $_POST['developers'],
'check_in_time' => $_POST['check_in_time'],
'building_type' => $_POST['building_type'],
'property_age' => $_POST['property_age'],
'decoration' => $_POST['decoration'],
'covered_area' => $_POST['acreage'],
......@@ -55,16 +65,17 @@ class House {
"property_money" => $_POST["property_money"],
'creattime' => date("Y-m-d H:i:s"),
'user_id' => get_current_user_id(),
'community_name' => $_POST["community_name"]
'community_name' => $_POST["community_name"],
'house_type' => 0
);
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE name="' . $_POST['name'] . '" and address="' . $_POST['address'] . '"', OBJECT);
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE name="' . $_POST['housename'] . '" and address="' . $_POST['address'] . '"', OBJECT);
if (!$res) {
$houseRes = $wpdb->insert('tospur_house', $insert_tospur_house_array);
if (!$houseRes) {
return 500;
}
$houseid = $wpdb->insert_id;
}
$house_number = "xf".str_pad($insert_tospur_house_array['city_id'],6,'0',STR_PAD_LEFT).str_pad($houseid,6,'0',STR_PAD_LEFT);
//主力房源的图片与房子信息关联插入数据库
if(isset($uploadedfile["name"])){
foreach($uploadedfile["name"] as $key=> $value) {
......@@ -87,14 +98,17 @@ class House {
$length = strpos($str, "/",strpos($str, "/")+1);
$url = substr($str,$length);
if ($movefile && !isset($movefile['error'])) {
$uploadFileName = end(explode("/",$url));
//上传成功后将图片信息存入tospur_image表
$insert_image_array = array(
'name' => $uploadParam["name"],
'name' => $uploadFileName,
'path' => $url,
'creattime' => date("Y-m-d H:i:s"),
'alt' => "",
'image_type' =>$data[$key]["type"]
);
$imagePath = get_home_path().$url;
Image::makeImage($uploadFileName,$imagePath);
//插入图片表
$imgRes = $wpdb->insert('tospur_image', $insert_image_array);
if (!$imgRes) {
......@@ -159,5 +173,9 @@ class House {
}
}
}
}else{
return 506;
}
return 200;
}
}
\ No newline at end of file
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
}
class newHouseList extends WP_List_Table
{
function __construct()
{
global $status, $page;
//Set parent defaults
parent::__construct(array(
'singular' => 'newHouseList', //singular name of the listed records
'plural' => 'newHouseLists', //plural name of the listed records
'ajax' => false //does this table support ajax?
));
}
function column_default($item, $column_name)
{
switch ($column_name) {
case'id':
case 'name':
case 'address':
case 'average_price':
case 'developer':
case 'check_in_time':
case 'building_type':
case 'property_age':
case 'decoration':
case 'covered_area':
case 'status':
case 'volume_rate':
case 'greening_rate':
case 'households':
case 'parking_spaces':
case 'property_management':
case 'property_money':
return $item[$column_name];
case 'valid':
if ($item[$column_name]) {
return '<button data-valid="0" data-score-id="' . $item['id'] . '">设为无效</button>';
} else {
return '<button data-valid="1" data-score-id="' . $item['id'] . '">设为有效</button>';
}
default:
return print_r($item, true); //Show the whole array for troubleshooting purposes
}
}
function column_cb($item)
{
return sprintf(
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
/*$1%s*/
$this->_args['singular'], //Let's simply repurpose the table's singular label ("score")
/*$2%s*/
$item['id'] //The value of the checkbox should be the record's id
);
}
function get_columns()
{
$columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
'id' =>'ID',
'name' => '楼盘名',
'address' => '地址',
'average_price' => '单价',
'developer' => '开发商',
'check_in_time' => '入住时间',
'building_type' => '建筑类型',
'property_age' => '产权年限',
'decoration' => '装修状况',
'covered_area' => '建筑面积',
'volume_rate' => '容积率',
'status' => '状态',
'greening_rate' => '绿化率',
'households' => '规划户数',
'parking_spaces' => '车位数',
'property_management' => '物业公司',
'property_money' => '物业费'
);
return $columns;
}
function get_sortable_columns()
{
$sortable_columns = array(
'id' => array('id', false),
'name' => array('name', false),
'address' => array('address', false),
'average_price' => array('average_price', false),
'developer' => array('developer', false),
'check_in_time' => array('check_in_time', false),
'building_type' => array('building_type', false),
'property_age' => array('property_age', false),
'decoration' => array('decoration', false),
'covered_area' => array('covered_area', false),
'status' => array('status', false),
'volume_rate' => array('valvolume_rateid', false),
'greening_rate' => array('greening_rate', false),
'households' => array('households', false),
'parking_spaces' => array('parking_spaces', false),
'property_management' => array('property_management', false),
'property_money' => array('property_money', false),
);
return $sortable_columns;
}
function get_bulk_actions()
{
$actions = array(
'noCheck' => '未审核',
'check' => '审核',
'stopSale' =>'下架'
);
return $actions;
}
function process_bulk_action()
{
$action = $this->current_action();
if ($action) {
$string = null;
$status = null;
switch ($action) {
case 'noCheck':
$id = $_POST['newhouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 0;
}
break;
case 'check':
$id = $_POST['newhouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 1;
}
break;
case 'stopSale':
$id = $_POST['newhouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 2;
}
break;
}
global $wpdb;
$result = $wpdb->query('update tospur_house SET status='.$status .' where id in ' . $string);
}
}
function prepare_items()
{
global $wpdb;
$per_page = 10;
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
$this->_column_headers = array($columns, $hidden, $sortable);
$this->process_bulk_action();
//$data = $this->example_data;
$sql = "select * from tospur_house th
left join (select buildproperty_id,house_area,image_id,house_id as bph_id from a_district_area) ada on th.id = ada.bph_id
where 1=1 ";
if($_POST["listCity"]!=0 ){
$sql = $sql." and city_id=".$_POST["listCity"];
}
if($_POST["listDistrict"] != 0 ){
$sql = $sql." and district_id=".$_POST["listDistrict"];
}
if($_POST["listPlate"] != 0){
$sql = $sql." and plate_id=".$_POST["listPlate"];
}
if($_POST["buildProperty"]!=0){
$sql = $sql." and buildproperty_id=".$_POST["buildProperty"];
}
if($_POST["room"]!=0){
$sql = $sql." and room_id=".$_POST["room"];
}
if(isset($_POST["status"]) && $_POST["status"]!=-1){
$sql = $sql." and status=".$_POST["status"];
}
if($_POST["totalPrice"]!=NULL){
$priceArray = explode("-", $_POST['totalPrice']);
$sql = $sql . " and average_price between ".$priceArray[0]." and ".$priceArray[1];
}
if($_POST["acreage"]!= NULL){
$areaArray = explode("-", $_POST['acreage']);
$sql = $sql . " and covered_area between ".$areaArray[0]." and ".$areaArray[1];
}
if($_POST["searchText"]!=NULL){
$sql = $sql . " and name like '%".$_POST['searchText']."%'";
}
$sql = $sql . " group by bph_id";
$result = $wpdb->get_results($sql);
$data = array();
foreach ($result as $key => $value) {
$data[$key] = array(
'id' => $value->id,
'name' => $value->name,
'address' => $value->address,
'average_price' => $value->average_price,
'developer' => $value->developer,
'check_in_time' => $value->check_in_time,
'building_type' => $value->building_type,
'property_age' => $value->property_age,
'decoration' => $value->decoration,
'covered_area' => $value->covered_area,
'volume_rate' => $value->volume_rate,
'greening_rate' => $value->greening_rate,
'households' => $value->households,
'parking_spaces' => $value->parking_spaces,
'property_management' => $value->property_management,
'property_money' => $value->property_money
);
if($value->status == 0){
$data[$key]['status'] ="未审核";
}else if($value->status == 1){
$data[$key]['status'] ="审核";
}else if($value->status == 2){
$data[$key]['status'] ="下架";
}
}
function usort_reorder($a, $b)
{
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'valid'; //If no sort, default to title
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'desc'; //If no order, default to asc
$result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
return ($order === 'asc') ? $result : -$result; //Send final sort direction to usort
}
usort($data, 'usort_reorder');
$current_page = $this->get_pagenum();
$total_items = count($data);
$data = array_slice($data, (($current_page - 1) * $per_page), $per_page);
$this->items = $data;
$this->set_pagination_args(array(
'total_items' => $total_items, //WE have to calculate the total number of items
'per_page' => $per_page, //WE have to determine how many items to show on a page
'total_pages' => ceil($total_items / $per_page) //WE have to calculate the total number of pages
));
}
}
add_action( 'wp_ajax_updateList', 'newHouseList::prepare_items');
add_action( 'wp_ajax_nopriv_updateList', 'newHouseList::prepare_items');
add_action( 'wp_ajax_searchListCity', 'SearchDao::ajax_searchListCity');
add_action( 'wp_ajax_nopriv_searchListCity', 'SearchDao::ajax_searchListCity');
function newHouseList()
{
$newHouseList = new newHouseList();
$newHouseList->prepare_items();
?>
<div class="wrap">
<h2>新房列表</h2>
<form id="scores-filter" method="POST">
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>"/>
<select id="listCity" name="listCity">
<option value="0"> 城市</option>
</select>
<select id="listDistrict" name="listDistrict">
<option value="0">区域</option>
</select>
<select id="listPlate" name="listPlate">
<option value="0">板块</option>
</select>
<select id="totalPrice" name="totalPrice">
<option value ="">价格</option>
</select>
<select id="buildProperty" name="buildProperty">
<option value="0">房型</option>
</select>
<select id="room" name="room">
<option value="0">类型</option>
</select>
<select id="acreage" name="acreage">
<option value ="">面积</option>
</select>
<select name="status" name="status">
<option value="-1">状态</option>
<option value="0">未审核</option>
<option value="1">审核</option>
<option value="2">下架</option>
</select>
<input type="text" placeholder="请出入楼盘名/地段名搜索" name="searchText">
<input type="submit" id="submit" class="button action" value="搜索">
<!-- Now we can render the completed list table -->
<?php $newHouseList->display() ?>
</form>
</div>
<script>
(function ($) {
$(document).ready(function(){
//获取城市信息AJAX
var listCity = $("#listCity");
var room = $("#room");
var buildProperty =$("#buildProperty");
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity",
success:function(data){
addOption(data,listCity)
}
})
//获取类型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchRoom",
success:function(data){
addOption(data,room)
}
})
//获取房型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchBuildProperty",
success:function(data){
addOption(data,buildProperty)
}
})
$("#listCity").change(function(){
var listCityId = $("#listCity").val();
var district =$("#listDistrict");
var acreage =$("#acreage");
var totalPrice = $("#totalPrice");
$('#listDistrict').find('option:not(:first-child)').remove();
$('#listPlate').find('option:not(:first-child)').remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity&cityId="+listCityId,
success:function(json){
addOption(json,district);
}
});
//面积
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchArea&cityId="+listCityId,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var id = json[i]["id"];
var value = json[i]["value"];
var Option = $("<option>").attr({"value": value}).append(value);
$("#acreage").append(Option);
}
}
});
//城市联动房子价格
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchUnitPriceRange&cityId="+listCityId,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var id = json[i]["id"];
var value = json[i]["value"];
var Option = $("<option>").attr({"value": value}).append(value);
$("#totalPrice").append(Option);
}
}
});
})
$("#listDistrict").change(function(){
var listCityId = $("#listCity").val();
var listDistrict = $("#listDistrict").val();
var listPlate = $("#listPlate");
$('#listPlate').find('option:not(:first-child)').remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity&cityId="+listCityId+"&districtId="+listDistrict,
success:function(json){
addOption(json,listPlate);
}
});
})
function addOption(json,select){
for(var i = 0; i <=json.length-1; i++){
var id = json[i]["id"];
var value = json[i]["value"];
var Option = $("<option>").attr({"value": id}).append(value);
select.append(Option);
}
}
});
})(jQuery);
</script>
<?php
}
?>
\ No newline at end of file
<?php
require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
require_once(PLUGIN_DIR . 'Dao/InsertDao.php');
require_once(PLUGIN_DIR . 'Tools/Image.php');
class SecHandHouse{
//二手房信息
public static function secHandHouse_html(){
wp_enqueue_script('bootstrapjs');
wp_enqueue_style('bootstrapcss');
global $wpdb;
$type = $_POST["type"];
if($type==2){
$wpdb->query("START TRANSACTION");
$result = SecHandHouse::secHouseData_insert();
if($result != 200){
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
echo "二手房房源新增失败";
}else{
$wpdb->query("COMMIT");
echo "二手房房源新增成功";
}
exit;
}else{
$context = array();
$context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty();
$context["photoType"] = SearchDao::searchPhotoType();
Timber::render("secHandHouse.html",$context);
}
}
public static function secHouseData_insert()
{
global $wpdb;
//图片信息
$uploadedfile = $_FILES['files'];
//房源与类型以及面积信息
$data = $_POST["data"];
//获取新房信息,存入tospur_house表
$insert_tospur_house_array = array(
'name' => $_POST['housename'],
'house_number' =>$_POST['house_number'],
'total_price' =>$_POST['total_price'],
'average_price' => $_POST['average_price'],
'buildproperty_id'=>$_POST['buildproperty_id'],
'covered_area' =>$_POST['covered_area'],
'floor' =>$_POST['floor'],
'faceto'=>$_POST['faceto'],
'decoration' => $_POST['decoration'],
'age'=>$_POST['age'],
'flat'=>$_POST['flat'],
'suite'=>$_POST["suite"],
'overview' => $_POST['overview'],
'address' => $_POST['address'],
'community_name'=>$_POST['community_name'],
'traffic' => $_POST['traffic'],
'periphery' => $_POST['periphery'],
'house_type' => 1
);
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE flat="' .$_POST['flat'] . '" and suite="' . $_POST["suite"] . '" and house_type=1', OBJECT);
if(!$res){
$houseId = InsertDao::insert_tospur_house($insert_tospur_house_array);
//主力房源的图片与房子信息关联插入数据库
if(isset($uploadedfile["name"])){
foreach($uploadedfile["name"] as $key=> $value) {
$uploadParam = array(
"name" => $uploadedfile["name"][$key],
"type" => $uploadedfile["type"][$key],
"tmp_name" => $uploadedfile["tmp_name"][$key],
"error" => $uploadedfile["error"][$key],
"size" => $uploadedfile["size"][$key]
);
//因为file提交过来有一个空的数组,所以这里判断在filename不为空的情况下,再做后续操作
if ($uploadParam["name"] != "") {
//上传图片
if (!function_exists('wp_handle_upload')) {
require_once(ABSPATH . 'wp-admin/includes/file.php');
}
$overrides = array('test_form' => false);
$movefile = wp_handle_upload($uploadParam, $overrides);
$str = preg_replace('#^https?://#', '', $movefile["url"]);
$length = strpos($str, "/",strpos($str, "/")+1);
$url = substr($str,$length);
if ($movefile && !isset($movefile['error'])) {
//上传成功后将图片信息存入tospur_image表
$insert_image_array = array(
'name' => $uploadParam["name"],
'path' => $url,
'creattime' => date("Y-m-d H:i:s"),
'alt' => "",
'image_type' =>$data[$key]["type"]
);
//插入图片表
$imgId =InsertDao::insert_tospur_image($insert_image_array);
$house_img_array = array(
'house_id' => $houseId,
'image_id' => $imgId,
);
$houseImgRes =InsertDao::insert_a_house_image($house_img_array);
} else {
return $movefile['error'];
echo "插入图片失败";
}
}
}
}
//插入推荐房源id与添加新房id到关联表a_house_recommend
if(isset($data["recommend"])){
foreach($data["recommend"] as $value){
$a_house_recommendArray = array(
"house_id" => $houseId,
"recommend_id" =>$value
);
$a_house_recommendRes =InsertDao::insert_a_house_recommend($a_house_recommendArray);
if($a_house_recommendRes == 504){
echo"推荐房源信息插入失败";
}
}
}
//插入推荐置业顾问user_id与新房id到关联表a_house_recommend
if($data["recConsultant"]){
foreach($data["recConsultant"] as $val){
$a_house_userArray = array(
"user_id" => $val,
"house_id" => $houseId,
"user_type" =>1
);
$a_house_userRes = InsertDao::insert_a_house_user($a_house_userArray);
if($a_house_userRes == 505){
echo"推荐置业顾问信息插入失败";
}
}
}
}else{
return 507;
}
return 200;
}
}
......@@ -5,22 +5,29 @@
<title>添加新房房源</title>
</head>
<body>
<br><br>
<div><b><font size="5">添加新房房源</font></b></div><br>
<h2 class="title">添加新房房源</h2>
<form action="" method="POST" enctype="multipart/form-data">
<div>
楼盘名:<input type="text" name="name" id="housename"><br><br>
小区名:<input type="text" name="name" id="community_name"><br><br>
均价:<input type="text" name=" average_price"><br><br>
最新动态:<textarea rows="3" cols="20" name="event"></textarea><br><br>
<div id="preview">
<span>主力户型:</span>
<input type="file" name="files[0]" property="0" class = "files"multiple class="browser button button-hero">
<P></P>
</div>
<br><br>
位置及周边:<br><br>
<p>
<table class="form-table">
<tbody>
<tr>
<th><label for="housename">楼盘名</label></th>
<td> <input name="housename" id="housename" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="community_name">小区名</label></th>
<td> <input name="community_name" id="community_name" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="average_price">均价</label></th>
<td> <input name="average_price" id="average_price" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="event">最新动态</label></th>
<td><textarea name="event" rows="4" cols="40" class="large-text code"></textarea></td>
</tr>
<tr>
<th><label for="from">所属地区</label></th>
<td>
<select id="baseCity" name="baseCity">
<option value=""> 城市</option>
{% for item in city %}
......@@ -33,48 +40,132 @@
<select id="basePlateId" name="basePlateId">
<option value = "">板块</option>
</select>
</td>
</tr>
<tr>
<th><label for="mainHouse">主力户型</label></th>
<td>
<div id="preview">
<input type="file" name="files[0]" property="0" class = "files"multiple class="browser button button-hero">
<P></P>
</div>
</td>
</tr>
</tbody>
</table>
<h2 class="title">位置及周边</h2>
<table class="form-table">
<tbody>
<tr>
<th><label for="address">地址</label></th>
<td> <input name="address" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="" class="regular-text code"></td>
</tr>
</tbody>
</table>
<h2 class="title">基本信息</h2>
<table class="form-table">
<tbody>
<tr>
<th><label for="developers">建筑类型</label></th>
<td>
<select id="baseRoom" name="baseRoom">
<option value = "">建筑类型</option>
{% for item in room %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
</p>
地址:<input type="text" name=" address" class="regular-text"><br><br>
交通线路:<input type="text" name=" traffic" class="regular-text"><br><br>
周边配套:<input type="text" name=" periphery" class="regular-text"><br><br>
基本信息:<br><br>
开发商:<input type="text" name=" developers" class="regular-text"><br><br>
入住时间:<input type="text" name=" check_in_time" id="checkin" class="regular-text"><br><br>
产权年限:<input type="text" name=" property_age" class="regular-text"><br><br>
装修状况:<input type="text" name=" decoration" class="regular-text"><br><br>
建筑面积:<input type="text" name=" acreage" class="regular-text"><br><br>
容积率:<input type="text" name=" volume_rate" class="regular-text"><br><br>
绿化率:<input type="text" name=" greening_rate" class="regular-text"><br><br>
规划户数:<input type="text" name=" households" class="regular-text"><br><br>
车位数:<input type="text" name=" parking_spaces" class="regular-text"><br><br>
物业公司:<input type="text" name=" property_management" class="regular-text"><br><br>
物业费:<input type="text" name=" property_money" class="regular-text"><br><br>
楼盘概述:<textarea rows="3" cols="20" name="overview" class="regular-text"></textarea>
<input type="text" name="type" value="1" hidden="hidden">
</div>
<div>
房源相册: <input type="button" value="新增" id="housePicture" class="button action">
<div id="picList"></div>
</div>
<!-- Button trigger modal -->
推荐房源:<button type="button" class="button action" data-toggle="modal" data-target="#myModal">
</td>
</tr>
<tr>
<th><label for="developers">开发商</label></th>
<td> <input name="developers" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="check_in_time">入住时间</label></th>
<td> <input name="check_in_time" id="checkin" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="property_age">产权年限</label></th>
<td> <input name="property_age" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="acreage">建筑面积</label></th>
<td> <input name="acreage" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="volume_rate">容积率</label></th>
<td> <input name="volume_rate" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="greening_rate">绿化率</label></th>
<td> <input name="greening_rate" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="households">规划户数</label></th>
<td> <input name="households" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="parking_spaces">车位数</label></th>
<td> <input name="parking_spaces" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="property_management">物业公司</label></th>
<td> <input name="property_management" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="property_money">物业费</label></th>
<td> <input name="property_money" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="property_money">楼盘概述</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code"></textarea></td>
</tr>
</tbody>
</table>
<h2 class="title">关联信息</h2>
<table class="form-table">
<tbody>
<tr>
<th><label>房源相册</label></th>
<td>
<div id="picList"></div><br />
<button type="button" id="housePicture" class="button action" data-toggle="modal">
新增
</button>
</td>
</tr>
<tr>
<th><label for="traffic">推荐房源</label></th>
<td>
<div id="houseImg"></div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal">
添加房源
</button>
<div id="houseImg"></div>
置业顾问:<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
</td>
</tr>
<tr>
<th><label for="periphery">置业顾问</label></th>
<td>
<div id="consultantImg"></div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
选择置业顾问
</button>
<div id="consultantImg"></div>
</td>
</tr>
</tbody>
</table>
<input type="text" name="type" value="1" hidden="hidden">
<input type="submit" id="submit" class="button action">
</form>
......@@ -89,34 +180,34 @@
<div class="modal-body" style="height: 300px;overflow: auto;">
<select id="cityId">
<option value="0"> 城市</option>
<option value="-1"> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="areaId">
<option value = "0">区域</option>
<option value = "-1">区域</option>
</select>
<select id="plateId">
<option value = "0">板块</option>
<option value = "-1">板块</option>
</select>
<select id="price">
<option value = "0">价格</option>
<option value = "-1">价格</option>
</select>
<select id="buildProperty">
<option value = "0">房型</option>
<option value = "-1">房型</option>
{% for item in buildProperty %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="room">
<option value = "0">类型</option>
<option value = "-1">类型</option>
{% for item in room %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="acreage">
<option value = "0">面积</option>
<option value = "-1">面积</option>
</select>
<input type="text" placeholder="请出入楼盘名/地段名搜索" id="searchtext">
<button type="button" class="button action" id="search">搜索</button>
......@@ -274,15 +365,17 @@
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "GET",
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price,
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=0",
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["name"];
var imgUrl = json[i]["path"];
var result = json.result;
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name);
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
$("#houseList").append(li);
}
}
......
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>添加二手房房源</title>
</head>
<body>
<h2 class="title">添加二手房房源</h2>
<form action="" method="POST" enctype="multipart/form-data">
<table class="form-table">
<tbody>
<tr>
<th><label for="housename">房源名:</label></th>
<td> <input name="housename" id="housename" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="community_name">房源编号:</label></th>
<td> <input name="house_number" id="house_number" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="total_price">售价</label></th>
<td> <input name="total_price" id="total_price" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="average_price">单价</label></th>
<td> <input name="average_price" id="average_price" type="text" value="" class="regular-text code"></td>
</tr>
</tbody>
</table>
<h2 class="title">基本信息</h2>
<table class="form-table">
<tbody>
<tr>
<th><label for="from">户型</label></th>
<td>
<select id="buildproperty_id" name="buildproperty_id">
<option value="-1"> 户型</option>
{% for item in buildProperty %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<th><label for="covered_area">面积</label></th>
<td> <input name="covered_area" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="check_in_time">楼层:</label></th>
<td> <input name="floor" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="property_age">朝向:</label></th>
<td> <input name="faceto" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="acreage">年代</label></th>
<td> <input name="age" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="volume_rate">楼号</label></th>
<td> <input name="flat" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="greening_rate"></label></th>
<td> <input name="suite" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="property_money">房源点评</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code"></textarea></td>
</tr>
</tbody>
</table>
<h2 class="title">位置及周边</h2>
<table class="form-table">
<tbody>
<tr>
<th><label for="address">地址</label></th>
<td> <input name="address" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="address">小区名称</label></th>
<td> <input name="community_name" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="" class="regular-text code"></td>
</tr>
<tr>
<th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="" class="regular-text code"></td>
</tr>
</tbody>
</table>
<h2 class="title">关联信息</h2>
<table class="form-table">
<tbody>
<tr>
<th><label>房源相册</label></th>
<td>
<div id="picList"></div><br />
<button type="button" id="housePicture" class="button action" data-toggle="modal">
新增
</button>
</td>
</tr>
<tr>
<th><label for="traffic">推荐房源</label></th>
<td>
<div id="houseImg"></div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal">
添加房源
</button>
</td>
</tr>
<tr>
<th><label for="periphery">置业顾问</label></th>
<td>
<div id="consultantImg"></div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
选择置业顾问
</button>
</td>
</tr>
<tr>
<th><label for="from">状态</label></th>
<td>
<select id="status" name="status">
<option value="-1"> 状态</option>
<option value="0">未审核</option>
<option value="1">审核</option>
<option value="2">下架</option>
</select>
</td>
</tr>
</tbody>
</table>
<input type="text" name="type" value="2" hidden="hidden">
<input type="submit" id="submit" class="button action">
</form>
<!-- Modal -->
<!-- 新增房源弹出层 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body" style="height: 300px;overflow: auto;">
<select id="cityId">
<option value="-1"> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="areaId">
<option value = "-1">区域</option>
</select>
<select id="plateId">
<option value = "-1">板块</option>
</select>
<select id="price">
<option value = "-1">价格</option>
</select>
<select id="buildProperty">
<option value = "-1">房型</option>
{% for item in buildProperty %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="room">
<option value = "-1">类型</option>
{% for item in room %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="acreage">
<option value = "-1">面积</option>
</select>
<input type="text" placeholder="请出入楼盘名/地段名搜索" id="searchtext">
<button type="button" class="button action" id="search">搜索</button>
<ul id="houseList">
</ul>
</div>
</div>
</div>
</div>
<!-- 置业顾问弹出层 -->
<div class="modal fade" id="myConsultant" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body" style="height: 300px;overflow: auto;">
<select id="consultCity">
<option value=""> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<input type="text" placeholder="请出入置业顾问姓名搜索" id="consultantName">
<button type="button" class="button action" id="searchConsult">搜索</button>
<ul id="consultantList">
</ul>
</div>
</div>
</div>
</div>
<script>
(function($){
$(document).ready(function(){
//主力房源中选择图片file的下标
var i = 0;
//基本信息的联动AJAX
$("#baseCity").change(function(){
var cityId = $("#baseCity").val();
var baserArea = $("#baseAreaId");
$('#baseAreaId').find('option:not(:first-child)').remove();
$('#basePlateId').find('option:not(:first-child)').remove();
//城市联动区域
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity&cityId="+cityId,
success:function(json){
addOption(json,baserArea);
}
});
});
//区域联动板块
$("#baseAreaId").change(function(){
var basePlate = $("#basePlateId");
var areaId = $("#baseAreaId").val();
var cityId = $("#baseCity").val();
$('#basePlateId').find('option:not(:first-child)').remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity&cityId="+cityId+"&districtId="+areaId,
success:function(json){
addOption(json,basePlate);
}
});
});
//推荐房源的联动AJAX
$("#cityId").change(function(){
var cityId = $(this).val();
var area = $("#areaId");
var acreage =$("#acreage");
var price = $("#price");
$('#areaId').find('option:not(:first-child)').remove();
$('#plateId').find('option:not(:first-child)').remove();
$('#price').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove();
$("#houseList").find("li").remove();
//城市联动区域
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity&cityId="+cityId,
success:function(json){
addOption(json,area);
}
});
//城市联动房子面积
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchArea&cityId="+cityId,
success:function(json){
addOption(json,acreage);
}
});
//城市联动房子价格
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchUnitPriceRange&cityId="+cityId,
success:function(json){
addOption(json,price);
}
});
});
//区域联动板块
$("#areaId").change(function(){
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plate = $("#plateId");
$("#houseList").find("li").remove();
$('#plateId').find('option:not(:first-child)').remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity&cityId="+cityId+"&districtId="+areaId,
success:function(json){
addOption(json,plate);
}
});
});
//推荐房源下显示图片信息以及房名
$("#cityId,#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plateId = $("#plateId").val();
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=1",
success:function(json){
var result = json.result;
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
$("#houseList").append(li);
}
}
});
});
//添加房源中搜索框的搜索
$("#search").click(function(){
$searchtext = $("#searchtext").val();
$("#houseList").find("li").remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&searchtext="+$searchtext,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["name"];
var imgUrl = json[i]["path"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name);
$("#houseList").append(li);
}
}
});
})
//搜索对应城市的置业顾问
$("#consultCity").change(function(){
var consulCityId = $("#consultCity").val();
var consultantName =$("#consultantName").val();
$("#consultantList").find("li").remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){
for(
var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",json[i]["id"]).append(img).append(name).addClass("consultantImg");
$("#consultantList").append(li);
}
}
});
});
//添加置业顾问弹出层中搜索框的搜索内容
$("#searchConsult").click(function(){
var consulCityId = $("#consultCity").val();
var consultantName =$("#consultantName").val();
$("#consultantList").find("li").remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){
for(
var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").append(img).append(name).addClass("consultantImg");
$("#consultantList").append(li);
}
}
});
})
//点击添加房源中显示的列表,在界面中显示
$("#houseList").on("click",".addImg",function(){
var recommendHouse = $("<input>").attr({"type":"hidden","name":"data[recommend][]","value": $(this).attr("id")});
var url = $(this).find("img").attr("src");
var img = $("<img>").attr({"src":url,"height":100,"width":100});
var cancel = $("<input>").attr({"type":"button","value":"删除"}).addClass("imgCancel");
var p = $("<p>").append(img).append(cancel).append(recommendHouse);
$("#houseImg").append(p);
controlCommand("houseImg",3,0);
});
//添加置业顾问
$("#consultantList").on("click",".consultantImg",function(){
var recommendConsultant = $("<input>").attr({"type":"hidden","name":"data[recConsultant][]","value": $(this).attr("id")});
var cancel = $("<input>").attr({"type":"button","value":"删除"}).addClass("consultantCancel");
var font = $("<font>").append( $(this).text());
var p = $("<p>").append(font).append(cancel).append(recommendConsultant);
$("#consultantImg").append(p);
controlCommand("consultantImg",1,1);
});
//新增房源相册
$("#housePicture").click(function(){
var picDelet = $("<font>").append("删除").addClass("picDelet");
var file = $("<input>").attr({"type":"file","name":"files["+i+"]"}).addClass("picFiles");
var select = $("<select>").attr("name","data["+i+"][type]");
{% for item in photoType %}
select.append($("<option>").attr("value",{{item.id}}).append('{{item.value}}'));
{% endfor%}
var p = $("<p>").append(select).append(file).append(picDelet);
$("#picList").append(p);
i++
});
//房源相册
$("#picList").on("change",".picFiles",function(){
readURL(this,2);
$(this).hide();
});
//删除房源相册、推荐房源、推荐置业顾问
$("#houseImg,#consultantImg,#picList").on("click",".imgCancel,.consultantCancel,.picDelet",function(){
$(this).parent("p").remove();
});
$("#submit").click(function(){
if($("#housename").val()==""){
alert("请输入楼盘名");
return false;
}
});
//file上传之前,显示图片的方法
function readURL(input,type) {
if(type == 1){
if (input.files && input.files[0]){
var reader = new FileReader();
reader.onload = function (e) {
var img = $("<img>").attr({"id":"target","src":e.target.result,"heghit":100,"width":100});
var button = $("<input>").attr({"type":"button","value":"取消","property":+i,"id":+i}).addClass("cancel");
var type = $("<input>").attr({"type":"hidden","name":"data["+i+"][type]","value":0,"property":+i});
var file = $("<input>").attr({"type":"file","name":"files["+(i+1)+"]","property":+(i+1)}).addClass("files");
var select = $("<select>").attr({"name":"data["+i+"][buildProperty]"});
{% for item in buildProperty %}{{item.id}}
select.append($("<option>").attr("value",{{item.id}}).append('{{item.value}}'));
{% endfor%}
var areatext = $("<input>").attr({"type":"text","placeholder":"面积","name":"data["+i+"][housearea]"}).addClass("regular-text");
var div = $("<div>").append(select).append(areatext).append(button).append(type);
var span = $("<span>").attr({"property":+i}).append(img).append(div);
$("form").find("#preview > p").before(file);
$("#preview > p").append(span);
i++;
}
}
}else{
if (input.files && input.files[0]){
var reader = new FileReader();
reader.onload = function (e){
var img = $("<img>").attr({"src":e.target.result,"heghit":100,"width":100});
$(input).before(img);
}
}
}
reader.readAsDataURL(input.files[0]);
}
function addOption(json,select){
var selectId = select.attr("id");
for(var i = 0; i <=json.length-1; i++){
var id = json[i]["id"];
var value = json[i]["value"];
if(selectId == "acreage" || selectId == "price"){
id = value;
}
var Option = $("<option>").attr({"value": id}).append(value);
select.append(Option);
}
}
function controlCommand(id,number,type){
var num = $("#"+id+" > p").length;
if(num>number){
if(type==0){
alert("最多只能推荐3个房源");
}else if(type==1){
alert("您只能推荐一位置业顾问");
}
$("#"+id).find("p:last-child").remove();
}
}
});
})(jQuery);
</script>
</body>
</html>
\ No newline at end of file
<?php
//require_once(dirname(__FILE__) . '/Config.php');
class InsertDao{
public static function insert_tospur_house($params){
global $wpdb;
$houseRes = $wpdb->insert(Config::TOSPUR_HOUSE_TABLE, $params);
$houseId = $wpdb->insert_id;
if($houseRes){
return $houseId;
}else{
return 500;
}
}
public static function insert_tospur_image($params){
global $wpdb;
$imgRes = $wpdb->insert(Config::TOSPUR_IMAGE_TABLE, $params);
$imgId = $wpdb->insert_id;
if($imgRes){
return $imgId;
}else{
return 501;
}
}
public static function insert_a_district_area($params){
global $wpdb;
$districtAreaRes = $wpdb->insert(Config::A_DISTRICT_AREA_TABLE, $params);
if($districtAreaRes){
return $districtAreaRes;
}else{
return 502;
}
}
public static function insert_a_house_image($params){
global $wpdb;
$houseImageRes = $wpdb->insert(Config::A_HOUSE_IMAGE_TABLE, $params);
if($houseImageRes){
return $houseImageRes;
}else{
return 503;
}
}
public static function insert_a_house_recommend($params){
global $wpdb;
$houseImageRes = $wpdb->insert(Config::A_HOUSE_RECOMMEND_TABLE, $params);
if($houseImageRes){
return $houseImageRes;
}else{
return 504;
}
}
public static function insert_a_house_user($params){
global $wpdb;
$houseUserRes = $wpdb->insert(Config::A_HOUSE_USER_TABLE, $params);
if($houseUserRes){
return $houseUserRes;
}else{
return 505;
}
}
}
?>
\ No newline at end of file
<?php
require_once(PLUGIN_DIR . 'Config.php');
class SearchDao{
public static function ajax_serachCity(){
wp_send_json(SearchDao::searchCity($_GET["cityId"],$_GET['districtId']));
require_once(PLUGIN_DIR . 'Tools/Image.php');
class SearchDao
{
public static function ajax_serachCity()
{
wp_send_json(SearchDao::searchCity($_GET["cityId"], $_GET['districtId']));
}
public static function searchCity($cityId = NULL,$districtId = NULL){
public static function searchCity($cityId = NULL, $districtId = NULL)
{
global $wpdb;
$selectName = "cityId as id,cityName as value";
$where = " where 1=1 ";
$groupBy = " group by cityId";
$params = array();
if($cityId != NULL && $districtId == NULL){
if ($cityId != NULL && $districtId == NULL) {
$selectName = "districtId as id,districtName as value";
$where .= " and cityId = %d";
$params[] = $cityId;
$groupBy = " group by districtId";
}else if($cityId != NULL && $districtId != NULL){
} else if ($cityId != NULL && $districtId != NULL) {
$selectName = "plateId as id,plateName as value";
$where .= " and cityId = %d and districtId = %d";
$params[] = $cityId;
$params[] = $districtId;
$groupBy = "";
}
$result = $wpdb->get_results($wpdb->prepare('select '.$selectName.' from '.Config::DIC_CITY_TABLE.$where.$groupBy,$params));
$result = $wpdb->get_results($wpdb->prepare('select ' . $selectName . ' from ' . Config::DIC_CITY_TABLE . $where . $groupBy, $params));
return $result;
}
public static function ajax_searchArea(){
public static function ajax_searchArea()
{
wp_send_json(SearchDao::searchArea($_GET['cityId']));
}
public static function searchArea($cityId){
public static function searchArea($cityId)
{
global $wpdb;
$where = " where 1=1";
if(isset($_GET['cityId'])){
if (isset($_GET['cityId'])) {
$where .= " and cityId = %d";
}
$result = $wpdb->get_results($wpdb->prepare('select id,priceValue as value from '.Config::DIC_AREA_TABLE.$where,$cityId));
$result = $wpdb->get_results($wpdb->prepare('select id,priceValue as value from ' . Config::DIC_AREA_TABLE . $where, $cityId));
return $result;
}
public static function ajax_searchBuildProperty(){
public static function ajax_searchBuildProperty()
{
wp_send_json(SearchDao::searchBuildProperty());
}
public static function searchBuildProperty(){
public static function searchBuildProperty()
{
global $wpdb;
$result = $wpdb->get_results('select value as id,literal as value from '.Config::DIC_BUILDPROPERTY_TABLE);
$result = $wpdb->get_results('select value as id,literal as value from ' . Config::DIC_BUILDPROPERTY_TABLE);
return $result;
}
public static function ajax_searchRoom(){
public static function ajax_searchRoom()
{
wp_send_json(SearchDao::searchRoom());
}
public static function searchRoom(){
public static function searchRoom()
{
global $wpdb;
$result = $wpdb->get_results('select value as id,literal as value from '.Config::DIC_ROOM_TABLE);
$result = $wpdb->get_results('select value as id,literal as value from ' . Config::DIC_ROOM_TABLE);
return $result;
}
public static function ajax_searchUnitPriceRange(){
public static function ajax_searchUnitPriceRange()
{
wp_send_json(SearchDao::searchUnitPriceRange($_GET['cityId']));
}
public static function searchUnitPriceRange($cityId){
public static function searchUnitPriceRange($cityId)
{
global $wpdb;
$where = " where 1=1";
if(isset($_GET['cityId'])){
if (isset($_GET['cityId'])) {
$where .= " and cityId = %d";
}
$result = $wpdb->get_results($wpdb->prepare('select id,priceValue as value from '.Config::DIC_UNITPRICERANGE_TABLE.$where,$cityId));
$result = $wpdb->get_results($wpdb->prepare('select id,priceValue as value from ' . Config::DIC_UNITPRICERANGE_TABLE . $where, $cityId));
return $result;
}
public static function ajax_searchTotalPrice(){
public static function ajax_searchTotalPrice()
{
wp_send_json(SearchDao::searchTotalPrice($_GET['cityId']));
}
public static function searchTotalPrice($cityId){
public static function searchTotalPrice($cityId)
{
global $wpdb;
$where = " where 1=1";
if(isset($_GET['cityId'])){
$where .= " and cityId = ".$cityId;
if (isset($_GET['cityId'])) {
$where .= " and cityId = " . $cityId;
}
$result = $wpdb->get_results($wpdb->prepare('select id,priceValue as value from '.Config::DIC_TOTALPRICE_TABLE.$where,$cityId));
$result = $wpdb->get_results($wpdb->prepare('select id,priceValue as value from ' . Config::DIC_TOTALPRICE_TABLE . $where, $cityId));
return $result;
}
public static function ajax_searchOrganization(){
public static function ajax_searchOrganization()
{
wp_send_json(SearchDao::searchOrganization($_GET['parentId']));
}
public static function searchOrganization($parentId = NULL){
public static function searchOrganization($parentId = NULL)
{
global $wpdb;
$where = " where 1=1 ";
if($parentId != NULL){
$where .= " and ParentId =".$parentId;
if ($parentId != NULL) {
$where .= " and ParentId =" . $parentId;
}
$result = $wpdb->get_results($wpdb->prepare('select Id as id,Name as name from '.Config::TOSPUR_ORGANIZATION_TABLE.$where,$parentId));
$result = $wpdb->get_results($wpdb->prepare('select Id as id,Name as name from ' . Config::TOSPUR_ORGANIZATION_TABLE . $where, $parentId));
return $result;
}
public static function getCityNameWithId($cityId){
public static function getCityNameWithId($cityId)
{
global $wpdb;
$result = $wpdb->get_var($wpdb->prepare("select cityName from ".Config::DIC_CITY_TABLE." where cityId = %d",$cityId));
if($result){
$result = $wpdb->get_var($wpdb->prepare("select cityName from " . Config::DIC_CITY_TABLE . " where cityId = %d", $cityId));
if ($result) {
return $result;
}else{
} else {
return "未知";
}
}
public static function ajax_searchHouse(){
wp_send_json(SearchDao::searchHouse($_GET["cityId"],$_GET["districtId"],$_GET["plateId"],$_GET["buildPropertyId"],$_GET["roomId"],$_GET["acreage"],$_GET["totalPrice"],$_GET["searchText"]));
public static function ajax_searchHouse()
{
$house_result = SearchDao::searchHouse(
array(
'cityId' => $_POST['cityId'],
'districtId' => $_POST['districtId'],
'plateId' => $_POST['plateId'],
'buildPropertyId' => $_POST['buildPropertyId'],
'roomId' => $_POST['roomId'],
'acreage' => $_POST['acreage'],
'totalPrice' => $_POST['totalPrice'],
'searchText' => $_POST['searchText'],
'houseType' => $_POST['houseType'],
'index' => $_POST['index']
)
);
$array = SearchDao::get_house_image_and_tags($house_result);
wp_send_json($array);
}
public static function searchHouse($cityId = 0,$districtId = 0,$plateId = 0,$buildPropertyId = 0,$roomId = 0,$acreage = 0,$totalPrice = 0,$searchText = NULL){
public static function searchHouse($array)
{
global $wpdb;
$params = array();
$sql = "select * from tospur_house th
left join (select buildproperty_id,house_area,image_id,house_id as bph_id from a_district_area) ada on th.id = ada.bph_id
left join dic_city dc on th.plate_id = dc.plateId
left join (select * from a_house_image group by house_id) hi on th.id = hi.house_id
left join (select id,name as iname,path,creattime as itime,alt,image_type from tospur_image) i on hi.image_id = i.id where 1=1";
if($cityId!=0 ){
$params[] = $cityId;
$sql = $sql." and cityId=%d";
}
if($districtId != 0 ){
$params[] = $districtId;
$sql = $sql." and districtId=%d";
}
if($plateId != 0){
$params[] = $plateId;
$sql = $sql." and plateId=%d";
}
if( $buildPropertyId != 0){
$params[] = $buildPropertyId;
$sql = $sql." and buildproperty_id=%d";
}
if($roomId!=0){
$params[] = $roomId;
$sql = $sql." and room_id=%d";
}
if($acreage!=0){
$areaArray = explode("-",$acreage);
$buildpropertySql = null;
$orderbySql = null;
if ($array['houseType'] == 0) {
$buildpropertySql = " left join (select buildproperty_id,house_area,image_id,house_id as bph_id from a_district_area) ada on th.id = ada.bph_id".
" left join (select value as bp_value,literal as bp_literal from dic_buildproperty) dbp on ada.buildproperty_id = dbp.bp_value";
$orderbySql = " group by ada.bph_id order by th.creattime DESC";
}else if ($array['houseType'] == 1||$array['houseType'] == 2) {
$buildpropertySql = " left join (select value as bp_value,literal as bp_literal from dic_buildproperty) dbp on th.buildproperty_id = dbp.bp_value";
$orderbySql = " order by th.creattime DESC";
}
$sql = "select * from tospur_house th".
$buildpropertySql.
" left join dic_city dc on th.plate_id = dc.plateId".
" left join (select id as rid,value as r_value,literal from dic_room) dr on th.room_id = dr.r_value".
" where 1=1";
if ($array['cityId'] > -1) {
$params[] = $array['cityId'];
$sql = $sql . " and cityId=%d";
}
if ($array['districtId'] > -1) {
$params[] = $array['districtId'];
$sql = $sql . " and districtId=%d";
}
if ($array['plateId'] > -1) {
$params[] = $array['plateId'];
$sql = $sql . " and plateId=%d";
}
if ($array['buildPropertyId'] > -1) {
$params[] = $array['buildPropertyId'];
$sql = $sql . " and buildproperty_id=%d";
}
if ($array['roomId'] > -1) {
$params[] = $array['roomId'];
$sql = $sql . " and room_id=%d";
}
if ($array['acreage'] > -1) {
$areaArray = explode("-", $array['acreage']);
$params[] = $areaArray[0];
$params[] = $areaArray[1];
$sql = $sql." and covered_area between %d and %d";
$sql = $sql . " and covered_area between %d and %d";
}
if($totalPrice!=0){
$priceArray = explode("-",$totalPrice);
if ($array['totalPrice'] > -1) {
$priceArray = explode("-", $array['totalPrice']);
$params[] = $priceArray[0];
$params[] = $priceArray[1];
$sql = $sql." and total_price between %d and %d";
$sql = $sql . " and total_price between %d and %d";
}
if($searchText!=0){
$params[] = "%".$searchText."%";
$sql = $sql." and name like %s";
if ($array['searchText'] != null) {
$params[] = "%" . $array['searchText'] . "%";
$sql = $sql . " and name like %s";
}
if ($array['houseType'] > -1) {
$params[] = $array['houseType'];
$sql = $sql . " and house_type = %d";
}
if ($array['userType'] > -1 && $array['userId'] > -1) {
$params[] = $array['userType'];
$params[] = $array['userId'];
$sql = $sql . " and id in (select house_id from a_house_user where user_type = %d and user_id = %d)";
}
$sql = $sql." group by bph_id order by th.creattime DESC";
$sql = $sql . $orderbySql;
$result = $wpdb->get_results($wpdb->prepare($sql,$params));
if ($array['index'] > -1) {
$params[] = $array['index'];
$sql = $sql . " limit %d,10";
}
$result = $wpdb->get_results($wpdb->prepare($sql, $params));
return $result;
}
public static function ajax_searchPhotoType(){
public static function ajax_searchPhotoType()
{
wp_send_json(SearchDao::searchPhotoType());
}
public static function searchPhotoType(){
public static function searchPhotoType()
{
global $wpdb;
$result = $wpdb->get_results('select id,photo_name as value from '.Config::DIC_PHOTOTYPE_TABLE);
$result = $wpdb->get_results('select id,photo_name as value from ' . Config::DIC_PHOTOTYPE_TABLE);
return $result;
}
......@@ -197,4 +258,54 @@ class SearchDao{
$result = $wpdb->get_results($wpdb->prepare($sql,$params));
return $result;
}
public static function get_house_image_and_tags($house_result)
{
$array = array();
if ($house_result) {
$array['code'] = 2000;
$house_ids = array();
foreach ($house_result as $key => $value) {
$house_id = $value->id;
$house_ids[] = $house_id;
}
$string = '(' . implode(',', array_map('intval', $house_ids)) . ')';
$tag_result = SearchDao::search_house_tag($string);
//标签
if ($tag_result) {
foreach ($tag_result as $key => $value) {
$array['tags'][$value->house_id][] = $value->name;
}
}
//图片
$image_result = SearchDao::search_house_image($string);
if ($image_result) {
foreach ($image_result as $key => $value) {
$array['images'][$value->house_id] = home_url() . Image::getImage($value->path,'small');
}
}
$array['result'] = $house_result;
} else {
$array['code'] = 2001;
}
return $array;
}
public static function search_house_image($house_ids)
{
$sql = 'select ahi.house_id,ti.path from a_house_image ahi' .
' left join tospur_image ti on ahi.image_id = ti.id' .
' where ti.image_type in (1,5) and house_id in ' . $house_ids . ' group by house_id';
global $wpdb;
return $wpdb->get_results($sql);
}
public static function search_house_tag($house_ids)
{
$sql = 'select aht.house_id,tt.name from a_house_tag aht' .
' left join tospur_tag tt on aht.tag_id = tt.id' .
' where house_id in ' . $house_ids;
global $wpdb;
return $wpdb->get_results($sql);
}
}
\ No newline at end of file
<?php
require_once(PLUGIN_DIR . 'Config.php');
class Image {
private static $imageSize = array(
'small' => array(120,90),
'normal' => array(320,270),
'big' => array(640,960)
);
public static function makeImage($name,$path){
foreach(Image::$imageSize as $item){
$image = wp_get_image_editor($path);
if(!is_wp_error($image)){
$image->resize($item[0],$item[1],true);
$imageName = explode(".",$name);
$image->save(str_replace($name,$imageName[0]."-{$item[0]}x{$item[1]}.".$imageName[1],$path));
}else{
return false;
}
}
return true;
}
public static function getImage($path,$size){
switch($size){
case "small":
$formatPath = Image::formatImageName($path,"small");
if(file_exists(Image::get_home_path().$formatPath)){
return $formatPath;
}
case "normal":
$formatPath = Image::formatImageName($path,"normal");
if(file_exists(Image::get_home_path().$formatPath)){
return $formatPath;
}
case "big":
$formatPath = Image::formatImageName($path,"big");
if(file_exists(Image::get_home_path().$formatPath)){
return $formatPath;
}
default:
return $path;
}
}
private static function get_home_path() {
$home = set_url_scheme( get_option( 'home' ), 'http' );
$siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' );
if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) {
$wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */
$pos = strripos( str_replace( '\\', '/', $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) );
$home_path = substr( $_SERVER['SCRIPT_FILENAME'], 0, $pos );
$home_path = trailingslashit( $home_path );
} else {
$home_path = ABSPATH;
}
return str_replace( '\\', '/', $home_path );
}
private static function formatImageName($path,$size){
$name = end(explode("/",$path));
$nameArray = explode(".",$name);
$imageSize = Image::$imageSize[$size];
return str_replace($name,$nameArray[0]."-{$imageSize[0]}x{$imageSize[1]}.".$nameArray[1],$path);
}
}
\ No newline at end of file
......@@ -132,7 +132,7 @@ class consultantScoreList extends WP_List_Table
//$data = $this->example_data;
$sql = "SELECT s.id,c.user_login as consultant,u.user_login as user,s.score,s.valid FROM tospur_consultant_score s " .
$sql = "SELECT s.id,c.display_name as consultant,u.user_login as user,s.score,s.valid FROM tospur_consultant_score s " .
"left join wp_users u on s.user_id = u.ID " .
"left join wp_users c on s.consultant_id = c.ID";
$result = $wpdb->get_results($sql);
......
<?php
$house_id = $_GET['id'];
$house_sql = 'SELECT v.id, h.name, u.user_login as phone, v.date, v.time, v.consultant_id as consultant_id, v.handle, v.handle_date FROM view_house v '
$house_sql = 'SELECT v.id, h.name, u.user_login as phone, v.date, v.time, v.consultant_id as consultant_id, v.handle, v.handle_date FROM tospur_view_house v '
. 'left join tospur_house h on v.house_id = h.id '
. 'left join wp_users u on v.user_id = u.id '
. 'where v.id = ' . $house_id;
......@@ -16,6 +16,6 @@ $context['consultant_result'] = $wpdb->get_results($consultant_sql);
$context['url'] = home_url();
$context['id'] = $house_id;
Timber::render('views/handle.html', $context);
Timber::render('Admin/views/handle.html', $context);
?>
\ No newline at end of file
<?php
/*
Plugin Name: table_test
Plugin Name: 同策插件
Version: 1.0
Plugin URI: http://www.u-gen.net
Author: U-GEN TECH.
Description: 自定义列表
Author: 同策.
Description: 同策
*/
define('PLUGIN_DIR', dirname(__FILE__) . '\\');
define('PLUGIN_DIR', dirname(__FILE__) . '/');
add_action('init', 'tospur_init');
function tospur_init()
{
require_once(PLUGIN_DIR . 'Tools/TCSync.php');
require_once(PLUGIN_DIR . 'Tools/Image.php');
require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
require_once(PLUGIN_DIR . 'Admin/House.php');
require_once(PLUGIN_DIR . 'Admin/newHouseList.php');
require_once(PLUGIN_DIR . 'Admin/secHandHouse.php');
require_once('consultant_score.php');
require_once('view_house.php');
require_once(PLUGIN_DIR . 'Tools\TCSync.php');
require_once(PLUGIN_DIR . 'Dao\SearchDao.php');
require_once(PLUGIN_DIR . 'Admin\House.php');
add_action('admin_menu', 'reset_menu');
$type = $_POST["type"];
if($type==1){
wp_redirect("?page=newHouse&updated=true");
}
tospur_register_script_style();
tospur_ajax_set();
tospur_theme_format();
}
function tospur_theme_format(){
//移除
add_filter('admin_footer_text', tospur_remove_admin_footer_text, 1000);
......@@ -130,8 +127,10 @@ function update_consultant()
function reset_menu()
{
add_menu_page("talbe_test", "table_test", "manage_options", "1", "create_table");
add_menu_page( 'newHouse_title', '新房信息', 'manage_options', 'newHouse', 'House::init_view', 'dashicons-admin-tools', 6 );
add_menu_page("sync", "同步数据", "manage_options", "1", "do_sync");
add_menu_page('nesHouseList','新房列表', 'activate_plugins', 'newHouseList', 'newHouseList', 'dashicons-menu', 6);
add_submenu_page('newHouseList', 'newHouse_title', '添加新房', 'activate_plugins', 'newHouse', 'House::init_view');
add_menu_page('secHandHouse','二手房', 'activate_plugins', 'secHandHouse', 'SecHandHouse::secHandHouse_html', 'dashicons-menu', 7);
//移除更新信息
remove_action( 'admin_notices', 'update_nag', 3 );
global $menu;
......@@ -165,9 +164,9 @@ function reset_menu()
}
}
function create_table()
function do_sync()
{
//TCSync::user_sync();
TCSync::user_sync();
TCSync::organization_sync();
TCSync::other_sync();
}
......@@ -55,42 +55,11 @@ class viewHouseList extends WP_List_Table
}
}
function column_title($item)
{
//Build row actions
$actions = array(
'edit' => sprintf('<a href="?page=%s&action=%s&house=%s">Edit</a>', $_REQUEST['page'], 'edit', $item['ID']),
'delete' => sprintf('<a href="?page=%s&action=%s&house=%s">Delete</a>', $_REQUEST['page'], 'delete', $item['ID']),
);
//Return the title contents
return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
/*$1%s*/
$item['title'],
/*$2%s*/
$item['ID'],
/*$3%s*/
$this->row_actions($actions)
);
}
function column_cb($item)
{
return sprintf(
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
/*$1%s*/
$this->_args['singular'], //Let's simply repurpose the table's singular label ("house")
/*$2%s*/
$item['ID'] //The value of the checkbox should be the record's id
);
}
function get_columns()
{
$columns = array(
'cb' => '<input type="checkbox">', //Render a checkbox instead of text
'name' => '楼盘名/房源名',
'date' => '时间',
'date' => '预约时间',
'phone' => '手机号',
'consultant' => '置业顾问',
'handle' => '处理状态',
......@@ -112,22 +81,6 @@ class viewHouseList extends WP_List_Table
return $sortable_columns;
}
function get_bulk_actions()
{
$actions = array(
'delete' => 'Delete'
);
return $actions;
}
function process_bulk_action()
{
if ('delete' === $this->current_action()) {
wp_die('Items deleted (or they would be if we had items to delete)!');
}
}
function prepare_items()
{
global $wpdb;
......@@ -139,9 +92,7 @@ class viewHouseList extends WP_List_Table
$this->_column_headers = array($columns, $hidden);
$this->process_bulk_action();
$sql = 'SELECT v.id, h.name, u.user_login as phone, v.date, v.time, c.display_name as consultant, v.handle, v.handle_date FROM view_house v '
$sql = 'SELECT v.id, h.name, u.user_login as phone, v.date, v.time, c.display_name as consultant, v.handle, v.handle_date FROM tospur_view_house v '
. 'left join tospur_house h on v.house_id = h.id '
. 'left join wp_users u on v.user_id = u.id '
. 'left join wp_users c on v.consultant_id = c.id '
......@@ -152,7 +103,7 @@ class viewHouseList extends WP_List_Table
$data[$key] = array(
'id' => $value->id,
'name' => $value->name,
'date' => $value->date,
'date' => $value->date.' '.$value->time,
'phone' => $value->phone,
'consultant' => $value->consultant,
'handle' => $value->handle,
......@@ -160,16 +111,6 @@ class viewHouseList extends WP_List_Table
);
}
/*function usort_reorder($a, $b)
{
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'handle'; //If no sort, default to title
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc
$result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
return ($order === 'asc') ? $result : -$result; //Send final sort direction to usort
}
usort($data, 'usort_reorder');*/
$current_page = $this->get_pagenum();
$total_items = count($data);
......
<?php
$context = array();
$context['theme'] = get_template_directory_uri();
$context['url'] = home_url();
Timber::render('comment.html', $context);
?>
\ No newline at end of file
......@@ -8,6 +8,8 @@ $const_register_page = home_url() . '/?page=register';
$const_forget_page = home_url() . '/?page=forget';
//我的
$const_my_page = home_url() . '/?page=my';
//我的楼盘
$const_myHouse_page = home_url() . '/?page=myHouse';
//预约看房
$const_view_page = home_url() . '/?page=view';
//约看清单
......
......@@ -8,10 +8,11 @@ $current_user = wp_get_current_user();
$user_id = $current_user->ID;
if ($user_id != 0) {
$context['user_id'] = $user_id;
$consultant_id = $_GET['consultant_id'];
$current_user = wp_get_current_user();
$consultant_id = isset($_GET['consultant_id'])?$_GET['consultant_id']:$current_user->ID;
$context['consultant_id'] = $consultant_id;
$context['consultant_name'] = get_user_by('id', $consultant_id)->user_nicename;
$context['consultant_score'] = get_consultant_score($consultant_id);
$context['consultant_name'] = get_user_by('id', $consultant_id)->display_name;
$context['consultant'] = get_consultant_info($consultant_id);
$context['consultant_score_url'] = $const_score_page . '&consultant_id=' . $consultant_id;
}
......
<?php
$context = array();
$context['theme'] = get_template_directory_uri();
$context['url'] = home_url();
require_once(WP_PLUGIN_DIR . "/tospur/Dao/SearchDao.php");
$city = SearchDao::searchCity();
$context['city'] = $city;
$city_id = $_GET['city_id'];
if (!isset($city_id)) {
$city_id = $city[0]->id;
}
foreach ($city as $value) {
if ($value->id == $city_id) {
$context['city_name'] = $value->value;
}
}
$context['city_id'] = $city_id;
Timber::render('consultant_list.html', $context);
?>
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: UGEN79
* Date: 2015/8/6
* Time: 16:51
*/
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
}
class consultantScoreList extends WP_List_Table
{
function __construct()
{
global $status, $page;
//Set parent defaults
parent::__construct(array(
'singular' => 'score', //singular name of the listed records
'plural' => 'scores', //plural name of the listed records
'ajax' => false //does this table support ajax?
));
}
function column_default($item, $column_name)
{
switch ($column_name) {
case 'id':
case 'consultant':
case 'user':
case 'score':
return $item[$column_name];
case 'valid':
if ($item[$column_name]) {
return '<button data-valid="0" data-score-id="' . $item['id'] . '">设为无效</button>';
} else {
return '<button data-valid="1" data-score-id="' . $item['id'] . '">设为有效</button>';
}
default:
return print_r($item, true); //Show the whole array for troubleshooting purposes
}
}
function column_cb($item)
{
return sprintf(
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
/*$1%s*/
$this->_args['singular'], //Let's simply repurpose the table's singular label ("score")
/*$2%s*/
$item['id'] //The value of the checkbox should be the record's id
);
}
function get_columns()
{
$columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
'id' => 'ID',
'consultant' => '置业顾问',
'user' => '用户',
'score' => '评分',
'valid' => '状态'
);
return $columns;
}
function get_sortable_columns()
{
$sortable_columns = array(
'id' => array('id', false),
'consultant' => array('consultant', false),
'user' => array('user', false),
'score' => array('score', false),
'valid' => array('valid', false)
);
return $sortable_columns;
}
function get_bulk_actions()
{
$actions = array(
'invalid' => '设为无效',
'valid' => '设为有效',
);
return $actions;
}
function process_bulk_action()
{
$action = $this->current_action();
if ($action) {
$string = null;
$valid = null;
switch ($action) {
case 'invalid':
$score = $_GET['score'];
if ($score) {
$string = '(' . implode(',', array_map('intval', $score)) . ')';
$valid = 0;
}
break;
case 'valid':
$score = $_GET['score'];
if ($score) {
$valid = 1;
$string = '(' . implode(',', array_map('intval', $score)) . ')';
}
break;
}
global $wpdb;
$result = $wpdb->query('update tospur_consultant_score SET valid=' . $valid . ' where id in ' . $string);
}
}
function prepare_items()
{
global $wpdb;
$per_page = 5;
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
$this->_column_headers = array($columns, $hidden, $sortable);
$this->process_bulk_action();
//$data = $this->example_data;
$sql = "SELECT s.id,c.display_name as consultant,u.user_login as user,s.score,s.valid FROM tospur_consultant_score s " .
"left join wp_users u on s.user_id = u.ID " .
"left join wp_users c on s.consultant_id = c.ID";
$result = $wpdb->get_results($sql);
$data = array();
foreach ($result as $key => $value) {
$data[$key] = array(
'id' => $value->id,
'consultant' => $value->consultant,
'user' => $value->user,
'score' => $value->score,
'valid' => $value->valid,
);
}
function usort_reorder($a, $b)
{
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'valid'; //If no sort, default to title
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'desc'; //If no order, default to asc
$result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
return ($order === 'asc') ? $result : -$result; //Send final sort direction to usort
}
usort($data, 'usort_reorder');
$current_page = $this->get_pagenum();
$total_items = count($data);
$data = array_slice($data, (($current_page - 1) * $per_page), $per_page);
$this->items = $data;
$this->set_pagination_args(array(
'total_items' => $total_items, //WE have to calculate the total number of items
'per_page' => $per_page, //WE have to determine how many items to show on a page
'total_pages' => ceil($total_items / $per_page) //WE have to calculate the total number of pages
));
}
}
function add_consultant_score_menu()
{
add_menu_page('置业顾问评分', '置业顾问评分', 'activate_plugins', 'consultant_score', 'consultant_score_page', 'dashicons-menu', 26);
}
add_action('admin_menu', 'add_consultant_score_menu');
function consultant_score_page()
{
$consultantScoreList = new consultantScoreList();
$consultantScoreList->prepare_items();
?>
<div class="wrap">
<h2>置业顾问评分列表</h2>
<form id="scores-filter" method="get">
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>"/>
<!-- Now we can render the completed list table -->
<?php $consultantScoreList->display() ?>
</form>
</div>
<script>
(function ($) {
$('button[data-score-id]').click(function () {
var self = $(this);
var score_id = $(this).data('score-id');
var valid = $(this).data('valid');
$.ajax({
type: 'POST',
url: '<?php echo admin_url()?>admin-ajax.php/',
data: 'action=valid_consultant_score&id=' + score_id + '&valid=' + valid,
success: function (data) {
if (data.code == 2000) {
if (valid == 0) {
self.text('设为有效');
self.data('valid', 1);
} else {
self.text('设为无效');
self.data('valid', 0);
}
alert('设置成功');
} else {
alert('设置失败');
}
}
});
return false;
});
})(jQuery);
</script>
<?php
}
?>
\ No newline at end of file
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
#wrapper {
width: 100%;
height: 100%;
overflow: hidden;
}
#wrapper #scroller {
padding-bottom: 5px;
}
#wrapper #scroller ul {
margin-bottom: 0;
padding: 0 15px;
}
#wrapper #scroller ul li {
color: #636363;
padding: 20px 0;
border-bottom: 1px solid #7d7d7d;
}
#wrapper #scroller ul li p {
padding-left: 15px;
margin-bottom: 0;
}
#wrapper #scroller ul li p:nth-child(1) {
color: #000000;
font-size: 22px;
font-weight: bold;
margin-bottom: 2px;
}
.modal .modal-booking {
width: 320px;
height: 276px;
}
.modal .modal-booking .modal-content h3 {
color: #ffffff;
font-weight: bold;
line-height: 28px;
margin: 0;
padding: 25px 0 15px 15px;
background-color: #008cd7;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
}
.modal .modal-booking .modal-content ul li {
height: 60px;
line-height: 60px;
color: #959595;
font-size: 22px;
border-top: 1px solid #7d7d7d;
}
.modal .modal-booking .modal-content ul li .iconfont {
color: #008cd7;
font-size: 18px;
}
.modal .modal-booking .modal-content ul li .iconfont:after {
content: "\e603";
position: absolute;
right: 20px;
}
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
.main form > p {
color: #000000;
font-size: 20px;
font-weight: bold;
padding: 20px 0 0 35px;
}
.main form ul {
margin-bottom: 30%;
border-top: 1px solid #008cd7;
}
.main form ul li {
width: 100%;
height: 60px;
line-height: 60px;
color: #636363;
font-size: 15px;
background-color: #ffffff;
border-bottom: 1px solid #008cd7;
}
.main form ul li label {
margin-bottom: 0;
text-align: center;
}
.main form ul li label input[type="radio"] {
display: none;
}
.main form ul li label input[type="radio"]:checked + span {
background-position: -27px -1px;
}
.main form ul li label span {
width: 25px;
height: 25px;
background: url("../img/radio_icon.png") no-repeat;
background-size: 53px 27px;
-webkit-background-size: 53px 27px;
background-position: -1px -1px;
display: inline-block;
position: relative;
top: 8px;
margin-right: 5px;
}
.main form ul li label span.time {
width: 30px;
height: 30px;
background: url("../img/blue_time_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
top: 10px;
}
.main form ul li p {
margin-bottom: 0;
text-align: center;
}
.main form ul li p select {
font-size: 20px;
background-color: transparent;
border: 0;
margin: 0 -8px;
}
.main form .btn {
width: 90%;
color: #ffffff;
margin: 0 auto;
padding: 16px;
display: block;
background-color: #008cd7;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9;
}
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
#wrapper {
position: absolute;
z-index: 1;
top: 54px;
bottom: 0;
left: 0;
width: 100%;
overflow: hidden;
}
#wrapper #scroller {
padding-bottom: 5px;
}
#wrapper #scroller ul {
margin-bottom: 0;
}
#wrapper #scroller ul li {
width: 100%;
height: 106px;
padding: 15px 0;
}
#wrapper #scroller ul li ol {
padding-right: 0;
}
#wrapper #scroller ul li ol img {
width: 75px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
}
#wrapper #scroller ul li ol p {
color: #000000;
font-size: 18px;
font-weight: bold;
height: 25px;
margin-bottom: 0;
}
#wrapper #scroller ul li ol .btn {
width: 80%;
padding: 2px 0;
margin-top: 24px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
}
#wrapper #scroller ul li ol .btn.btn-phone {
color: #ed6d00;
border-color: #ed6d00;
background-color: transparent;
}
#wrapper #scroller ul li ol .btn.btn-phone span {
width: 18px;
height: 18px;
background: url("../img/orange_phone_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
display: inline-block;
vertical-align: middle;
}
#wrapper #scroller ul li ol .btn.btn-booking {
color: #008cd7;
border-color: #008cd7;
background-color: transparent;
}
#wrapper #scroller ul li ol .btn.btn-booking span {
width: 18px;
height: 18px;
background: url("../img/blue_bespeak_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
display: inline-block;
vertical-align: middle;
}
#wrapper #scroller ul li {
border-bottom: 1px solid #7d7d7d;
}
#wrapper #scroller ul li ol p:nth-child(3) {
font-size: 16px;
color: #636363;
font-weight: normal;
}
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
.jumbotron {
padding: 15px 20px 8px;
margin-bottom: 0;
border-bottom: 1px solid #7d7d7d;
background-color: transparent;
}
.jumbotron ul {
overflow: hidden;
}
.jumbotron ul li {
padding-left: 5px;
}
.jumbotron ul li img {
width: 90px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
}
.jumbotron ul li p {
margin: 2px 0 0;
color: #636363;
font-size: 18px;
}
.jumbotron ul li p:nth-child(1) {
color: #000000;
font-size: 22px;
font-weight: bold;
}
.jumbotron h4 {
color: #000000;
font-size: 16px;
font-weight: bold;
margin-bottom: 5px;
}
.jumbotron #people_wrapper {
width: 100%;
height: 66px;
line-height: 22px;
position: relative;
overflow: hidden;
}
#wrapper {
position: absolute;
z-index: 1;
top: 252px;
bottom: 0;
left: 0;
width: 100%;
overflow: hidden;
}
#wrapper #scroller {
padding-bottom: 45px;
}
#wrapper #scroller .row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
#wrapper #scroller .row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
#wrapper #scroller .row p img {
height: 100%;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
#wrapper #scroller .row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
#wrapper #scroller .row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#wrapper #scroller .row ul li.address {
margin-top: 2px;
height: 22px;
line-height: 22px;
}
#wrapper #scroller .row ul li.address span:nth-child(1) {
color: #000000;
font-size: 21px;
font-weight: bold;
}
#wrapper #scroller .row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
#wrapper #scroller .row ul li:last-child .label {
color: #ff0000;
padding: 1px 4px;
font-size: 9px;
border: 1px solid #acacac;
margin: 0 5px 0 0;
vertical-align: middle;
}
#wrapper #scroller .row ul li:last-child span {
color: #000000;
font-size: 15px;
}
#wrapper #scroller .row ul li:last-child span em {
font-style: normal;
}
#wrapper #scroller .row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
#wrapper #scroller .row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
#wrapper #scroller .row ul li.multiLine_omit {
color: #000000;
font-weight: bold;
height: 36px;
margin-top: 0;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
white-space: normal;
}
#wrapper #scroller .row ul li span:nth-child(2),
#wrapper #scroller .row ul li span:nth-child(3) {
margin-left: 15px;
}
.footer {
width: 100%;
height: 45px;
background-color: rgba(0, 0, 0, 0.5);
}
.footer .btn {
width: 45%;
margin: 5px 2%;
padding: 1px;
color: #ffffff;
background-color: #008cd7;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9;
}
.footer .btn.btn-wechat span {
width: 30px;
height: 30px;
background: url("../img/white_wechat_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
display: inline-block;
vertical-align: middle;
margin-right: 6px;
}
.footer .btn.btn-phone span {
width: 30px;
height: 30px;
background: url("../img/white_phone_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
display: inline-block;
vertical-align: middle;
}
......@@ -14,6 +14,85 @@
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
......@@ -24,13 +103,14 @@
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: -1px;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
......@@ -489,9 +569,6 @@ body {
.detail_row .peopleCont li ol {
padding: 0;
}
.detail_row .peopleCont li ol:nth-child(2) {
padding: 0 10px;
}
.detail_row .peopleCont li ol img {
width: 50px;
border-top-left-radius: 3px;
......@@ -507,13 +584,12 @@ body {
color: #000000;
font-size: 18px;
font-weight: bold;
height: 25px;
margin-bottom: 0;
}
.detail_row .peopleCont li ol .btn-phone {
.detail_row .peopleCont li ol .btn {
width: 48%;
padding: 3px;
color: #ed6d00;
border-color: #ed6d00;
background-color: transparent;
padding: 2px 0;
margin-top: 12px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
......@@ -524,40 +600,37 @@ body {
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
}
.detail_row .peopleCont li ol .btn-phone span {
width: 16px;
height: 16px;
.detail_row .peopleCont li ol .btn.btn-phone {
color: #ed6d00;
border-color: #ed6d00;
background-color: transparent;
}
.detail_row .peopleCont li ol .btn.btn-phone span {
width: 18px;
height: 18px;
background: url("../img/orange_phone_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
display: inline-block;
vertical-align: middle;
}
.detail_row .peopleCont li ol .btn-booking {
width: 48%;
padding: 3px;
.detail_row .peopleCont li ol .btn.btn-booking {
color: #008cd7;
border-color: #008cd7;
background-color: transparent;
margin-top: 12px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
}
.detail_row .peopleCont li ol .btn-booking span {
width: 16px;
height: 16px;
.detail_row .peopleCont li ol .btn.btn-booking span {
width: 18px;
height: 18px;
background: url("../img/blue_bespeak_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
display: inline-block;
vertical-align: middle;
}
.detail_row .peopleCont li ol:nth-child(2) {
padding: 0 10px;
}
.footer {
width: 100%;
height: 45px;
......@@ -636,7 +709,6 @@ body {
font-size: 0;
}
.modal #carousel_wrapper #carousel_scroller ul li {
width: 360px;
height: 100%;
padding: 0;
overflow: hidden;
......
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot');
src: url('http://at.alicdn.com/t/font_1439179733_4587424.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439179733_4587424.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439179733_4587424.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439179733_4587424.svg#iconfont') format('svg');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
......@@ -14,6 +14,114 @@
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
......@@ -62,17 +170,150 @@
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
......@@ -86,12 +327,18 @@ body {
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
.container-fluid {
width: 100%;
height: 100%;
background: url("../img/formBg.jpg") no-repeat;
background-size: 100% 100%;
-webkit-background-size: 100% 100%;
background-attachment: fixed;
overflow: auto;
padding: 0 25px;
}
.container-fluid form h2 {
margin: 20% 0;
......@@ -100,32 +347,53 @@ body {
}
.container-fluid form .has-feedback {
margin-bottom: 0;
background-color: #fff;
border: 1px solid #DED6D9;
background-color: #ffffff;
border: 1px solid #cfd0d0;
}
.container-fluid form .has-feedback .form-control {
height: 60px;
color: #7d7d7d;
border: 0;
box-shadow: none;
-webkit-box-shadow: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-webkit-appearance: none;
}
.container-fluid form .has-feedback .form-control::-webkit-input-placeholder {
color: #7d7d7d;
}
.container-fluid form .has-feedback:first-of-type {
margin-bottom: -1px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
margin-bottom: -1px;
}
.container-fluid form .has-feedback:first-of-type .form-control {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
}
.container-fluid form .has-feedback:last-of-type {
margin-top: -1px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
margin-top: -1px;
}
.container-fluid form .has-feedback:last-of-type .form-control {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
}
.container-fluid form .has-feedback.username .form-control-feedback {
width: 30px;
......@@ -146,15 +414,16 @@ body {
right: 15px;
}
.container-fluid form .has-feedback.code .form-control {
width: 65%;
width: 60%;
}
.container-fluid form .has-feedback.code .form-control-feedback {
top: 4px;
top: 6px;
right: 4px;
width: 30%;
height: 50px;
line-height: 50px;
width: 35%;
height: 46px;
line-height: 46px;
color: #ffffff;
font-size: 16px;
background-color: #0bacd3;
box-shadow: 0 2px 0 0 #088aa9;
-webkit-box-shadow: 0 2px 0 0 #088aa9;
......@@ -170,7 +439,8 @@ body {
}
.container-fluid form .btn {
color: #ffffff;
margin: 10% 0 5%;
margin: 12% 0 5%;
padding: 16px;
background-color: #008cd7;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
......@@ -183,6 +453,9 @@ body {
box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9;
}
.container-fluid form .btn.btn-register {
margin-top: 20%;
}
.container-fluid form a {
display: block;
color: #ffffff;
......@@ -196,12 +469,7 @@ body {
margin: 0 5px;
background-color: rgba(255, 255, 255, 0.4);
}
.container-fluid form a:active {
color: ;
}
.container-fluid form a:hover {
text-decoration: none;
}
.container-fluid form a.link-register {
margin-top: 100px;
margin-top: 30%;
padding-bottom: 25px;
}
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
.container-fluid p {
color: #7d7d7d;
font-size: 16px;
font-weight: bold;
margin: 10% 0 5%;
}
.container-fluid .form-control {
resize: none;
border-color: #e9e9e9;
box-shadow: none;
-webkit-box-shadow: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-webkit-appearance: none;
color: #7d7d7d;
}
.container-fluid .form-control::-webkit-input-placeholder {
color: #7d7d7d;
}
.container-fluid .btn {
width: 94%;
color: #ffffff;
margin: 10% auto;
padding: 16px;
display: block;
background-color: #008cd7;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9;
}
......@@ -14,6 +14,85 @@
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
......@@ -24,13 +103,14 @@
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: -1px;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
......@@ -250,84 +330,6 @@ body {
a:hover {
text-decoration: none;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
border: 0;
padding: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.search .has-feedback {
width: 75%;
}
......@@ -361,10 +363,9 @@ a:hover {
}
.btn-group-justified {
width: 100%;
height: 45px;
height: 46px;
position: relative;
box-sizing: content-box;
-webkit-box-sizing: content-box;
z-index: 2;
border-bottom: 1px solid #b7b7b7;
}
.btn-group-justified .btn-group {
......@@ -397,8 +398,8 @@ a:hover {
left: 0;
width: 100%;
height: 300px;
border: 0;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
......@@ -494,15 +495,18 @@ a:hover {
font-size: 15px;
}
#wrapper #scroller .row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#wrapper #scroller .row ul li:first-child {
margin-top: 5px;
#wrapper #scroller .row ul li.address {
margin-top: 2px;
height: 22px;
line-height: 22px;
}
#wrapper #scroller .row ul li:first-child .address {
#wrapper #scroller .row ul li.address span:nth-child(1) {
color: #000000;
font-size: 21px;
font-weight: bold;
......@@ -512,23 +516,26 @@ a:hover {
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
#wrapper #scroller .row ul li:last-child .label {
color: #ff0000;
padding: 1px 4px;
font-size: 9px;
padding: 0 4px 1px;
border: 1px solid #acacac;
vertical-align: bottom;
margin: 0 5px 0 0;
vertical-align: middle;
}
#wrapper #scroller .row ul li:last-child span {
color: #000000;
font-size: 15px;
}
#wrapper #scroller .row ul li:last-child span em {
font-style: normal;
}
#wrapper #scroller .row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 21px;
font-size: 19px;
font-weight: bold;
}
#wrapper #scroller .row ul li:last-child span em:nth-child(2) {
......@@ -545,6 +552,10 @@ a:hover {
-webkit-box-orient: vertical;
white-space: normal;
}
#wrapper #scroller .row ul li span:nth-child(2),
#wrapper #scroller .row ul li span:nth-child(3) {
margin-left: 15px;
}
.footer {
width: 100%;
height: 45px;
......
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot');
src: url('http://at.alicdn.com/t/font_1439432624_5842593.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439432624_5842593.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439432624_5842593.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439432624_5842593.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
border-bottom: 1px solid #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-size: 17px;
font-weight: bold;
}
.search .btn-group .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
position: relative;
top: -2px;
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
padding: 0;
border: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
#wrapper {
position: absolute;
z-index: 1;
top: 40px;
bottom: 0;
left: 0;
width: 100%;
overflow: hidden;
}
#wrapper #scroller {
padding-bottom: 5px;
}
#wrapper #scroller .row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
#wrapper #scroller .row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
#wrapper #scroller .row p img {
height: 100%;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
#wrapper #scroller .row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
#wrapper #scroller .row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#wrapper #scroller .row ul li.address {
margin-top: 2px;
height: 22px;
line-height: 22px;
}
#wrapper #scroller .row ul li.address span:nth-child(1) {
color: #000000;
font-size: 21px;
font-weight: bold;
}
#wrapper #scroller .row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
#wrapper #scroller .row ul li:last-child .label {
color: #ff0000;
padding: 1px 4px;
font-size: 9px;
border: 1px solid #acacac;
margin: 0 5px 0 0;
vertical-align: middle;
}
#wrapper #scroller .row ul li:last-child span {
color: #000000;
font-size: 15px;
}
#wrapper #scroller .row ul li:last-child span em {
font-style: normal;
}
#wrapper #scroller .row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
#wrapper #scroller .row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
#wrapper #scroller .row ul li.multiLine_omit {
color: #000000;
font-weight: bold;
height: 36px;
margin-top: 0;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
white-space: normal;
}
#wrapper #scroller .row ul li span:nth-child(2),
#wrapper #scroller .row ul li span:nth-child(3) {
margin-left: 15px;
}
......@@ -48,7 +48,9 @@ class dao
public static function search_view_house_by_user_id($user_id)
{
global $wpdb;
$sql = "select v.house_id,v.date,v.time,v.consultant_id,v.handle from " . tospur_view_house_table . " v where user_id = " . $user_id . " order by v.date desc";
$sql = "select v.house_id,v.date,v.time,v.consultant_id,v.handle,h.name from " . tospur_view_house_table . " v " .
"left join tospur_house h on v.house_id = h.id " .
"where v.user_id = " . $user_id . " order by v.date desc";
return $wpdb->get_results($sql);
}
......@@ -56,7 +58,9 @@ class dao
public static function search_view_house_by_consultant_id($consultant_id)
{
global $wpdb;
$sql = "select v.id,v.house_id,v.user_id,v.date,v.time,v.handle from " . tospur_view_house_table . " v where consultant_id = " . $consultant_id . " order by v.date desc";
$sql = "select v.id,v.house_id,v.date,v.time,v.user_id,v.handle,h.name from " . tospur_view_house_table . " v " .
"left join tospur_house h on v.house_id = h.id " .
"where v.consultant_id = " . $consultant_id . " order by v.date desc";
return $wpdb->get_results($sql);
}
......@@ -74,12 +78,15 @@ class dao
return $result;
}
//search 置业顾问评分
public static function search_consultant_score($consultant_id)
//search 置业顾问信息
public static function search_consultant_info($consultant_id)
{
global $wpdb;
$sql = "select sum(score)/count(score) as average_score from tospur_consultant_score where consultant_id = " . $consultant_id . " and valid = 1;";
return $wpdb->get_var($sql);
$sql = "select c.*,u.display_name,s.average_score from tospur_consultant c " .
"left join wp_users u on c.id = u.ID " .
"left join (select consultant_id,sum(score)/count(score) as average_score from tospur_consultant_score group by consultant_id) s " .
"on c.id = s.consultant_id where c.id = " . $consultant_id;
return $wpdb->get_row($sql);
}
public static function update_consultant_score($score_id, $valid)
......
......@@ -18,14 +18,19 @@
LEFT JOIN ".Config::TOSPUR_IMAGE_TABLE." ti on ti.id = ada.image_id
where ada.house_id = %d";
$mainImage = $wpdb->get_results($wpdb->prepare($mainImagesSql,$hid));
foreach($mainImage as $key => $value){
$value->path = Image::getImage($value->path,'small');
}
$context['mainImage'] = $mainImage;
$recommendSql = "select ahi.house_id as id,ti.path from a_house_image ahi
left join tospur_image ti on ahi.image_id = ti.id
where ti.image_type in (1,5) and house_id
in (select recommend_id from a_house_recommend where house_id = %d) group by house_id";
$recommends = $wpdb->get_results($wpdb->prepare($recommendSql,$hid));
foreach($recommends as $key => $value){
$value->path = Image::getImage($value->path,'small');
}
$context['recommends'] = $recommends;
$consultantSql = 'select id,name,mobile,imageUrl,s.average_score from tospur_consultant c
......@@ -40,8 +45,10 @@
LEFT JOIN a_house_image ahi on ti.id = ahi.image_id
WHERE ahi.house_id = %d order by image_type;';
$images = $wpdb->get_results($wpdb->prepare($imagesSql,$hid));
foreach($images as $key => $value){
$value->path = Image::getImage($value->path,'big');
}
$context['images'] = $images;
Timber::render('detail.html', $context);
}else{
Timber::render('error.html', $context);
......
<?php
require_once(dirname(__FILE__) . '/dao.php');
require_once(dirname(__FILE__) . '/../../plugins/tospur/Dao/SearchDao.php');
require_once(dirname(__FILE__) . '/../../plugins/tospur/Tools/Image.php');
add_filter('template_include', 'page_template');
function page_template($template)
{
$theme = get_stylesheet_directory();
$page = null;
if (isset($_GET['page'])) {
switch ($_GET['page']) {
case 'login':
$page = $theme . '/login.php';
......@@ -29,20 +32,29 @@ function page_template($template)
case 'consultant_info':
$page = $theme . '/consultant_info.php';
break;
case 'consultant_list':
$page = $theme . '/consultant_list.php';
break;
case 'score':
$page = $theme . '/score.php';
break;
case 'comment':
$page = $theme . '/comment.php';
break;
case 'myHouse':
$page = $theme . '/myHouse.php';
break;
case 'detail':
$page = $theme . '/detail.php';
break;
case 'map':
$page = $theme . '/map.php';
break;
default:
$page = $template;
break;
}
return $page;
} else {
return $template;
}
}
function generate_code()
......@@ -100,7 +112,6 @@ function view_house()
}
$time = (9 + $index) . ':00-' . (10 + $index) . ':00';
$result = dao::insert_view_house($_POST['house_id'], $_POST['user_id'], $date, $index, $time, $_POST['consultant_id']);
print_r($result);
$array = array();
if ($result) {
$array['code'] = 2000;
......@@ -144,12 +155,83 @@ function add_consultant_score()
}
}
//置业顾问信息 评分
function get_consultant_score($consultant_id)
//置业顾问信息
function get_consultant_info($consultant_id)
{
return dao::search_consultant_score($consultant_id);
return dao::search_consultant_info($consultant_id);
}
add_action('wp_ajax_get_consultant', 'get_consultant');
function get_consultant()
{
if (isset($_POST['city_id']) && isset($_POST['index'])) {
$result = dao::search_consultant_by_city($_POST['city_id'], $_POST['index']);
$array = array();
if ($result) {
$array['code'] = 2000;
$array['result'] = $result;
} else {
$array['code'] = 2001;
}
wp_send_json($array);
}
}
add_action('wp_ajax_get_my_house', 'get_my_house');
function get_my_house()
{
$houseType = $_POST['houseType'];
$userType = $_POST['userType'];
$userId = $_POST['userId'];
$index = $_POST['index'];
if (isset($houseType) && isset($userType) && isset($userId) && isset($index)) {
$house_result = SearchDao::searchHouse(
array(
'houseType' => $houseType,
'userType' => $userType,
'userId' => $userId,
'index' => $index
)
);
$array = get_house_image_and_tags($house_result);
wp_send_json($array);
}
}
add_action('wp_ajax_search_house', 'SearchDao::ajax_searchHouse');
add_action('wp_ajax_nopriv_search_house', 'SearchDao::ajax_searchHouse');
function get_house_image_and_tags($house_result)
{
$array = array();
if ($house_result) {
$array['code'] = 2000;
$house_ids = array();
foreach ($house_result as $key => $value) {
$house_id = $value->id;
$house_ids[] = $house_id;
}
$string = '(' . implode(',', array_map('intval', $house_ids)) . ')';
$tag_result = dao::search_house_tag($string);
//标签
if ($tag_result) {
foreach ($tag_result as $key => $value) {
$array['tags'][$value->house_id][] = $value->name;
}
}
//图片
$image_result = dao::search_house_image($string);
if ($image_result) {
foreach ($image_result as $key => $value) {
$array['images'][$value->house_id] = home_url() . Image::getImage($value->path,'small');
}
}
$array['result'] = $house_result;
} else {
$array['code'] = 2001;
}
return $array;
}
add_action('wp_ajax_add_collect', 'add_collect');
function add_collect($house_id){
......@@ -169,4 +251,18 @@ function add_collect($house_id){
}
wp_send_json($array);
}
add_filter('login_redirect', 'new_login_redirect', 10, 3);
function new_login_redirect($redirect_to, $request, $user ){
if($user-ID>0) {
$role = $user->roles[0];
if ($role == 'administrator' || $role == 'editor') {
return admin_url('admin.php?page=newHouseList');
} else {
return site_url();
}
}else{
return $redirect_to;
}
}
?>
\ No newline at end of file
<?php
$house_id = $_GET['id'];
$house_sql = 'SELECT v.id, h.name, u.user_login as phone, v.date, v.time, v.consultant_id as consultant_id, v.handle, v.handle_date FROM tospur_view_house v '
. 'left join tospur_house h on v.house_id = h.id '
. 'left join wp_users u on v.user_id = u.id '
. 'where v.id = ' . $house_id;
$consultant_sql = 'SELECT u.id,u.display_name FROM wp_users u '
. 'left join wp_usermeta m on u.id=m.user_id where meta_key="wp_user_level" and meta_value=7;';
global $wpdb;
$context['house_result'] = $wpdb->get_row($house_sql);
$context['consultant_result'] = $wpdb->get_results($consultant_sql);
$context['url'] = home_url();
$context['id'] = $house_id;
Timber::render('Admin/views/handle.html', $context);
?>
\ No newline at end of file
<?php
$context = array();
$context['theme'] = get_template_directory_uri();
require_once(WP_PLUGIN_DIR."/tospur/Dao/SearchDao.php");
$context = array();
$context['theme'] = get_template_directory_uri();
require_once(WP_PLUGIN_DIR."/tospur/Dao/SearchDao.php");
$cityId = 1;
if($_GET['cityId'])
$cityId = 1;
if($_GET['cityId'])
$cityId = $_GET['cityId'];
$context['cityId'] = $cityId;
$context['cityName'] = SearchDao::getCityNameWithId($cityId);
$context['select']['city'] = SearchDao::searchCity();
$context['select']['district'] = SearchDao::searchCity($cityId);
$plateArray = array();
foreach($context['select']['district'] as $item){
$context['cityId'] = $cityId;
$context['cityName'] = SearchDao::getCityNameWithId($cityId);
$context['select']['city'] = SearchDao::searchCity();
$context['select']['district'] = SearchDao::searchCity($cityId);
$plateArray = array();
foreach($context['select']['district'] as $item){
$plateArray[$item->id] = array();
foreach(SearchDao::searchCity($cityId,$item->id) as $i){
$plateArray[$item->id][] = $i;
}
}
$context['select']['plate'] = json_encode($plateArray);
$context['select']['buildProperty'] = SearchDao::searchBuildProperty();
$context['select']['room'] = json_encode(SearchDao::searchRoom());
$context['select']['unitPriceRange'] = SearchDao::searchUnitPriceRange($cityId);
$context['select']['totalPrice'] = SearchDao::searchTotalPrice($cityId);
$context['select']['area'] = json_encode(SearchDao::searchArea($cityId));
}
$context['select']['plate'] = json_encode($plateArray);
$context['select']['buildProperty'] = SearchDao::searchBuildProperty();
$context['select']['room'] = json_encode(SearchDao::searchRoom());
$context['select']['unitPriceRange'] = SearchDao::searchUnitPriceRange($cityId);
$context['select']['totalPrice'] = SearchDao::searchTotalPrice($cityId);
$context['select']['area'] = json_encode(SearchDao::searchArea($cityId));
$context['site_url'] = site_url();
Timber::render('index.html', $context);
$context['site_url'] = site_url();
Timber::render('index.html', $context);
?>
\ No newline at end of file
......@@ -76,77 +76,3 @@ Date.prototype.Format = function (fmt) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
};
\ No newline at end of file
//将数据存储到lacalstorage和cookie中,
var ugenLocalStorage =
{
set: function(name, value)
{
var date = new Date(),
expires = '',
type = typeof(value),
valueToUse = ''
//cookie后的时间变量,固定为了365天
date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
//判断数据类型是string还是map
if (type === "object" && type !== "undefined") {
if(!("JSON" in window)) throw "Bummer, your browser doesn't support JSON parsing.";
valueToUse = JSON.stringify(value);
} else {
valueToUse = value;
}
//储存在localStorage中
localStorage[name] = valueToUse;
//储存在cookie中
document.cookie = name + "=" +encodeURIComponent(valueToUse) + expires
},
get: function(name){
//判断是否存在localstorage,有返回localstorage没有返回cookie
if(localStorage[name]){
return localStorage[name];
}else
{
var nameEQ = name + "=",
//从cookie中拿出数据使用';'分开
ca = document.cookie.split(';'),
value = '',
//存放数据第一个字符变量
firstChar = '',
parsed={};
for (var i = 0; i < ca.length; i++)
{
var c = ca[i];
//循环每个字符,直到为空
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
//判断nameEQ与储存数据name是否匹配
if (c.indexOf(nameEQ) === 0)
{
//将cookie数据解码
value = decodeURIComponent(c.substring(nameEQ.length, c.length));
firstChar = value.substring(0, 1);
//判断是否为map形式
if(firstChar=="{")
{
try
{
parsed = JSON.parse(value);
if("v" in parsed) return parsed.v;
} catch(e)
{
return value;
}
}
if (value=="undefined") return undefined;
return value;
}
}
return null;
}
}
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ if ($current_user_id == 0) {
if ($result) {
$context['result'] = $result;
} else {
$context['message'] = 'not found';
$context['result'] = null;
}
}
......
......@@ -12,9 +12,9 @@ if (is_user_logged_in()) {
$phone = $_POST['phone'];
$password = $_POST['password'];
if (!$phone) {
$context['phoneError'] = '请输入用户名';
$context['error'] = '请输入用户名';
} else if (!$password) {
$context['passwordError'] = '请输入密码';
$context['error'] = '请输入密码';
} else {
if (strlen($phone) != 11) {
$response = wp_remote_post('http://218.1.67.130:8988/api/NanTongWechat/LoginWechat' .
......@@ -33,9 +33,9 @@ if (is_user_logged_in()) {
if (!is_wp_error($user)) {
wp_redirect($const_my_page);
} else if ($user->get_error_code() == 'invalid_username') {
$context['phoneError'] = '请输入有效的用户名';
$context['error'] = '请输入有效的用户名';
} else if ($user->get_error_code() == 'incorrect_password') {
$context['passwordError'] = '您输入的密码无效';
$context['error'] = '您输入的密码无效';
}
}
}
......
......@@ -7,32 +7,23 @@ $context['theme'] = get_template_directory_uri();
$current_user = wp_get_current_user();
$current_user_id = $current_user->ID;
if ($current_user_id == 0) {
$context['logout'] = array(
'login' => $const_login_page,
'register' => $const_register_page
);
wp_redirect(get_site_url()."?page=login");
} else {
$name = $current_user->user_login;
$role = $current_user->roles[0];
$user_role = '';
switch ($role) {
case 'contributor':
case 'administrator':
case 'subscriber':
$user_role = '用户';
wp_redirect(get_site_url()."?page=myHouse");
break;
case 'editor':
$user_role = '置业顾问';
/*header('Location: ' . $const_list_page);
exit;*/
break;
case 'administrator':
$user_role = '管理员';
wp_redirect(get_site_url()."?page=list");
break;
}
$context['login'] = array(
'name' => $user_role . $name,
'out' => wp_logout_url($const_login_page)
);
}
Timber::render('my.html', $context);
?>
\ No newline at end of file
<?php
$context = array();
$context['theme'] = get_template_directory_uri();
$context['url'] = home_url();
$current_user = wp_get_current_user();
$user_id = $current_user->ID;
if ($user_id != 0) {
$context['user_id'] = $user_id;
}
Timber::render('myHouse.html', $context);
?>
\ No newline at end of file
<?php
require_once('const.php');
$context = array();
$context['theme'] = get_template_directory_uri();
$context['url'] = home_url();
......@@ -8,11 +9,11 @@ if ($_POST) {
$code = $_POST['code'];
$password = $_POST['password'];
if (!$phone) {
$context['phoneError'] = '请输入11位手机号';
$context['error'] = '请输入11位手机号';
} else if (!$code) {
$context['codeError'] = '请输入验证码';
$context['error'] = '请输入验证码';
} else if (!$password) {
$context['passwordError'] = '请输入密码';
$context['error'] = '请输入密码';
} else {
$search_code = dao::search_tospur_verify($phone, $code);
if ($code == $search_code) {
......@@ -22,16 +23,15 @@ if ($_POST) {
$creds['user_login'] = $phone;
$creds['user_password'] = $password;
$creds['remember'] = true;
echo '注册成功';
$user = wp_signon($creds, false);
if (!is_wp_error($user)) {
echo '自动登录,跳转页面';
wp_redirect($const_my_page);
}
} else {
$context['phoneError'] = '抱歉,用户名已存在';
$context['error'] = '抱歉,用户名已存在';
}
} else {
$context['codeError'] = '请输入正确的验证码';
$context['error'] = '请输入正确的验证码';
}
}
}
......
......@@ -5,10 +5,7 @@ $context['theme'] = get_template_directory_uri();
$context['url'] = home_url();
$current_user = wp_get_current_user();
$user_id = $current_user->ID;
if ($user_id == 0) {
wp_redirect(get_site_url()."?page=login");
exit;
}else{
if ($user_id != 0) {
$date = current_time('Y-m-d');
$datetime = new DateTime($cureent_time . '+1 day');
$date = $datetime->format('Y-m-d');
......@@ -21,6 +18,9 @@ if ($user_id == 0) {
$context['house_id'] = $_GET['house_id'];
$context['consultant_id'] = $_GET['consultant_id'];
Timber::render('view.html', $context);
}else{
wp_redirect(get_site_url()."?page=login");
exit;
}
......
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title></title>
<style></style>
<script src="{{ theme }}/js/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('#submit').click(function () {
var content = $('#content').val();
if (content.trim() == '') {
alert('请输入评论内容!');
}
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=submit_comment',
success: function (data) {
}
});
});
});
</script>
</head>
<body>
</body>
</html>
\ No newline at end of file
......@@ -2,37 +2,237 @@
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="viewport" content="width=360, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title></title>
<style></style>
<link rel="stylesheet" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ theme }}/css/star-rating.min.css">
<script src="{{ theme }}/js/jquery.min.js"></script>
<script src="{{ theme }}/js/star-rating.min.js"></script>
<script>
<title>置业顾问信息</title>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/consultantShop.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/star-rating.min.css">
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/star-rating.min.js"></script>
</head>
<body>
<div class="jumbotron">
<ul class="list-unstyled">
<li class="col-xs-4 text-center">
<img src="{{ consultant.imageUrl }}" data-attr="">
</li>
<li class="col-xs-8">
<p>{{ consultant.display_name }}</p>
<div class="star-rating rating-xs rating-disabled" style="font-size:12px;">
<div class="rating-container rating-gly-star" data-content="">
<div class="rating-stars" data-content="" style="width: {{ consultant.average_score*20 }}%;" data-attr="score"></div>
</div>
</div>
<p>同策房屋</p>
</li>
</ul>
<h4>诚信宣言</h4>
<div id="people_wrapper">
<div id="people_scroller">
{{ consultant.introduction }}
</div>
</div>
</div>
<ul id="tab" class="list-unstyled btn-group-justified tab">
<li class="btn-group active">
<a href="#new" data-toggle="tab" class="btn">新房</a>
</li>
<li class="btn-group">
<a href="#secondhand" data-toggle="tab" class="btn">二手房</a>
</li>
<li class="btn-group">
<a href="#rent" data-toggle="tab" class="btn">租房</a>
</li>
</ul>
<div id="wrapper">
<div id="scroller" class="tab-content">
<div class="tab-pane fade in active" data-house="0" id="new"></div>
<div class="tab-pane fade" data-house="1" id="secondhand"></div>
<div class="tab-pane fade" data-house="2" id="rent"></div>
</div>
</div>
<footer class="footer navbar-fixed-bottom">
<button type="button" class="btn btn-wechat"><span></span>微信联系</button>
<button type="button" class="btn btn-phone"><span></span>电话联系</button>
</footer>
<div class="loading" id="loading" style="display: none;">
<ul class="list-unstyled">
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
</ul>
</div>
<div id="template_0" style="display: none">
<p>
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="address">
<span data-attr="name"></span>
<span class="pull-right" data-attr="type"></span>
</li>
<li data-attr="address"></li>
<li data-attr="latest_news"></li>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<div id="template_1" style="display: none">
<p>
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit" data-attr="name"></li>
<li data-attr="community"></li>
<li>
<span data-attr="apartment"></span>
<span data-attr="covered_area"></span>
</li>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<div id="template_2" style="display: none">
<p>
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit" data-attr="name"></li>
<li data-attr="community"></li>
<li>
<span data-attr="apartment"></span>
<span data-attr="decoration"></span>
<span data-attr="covered_area"></span>
</li>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<script>
var houseType = 0;
var userId = '{{ consultant_id }}';
var index = 0;
var myScroll;
var template;
var loading;
$(document).ready(function () {
var score = $('#score');
score.rating({
size: 'xs',
showClear: false,
showCaption: false,
hoverEnabled: false,
readonly: true
var tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html();
loading = $('#loading');
ajax_get_house(tabPane);
var pullUpFlag = false;
var peopleScroll = new IScroll('#people_wrapper');
myScroll = new IScroll('#wrapper', {
scrollbars: true,
click: true
});
var consultant_score = {{ consultant_score }};
var decimal = consultant_score % 0.5;
score.rating('update', consultant_score - decimal);
myScroll.on("scrollStart", function () {
if (this.maxScrollY >= this.y) {
pullUpFlag = true;
}
});
</script>
</head>
<body>
<p>{{ consultant_name }}</p>
<label for="score">星级</label>
<input type="hidden" id="score" name="score">
<input type="hidden" name="consultant_id" value="{{ consultant_id }}">
<a href="{{ consultant_score_url }}">评分</a>
<br>
myScroll.on("scrollEnd", function () {
if (pullUpFlag) {
pullUpFlag = false;
ajax_get_house(tabPane);
}
});
var aTab = $('a[data-toggle=tab]');
aTab.on('show.bs.tab', function (e) {
if (e) {
var previous = $(e.relatedTarget).parent().index();
$('[data-house=' + previous + ']').html('');
houseType = $(e.target).parent().index();
tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html();
index = 0;
myScroll.scrollTo(0, 0);
setTimeout(function () {
myScroll.refresh();
ajax_get_house(tabPane);
}, 200);
}
})
});
function ajax_get_house(tabPane) {
loading.show();
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=get_my_house&houseType=' + houseType + '&userType=1&userId=' + userId + '&index=' + index,
success: function (data) {
loading.hide();
if (data.code == 2000) {
$.each(data.result, function (index, value) {
if(data.tags)
var data_tags = data.tags[value.id];
if(data.images)
var data_images = data.images[value.id];
var div = $('<div class="row">');
div.append(template);
div.find('[data-attr=name]').text(value.name);
var tags = div.find('[data-attr=tags]');
if (houseType == 0) {
div.find('[data-attr=type]').text(value.literal);
div.find('[data-attr=address]').text(value.address);
div.find('[data-attr=latest_news]').text(value.latest_news);
div.find('[data-attr=price]').html('<em>' + (value.average_price / 10000).toFixed(2) + '万</em>/m<em>2</em>');
} else if (houseType == 1) {
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=price]').html('<em>' + value.total_price + '万</em>');
} else if (houseType == 2) {
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=decoration]').text(value.decoration);
div.find('[data-attr=price]').html('<em>' + value.rent + '</em>/月');
}
var image = div.find('[data-attr=image]');
if (data_images) {
image.attr('src', data_images);
}
if (data_tags) {
$.each(data_tags, function (k, v) {
tags.prepend('<span class="label">' + v + '</span>');
});
}
tabPane.append(div);
});
index += 10;
myScroll.refresh();
} else {
}
}
});
}
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=360, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title>置业顾问</title>
<link rel="stylesheet" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ theme }}/css/consultantList.css">
<link rel="stylesheet" href="{{ theme }}/css/star-rating.min.css">
<script src="{{ theme }}/js/iscroll.js"></script>
<script src="{{ theme }}/js/jquery.min.js"></script>
<script src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script src="{{ theme }}/js/star-rating.min.js"></script>
</head>
<body>
<div class="search">
<div class="btn-group pull-left" id="cityGroup">
<a class="btn" id="cityName">{{ city_name }}<i class="iconfont"></i></a>
<div id="city_wrapper" class="dropdown-menu">
<div id="city_scroller">
{% for item in city %}
<a href="{{ url }}/?page=consultant_list&city_id={{ item.id }}"{% if(item.id==city_id) %} class="active"{% endif %}>{{ item.value }}</a>
{% endfor %}
</div>
</div>
</div>
</div>
<div id="wrapper">
<div id="scroller">
<ul class="list-unstyled" id="consultantList"></ul>
</div>
</div>
<div id="template" style="display: none">
<ol class="col-xs-3">
<img data-attr="image">
</ol>
<ol class="col-xs-4">
<p data-attr="name"></p>
<div class="star-rating rating-xs rating-disabled" style="font-size:12px;">
<div class="rating-container rating-gly-star" data-content="">
<div class="rating-stars" data-content="" style="" data-attr="score"></div>
</div>
</div>
<p>同策房屋</p>
</ol>
<ol class="col-xs-5">
<a class="btn btn-phone" data-attr="mobile">
<span></span>电话联系
</a>
</ol>
</div>
<div class="loading" id="loading" style="display: none;">
<ul class="list-unstyled">
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
</ul>
</div>
<script>
var index = 0;
var cityScroll;
var myScroll;
var template;
var consultant_info_url = '{{ url }}/?page=consultant_info';
var loading;
$(document).ready(function () {
loading = $('#loading');
$('#cityGroup').tap(function () {
var self = $(this);
if(self.hasClass('open')){
self.removeClass('open');
}else{
self.addClass('open');
}
cityScroll.refresh();
});
var pullUpFlag = false;
cityScroll = new IScroll('#city_wrapper',{
click: true
});
myScroll = new IScroll('#wrapper',{
click: true
});
myScroll.on("scrollStart", function () {
console.log(this.maxScrollY);
console.log(this.y);
if (this.maxScrollY >= this.y) {
pullUpFlag = true;
}
});
myScroll.on("scrollEnd", function () {
if (pullUpFlag) {
pullUpFlag = false;
ajax_get_consultant();
}
});
template = $('#template').html();
ajax_get_consultant();
});
function ajax_get_consultant() {
loading.show();
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=get_consultant&city_id={{ city_id }}&index=' + index,
success: function (data) {
loading.hide();
if (data.code == 2000) {
$.each(data.result, function (index, value) {
var li = $('<li>');
li.append(template);
li.find('[data-attr=name]').text(value.display_name);
li.find('[data-attr=score]').attr('style', 'width: '+ value.average_score*20+'%');
li.find('[data-attr=image]').attr('src', value.imageUrl);
var infoUrl;
if(value.mobile){
li.find('[data-attr=mobile]').attr('href', 'tel:' + value.mobile);
infoUrl = consultant_info_url + '&consultant_id=' + value.id + '&mobile=' + value.mobile;
}else{
li.find('[data-attr=mobile]').attr('disabled',true);
infoUrl = consultant_info_url + '&consultant_id=' + value.id;
}
li.tap(function(e){
window.location.href = infoUrl;
});
$('#consultantList').append(li);
});
$('input[data-attr=score]').rating({
size: 'xs',
showClear: false,
showCaption: false,
hoverEnabled: false,
readonly: true
});
index += 20;
myScroll.refresh();
} else {
}
}
});
}
</script>
</body>
</html>
\ No newline at end of file
......@@ -45,6 +45,12 @@
$(document).ready(function(){
$("#slider").bind("tap",function(){
$("#carousel_wrapper").parent().show();
var carousel = $("#carousel_wrapper");
var carouselWidth = carousel.width();
carousel.find("#carousel_scroller ul li").css({"width":carouselWidth});
carousel.find("#carousel_indicator li").removeClass("carousel_active");
carousel.find("#carousel_indicator li:first").addClass("carousel_active");
carouselScroll = new IScroll('#carousel_wrapper', {
bounce: false,
scrollX: true,
......@@ -58,11 +64,6 @@
$("#carousel_indicator li").removeClass("carousel_active");
$("#carousel_indicator li").eq(this.currentPage.pageX).addClass("carousel_active");
});
var carousel = $("#carousel_wrapper");
var carouselWidth = carousel.width();
carousel.find("#carousel_scroller ul li").css({"width":carouselWidth});
carousel.find("#carousel_indicator li").removeClass("carousel_active");
carousel.find("#carousel_indicator li:first").addClass("carousel_active");
return false;
});
$("#carousel_wrapper").parent().bind("click",function(){
......@@ -214,13 +215,11 @@
</ol>
<ol class="col-xs-4">
<p>{{item.name}}</p>
<p>
<div class="star-rating rating-xs rating-disabled" style="font-size:12px;">
<div class="star-rating rating-xs rating-disabled" style="font-size:16px;height:25px;">
<div class="rating-container rating-gly-star" data-content="">
<div class="rating-stars" data-content="" style="width: {{item.average_score*2*10}}%;"></div>
</div>
</div>
</p>
</ol>
<ol class="col-xs-6">
{% if not item.mobile %}
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="viewport" content="width=360, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
......@@ -28,6 +28,18 @@
scrollbars: true,
click: true
});
var pullUpFlag = false;
myScroll.on("scrollStart", function () {
if (this.maxScrollY >= this.y) {
pullUpFlag = true;
}
});
myScroll.on("scrollEnd", function () {
if (pullUpFlag) {
pullUpFlag = false;
getHouse();
}
});
scrollList.push(myScroll);
cityScroll = new IScroll('#city_wrapper',{
click: true
......@@ -59,13 +71,15 @@
var room = {{select.room}};
var area = {{select.area}};
var scroller;
$(document).ready(function(){
scroller = $('#scroller');
$(".btn-group > a").bind('tap',function(){
var parent = $(this).parent();
if(parent.hasClass("open")){
$(".btn-group").removeClass("open");
}else{
$(".btn-group").removeClass("open");
//$(".btn-group").removeClass("open");
parent.addClass("open");
}
$.each(scrollList,function(i,item){
......@@ -90,13 +104,13 @@
$.each(other_item,function(i,item){
other.append('<a data-id="'+item[roomAndAcreageKey]+'">'+item.value+'</a>');
});
other.attr("type","room");
$("#room,#acreage").bind('tap',function(){
other.attr("type","roomId");
$("#roomId,#acreage").bind('tap',function(){
$(this).parent().children().removeClass('active-bg');
$(this).addClass('active-bg');
var id = $(this).attr('id');
other.children(":not(:first)").remove();
if(id == 'room'){
if(id == 'roomId'){
other_item = room;
other.attr("type","roomId");
roomAndAcreageKey = "id";
......@@ -111,37 +125,82 @@
});
otherScroll.refresh();
});
$(".btn-group").on('tap','a',function(){
$(".btn-group").on('tap','.dropdown-menu a',function(){
searchData.index = 0;
if($(this).parent().attr("type")!=undefined){
searchData[$(this).parent().attr("type")] = $(this).attr("data-id")!=undefined?$(this).attr("data-id"):0;
searchData[$(this).parent().attr("type")] = $(this).attr("data-id")!=undefined?$(this).attr("data-id"):-1;
if($(this).attr("data-action") != "open"){
//do somthing
$(".btn-group").removeClass("open");
console.log(JSON.stringify(searchData));
scroller.html('');
getHouse();
}
}
});
getHouse();
});
var searchData = {
action:"searchHouse",
action:"search_house",
cityId:{{cityId}},
districtId:0,
plateId:0,
totalPrice:'',
buildPropertyId:0,
roomId:0,
acreage:'',
searchText:''
districtId:-1,
plateId:-1,
totalPrice:-1,
buildPropertyId:-1,
roomId:-1,
acreage:-1,
searchText:'',
index:0
};
function getHouse(){
$.ajax({
type: "GET",
type: "POST",
url: "/tospur/wp-admin/admin-ajax.php",
data: searchData,
success:function(json){
alert(JSON.stringify(json));
success:function(data){
if (data.code == 2000) {
$.each(data.result, function (index, value) {
var houseType= value.house_type;
var template = $('#template_' + houseType).html();
if(data.tags)
var data_tags = data.tags[value.id];
if(data.images)
var data_images = data.images[value.id];
var div = $('<div class="row">');
div.append(template);
div.find('[data-attr=name]').text(value.name);
var tags = div.find('[data-attr=tags]');
if (houseType == 0) {
div.find('[data-attr=type]').text(value.literal);
div.find('[data-attr=address]').text(value.address);
div.find('[data-attr=latest_news]').text(value.latest_news);
div.find('[data-attr=price]').html('<em>' + (value.average_price / 10000).toFixed(2) + '万</em>/m<em>2</em>');
} else if (houseType == 1) {
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=price]').html('<em>' + value.total_price + '万</em>');
} else if (houseType == 2) {
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=decoration]').text(value.decoration);
div.find('[data-attr=price]').html('<em>' + value.rent + '</em>/月');
}
var image = div.find('[data-attr=image]');
if (data_images) {
image.attr('src', data_images);
}
if (data_tags) {
$.each(data_tags, function (k, v) {
tags.prepend('<span class="label">' + v + '</span>');
});
}
scroller.append(div);
});
searchData.index += 10;
myScroll.refresh();
}
}
});
}
......@@ -214,7 +273,7 @@
<div class="dropdown-menu">
<div class="col-xs-5 left-menu">
<div>
<a id="room" class="active-bg">类型</a>
<a id="roomId" class="active-bg">类型</a>
<a id="acreage">面积</a>
</div>
</div>
......@@ -230,143 +289,61 @@
<div id="wrapper">
<div id="scroller">
<div>
<p>
<img src="../img/img.jpg">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit">买卖二手房,只收0.5%的佣金,让您满意服务。买卖二手房,只收0.5%的佣金,让
您满意服务。</li>
<li>宝瓶小区</li>
<li>
<span>2室1厅</span>
<span style="margin-left:20px;">54平米</span>
</li>
<li>
<span class="label">地铁房</span>
<span class="label">学区房</span>
<span class="label">一手房</span>
<span class="pull-right">
<em>140万</em>
</span>
</li>
</ul>
</div>
<div>
<p>
<img src="../img/img.jpg">
</p>
<ul class="list-unstyled">
<li>
<span>张江公馆</span>
<span class="pull-right">别墅</span>
</li>
<li>高科中路2810弄(近镇宁路)浦东高.</li>
<li>促销活动:7/30-8/1 房源紧张,尽早</li>
<li>
<span class="label">地铁房</span>
<span class="label">学区房</span>
<span class="label">全装修</span>
<span class="pull-right">
<em>2.35万</em>/m<em>2</em>
</span>
</li>
</ul>
</div>
<div>
</div>
<footer class="footer text-center navbar-fixed-bottom">
拨打400-123-4567
</footer>
<div id="template_0" style="display: none">
<p>
<img src="../img/img.jpg">
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit">买卖二手房,只收0.5%的佣金,让您满意服务。买卖二手房,只收0.5%的佣金,让
您满意服务。</li>
<li>宝瓶小区</li>
<li>
<span>2室1厅</span>
<span style="margin-left:20px;">54平米</span>
<li class="address">
<span data-attr="name"></span>
<span class="pull-right" data-attr="type"></span>
</li>
<li>
<span class="label">地铁房</span>
<span class="label">学区房</span>
<span class="label">一手房</span>
<span class="pull-right">
<em>140万</em>
</span>
<li data-attr="address"></li>
<li data-attr="latest_news"></li>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<div>
<p>
<img src="../img/img.jpg">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit">买卖二手房,只收0.5%的佣金,让您满意服务。买卖二手房,只收0.5%的佣金,让
您满意服务。</li>
<li>宝瓶小区</li>
<li>
<span>2室1厅</span>
<span style="margin-left:20px;">54平米</span>
</li>
<li>
<span class="label">地铁房</span>
<span class="label">学区房</span>
<span class="label">一手房</span>
<span class="pull-right">
<em>140万</em>
</span>
</li>
</ul>
</div>
<div>
</div>
<div id="template_1" style="display: none">
<p>
<img src="../img/img.jpg">
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit">买卖二手房,只收0.5%的佣金,让您满意服务。买卖二手房,只收0.5%的佣金,让
您满意服务。</li>
<li>宝瓶小区</li>
<li class="multiLine_omit" data-attr="name"></li>
<li data-attr="community"></li>
<li>
<span>2室1厅</span>
<span style="margin-left:20px;">54平米</span>
<span data-attr="apartment"></span>
<span data-attr="covered_area"></span>
</li>
<li>
<span class="label">地铁房</span>
<span class="label">学区房</span>
<span class="label">一手房</span>
<span class="pull-right">
<em>140万</em>
</span>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<div>
</div>
<div id="template_2" style="display: none">
<p>
<img src="../img/img.jpg">
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit">买卖二手房,只收0.5%的佣金,让您满意服务。买卖二手房,只收0.5%的佣金,让
您满意服务。</li>
<li>宝瓶小区</li>
<li class="multiLine_omit" data-attr="name"></li>
<li data-attr="community"></li>
<li>
<span>2室1厅</span>
<span style="margin-left:20px;">54平米</span>
<span data-attr="apartment"></span>
<span data-attr="decoration"></span>
<span data-attr="covered_area"></span>
</li>
<li>
<span class="label">地铁房</span>
<span class="label">学区房</span>
<span class="label">一手房</span>
<span class="pull-right">
<em>140万</em>
</span>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
</div>
</div>
<footer class="footer text-center navbar-fixed-bottom">
拨打400-123-4567
</footer>
</body>
</html>
\ No newline at end of file
......@@ -7,10 +7,63 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title></title>
<style></style>
<script src="{{ theme }}/js/jquery.min.js"></script>
<script src="{{ theme }}/js/public.js"></script>
<script>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bookingList.css">
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
</head>
<body>
{% if result %}
<div id="wrapper">
<div id="scroller">
{% for item in result %}
<ul class="list-unstyled">
<li>
<p>楼盘名:{{ item.name }}</p>
<p>预约时间:{{ item.date }} {{ item.time }}</p>
{% if item.consultant_id %}
{% if item.handle==0 %}
<p>未接受</p>
{% else %}
<p>已接受</p>
{% endif %}
{% endif %}
{% if item.user_id %}
{% if item.handle==0 %}
<p data-name="handle" data-id="{{ item.id }}">接受</p>
{% else %}
<p>已接受</p>
{% endif %}
{% endif %}
</li>
</ul>
{% else %}
{{ message }}
{% endfor %}
</div>
</div>
{% else %}
<div class="modal fade" id="myModal">
<div class="modal-dialog modal-booking">
<div class="modal-content text-center">
<h3>您还未预约过看房信息。<br>马上去预约看房!</h3>
<ul class="list-unstyled">
<li>新房<i class="iconfont"></i></li>
<li>二手房<i class="iconfont"></i></li>
<li>租房<i class="iconfont"></i></li>
</ul>
</div>
</div>
</div>
{% endif %}
<script>
$(document).ready(function () {
{% if result %}
var myScroll = new IScroll('#wrapper',{
scrollbars: true,
click: true
});
$('[data-name=handle]').click(function () {
var self = $(this);
var id = self.data('id');
......@@ -20,7 +73,7 @@
data: 'action=handle_view_house&id=' + id,
success: function (data) {
if (data.code == 2000) {
self.parent().html('已接受');
self.html('已接受');
alert('接受成功');
} else {
alert('接受失败');
......@@ -28,40 +81,14 @@
}
});
});
{% if message %}
alert('{{ message }}');
{% endif %}
});
</script>
</head>
<body>
{% for item in result %}
<div>
<ul>
<li>楼盘 {{ item.house_id }}</li>
<li>预约时间 {{ item.date }} {{ item.time }}</li>
<!--用户 约看清单-->
{% if item.consultant_id %}
<li>置业顾问 {{ item.consultant_id }}</li>
{% if item.handle==0 %}
<li>未接受</li>
{% else %}
<li>接受</li>
{% endif %}
{% endif %}
<!--置业顾问 约看清单-->
{% if item.user_id %}
<li>用户 {{ item.user_id }}</li>
{% if item.handle==0 %}
<li>
<button data-name="handle" data-id="{{ item.id }}">接受</button>
</li>
{% else %}
<li>已接受</li>
{% endif %}
var myModal = $('#myModal');
myModal.modal('show');
myModal.find('li').click(function(){
window.location.href = '{{ url }}';
});
{% endif %}
</ul>
</div>
{% endfor %}
});
</script>
</body>
</html>
\ No newline at end of file
......@@ -41,6 +41,10 @@
myModal.on('hide.bs.modal',function(){
notice.children().remove();
});
{% if(error) %}
notice.html('<span>{{ error }}</span>');
myModal.modal('show');
{% endif %}
});
</script>
</head>
......
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=360, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title>我的楼盘</title>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/myHouse.css">
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
</head>
<body>
<ul id="tab" class="list-unstyled btn-group-justified tab">
<li class="btn-group active">
<a href="#new" data-toggle="tab" class="btn">新房</a>
</li>
<li class="btn-group">
<a href="#secondhand" data-toggle="tab" class="btn">二手房</a>
</li>
<li class="btn-group">
<a href="#rent" data-toggle="tab" class="btn">租房</a>
</li>
</ul>
<div id="wrapper">
<div id="scroller" class="tab-content">
<div class="tab-pane fade in active" data-house="0" id="new"></div>
<div class="tab-pane fade" data-house="1" id="secondhand"></div>
<div class="tab-pane fade" data-house="2" id="rent"></div>
</div>
</div>
<div class="loading" id="loading" style="display: none;">
<ul class="list-unstyled">
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
</ul>
</div>
<div id="template_0" style="display: none">
<p>
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="address">
<span data-attr="name"></span>
<span class="pull-right" data-attr="type"></span>
</li>
<li data-attr="address"></li>
<li data-attr="latest_news"></li>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<div id="template_1" style="display: none">
<p>
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit" data-attr="name"></li>
<li data-attr="community"></li>
<li>
<span data-attr="apartment"></span>
<span data-attr="covered_area"></span>
</li>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<div id="template_2" style="display: none">
<p>
<img src="" data-attr="image">
</p>
<ul class="list-unstyled">
<li class="multiLine_omit" data-attr="name"></li>
<li data-attr="community"></li>
<li>
<span data-attr="apartment"></span>
<span data-attr="decoration"></span>
<span data-attr="covered_area"></span>
</li>
<li data-attr="tags">
<span class="pull-right" data-attr="price"></span>
</li>
</ul>
</div>
<script>
var houseType = 0;
var userId = '{{ user_id }}';
var index = 0;
var myScroll;
var template;
var loading;
$(document).ready(function () {
var tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html();
loading = $('#loading');
ajax_get_my_house(tabPane);
var pullUpFlag = false;
myScroll = new IScroll('#wrapper', {
scrollbars: true,
click: true
});
myScroll.on("scrollStart", function () {
if (this.maxScrollY >= this.y) {
pullUpFlag = true;
}
});
myScroll.on("scrollEnd", function () {
if (pullUpFlag) {
pullUpFlag = false;
ajax_get_my_house(tabPane);
}
});
var aTab = $('a[data-toggle=tab]');
aTab.on('show.bs.tab', function (e) {
if (e) {
var previous = $(e.relatedTarget).parent().index();
$('[data-house=' + previous + ']').html('');
houseType = $(e.target).parent().index();
tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html();
index = 0;
myScroll.scrollTo(0, 0);
setTimeout(function () {
myScroll.refresh();
ajax_get_my_house(tabPane);
}, 200);
}
})
});
function ajax_get_my_house(tabPane) {
loading.show();
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=get_my_house&houseType=' + houseType + '&userType=0&userId=' + userId + '&index=' + index,
success: function (data) {
loading.hide();
if (data.code == 2000) {
$.each(data.result, function (index, value) {
if(data.tags)
var data_tags = data.tags[value.id];
if(data.images)
var data_images = data.images[value.id];
var div = $('<div class="row">');
div.append(template);
div.find('[data-attr=name]').text(value.name);
var tags = div.find('[data-attr=tags]');
if (houseType == 0) {
div.find('[data-attr=type]').text(value.literal);
div.find('[data-attr=address]').text(value.address);
div.find('[data-attr=latest_news]').text(value.latest_news);
div.find('[data-attr=price]').html('<em>' + (value.average_price / 10000).toFixed(2) + '万</em>/m<em>2</em>');
} else if (houseType == 1) {
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=price]').html('<em>' + value.total_price + '万</em>');
} else if (houseType == 2) {
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=decoration]').text(value.decoration);
div.find('[data-attr=price]').html('<em>' + value.rent + '</em>/月');
}
var image = div.find('[data-attr=image]');
if (data_images) {
image.attr('src', data_images);
}
if (data_tags) {
$.each(data_tags, function (k, v) {
tags.prepend('<span class="label">' + v + '</span>');
});
}
tabPane.append(div);
});
index += 10;
myScroll.refresh();
} else {
}
}
});
}
</script>
</body>
</html>
\ No newline at end of file
......@@ -50,6 +50,10 @@
notice.children().remove();
});
sendCodeBindClick("{{ url }}", 0);
{% if(error) %}
notice.html('<span>{{ error }}</span>');
myModal.modal('show');
{% endif %}
});
</script>
</head>
......@@ -61,19 +65,19 @@
<p class="has-feedback username">
<label for="phone" class="sr-only">用户名</label>
<input type="tel" name="phone" id="phone" class="form-control input-lg" placeholder="手机号码">
<input tabindex="1" type="tel" name="phone" id="phone" class="form-control input-lg" placeholder="手机号码">
<span class="form-control-feedback"></span>
</p>
<p class="has-feedback password">
<label for="password" class="sr-only">密码</label>
<input type="password" name="password" id="password" class="form-control input-lg" placeholder="密码">
<input tabindex="2" type="password" name="password" id="password" class="form-control input-lg" placeholder="密码">
<span class="form-control-feedback"></span>
</p>
<p class="has-feedback code">
<label for="code" class="sr-only">验证码</label>
<input type="text" name="code" id="code" class="form-control input-lg" placeholder="验证码">
<input tabindex="3" type="text" name="code" id="code" class="form-control input-lg" placeholder="验证码">
<span id="send" class="form-control-feedback">发送验证码</span>
</p>
<input type="submit" id="register_submit" value="注册" class="btn btn-lg btn-block">
......
......@@ -2,11 +2,12 @@
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="viewport" content="width=360, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title></title>
<style></style>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bookingSeeHouse.css">
<script src="{{ theme }}/js/jquery.min.js"></script>
<script src="{{ theme }}/js/jquery.validate.js"></script>
<script src="{{ theme }}/js/date-selector.js"></script>
......@@ -14,15 +15,23 @@
<script>
$(document).ready(function () {
var ds = new DateSelector('year', 'month', 'day', {
MaxYear: new Date().getFullYear() + 1,
onChange: function () {
$('#date').val(this.Year + '-' + this.Month + '-' + this.Day);
}
MaxYear: new Date().getFullYear() + 1
});
ds.onChange();
var inputDate = $('#date');
var viewForm = $('#viewForm');
viewForm.submit(function () {
var dayValue = Number($('input[name=day]:checked').val());
var date = new Date();
switch (dayValue) {
case 3:
inputDate.val(ds.Year + '-' + ds.Month + '-' + ds.Day);
break;
default:
date.setTime(date.getTime() + dayValue * 24 * 60 * 60 * 1000);
inputDate.val(date.Format('yyyy-MM-dd'));
break;
}
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
......@@ -41,29 +50,58 @@
</script>
</head>
<body>
<form id="viewForm" method="post">
<div>
<label for="jt">今天</label>
<input type="radio" name="day" id="jt" value="0"/>
<label for="mt">明天</label>
<input type="radio" name="day" id="mt" value="1"/>
<label for="ht">后天</label>
<input type="radio" name="day" id="ht" value="2"/>
</div>
<div>
<p>指定日期</p>
<div class="main">
<form id="viewForm" method="post">
<p class="">看房时间</p>
<ul class="list-unstyled">
<li>
<label for="jt" class="col-xs-4">
<input type="radio" name="day" id="jt" value="0" checked>
<span></span>今天
</label>
<label for="mt" class="col-xs-4">
<input type="radio" name="day" id="mt" value="1">
<span></span>明天
</label>
<label for="ht" class="col-xs-4 ">
<input type="radio" name="day" id="ht" value="2">
<span></span>后天
</label>
</li>
<p>
<li>
<label class="col-xs-5">
<input type="radio" name="day" value="3">
<span></span>指定日期
</label>
<p class="col-xs-7">
<select id="year">
<option value="2015">2015</option>
<option value="2016">2016</option>
</select>
<label for="year"></label>
<select id="year"></select>
<select id="month">
<option value="8">8</option>
<option value="9">9</option>
</select>
<label for="month"></label>
<select id="month"></select>
<select id="day">
<option value="8">14</option>
<option value="9">15</option>
</select>
<label for="day"></label>
<select id="day"></select>
</p>
</div>
<div>
<label for="index">选择时间</label>
</li>
<li>
<label for="index" class="col-xs-5">
<span class="time"></span>看房时段
</label>
<p class="col-xs-7">
<select id="index" name="index">
<option value="0">9:00-10:00</option>
<option value="1">10:00-11:00</option>
......@@ -74,15 +112,15 @@
<option value="6">15:00-16:00</option>
<option value="7">16:00-17:00</option>
</select>
</div>
</p>
</li>
</ul>
<input type="hidden" name="date" id="date" value="">
<input type="hidden" name="user_id" value="{{ user_id }}">
<input type="hidden" name="house_id" value="{{ house_id }}">
<input type="hidden" name="consultant_id" value="{{ consultant_id }}">
<p class="submit">
<input type="submit" id="view_submit" value="提交">
</p>
</form>
<input type="submit" id="view_submit" value="提交" class="btn btn-lg">
</form>
</div>
</body>
</html>
\ No newline at end of file
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