Commit 965b462c by shz

tospur

parent 43432316
# BEGIN WordPress # BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /tospur/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /tospur/index.php [L]
</IfModule>
# END WordPress # END WordPress
<?php <?php
require_once(PLUGIN_DIR . 'Dao/SearchDao.php'); require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
require_once(PLUGIN_DIR . 'Dao/InsertDao.php');
require_once(PLUGIN_DIR . 'Tools/Image.php'); require_once(PLUGIN_DIR . 'Tools/Image.php');
require_once(PLUGIN_DIR . 'Tools/Core.php'); require_once(PLUGIN_DIR . 'Tools/Core.php');
class House { class House {
...@@ -35,14 +36,23 @@ class House { ...@@ -35,14 +36,23 @@ class House {
'city_id' => $_POST['baseCity'], 'city_id' => $_POST['baseCity'],
'district_id' => $_POST['baseAreaId'], 'district_id' => $_POST['baseAreaId'],
'plate_id' => $_POST["basePlateId"], 'plate_id' => $_POST["basePlateId"],
"room_id" => $_POST["baseRoom"], 'room_id' => $_POST['baseRoom'],
"location" => $_POST["location"],
'status' =>$_POST['status'],
"property_money" => $_POST["property_money"], "property_money" => $_POST["property_money"],
'community_name' => $_POST["community_name"], 'community_name' => $_POST["community_name"],
); );
$wpdb->query("START TRANSACTION"); $wpdb->query("START TRANSACTION");
if(isset($_POST['houseId'])){ if(isset($_POST['houseId'])){
$result = House::data_update($_POST['houseId'],$insert_tospur_house_array); $result = House::data_update($_POST['houseId'],$insert_tospur_house_array);
if($result != 203){
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
echo "新房房源修改失败";
}else{
$wpdb->query("COMMIT"); $wpdb->query("COMMIT");
echo "新房房源修改成功";
}
}else{ }else{
$result = House::data_insert($insert_tospur_house_array); $result = House::data_insert($insert_tospur_house_array);
if($result != 200){ if($result != 200){
...@@ -60,18 +70,24 @@ class House { ...@@ -60,18 +70,24 @@ class House {
$context = array_merge($context,SearchDao::getDetailInfo($_GET['id'],"edit")); $context = array_merge($context,SearchDao::getDetailInfo($_GET['id'],"edit"));
$context["district"] = SearchDao::searchCity($context['result']->city_id); $context["district"] = SearchDao::searchCity($context['result']->city_id);
$context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id); $context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id);
$context["mark"] = SearchDao::searchHouseTag($_GET['id']);
} }
$context['role'] = SecHandHouse::getCurrentRole();
$context["city"] = SearchDao::searchCity(); $context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty(); $context["buildProperty"] = SearchDao::searchBuildProperty();
$context["room"] = SearchDao::searchRoom(); $context["room"] = SearchDao::searchRoom();
$context["photoType"] = SearchDao::searchPhotoType(); $context["photoType"] = SearchDao::searchPhotoType();
$context["status"] = searchDao::searchStatusType(1);
Timber::render("newhouse.html",$context); Timber::render("newhouse.html",$context);
} }
public static function data_update($houseId,$insert_tospur_house_array){ public static function data_update($houseId,$insert_tospur_house_array){
global $wpdb; global $wpdb;
$data = $_POST["data"];
$wpdb->update(Config::TOSPUR_HOUSE_TABLE,$insert_tospur_house_array,array("id" => $houseId)); $wpdb->update(Config::TOSPUR_HOUSE_TABLE,$insert_tospur_house_array,array("id" => $houseId));
$result = 203;
$exist_ids = array(); $exist_ids = array();
if(isset($_POST['exists'])){
foreach($_POST['exists'] as $id => $item){ foreach($_POST['exists'] as $id => $item){
$wpdb->update(Config::A_DISTRICT_AREA_TABLE,array( $wpdb->update(Config::A_DISTRICT_AREA_TABLE,array(
"buildproperty_id" => $item['buildProperty'], "buildproperty_id" => $item['buildProperty'],
...@@ -87,15 +103,18 @@ class House { ...@@ -87,15 +103,18 @@ class House {
$delete_ids = implode(",",$delete_ids); $delete_ids = implode(",",$delete_ids);
$wpdb->query("delete from ".Config::A_DISTRICT_AREA_TABLE." where house_id = {$houseId} and image_id in ({$delete_ids});"); $wpdb->query("delete from ".Config::A_DISTRICT_AREA_TABLE." where house_id = {$houseId} and image_id in ({$delete_ids});");
$wpdb->query("delete from ".Config::A_HOUSE_IMAGE_TABLE." where house_id = {$houseId} and image_id in ({$delete_ids});"); $wpdb->query("delete from ".Config::A_HOUSE_IMAGE_TABLE." where house_id = {$houseId} and image_id in ({$delete_ids});");
House::addMainImage($houseId); }
InsertDao::addMainImage($houseId,$data);
$exists_photo_ids = array(); $exists_photo_ids = array();
if(isset($_POST['exists_photo'])){
foreach($_POST['exists_photo'] as $id => $item){ foreach($_POST['exists_photo'] as $id => $item){
$wpdb->update(Config::TOSPUR_IMAGE_TABLE,array( $wpdb->update(Config::TOSPUR_IMAGE_TABLE,array(
"image_type" => $item['type'], "image_type" => $item['type'],
),array("id" => $id)); ),array("id" => $id));
$exists_photo_ids[] = $id; $exists_photo_ids[] = $id;
} }
}
$old_exists_photo_ids = explode(",",$_POST['exists_photo_ids']); $old_exists_photo_ids = explode(",",$_POST['exists_photo_ids']);
$delete_photo_ids = array(); $delete_photo_ids = array();
foreach(array_diff($old_exists_photo_ids,$exists_photo_ids) as $key => $id){ foreach(array_diff($old_exists_photo_ids,$exists_photo_ids) as $key => $id){
...@@ -104,204 +123,54 @@ class House { ...@@ -104,204 +123,54 @@ class House {
$delete_photo_ids = implode(",",$delete_photo_ids); $delete_photo_ids = implode(",",$delete_photo_ids);
$wpdb->query("delete from ".Config::A_HOUSE_IMAGE_TABLE." where house_id = {$houseId} and image_id in ({$delete_photo_ids});"); $wpdb->query("delete from ".Config::A_HOUSE_IMAGE_TABLE." where house_id = {$houseId} and image_id in ({$delete_photo_ids});");
$wpdb->delete(Config::A_HOUSE_RECOMMEND_TABLE,array("house_id" => $houseId));
$res = InsertDao::addRecommend($houseId,$data);
if($res == 504){
$result = $res;
echo "推荐房源修改失败";
} }
private static function addMainImage($houseid){ $wpdb->delete(Config::A_HOUSE_USER_TABLE,array("house_id" => $houseId));
global $wpdb; $res = InsertDao::addRecConsultant($houseId,$data);
//图片信息 if($res == 505){
$uploadedfile = $_FILES['files']; $result = $res;
$data = $_POST["data"]; echo "推荐置业顾问修改失败";
print_r($data);
//主力房源的图片与房子信息关联插入数据库
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'])) {
$uploadFileName = end(explode("/",$url));
//上传成功后将图片信息存入tospur_image表
$insert_image_array = array(
'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) {
return 501;
}
//获取插入图片的id
$imgid = $wpdb->insert_id;
//房源类型、面积与图片关联表
if($data[$key]["type"] == "0"){
$houseTypeArea = array(
'house_id' => $houseid,
"buildproperty_id" => $data["$key"]["buildProperty"],
"house_area" => $data["$key"]["housearea"],
"image_id" => $imgid
);
$houseTypeAreaRes = $wpdb->insert('a_district_area', $houseTypeArea);
if (!$houseTypeAreaRes) {
return 502;
}
}
//将房源id与图片id储存到关联表中
$house_img_array = array(
'house_id' => $houseid,
'image_id' => $imgid,
);
$houseImgRes = $wpdb->insert('a_house_image', $house_img_array);
if (!$houseImgRes) {
return 503;
}
} else {
return $movefile['error'];
}
}
}
} }
InsertDao::addHouseTag($_POST['mark'],$houseId);
return $result;
} }
public static function data_insert($insert_tospur_house_array){ public static function data_insert($params){
global $wpdb; global $wpdb;
//房源与类型以及面积信息 //房源与类型以及面积信息
$data = $_POST["data"]; $data = $_POST["data"];
//获取新房信息,存入tospur_house表 //获取新房信息,存入tospur_house表
$insert_tospur_house_array['user_id'] = get_current_user_id(); $params['user_id'] = get_current_user_id();
$insert_tospur_house_array['creattime'] = date("Y-m-d H:i:s"); $params['creattime'] = date("Y-m-d H:i:s");
$insert_tospur_house_array['house_type'] = 0; $params['house_type'] = 0;
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE name="' . $_POST['housename'] . '" and address="' . $_POST['address'] . '"', OBJECT); $res = $wpdb->get_results('SELECT * FROM tospur_house WHERE name="' . $_POST['housename'] . '" and address="' . $_POST['address'] . '" and house_type=0', OBJECT);
if (!$res) { if (!$res) {
$houseRes = $wpdb->insert('tospur_house', $insert_tospur_house_array); $houseId = InsertDao::insert_tospur_house($params);
if (!$houseRes) {
return 500;
}
$houseid = $wpdb->insert_id;
if(!SearchDao::setHouseNumber($houseid,$insert_tospur_house_array['house_type'],$insert_tospur_house_array['city_id'])){
return 510;
}
//图片信息
$uploadedfile = $_FILES['files'];
//主力房源的图片与房子信息关联插入数据库
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'])) {
$uploadFileName = end(explode("/",$url));
//上传成功后将图片信息存入tospur_image表
$insert_image_array = array(
'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) {
return 501;
}
//获取插入图片的id
$imgid = $wpdb->insert_id;
//房源类型、面积与图片关联表
if($data[$key]["type"] == "0"){
$houseTypeArea = array(
'house_id' => $houseid,
"buildproperty_id" => $data["$key"]["buildProperty"],
"house_area" => $data["$key"]["housearea"],
"image_id" => $imgid
);
$houseTypeAreaRes = $wpdb->insert('a_district_area', $houseTypeArea);
if (!$houseTypeAreaRes) {
return 502;
}
}
//将房源id与图片id储存到关联表中
$house_img_array = array(
'house_id' => $houseid,
'image_id' => $imgid,
);
$houseImgRes = $wpdb->insert('a_house_image', $house_img_array);
if (!$houseImgRes) {
return 503;
}
} else {
return $movefile['error'];
}
}
}
}
if(isset($data["recommend"])){ InsertDao::addMainImage($houseId,$data);
//插入推荐房源id与添加新房id到关联表a_house_recommend
foreach($data["recommend"] as $value){ InsertDao::addRecommend($houseId,$data);
$a_house_recommendArray = array(
"house_id" => $houseid, InsertDao::addRecConsultant($houseId,$data);
"recommend_id" =>$value
); InsertDao::addHouseTag($_POST['mark'],$houseId);
$a_house_recommendRes = $wpdb->insert('a_house_recommend', $a_house_recommendArray);
if(!$a_house_recommendRes){
return 504;
}
}
}
if($data["recConsultant"]){
//插入推荐置业顾问user_id与新房id到关联表a_house_recommend
foreach($data["recConsultant"] as $val){
$a_house_userArray = array(
"user_id" => $val,
"house_id" => $houseid,
"user_type" =>1
);
$a_house_userRes = $wpdb->insert('a_house_user', $a_house_userArray);
if(!$a_house_userRes){
return 505;
}
}
}
}else{ }else{
return 506; return 506;
} }
return 200; return 200;
} }
public static function getCurrentRole(){
$current_user = wp_get_current_user();
if ( !($current_user instanceof WP_User) )
return;
$roles = $current_user->roles;
return $roles[0];
}
} }
\ No newline at end of file
<?php
class feature
{
public static function ajax_add_feature()
{
$name = $_POST['name'];
$array = array();
$result = feature::search_feature($name);
if ($result) {
$array['code'] = 2001;
} else {
feature::add_feature($name);
$array['code'] = 2000;
}
wp_send_json($array);
}
public static function search_feature($name = null)
{
global $wpdb;
$sql = "select id,name from " . Config::TOSPUR_TAG_TABLE . " where type = 1";
if ($name) {
$sql .= " and name = '" . $name . "'";
}
return $wpdb->get_results($sql);
}
public static function add_feature($name)
{
global $wpdb;
$result = $wpdb->insert(Config::TOSPUR_TAG_TABLE, array(
'name' => $name,
'type' => 1
));
return $result;
}
public static function add_feature_html()
{
$context = array();
$context['url'] = home_url();
$context['admin_url'] = admin_url();
Timber::render('add_feature.html', $context);
}
public static function feature_list_html()
{
$context = array();
$context['view'] = plugins_url() . '/tospur/Admin/views';
$context['result'] = feature::search_feature();
Timber::render('feature_list.html', $context);
}
}
?>
\ No newline at end of file
<?php
class introduction
{
public static function ajax_submit_introduction()
{
$introduction = $_POST['introduction'];
$user_id = $_POST['user_id'];
wp_send_json(introduction::submit_introduction($introduction, $user_id));
}
public static function submit_introduction($introduction, $user_id)
{
global $wpdb;
$result = $wpdb->update(
Config::TOSPUR_CONSULTANT,
array(
'introduction' => $introduction
),
array('id' => $user_id)
);
return $result;
}
public static function search_introduction()
{
global $wpdb;
$user_id = introduction::get_user_id();
$sql = "select introduction from " . Config::TOSPUR_CONSULTANT . " where id = " . $user_id;
$result = $wpdb->get_var($sql);
return $result;
}
public static function introduction_html()
{
$context = array();
$context['url'] = home_url();
$context['introduction'] = introduction::search_introduction();
$user_id = introduction::get_user_id();
$context['user_id'] = $user_id;
Timber::render('introduction.html', $context);
}
public static function get_user_id()
{
$current_user = wp_get_current_user();
return $current_user->ID;
}
}
?>
\ No newline at end of file
...@@ -28,7 +28,7 @@ class newHouseList extends WP_List_Table ...@@ -28,7 +28,7 @@ class newHouseList extends WP_List_Table
case 'average_price': case 'average_price':
case 'developer': case 'developer':
case 'check_in_time': case 'check_in_time':
case 'building_type': case 'room_id':
case 'property_age': case 'property_age':
case 'decoration': case 'decoration':
case 'covered_area': case 'covered_area':
...@@ -57,26 +57,28 @@ class newHouseList extends WP_List_Table ...@@ -57,26 +57,28 @@ class newHouseList extends WP_List_Table
function get_columns() function get_columns()
{ {
if( current_user_can('administrator') ) {
$columns = array( $columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text 'cb' => '<input type="checkbox" />'
'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' => '物业费'
); );
}
$columns['id']= 'ID';
$columns['name']= '楼盘名';
$columns['address']= '地址';
$columns['average_price']= '单价';
$columns['developer']= '开发商';
$columns['check_in_time']= '入住时间';
$columns['room_id']= '建筑类型';
$columns['property_age']= '产权年限';
$columns['decoration']= '装修状况';
$columns['covered_area']= '建筑面积';
$columns['volume_rate']= '容积率';
$columns['greening_rate']= '绿化率';
$columns['households']= '规划户数';
$columns['parking_spaces']= '车位数';
$columns['property_management']= '物业公司';
$columns['property_money']= '物业费';
$columns['status']= '状态';
return $columns; return $columns;
} }
...@@ -89,7 +91,7 @@ class newHouseList extends WP_List_Table ...@@ -89,7 +91,7 @@ class newHouseList extends WP_List_Table
'average_price' => array('average_price', false), 'average_price' => array('average_price', false),
'developer' => array('developer', false), 'developer' => array('developer', false),
'check_in_time' => array('check_in_time', false), 'check_in_time' => array('check_in_time', false),
'building_type' => array('building_type', false), 'room_id' => array('room_id', false),
'property_age' => array('property_age', false), 'property_age' => array('property_age', false),
'decoration' => array('decoration', false), 'decoration' => array('decoration', false),
'covered_area' => array('covered_area', false), 'covered_area' => array('covered_area', false),
...@@ -166,6 +168,7 @@ class newHouseList extends WP_List_Table ...@@ -166,6 +168,7 @@ class newHouseList extends WP_List_Table
$sql = "select * from tospur_house th $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 (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 did,literal as room_type from dic_room) dr on dr.did = th.room_id
where 1=1 and house_type=0"; where 1=1 and house_type=0";
if($_POST["listCity"]!=0 ){ if($_POST["listCity"]!=0 ){
$sql = $sql." and city_id=".$_POST["listCity"]; $sql = $sql." and city_id=".$_POST["listCity"];
...@@ -196,7 +199,7 @@ class newHouseList extends WP_List_Table ...@@ -196,7 +199,7 @@ class newHouseList extends WP_List_Table
if($_POST["searchText"]!=NULL){ if($_POST["searchText"]!=NULL){
$sql = $sql . " and name like '%".$_POST['searchText']."%'"; $sql = $sql . " and name like '%".$_POST['searchText']."%'";
} }
$sql = $sql . " group by bph_id"; $sql = $sql . " group by id";
$result = $wpdb->get_results($sql); $result = $wpdb->get_results($sql);
$data = array(); $data = array();
foreach ($result as $key => $value) { foreach ($result as $key => $value) {
...@@ -207,7 +210,7 @@ class newHouseList extends WP_List_Table ...@@ -207,7 +210,7 @@ class newHouseList extends WP_List_Table
'average_price' => $value->average_price, 'average_price' => $value->average_price,
'developer' => $value->developer, 'developer' => $value->developer,
'check_in_time' => $value->check_in_time, 'check_in_time' => $value->check_in_time,
'building_type' => $value->building_type, 'room_id' => $value->room_type,
'property_age' => $value->property_age, 'property_age' => $value->property_age,
'decoration' => $value->decoration, 'decoration' => $value->decoration,
'covered_area' => $value->covered_area, 'covered_area' => $value->covered_area,
...@@ -259,154 +262,29 @@ add_action( 'wp_ajax_nopriv_searchListCity', 'SearchDao::ajax_searchListCity'); ...@@ -259,154 +262,29 @@ add_action( 'wp_ajax_nopriv_searchListCity', 'SearchDao::ajax_searchListCity');
function newHouseList() function newHouseList()
{ {
$contest = array();
$contest['page'] = $_REQUEST['page'];
if(isset($_POST['hasSearch'])){
$bpRes = SearchDao::searchBuildProperty();
foreach($bpRes as $val){
if($val->id == $_POST['buildProperty']){
$contest['buildProperty'] = $val->value;
$contest['buildPropertyId'] = $val->id;
}
}
$contest['options']= SearchDao::searchForCDP($_POST['listCity'],$_POST['listDistrict'],$_POST['listPlate']);
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = SearchDao::searchStatus(1,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
}
Timber::render("newHouseList.html",$contest);
}
function addNewHouseTable(){
$newHouseList = new newHouseList(); $newHouseList = new newHouseList();
$newHouseList->prepare_items(); $newHouseList->prepare_items();
?> $newHouseList->display();
<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
} }
?> ?>
...@@ -10,6 +10,7 @@ class RentHouse{ ...@@ -10,6 +10,7 @@ class RentHouse{
global $wpdb; global $wpdb;
$type = $_POST["type"]; $type = $_POST["type"];
$context = array(); $context = array();
$context['siteUrl'] = get_site_url();
//获取新房信息,存入tospur_house表 //获取新房信息,存入tospur_house表
$insert_tospur_house_array = array( $insert_tospur_house_array = array(
'name' => $_POST['housename'], 'name' => $_POST['housename'],
...@@ -33,7 +34,9 @@ class RentHouse{ ...@@ -33,7 +34,9 @@ class RentHouse{
'traffic' => $_POST['traffic'], 'traffic' => $_POST['traffic'],
'periphery' => $_POST['periphery'], 'periphery' => $_POST['periphery'],
'status' =>$_POST['status'], 'status' =>$_POST['status'],
'house_type' => 2 'owner_name'=>$_POST['owner_name'],
'owner_phone'=>$_POST['owner_phone'],
"location" => $_POST["location"],
); );
if($type==3){ if($type==3){
$wpdb->query("START TRANSACTION"); $wpdb->query("START TRANSACTION");
...@@ -65,11 +68,14 @@ class RentHouse{ ...@@ -65,11 +68,14 @@ class RentHouse{
$context = array_merge($context,SearchDao::getDetailInfo($_GET['id'])); $context = array_merge($context,SearchDao::getDetailInfo($_GET['id']));
$context["district"] = SearchDao::searchCity($context['result']->city_id); $context["district"] = SearchDao::searchCity($context['result']->city_id);
$context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id); $context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id);
$context["mark"] = SearchDao::searchHouseTag($_GET['id']);
} }
$context['role'] = SecHandHouse::getCurrentRole();
$context["city"] = SearchDao::searchCity(); $context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty(); $context["buildProperty"] = SearchDao::searchBuildProperty();
$context["room"] = SearchDao::searchRoom(); $context["room"] = SearchDao::searchRoom();
$context["photoType"] = SearchDao::searchPhotoType(); $context["photoType"] = SearchDao::searchPhotoType();
$context["status"] = searchDao::searchStatusType(2);
Timber::render("rentHouse.html",$context); Timber::render("rentHouse.html",$context);
} }
...@@ -77,86 +83,22 @@ class RentHouse{ ...@@ -77,86 +83,22 @@ class RentHouse{
public static function rentHouseData_insert($params) public static function rentHouseData_insert($params)
{ {
global $wpdb; global $wpdb;
//图片信息
$uploadedfile = $_FILES['files'];
//房源与类型以及面积信息 //房源与类型以及面积信息
$data = $_POST["data"]; $data = $_POST["data"];
$params['user_id'] = get_current_user_id();
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE flat="' .$_POST['flat'] . '" and suite="' . $_POST["suite"] . '" and house_type=2', OBJECT); $params['creattime'] = date("Y-m-d H:i:s");
$params['house_type'] = 2;
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE address="' .$params['address'] . '" and owner_name="' .$params['owner_name'] . '" and owner_phone="'.$params['owner_phone'].'" and house_type=2', OBJECT);
if(!$res){ if(!$res){
$houseId = InsertDao::insert_tospur_house($params); $houseId = InsertDao::insert_tospur_house($params);
//主力房源的图片与房子信息关联插入数据库
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( InsertDao::addMainImage($houseId,$data);
'house_id' => $houseId,
'image_id' => $imgId, InsertDao::addRecommend($houseId,$data);
);
$houseImgRes =InsertDao::insert_a_house_image($house_img_array); InsertDao::addRecConsultant($houseId,$data);
} else {
return $movefile['error']; InsertDao::addHouseTag($_POST['mark'],$houseId);
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{ }else{
return 508; return 508;
} }
...@@ -168,36 +110,41 @@ class RentHouse{ ...@@ -168,36 +110,41 @@ class RentHouse{
global $wpdb; global $wpdb;
$data = $_POST["data"]; $data = $_POST["data"];
$res = $wpdb->update(Config::TOSPUR_HOUSE_TABLE,$params,array("id" => $houseId)); $res = $wpdb->update(Config::TOSPUR_HOUSE_TABLE,$params,array("id" => $houseId));
if($res){ $result = 202;
if($data["recConsultant"]){
foreach($data["recConsultant"] as $val){ InsertDao::addMainImage($houseId,$data);
$a_house_userArray = array( $exists_photo_ids = array();
"user_id" => $val, if(isset($_POST['exists_photo'])){
"house_id" => $houseId, foreach($_POST['exists_photo'] as $id => $item){
"user_type" =>1 $wpdb->update(Config::TOSPUR_IMAGE_TABLE,array(
); "image_type" => $item['type'],
$a_house_userRes = $wpdb->update(Config::A_HOUSE_USER_TABLE,$a_house_userArray,array("house_id" => $houseId)); ),array("id" => $id));
if(!$a_house_userRes){ $exists_photo_ids[] = $id;
return 513; }
} }
} $old_exists_photo_ids = explode(",",$_POST['exists_photo_ids']);
} $delete_photo_ids = array();
if(isset($data["recommend"])){ foreach(array_diff($old_exists_photo_ids,$exists_photo_ids) as $key => $id){
$delRes =$wpdb->delete( Config::A_HOUSE_RECOMMEND_TABLE, array( 'house_id'=>$houseId)); $delete_photo_ids[] = $id;
if($delRes){ }
foreach($data["recommend"] as $value){ $delete_photo_ids = implode(",",$delete_photo_ids);
$a_house_recommendArray = array( $wpdb->query("delete from ".Config::A_HOUSE_IMAGE_TABLE." where house_id = {$houseId} and image_id in ({$delete_photo_ids});");
"house_id" => $houseId,
"recommend_id" =>$value $wpdb->delete(Config::A_HOUSE_RECOMMEND_TABLE,array("house_id" => $houseId));
); InsertDao::addRecommend($houseId,$data);
$a_house_recommendRes =InsertDao::insert_a_house_recommend($a_house_recommendArray);
} $wpdb->delete(Config::A_HOUSE_USER_TABLE,array("house_id" => $houseId));
} InsertDao::addRecConsultant($houseId,$data);
}
}else{ InsertDao::addHouseTag($_POST['mark'],$houseId);
return 512; return $result;
} }
return 202; public static function getCurrentRole(){
$current_user = wp_get_current_user();
if ( !($current_user instanceof WP_User) )
return;
$roles = $current_user->roles;
return $roles[0];
} }
} }
...@@ -59,24 +59,26 @@ class rentHouseList extends WP_List_Table ...@@ -59,24 +59,26 @@ class rentHouseList extends WP_List_Table
function get_columns() function get_columns()
{ {
if( current_user_can('administrator') ) {
$columns = array( $columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text 'cb' => '<input type="checkbox" />'
'id' =>'ID',
'name' => '租房标题',
'community_name' => '小区名称',
'rent' => '元/月',
'buildproperty_id' => '户型',
'covered_area' => '面积',
'floor' => '楼层',
'faceto' => '朝向',
'decoration' => '装修状况',
'age' => '年代',
'matching_facilities'=>'配套设施',
'flat' => '楼号',
'suite' => '室',
'user_id' => '置业顾问',
'status' => '状态'
); );
}
$columns['id']= 'ID';
$columns['name']= '租房标题';
$columns['community_name']= '小区名称';
$columns['rent']= '元/月';
$columns['buildproperty_id']= '户型';
$columns['covered_area']= '面积';
$columns['floor']= '楼层';
$columns['faceto']= '朝向';
$columns['decoration']= '装修状况';
$columns['age']= '年代';
$columns['matching_facilities']= '配套设施';
$columns['flat']= '楼号';
$columns['suite']= '室';
$columns['user_id']= '置业顾问';
$columns['status']= '状态';
return $columns; return $columns;
} }
...@@ -107,7 +109,10 @@ class rentHouseList extends WP_List_Table ...@@ -107,7 +109,10 @@ class rentHouseList extends WP_List_Table
$actions = array( $actions = array(
'noCheck' => '未审核', 'noCheck' => '未审核',
'check' => '审核', 'check' => '审核',
'stopSale' =>'下架' 'selfSale'=>'自售',
'otherSale'=>'他售',
'invalid'=>'无效',
'reactivation'=>'重激活'
); );
return $actions; return $actions;
} }
...@@ -133,13 +138,35 @@ class rentHouseList extends WP_List_Table ...@@ -133,13 +138,35 @@ class rentHouseList extends WP_List_Table
$status = 1; $status = 1;
} }
break; break;
case 'stopSale': case 'selfSale':
$id = $_POST['renthouselist']; $id = $_POST['renthouselist'];
if ($id) { if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')'; $string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 2; $status = 2;
} }
break; break;
case 'otherSale':
$id = $_POST['renthouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 3;
}
break;
case 'invalid':
$id = $_POST['renthouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 4;
}
break;
case 'reactivation':
$id = $_POST['renthouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 5;
}
break;
} }
global $wpdb; global $wpdb;
$result = $wpdb->query('update tospur_house SET status='.$status .' where id in ' . $string); $result = $wpdb->query('update tospur_house SET status='.$status .' where id in ' . $string);
...@@ -161,6 +188,14 @@ class rentHouseList extends WP_List_Table ...@@ -161,6 +188,14 @@ class rentHouseList extends WP_List_Table
$this->process_bulk_action(); $this->process_bulk_action();
//$data = $this->example_data; //$data = $this->example_data;
$params = array(
"city_id" => $_POST["listCity"],
"district_id" => $_POST["listDistrict"],
"plate_id" =>$_POST["listPlate"],
"buildproperty_id"=>$_POST["buildProperty"],
"status" => $_POST["status"],
);
$sql = "select * from tospur_house th $sql = "select * from tospur_house th
left join(select user_id as aus_id,house_id from a_house_user) ahu on th.id = ahu.house_id left join(select user_id as aus_id,house_id from a_house_user) ahu on th.id = ahu.house_id
...@@ -215,7 +250,13 @@ class rentHouseList extends WP_List_Table ...@@ -215,7 +250,13 @@ class rentHouseList extends WP_List_Table
}else if($value->status == 1){ }else if($value->status == 1){
$data[$key]['status'] ="审核"; $data[$key]['status'] ="审核";
}else if($value->status == 2){ }else if($value->status == 2){
$data[$key]['status'] ="下架"; $data[$key]['status'] ="自售";
}else if($value->status == 3){
$data[$key]['status'] ="他售";
}else if($value->status == 4){
$data[$key]['status'] ="无效";
}else if($value->status == 5){
$data[$key]['status'] ="重激活";
} }
} }
...@@ -251,151 +292,34 @@ add_action( 'wp_ajax_nopriv_searchListCity', 'SearchDao::ajax_searchListCity'); ...@@ -251,151 +292,34 @@ add_action( 'wp_ajax_nopriv_searchListCity', 'SearchDao::ajax_searchListCity');
function rentHouseList() function rentHouseList()
{ {
$contest = array();
$contest['page'] = $_REQUEST['page'];
if(isset($_POST['hasSearch'])){
$bpRes = SearchDao::searchBuildProperty();
foreach($bpRes as $val){
if($val->id == $_POST['buildProperty']){
$contest['buildProperty'] = $val->value;
$contest['buildPropertyId'] = $val->id;
}
}
$contest['options']= SearchDao::searchForCDP($_POST['listCity'],$_POST['listDistrict'],$_POST['listPlate']);
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = SearchDao::searchStatus(2,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
}
Timber::render("rentHouseList.html",$contest);
}
function addRentTable(){
$rentHouseList = new rentHouseList(); $rentHouseList = new rentHouseList();
$rentHouseList->prepare_items(); $rentHouseList->prepare_items();
?> $rentHouseList->display();
<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="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 $rentHouseList->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
} }
?> ?>
...@@ -10,6 +10,7 @@ class SecHandHouse{ ...@@ -10,6 +10,7 @@ class SecHandHouse{
global $wpdb; global $wpdb;
$type = $_POST["type"]; $type = $_POST["type"];
$context = array(); $context = array();
$context['siteUrl'] = get_site_url();
$insert_tospur_house_array = array( $insert_tospur_house_array = array(
'name' => $_POST['housename'], 'name' => $_POST['housename'],
'house_number' =>$_POST['house_number'], 'house_number' =>$_POST['house_number'],
...@@ -32,7 +33,9 @@ class SecHandHouse{ ...@@ -32,7 +33,9 @@ class SecHandHouse{
'traffic' => $_POST['traffic'], 'traffic' => $_POST['traffic'],
'periphery' => $_POST['periphery'], 'periphery' => $_POST['periphery'],
'status' =>$_POST['status'], 'status' =>$_POST['status'],
'house_type' => 1 'owner_name'=>$_POST['owner_name'],
'owner_phone'=>$_POST['owner_phone'],
"location" => $_POST["location"],
); );
if($type==2){ if($type==2){
$wpdb->query("START TRANSACTION"); $wpdb->query("START TRANSACTION");
...@@ -64,11 +67,14 @@ class SecHandHouse{ ...@@ -64,11 +67,14 @@ class SecHandHouse{
$context = array_merge($context,SearchDao::getDetailInfo($_GET['id'])); $context = array_merge($context,SearchDao::getDetailInfo($_GET['id']));
$context["district"] = SearchDao::searchCity($context['result']->city_id); $context["district"] = SearchDao::searchCity($context['result']->city_id);
$context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id); $context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id);
$context["mark"] = SearchDao::searchHouseTag($_GET['id']);
} }
$context['role'] = SecHandHouse::getCurrentRole();
$context["city"] = SearchDao::searchCity(); $context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty(); $context["buildProperty"] = SearchDao::searchBuildProperty();
$context["room"] = SearchDao::searchRoom(); $context["room"] = SearchDao::searchRoom();
$context["photoType"] = SearchDao::searchPhotoType(); $context["photoType"] = SearchDao::searchPhotoType();
$context["status"] = searchDao::searchStatusType(2);
Timber::render("secHandHouse.html",$context); Timber::render("secHandHouse.html",$context);
} }
...@@ -76,86 +82,24 @@ class SecHandHouse{ ...@@ -76,86 +82,24 @@ class SecHandHouse{
public static function secHouseData_insert($params) public static function secHouseData_insert($params)
{ {
global $wpdb; global $wpdb;
//图片信息
$uploadedfile = $_FILES['files'];
//房源与类型以及面积信息 //房源与类型以及面积信息
$data = $_POST["data"]; $data = $_POST["data"];
$params['user_id'] = get_current_user_id();
$params['creattime'] = date("Y-m-d H:i:s");
$params['house_type'] = 1;
//获取新房信息,存入tospur_house表 //获取新房信息,存入tospur_house表
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE name="'.$params['name'].'" flat="' .$_POST['flat'] . '" and suite="' . $_POST["suite"] . '" and house_type=1', OBJECT); $res = $wpdb->get_results('SELECT * FROM tospur_house WHERE address="' .$params['address'] . '" and owner_name="' .$params['owner_name'] . '" and owner_phone="'.$params['owner_phone'].'" and house_type=1', OBJECT);
if(!$res){ if(!$res){
$houseId = InsertDao::insert_tospur_house($params); $houseId = InsertDao::insert_tospur_house($params);
//主力房源的图片与房子信息关联插入数据库
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( InsertDao::addMainImage($houseId,$data);
'house_id' => $houseId,
'image_id' => $imgId, InsertDao::addRecommend($houseId,$data);
);
$houseImgRes =InsertDao::insert_a_house_image($house_img_array); InsertDao::addRecConsultant($houseId,$data);
} else {
return $movefile['error']; InsertDao::addHouseTag($_POST['mark'],$houseId);
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{ }else{
return 507; return 507;
} }
...@@ -166,38 +110,43 @@ class SecHandHouse{ ...@@ -166,38 +110,43 @@ class SecHandHouse{
global $wpdb; global $wpdb;
$data = $_POST["data"]; $data = $_POST["data"];
$res = $wpdb->update(Config::TOSPUR_HOUSE_TABLE,$params,array("id" => $houseId)); $res = $wpdb->update(Config::TOSPUR_HOUSE_TABLE,$params,array("id" => $houseId));
if($res){ $result = 201;
if($data["recConsultant"]){
foreach($data["recConsultant"] as $val){ InsertDao::addMainImage($houseId,$data);
$a_house_userArray = array(
"user_id" => $val, $exists_photo_ids = array();
"house_id" => $houseId, if(isset($_POST['exists_photo'])){
"user_type" =>1 foreach($_POST['exists_photo'] as $id => $item){
); $wpdb->update(Config::TOSPUR_IMAGE_TABLE,array(
$a_house_userRes = $wpdb->update(Config::A_HOUSE_USER_TABLE,$a_house_userArray,array("house_id" => $houseId)); "image_type" => $item['type'],
if(!$a_house_userRes){ ),array("id" => $id));
return 511; $exists_photo_ids[] = $id;
} }
} }
} $old_exists_photo_ids = explode(",",$_POST['exists_photo_ids']);
if(isset($data["recommend"])){ $delete_photo_ids = array();
$delRes =$wpdb->delete( Config::A_HOUSE_RECOMMEND_TABLE, array( 'house_id'=>$houseId)); foreach(array_diff($old_exists_photo_ids,$exists_photo_ids) as $key => $id){
if($delRes){ $delete_photo_ids[] = $id;
foreach($data["recommend"] as $value){ }
$a_house_recommendArray = array( $delete_photo_ids = implode(",",$delete_photo_ids);
"house_id" => $houseId, $wpdb->query("delete from ".Config::A_HOUSE_IMAGE_TABLE." where house_id = {$houseId} and image_id in ({$delete_photo_ids});");
"recommend_id" =>$value
); $wpdb->delete(Config::A_HOUSE_RECOMMEND_TABLE,array("house_id" => $houseId));
$a_house_recommendRes =InsertDao::insert_a_house_recommend($a_house_recommendArray); InsertDao::addRecommend($houseId,$data);
$wpdb->show_errors();
$wpdb->print_error(); $wpdb->delete(Config::A_HOUSE_USER_TABLE,array("house_id" => $houseId));
} InsertDao::addRecConsultant($houseId,$data);
}
} InsertDao::addHouseTag($_POST['mark'],$houseId);
}else{ return $result;
return 510;
} }
return 201;
public static function getCurrentRole(){
$current_user = wp_get_current_user();
if ( !($current_user instanceof WP_User) )
return;
$roles = $current_user->roles;
return $roles[0];
} }
} }
......
...@@ -51,26 +51,25 @@ class secHandHouseList extends WP_List_Table ...@@ -51,26 +51,25 @@ class secHandHouseList extends WP_List_Table
function get_columns() function get_columns()
{ {
if( current_user_can('administrator') ) {
$columns = array( $columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text 'cb' => '<input type="checkbox" />'
'id' =>'ID',
'name' => '二手房标题',
'community_name' => '小区名称',
'total_price' => '总价',
'buildproperty_id' => '户型',
'covered_area' => '面积',
'floor' => '楼层',
'faceto' => '朝向',
'decoration' => '装修状况',
'age' => '年代',
'flat' => '楼号',
'suite' => '室',
'user_id' => '置业顾问',
'status' => '状态'
); );
// if (current_user_can('Administrator')) { }
// $columns['cb'] = '<input type="checkbox" />'; $columns['id']= 'ID';
// } $columns['name']= '二手房标题';
$columns['community_name']= '小区名称';
$columns['total_price']= '总价';
$columns['buildproperty_id']= '户型';
$columns['covered_area']= '面积';
$columns['floor']= '楼层';
$columns['faceto']= '朝向';
$columns['decoration']= '装修状况';
$columns['age']= '年代';
$columns['flat']= '楼号';
$columns['suite']= '室';
$columns['user_id']= '置业顾问';
$columns['status']= '状态';
return $columns; return $columns;
} }
...@@ -100,7 +99,10 @@ class secHandHouseList extends WP_List_Table ...@@ -100,7 +99,10 @@ class secHandHouseList extends WP_List_Table
$actions = array( $actions = array(
'noCheck' => '未审核', 'noCheck' => '未审核',
'check' => '审核', 'check' => '审核',
'stopSale' =>'下架' 'selfSale'=>'自售',
'otherSale'=>'他售',
'invalid'=>'无效',
'reactivation'=>'重激活'
); );
return $actions; return $actions;
} }
...@@ -126,15 +128,38 @@ class secHandHouseList extends WP_List_Table ...@@ -126,15 +128,38 @@ class secHandHouseList extends WP_List_Table
$status = 1; $status = 1;
} }
break; break;
case 'stopSale': case 'selfSale':
$id = $_POST['sechandhouselist']; $id = $_POST['sechandhouselist'];
if ($id) { if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')'; $string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 2; $status = 2;
} }
break; break;
case 'otherSale':
$id = $_POST['sechandhouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 3;
}
break;
case 'invalid':
$id = $_POST['sechandhouselist'];
print_r($id);
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 4;
}
break;
case 'reactivation':
$id = $_POST['sechandhouselist'];
if ($id) {
$string = '(' . implode(',', array_map('intval', $id)) . ')';
$status = 5;
}
break;
} }
global $wpdb; global $wpdb;
print_r('update tospur_house SET status='.$status .' where id in ' . $string);
$result = $wpdb->query('update tospur_house SET status='.$status .' where id in ' . $string); $result = $wpdb->query('update tospur_house SET status='.$status .' where id in ' . $string);
} }
} }
...@@ -205,13 +230,18 @@ class secHandHouseList extends WP_List_Table ...@@ -205,13 +230,18 @@ class secHandHouseList extends WP_List_Table
'suite' => $value->suite, 'suite' => $value->suite,
'user_id' => $value->consul_name, 'user_id' => $value->consul_name,
); );
if($value->status == 0){ if($value->status == 0){
$data[$key]['status'] ="未审核"; $data[$key]['status'] ="未审核";
}else if($value->status == 1){ }else if($value->status == 1){
$data[$key]['status'] ="审核"; $data[$key]['status'] ="审核";
}else if($value->status == 2){ }else if($value->status == 2){
$data[$key]['status'] ="下架"; $data[$key]['status'] ="自售";
}else if($value->status == 3){
$data[$key]['status'] ="他售";
}else if($value->status == 4){
$data[$key]['status'] ="无效";
}else if($value->status == 5){
$data[$key]['status'] ="重激活";
} }
} }
...@@ -242,161 +272,35 @@ class secHandHouseList extends WP_List_Table ...@@ -242,161 +272,35 @@ class secHandHouseList extends WP_List_Table
} }
add_action( 'wp_ajax_updateList', 'newHouseList::prepare_items'); add_action( 'wp_ajax_updateList', 'newHouseList::prepare_items');
add_action( 'wp_ajax_nopriv_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 secHandHouseList() function secHandHouseList()
{ {
$contest = array();
$contest['page'] = $_REQUEST['page'];
if(isset($_POST['hasSearch'])){
$bpRes = SearchDao::searchBuildProperty();
foreach($bpRes as $val){
if($val->id == $_POST['buildProperty']){
$contest['buildProperty'] = $val->value;
$contest['buildPropertyId'] = $val->id;
}
}
$contest['options']= SearchDao::searchForCDP($_POST['listCity'],$_POST['listDistrict'],$_POST['listPlate']);
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = SearchDao::searchStatus(2,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
}
Timber::render("secHandHouseList.html",$contest);
}
function addSecTable(){
$secHandHouseList = new secHandHouseList(); $secHandHouseList = new secHandHouseList();
$secHandHouseList->prepare_items(); $secHandHouseList->prepare_items();
?> $secHandHouseList->display();
<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="acreage" name="acreage">
<option value ="">面积</option>
</select>
<select id="characteristic" name="characteristic">
<option value ="">特色</option>
<option value ="">满5</option>
<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 $secHandHouseList->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
<h2>添加特色</h2>
<label for="feature">特色:</label>
<input id="feature" type="text">
<input type="submit" id="submit" class="button">
<script>
var admin_url = '{{ admin_url }}';
(function ($) {
$(document).ready(function () {
$('#submit').click(function () {
var name = $('#feature').val();
if (name.trim() != '') {
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=add_feature&name=' + name,
success: function (data) {
switch (data.code) {
case 2000:
window.location.href = admin_url + 'admin.php?page=feature_list';
break;
case 2001:
alert('不能重复添加特色');
break;
default:
break;
}
}
});
} else {
alert('请输入特色');
}
});
});
})(jQuery);
</script>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<link rel="stylesheet" type="text/css" href="{{ view }}/css/bootstrap.min.css">
<h2>特色列表</h2>
<table class="table">
<thead>
<tr>
<th style="">
<div class="th-inner">ID</div>
<div class="fht-cell"></div>
</th>
<th style="">
<div class="th-inner">名称</div>
<div class="fht-cell"></div>
</th>
</tr>
</thead>
<tbody>
{% for item in result %}
<tr>
<td>{{ item.id }}</td>
<td>{{ item.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
\ No newline at end of file
<h2>诚信宣言</h2>
<label for="introduction">
<textarea id="introduction" placeholder="请输入诚信宣言" rows="10" cols="50" style="resize: none;">{{ introduction }}</textarea>
</label>
<p>
<input type="hidden" id="user_id" value="{{ user_id }}">
<input type="submit" id="submit" class="button">
</p>
<script>
(function ($) {
var oldIntroduction = '{{ introduction }}';
$(document).ready(function () {
$('#submit').click(function () {
var introduction = $('#introduction').val();
var user_id = $('#user_id').val();
if (introduction.trim() != '' && oldIntroduction != introduction) {
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=submit_introduction&introduction=' + introduction + '&user_id=' + user_id,
success: function (data) {
if (data) {
alert('提交成功');
}
}
});
}else{
alert('请修改诚信宣言');
}
});
});
})(jQuery);
</script>
\ No newline at end of file
<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="{{page}}"/>
<input type="hidden" name="hasSearch" value="1"/>
<select id="listCity" name="listCity">
{% if hasSearch and options.cityName %}
<option value="{{options.cityId}}"> {{options.cityName}}</option>
{% else %}
<option value="0"> 城市</option>
{% endif %}
</select>
<select id="listDistrict" name="listDistrict">
{% if hasSearch and options.districtName %}
<option value="{{options.districtId}}"> {{options.districtName}}</option>
{% else %}
<option value="0">区域</option>
{% endif %}
</select>
<select id="listPlate" name="listPlate">
{% if hasSearch and options.districtName and options.plateName %}
<option value="{{options.plateId}}">{{options.plateName}}</option>
{% else %}
<option value="0">板块</option>
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
<option value="{{buildPropertyId}}"> {{buildProperty}}</option>
{% else %}
<option value="0"> 房型</option>
{% endif %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% endif %}
</select>
<select name="status" name="status">
{% if hasSearch and status %}
{% for item in status %}
<option value="{{ item.status_id }}">{{ item.status_name }}</option>
{% endfor %}
{% else %}
<option value="-1">状态</option>
{% endif %}
<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 -->
{{function("addNewHouseTable")}}
</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>
\ No newline at end of file
...@@ -12,19 +12,23 @@ ...@@ -12,19 +12,23 @@
<tbody> <tbody>
<tr> <tr>
<th><label for="housename">楼盘名</label></th> <th><label for="housename">楼盘名</label></th>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code"></td> <td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="mark">标签:</label></th>
<td> <input name="mark" id="mark" type="text" value="{{mark}}" class="regular-text code"></td>
</tr> </tr>
<tr> <tr>
<th><label for="community_name">小区名</label></th> <th><label for="community_name">小区名</label></th>
<td> <input name="community_name" id="community_name" type="text" value="{{result.community_name}}" class="regular-text code"></td> <td> <input name="community_name" id="community_name" type="text" value="{{result.community_name}}" style="width: 150px;" class="regular-text code" ></td>
</tr> </tr>
<tr> <tr>
<th><label for="average_price">均价</label></th> <th><label for="average_price">均价</label></th>
<td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code"></td> <td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="latest_news">最新动态</label></th> <th><label for="latest_news">最新动态</label></th>
<td><textarea name="latest_news" rows="4" cols="40" class="large-text code">{{result.latest_news}}</textarea></td> <td><textarea name="latest_news" rows="4" cols="40" class="large-text code" style="width: 400px;">{{result.latest_news}}</textarea></td>
</tr> </tr>
<tr> <tr>
<th><label for="from">所属地区</label></th> <th><label for="from">所属地区</label></th>
...@@ -54,6 +58,10 @@ ...@@ -54,6 +58,10 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th><label for="location">地域坐标</label></th>
<td> <input name="location" id="location" type="text" value="{{result.location}}" class="regular-text code"></td>
</tr>
<tr>
<th><label for="mainHouse">主力户型</label></th> <th><label for="mainHouse">主力户型</label></th>
<td> <td>
<div id="preview"> <div id="preview">
...@@ -63,7 +71,7 @@ ...@@ -63,7 +71,7 @@
{% set exists_ids = exists_ids~"," %} {% set exists_ids = exists_ids~"," %}
{% endif %} {% endif %}
{% set exists_ids = exists_ids~item.id %} {% set exists_ids = exists_ids~item.id %}
<div id="exists_{{item.id}}"> <div>
<img src="{{siteUrl}}{{item.path}}" heghit="100" width="100"><br /> <img src="{{siteUrl}}{{item.path}}" heghit="100" width="100"><br />
<select name="exists[{{item.id}}][buildProperty]"> <select name="exists[{{item.id}}][buildProperty]">
{% for i in buildProperty %} {% for i in buildProperty %}
...@@ -91,11 +99,11 @@ ...@@ -91,11 +99,11 @@
</tr> </tr>
<tr> <tr>
<th><label for="traffic">交通线路</label></th> <th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code"></td> <td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code" style="width: 300px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="periphery">周边配套</label></th> <th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code"></td> <td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code" style="width: 300px;"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -114,51 +122,51 @@ ...@@ -114,51 +122,51 @@
</tr> </tr>
<tr> <tr>
<th><label for="developers">开发商</label></th> <th><label for="developers">开发商</label></th>
<td> <input name="developers" type="text" value="{{result.developer}}" class="regular-text code"></td> <td> <input name="developers" type="text" value="{{result.developer}}" class="regular-text code" style="width: 150px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="check_in_time">入住时间</label></th> <th><label for="check_in_time">入住时间</label></th>
<td> <input name="check_in_time" id="checkin" type="text" value="{{result.check_in_time}}" class="regular-text code"></td> <td> <input name="check_in_time" id="checkin" type="text" value="{{result.check_in_time}}" class="regular-text code" style="width: 150px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="property_age">产权年限</label></th> <th><label for="property_age">产权年限</label></th>
<td> <input name="property_age" type="text" value="{{result.property_age}}" class="regular-text code"></td> <td> <input name="property_age" type="text" value="{{result.property_age}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="decoration">装修状况</label></th> <th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"></td> <td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="covered_area">建筑面积</label></th> <th><label for="covered_area">建筑面积</label></th>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code"></td> <td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="volume_rate">容积率</label></th> <th><label for="volume_rate">容积率</label></th>
<td> <input name="volume_rate" type="text" value="{{result.volume_rate}}" class="regular-text code"></td> <td> <input name="volume_rate" type="text" value="{{result.volume_rate}}" class="regular-text code" style="width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="greening_rate">绿化率</label></th> <th><label for="greening_rate">绿化率</label></th>
<td> <input name="greening_rate" type="text" value="{{result.greening_rate}}" class="regular-text code"></td> <td> <input name="greening_rate" type="text" value="{{result.greening_rate}}" class="regular-text code" style="width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="households">规划户数</label></th> <th><label for="households">规划户数</label></th>
<td> <input name="households" type="text" value="{{result.households}}" class="regular-text code"></td> <td> <input name="households" type="text" value="{{result.households}}" class="regular-text code" style="width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="parking_spaces">车位数</label></th> <th><label for="parking_spaces">车位数</label></th>
<td> <input name="parking_spaces" type="text" value="{{result.parking_spaces}}" class="regular-text code"></td> <td> <input name="parking_spaces" type="text" value="{{result.parking_spaces}}" class="regular-text code" style="width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="property_management">物业公司</label></th> <th><label for="property_management">物业公司</label></th>
<td> <input name="property_management" type="text" value="{{result.property_management}}" class="regular-text code"></td> <td> <input name="property_management" type="text" value="{{result.property_management}}" class="regular-text code" style="width: 150px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="property_money">物业费</label></th> <th><label for="property_money">物业费</label></th>
<td> <input name="property_money" type="text" value="{{result.property_money}}" class="regular-text code"></td> <td> <input name="property_money" type="text" value="{{result.property_money}}" class="regular-text code" style="width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="overview">楼盘概述</label></th> <th><label for="overview">楼盘概述</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code">{{result.overview}}</textarea></td> <td> <textarea name="overview" rows="4" cols="40" class="large-text code" style="width: 400px;">{{result.overview}}</textarea></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -174,9 +182,9 @@ ...@@ -174,9 +182,9 @@
{% if exists_photo_ids != "" %} {% if exists_photo_ids != "" %}
{% set exists_photo_ids = exists_photo_ids~"," %} {% set exists_photo_ids = exists_photo_ids~"," %}
{% endif %} {% endif %}
{% set exists_photo_ids = exists_photo_ids~item.id %} {% set exists_photo_ids = exists_photo_ids~item.image_id %}
<p id="exists_photo_{{ item.id }}"> <p>
<select name="exists_photo[{{ item.id }}][type]"> <select name="exists_photo[{{ item.image_id }}][type]">
{% for i in photoType %} {% for i in photoType %}
<option {{ i.id == item.image_type?"selected":"" }} value="{{ i.id }}">{{ i.value }}</option> <option {{ i.id == item.image_type?"selected":"" }} value="{{ i.id }}">{{ i.value }}</option>
{% endfor %} {% endfor %}
...@@ -195,8 +203,16 @@ ...@@ -195,8 +203,16 @@
<tr> <tr>
<th><label for="traffic">推荐房源</label></th> <th><label for="traffic">推荐房源</label></th>
<td> <td>
<div id="houseImg"></div><br /> <div id="houseImg">
<button type="button" class="button action" data-toggle="modal" data-target="#myModal"> {% for item in recommends %}
<p>
<img src="{{siteUrl}}{{item.path}}" height="100" width="100">
<input type="button" value="删除" class="imgCancel existsCancel">
<input type="hidden" name="data[recommend][]" value="{{item.id}}">
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal" id="recHouseBt">
添加房源 添加房源
</button> </button>
</td> </td>
...@@ -204,12 +220,32 @@ ...@@ -204,12 +220,32 @@
<tr> <tr>
<th><label for="periphery">置业顾问</label></th> <th><label for="periphery">置业顾问</label></th>
<td> <td>
<div id="consultantImg"></div><br /> <div id="consultantImg">
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant"> {% for item in consultant %}
<p>
<span>{{item.name}}</span>
<input type="button" value="删除" class="consultantCancel existsCancel">
<input type="hidden" name="data[recConsultant][]" value="{{item.id}}">
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择置业顾问 选择置业顾问
</button> </button>
</td> </td>
</tr> </tr>
{% if role == 'administrator' %}
<tr>
<th><label for="from">状态</label></th>
<td>
<select id="status" name="status">
{% for item in status %}
<option value={{item.status_id}}>{{item.status_name}}</option>
{% endfor %}
</select>
</td>
</tr>
{% endif %}
</tbody> </tbody>
</table> </table>
<input type="text" name="type" value="1" hidden="hidden"> <input type="text" name="type" value="1" hidden="hidden">
...@@ -220,8 +256,6 @@ ...@@ -220,8 +256,6 @@
</form> </form>
<!-- Modal --> <!-- Modal -->
<!-- 新增房源弹出层 --> <!-- 新增房源弹出层 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
...@@ -230,10 +264,6 @@ ...@@ -230,10 +264,6 @@
<div class="modal-body" style="height: 300px;overflow: auto;"> <div class="modal-body" style="height: 300px;overflow: auto;">
<select id="cityId"> <select id="cityId">
<option value="-1"> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select> </select>
<select id="areaId"> <select id="areaId">
<option value = "-1">区域</option> <option value = "-1">区域</option>
...@@ -274,10 +304,6 @@ ...@@ -274,10 +304,6 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-body" style="height: 300px;overflow: auto;"> <div class="modal-body" style="height: 300px;overflow: auto;">
<select id="consultCity"> <select id="consultCity">
<option value=""> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select> </select>
<input type="text" placeholder="请出入置业顾问姓名搜索" id="consultantName"> <input type="text" placeholder="请出入置业顾问姓名搜索" id="consultantName">
<button type="button" class="button action" id="searchConsult">搜索</button> <button type="button" class="button action" id="searchConsult">搜索</button>
...@@ -345,20 +371,21 @@ ...@@ -345,20 +371,21 @@
}); });
}); });
//根据上方选择的城市,选择推荐房源的默认城市
//推荐房源的联动AJAX $("#recHouseBt").click(function(){
$("#cityId").change(function(){ $('#cityId').find('option').remove();
var cityId = $(this).val();
var area = $("#areaId");
var acreage =$("#acreage");
var price = $("#price");
$('#areaId').find('option:not(:first-child)').remove(); $('#areaId').find('option:not(:first-child)').remove();
$('#plateId').find('option:not(:first-child)').remove(); $('#plateId').find('option:not(:first-child)').remove();
$('#price').find('option:not(:first-child)').remove(); $('#price').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove(); $('#acreage').find('option:not(:first-child)').remove();
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
var acreage =$("#acreage");
//城市联动区域 var price = $("#price");
var cityId = $("#baseCity").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
var area = $("#areaId");
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
...@@ -367,6 +394,7 @@ ...@@ -367,6 +394,7 @@
addOption(json,area); addOption(json,area);
} }
}); });
//城市联动房子面积 //城市联动房子面积
$.ajax({ $.ajax({
type: "GET", type: "GET",
...@@ -385,6 +413,23 @@ ...@@ -385,6 +413,23 @@
addOption(json,price); addOption(json,price);
} }
}); });
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&houseType=0",
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);
}
}
});
}); });
//区域联动板块 //区域联动板块
...@@ -405,7 +450,7 @@ ...@@ -405,7 +450,7 @@
}); });
//推荐房源下显示图片信息以及房名 //推荐房源下显示图片信息以及房名
$("#cityId,#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){ $("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val(); var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val(); var room = $("#room").val();
...@@ -437,13 +482,15 @@ ...@@ -437,13 +482,15 @@
$searchtext = $("#searchtext").val(); $searchtext = $("#searchtext").val();
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
$.ajax({ $.ajax({
type: "GET", type: "post",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&searchtext="+$searchtext, data: "action=searchHouse&searchText="+$searchtext,
success:function(json){ success:function(json){
for(var i = 0; i <=json.length-1; i++){ var result = json.result;
var name = json[i]["name"]; for(var i = 0; i < result.length; i++){
var imgUrl = json[i]["path"]; 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 img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name); var li = $("<li>").addClass("addImg").append(img).append(name);
$("#houseList").append(li); $("#houseList").append(li);
...@@ -452,18 +499,21 @@ ...@@ -452,18 +499,21 @@
}); });
}) })
//搜索对应城市的置业顾问 //根据上方选择的城市,选择推荐置业顾问的默认城市
$("#consultCity").change(function(){ $("#recConsultantBt").click(function(){
var consulCityId = $("#consultCity").val(); $('#consultCity').find('option').remove();
var consultantName =$("#consultantName").val();
$("#consultantList").find("li").remove(); $("#consultantList").find("li").remove();
var consulCityId = $("#baseCity").val();
var consultantName =$("#consultantName").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",consulCityId).append(cityName);
$("#consultCity").append(option);
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName, data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){ success:function(json){
for( for(var i = 0; i <=json.length-1; i++){
var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"]; var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"]; var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100}); var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
...@@ -473,6 +523,7 @@ ...@@ -473,6 +523,7 @@
} }
}); });
}); });
//添加置业顾问弹出层中搜索框的搜索内容 //添加置业顾问弹出层中搜索框的搜索内容
$("#searchConsult").click(function(){ $("#searchConsult").click(function(){
var consulCityId = $("#consultCity").val(); var consulCityId = $("#consultCity").val();
...@@ -538,6 +589,7 @@ ...@@ -538,6 +589,7 @@
$(this).parent("p").remove(); $(this).parent("p").remove();
}); });
$("#submit").click(function(){ $("#submit").click(function(){
if($("#housename").val()==""){ if($("#housename").val()==""){
alert("请输入楼盘名"); alert("请输入楼盘名");
...@@ -553,7 +605,7 @@ ...@@ -553,7 +605,7 @@
reader.onload = function (e) { reader.onload = function (e) {
var img = $("<img>").attr({"id":"target","src":e.target.result,"heghit":100,"width":100}); 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 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 type = $("<input>").attr({"type":"hidden","name":"data["+i+"][type]","value":4,"property":+i});
var file = $("<input>").attr({"type":"file","name":"files["+(i+1)+"]","property":+(i+1)}).addClass("files"); var file = $("<input>").attr({"type":"file","name":"files["+(i+1)+"]","property":+(i+1)}).addClass("files");
var select = $("<select>").attr({"name":"data["+i+"][buildProperty]"}); var select = $("<select>").attr({"name":"data["+i+"][buildProperty]"});
{% for item in buildProperty %}{{item.id}} {% for item in buildProperty %}{{item.id}}
...@@ -599,7 +651,7 @@ ...@@ -599,7 +651,7 @@
} }
} }
$("#preview,#picList").on("click",".existsCancel",function(){ $("#preview,#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove(); $(this).parent().remove();
}); });
}); });
......
...@@ -12,11 +12,25 @@ ...@@ -12,11 +12,25 @@
<tbody> <tbody>
<tr> <tr>
<th><label for="housename">房源名:</label></th> <th><label for="housename">房源名:</label></th>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code"></td> <td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code" style="width: 150px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="mark">标签:</label></th>
<td> <input name="mark" id="mark" type="text" value="{{mark}}" class="regular-text code"></td>
</tr>
{% if not houseId %}
<tr>
<th><label for="owner_name">业主姓名</label></th>
<td> <input name="owner_name" id="owner_name" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="owner_phone">业主电话</label></th>
<td> <input name="owner_phone" id="owner_phone" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr>
{% endif %}
<tr>
<th><label for="rent">租金</label></th> <th><label for="rent">租金</label></th>
<td> <input name="rent" id="rent" type="text" value="{{result.rent}}" class="regular-text code"></td> <td> <input name="rent" id="rent" type="text" value="{{result.rent}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
</tbody> </tbody>
...@@ -37,23 +51,23 @@ ...@@ -37,23 +51,23 @@
</tr> </tr>
<tr> <tr>
<th><label for="covered_area">面积</label></th> <th><label for="covered_area">面积</label></th>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code"></td> <td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="floor">楼层:</label></th> <th><label for="floor">楼层:</label></th>
<td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code"></td> <td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="faceto">朝向:</label></th> <th><label for="faceto">朝向:</label></th>
<td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code"></td> <td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code" style="width: 70px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="decoration">装修状况</label></th> <th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"></td> <td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code" style="width: 70px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="age">建筑年代</label></th> <th><label for="age">建筑年代</label></th>
<td> <input name="age" type="text" value="{{result.age}}" class="regular-text code"></td> <td> <input name="age" type="text" value="{{result.age}}" class="regular-text code" style="width: 70px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="matching_facilities">配套设施</label></th> <th><label for="matching_facilities">配套设施</label></th>
...@@ -61,17 +75,47 @@ ...@@ -61,17 +75,47 @@
</tr> </tr>
<tr> <tr>
<th><label for="flat">楼号</label></th> <th><label for="flat">楼号</label></th>
<td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code"></td> <td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code" style=" width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="suite"></label></th> <th><label for="suite"></label></th>
<td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code"></td> <td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code" style=" width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="overview">房源点评</label></th> <th><label for="overview">房源点评</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code">{{result.overview}}</textarea></td> <td> <textarea name="overview" rows="4" cols="40" class="large-text code" style=" width: 400px;">{{result.overview}}</textarea></td>
</tr>
<tr>
<th><label for="from">所属地区</label></th>
<td>
<select id="baseCity" name="baseCity">
<option value=""> 城市</option>
{% for item in city %}
<option {{ item.id == result.city_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="baseAreaId" name="baseAreaId">
<option value = "">区域</option>
{% if district %}
{% for item in district %}
<option {{ item.id == result.district_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="basePlateId" name="basePlateId">
<option value = "">板块</option>
{% if district %}
{% for item in plate %}
<option {{ item.id == result.plate_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
</td>
</tr>
<tr>
<th><label for="location">地域坐标</label></th>
<td> <input name="location" id="location" type="text" value="{{result.location}}" class="regular-text code"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h2 class="title">位置及周边</h2> <h2 class="title">位置及周边</h2>
...@@ -83,15 +127,15 @@ ...@@ -83,15 +127,15 @@
</tr> </tr>
<tr> <tr>
<th><label for="address">小区名称</label></th> <th><label for="address">小区名称</label></th>
<td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code"></td> <td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code" style="width: 150px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="traffic">交通线路</label></th> <th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code"></td> <td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code" style="width: 300px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="periphery">周边配套</label></th> <th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code"></td> <td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code" ></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -102,7 +146,25 @@ ...@@ -102,7 +146,25 @@
<tr> <tr>
<th><label>房源相册</label></th> <th><label>房源相册</label></th>
<td> <td>
<div id="picList"></div><br /> <div id="picList">
{% set exists_photo_ids = "" %}
{% for item in images %}
{% if exists_photo_ids != "" %}
{% set exists_photo_ids = exists_photo_ids~"," %}
{% endif %}
{% set exists_photo_ids = exists_photo_ids~item.image_id %}
<p>
<select name="exists_photo[{{ item.image_id }}][type]">
{% for i in photoType %}
<option {{ i.id == item.image_type?"selected":"" }} value="{{ i.id }}">{{ i.value }}</option>
{% endfor %}
</select>
<img src="{{siteUrl}}{{item.path}}" heghit="100" width="100">
<input type="button" value="取消" class="cancel existsCancel">
</p>
{% endfor %}
<input type="hidden" name="exists_photo_ids" value="{{exists_photo_ids}}" >
</div><br />
<button type="button" id="housePicture" class="button action" data-toggle="modal"> <button type="button" id="housePicture" class="button action" data-toggle="modal">
新增 新增
</button> </button>
...@@ -112,7 +174,7 @@ ...@@ -112,7 +174,7 @@
<th><label for="recommend">推荐房源</label></th> <th><label for="recommend">推荐房源</label></th>
<td> <td>
<div id="houseImg"></div><br /> <div id="houseImg"></div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal"> <button type="button" class="button action" data-toggle="modal" data-target="#myModal" id="recHouseBt" >
添加房源 添加房源
</button> </button>
</td> </td>
...@@ -120,23 +182,32 @@ ...@@ -120,23 +182,32 @@
<tr> <tr>
<th><label for="consultant">置业顾问</label></th> <th><label for="consultant">置业顾问</label></th>
<td> <td>
<div id="consultantImg"></div><br /> <div id="consultantImg">
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant"> {% for item in consultant %}
<p>
<span>{{item.name}}</span>
<input type="button" value="删除" class="consultantCancel existsCancel">
<input type="hidden" name="data[recConsultant][]" value="{{item.id}}">
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择置业顾问 选择置业顾问
</button> </button>
</td> </td>
</tr> </tr>
{% if role == 'administrator' %}
<tr> <tr>
<th><label for="from">状态</label></th> <th><label for="from">状态</label></th>
<td> <td>
<select id="status" name="status"> <select id="status" name="status">
<option value="-1"> 状态</option> {% for item in status %}
<option value="0">未审核</option> <option value={{item.status_id}}>{{item.status_name}}</option>
<option value="1">审核</option> {% endfor %}
<option value="2">下架</option>
</select> </select>
</td> </td>
</tr> </tr>
{% endif %}
</tbody> </tbody>
</table> </table>
<input type="text" name="type" value="3" hidden="hidden"> <input type="text" name="type" value="3" hidden="hidden">
...@@ -155,10 +226,6 @@ ...@@ -155,10 +226,6 @@
<div class="modal-body" style="height: 300px;overflow: auto;"> <div class="modal-body" style="height: 300px;overflow: auto;">
<select id="cityId"> <select id="cityId">
<option value="-1"> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select> </select>
<select id="areaId"> <select id="areaId">
<option value = "-1">区域</option> <option value = "-1">区域</option>
...@@ -253,19 +320,21 @@ ...@@ -253,19 +320,21 @@
}); });
}); });
//推荐房源的联动AJAX //根据上方选择的城市,选择推荐房源的默认城市
$("#cityId").change(function(){ $("#recHouseBt").click(function(){
var cityId = $(this).val(); $('#cityId').find('option').remove();
var area = $("#areaId");
var acreage =$("#acreage");
var price = $("#price");
$('#areaId').find('option:not(:first-child)').remove(); $('#areaId').find('option:not(:first-child)').remove();
$('#plateId').find('option:not(:first-child)').remove(); $('#plateId').find('option:not(:first-child)').remove();
$('#price').find('option:not(:first-child)').remove(); $('#price').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove(); $('#acreage').find('option:not(:first-child)').remove();
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
var acreage =$("#acreage");
//城市联动区域 var price = $("#price");
var cityId = $("#baseCity").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
var area = $("#areaId");
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
...@@ -274,6 +343,7 @@ ...@@ -274,6 +343,7 @@
addOption(json,area); addOption(json,area);
} }
}); });
//城市联动房子面积 //城市联动房子面积
$.ajax({ $.ajax({
type: "GET", type: "GET",
...@@ -292,8 +362,26 @@ ...@@ -292,8 +362,26 @@
addOption(json,price); addOption(json,price);
} }
}); });
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&houseType=2",
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);
}
}
});
}); });
//区域联动板块 //区域联动板块
$("#areaId").change(function(){ $("#areaId").change(function(){
var areaId = $("#areaId").val(); var areaId = $("#areaId").val();
...@@ -312,7 +400,7 @@ ...@@ -312,7 +400,7 @@
}); });
//推荐房源下显示图片信息以及房名 //推荐房源下显示图片信息以及房名
$("#cityId,#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){ $("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val(); var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val(); var room = $("#room").val();
...@@ -327,14 +415,21 @@ ...@@ -327,14 +415,21 @@
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=2", data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=2",
success:function(json){ success:function(json){
var result = json.result; var result = json.result;
var urlParams = getUrlParmas();
for(var i = 0; i <result.length; i++){ for(var i = 0; i <result.length; i++){
var name = result[i]["name"]; var name = result[i]["name"];
var id = result[i]['id']; var id = result[i]['id'];
var imgUrl = json.images[id]; var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100}); var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name); var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
if(urlParams["id"]){
if(urlParams["id"]!=id){
$("#houseList").append(li); $("#houseList").append(li);
} }
}else{
$("#houseList").append(li);
}
}
} }
}); });
}); });
...@@ -344,13 +439,15 @@ ...@@ -344,13 +439,15 @@
$searchtext = $("#searchtext").val(); $searchtext = $("#searchtext").val();
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
$.ajax({ $.ajax({
type: "GET", type: "post",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&searchtext="+$searchtext, data: "action=searchHouse&searchText="+$searchtext,
success:function(json){ success:function(json){
for(var i = 0; i <=json.length-1; i++){ var result = json.result;
var name = json[i]["name"]; for(var i = 0; i < result.length; i++){
var imgUrl = json[i]["path"]; 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 img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name); var li = $("<li>").addClass("addImg").append(img).append(name);
$("#houseList").append(li); $("#houseList").append(li);
...@@ -359,18 +456,21 @@ ...@@ -359,18 +456,21 @@
}); });
}) })
//搜索对应城市的置业顾问 //根据上方选择的城市,选择推荐置业顾问的默认城市
$("#consultCity").change(function(){ $("#recConsultantBt").click(function(){
var consulCityId = $("#consultCity").val(); $('#consultCity').find('option').remove();
var consultantName =$("#consultantName").val();
$("#consultantList").find("li").remove(); $("#consultantList").find("li").remove();
var consulCityId = $("#baseCity").val();
var consultantName =$("#consultantName").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",consulCityId).append(cityName);
$("#consultCity").append(option);
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName, data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){ success:function(json){
for( for(var i = 0; i <=json.length-1; i++){
var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"]; var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"]; var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100}); var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
...@@ -511,6 +611,21 @@ ...@@ -511,6 +611,21 @@
} }
} }
function getUrlParmas(){
var href = location.search.substr(1,location.search.length-1);
var params = href.split("&");
var map = {};
for(item in params){
var key = params[item].split("=")[0] || "";
var value = params[item].split("=")[1] || "";
map[key] = value;
}
return map;
}
$("#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
});
}); });
})(jQuery); })(jQuery);
......
<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="{{page}}"/>
<input type="hidden" name="hasSearch" value="1"/>
<select id="listCity" name="listCity">
{% if hasSearch and options.cityName %}
<option value="{{options.cityId}}"> {{options.cityName}}</option>
{% else %}
<option value="0"> 城市</option>
{% endif %}
</select>
<select id="listDistrict" name="listDistrict">
{% if hasSearch and options.districtName %}
<option value="{{options.districtId}}"> {{options.districtName}}</option>
{% else %}
<option value="0">区域</option>
{% endif %}
</select>
<select id="listPlate" name="listPlate">
{% if hasSearch and options.districtName and options.plateName %}
<option value="{{options.plateId}}">{{options.plateName}}</option>
{% else %}
<option value="0">板块</option>
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
<option value="{{buildPropertyId}}"> {{buildProperty}}</option>
{% else %}
<option value="0"> 房型</option>
{% endif %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% endif %}
</select>
<select name="status" name="status">
{% if hasSearch and status %}
{% for item in status %}
<option value="{{ item.status_id }}">{{ item.status_name }}</option>
{% endfor %}
{% else %}
<option value="-1">状态</option>
{% endif %}
<option value="0">未审核</option>
<option value="1">审核</option>
<option value="2">自售</option>
<option value="3">他售</option>
<option value="4">无效</option>
<option value="5">重激活</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 -->
{{function("addRentTable")}}
</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>
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<head> <head>
...@@ -12,15 +13,29 @@ ...@@ -12,15 +13,29 @@
<tbody> <tbody>
<tr> <tr>
<th><label for="housename">房源名:</label></th> <th><label for="housename">房源名:</label></th>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code"></td> <td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="housename">标签:</label></th>
<td> <input name="mark" id="mark" type="text" value="{{mark}}" class="regular-text code"></td>
</tr>
{% if not houseId %}
<tr>
<th><label for="owner_name">业主姓名</label></th>
<td> <input name="owner_name" id="owner_name" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="owner_phone">业主电话</label></th>
<td> <input name="owner_phone" id="owner_phone" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr>
{% endif %}
<tr>
<th><label for="total_price">售价</label></th> <th><label for="total_price">售价</label></th>
<td> <input name="total_price" id="total_price" type="text" value="{{result.total_price}}" class="regular-text code"></td> <td> <input name="total_price" id="total_price" type="text" value="{{result.total_price}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="average_price">单价</label></th> <th><label for="average_price">单价</label></th>
<td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code"></td> <td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -39,35 +54,35 @@ ...@@ -39,35 +54,35 @@
</tr> </tr>
<tr> <tr>
<th><label for="covered_area">面积</label></th> <th><label for="covered_area">面积</label></th>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code"></td> <td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code" style="width: 90px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="floor">楼层:</label></th> <th><label for="floor">楼层:</label></th>
<td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code"></td> <td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code" style=" width: 70px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="faceto">朝向:</label></th> <th><label for="faceto">朝向:</label></th>
<td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code"></td> <td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code" style=" width: 70px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="decoration">装修状况</label></th> <th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"></td> <td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code" style=" width: 70px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="age">建筑年代</label></th> <th><label for="age">建筑年代</label></th>
<td> <input name="age" type="text" value="{{result.age}}" class="regular-text code"></td> <td> <input name="age" type="text" value="{{result.age}}" class="regular-text code" style=" width: 70px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="flat">楼号</label></th> <th><label for="flat">楼号</label></th>
<td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code"></td> <td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code" style=" width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="suite"></label></th> <th><label for="suite"></label></th>
<td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code"></td> <td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code" style=" width: 50px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="overview">房源点评</label></th> <th><label for="overview">房源点评</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code">{{result.overview}} <td> <textarea name="overview" rows="4" cols="40" class="large-text code" style=" width: 400px;">{{result.overview}}
</textarea></td> </textarea></td>
</tr> </tr>
<tr> <tr>
...@@ -97,6 +112,11 @@ ...@@ -97,6 +112,11 @@
</select> </select>
</td> </td>
</tr> </tr>
<tr>
<th><label for="location">地域坐标</label></th>
<td> <input name="location" id="location" type="text" value="{{result.location}}" class="regular-text code"></td>
</tr>
</tbody> </tbody>
</table> </table>
<h2 class="title">位置及周边</h2> <h2 class="title">位置及周边</h2>
...@@ -108,15 +128,15 @@ ...@@ -108,15 +128,15 @@
</tr> </tr>
<tr> <tr>
<th><label for="address">小区名称</label></th> <th><label for="address">小区名称</label></th>
<td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code"></td> <td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code" style="width: 150px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="traffic">交通线路</label></th> <th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code"></td> <td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code" style="width: 300px;"></td>
</tr> </tr>
<tr> <tr>
<th><label for="periphery">周边配套</label></th> <th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code"></td> <td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code" style="width: 300px;"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -127,17 +147,43 @@ ...@@ -127,17 +147,43 @@
<tr> <tr>
<th><label>房源相册</label></th> <th><label>房源相册</label></th>
<td> <td>
<div id="picList"></div><br /> <div id="picList">
{% set exists_photo_ids = "" %}
{% for item in images %}
{% if exists_photo_ids != "" %}
{% set exists_photo_ids = exists_photo_ids~"," %}
{% endif %}
{% set exists_photo_ids = exists_photo_ids~item.image_id %}
<p>
<select name="exists_photo[{{ item.image_id }}][type]">
{% for i in photoType %}
<option {{ i.id == item.image_type?"selected":"" }} value="{{ i.id }}">{{ i.value }}</option>
{% endfor %}
</select>
<img src="{{siteUrl}}{{item.path}}" heghit="100" width="100">
<input type="button" value="取消" class="cancel existsCancel">
</p>
{% endfor %}
<input type="hidden" name="exists_photo_ids" value="{{exists_photo_ids}}" >
</div><br />
<button type="button" id="housePicture" class="button action" data-toggle="modal"> <button type="button" id="housePicture" class="button action" data-toggle="modal">
新增 新增
</button> </button>
</td> </td>
</tr> </tr>
<tr> <tr>
<th><label for="recommend">推荐房源</label></th> <th><label for="traffic">推荐房源</label></th>
<td> <td>
<div id="houseImg"></div><br /> <div id="houseImg">
<button type="button" class="button action" data-toggle="modal" data-target="#myModal"> {% for item in recommends %}
<p>
<img src="{{siteUrl}}{{item.path}}" height="100" width="100">
<input type="button" value="删除" class="imgCancel existsCancel">
<input type="hidden" name="data[recommend][]" value="{{item.id}}">
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal" id="recHouseBt">
添加房源 添加房源
</button> </button>
</td> </td>
...@@ -145,34 +191,41 @@ ...@@ -145,34 +191,41 @@
<tr> <tr>
<th><label for="consultant">置业顾问</label></th> <th><label for="consultant">置业顾问</label></th>
<td> <td>
<div id="consultantImg"></div><br /> <div id="consultantImg">
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant"> {% for item in consultant %}
<p>
<span>{{item.name}}</span>
<input type="button" value="删除" class="consultantCancel existsCancel">
<input type="hidden" name="data[recConsultant][]" value="{{item.id}}">
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择置业顾问 选择置业顾问
</button> </button>
</td> </td>
</tr> </tr>
{% if role == 'administrator' %}
<tr> <tr>
<th><label for="from">状态</label></th> <th><label for="from">状态</label></th>
<td> <td>
<select id="status" name="status"> <select id="status" name="status">
<option value="-1"> 状态</option> {% for item in status %}
<option value="0">未审核</option> <option value={{item.status_id}}>{{item.status_name}}</option>
<option value="1">审核</option> {% endfor %}
<option value="2">下架</option>
</select> </select>
</td> </td>
</tr> </tr>
{% endif %}
</tbody> </tbody>
</table> </table>
<input type="text" name="type" value="2" hidden="hidden"> <input type="text" name="type" value="2" hidden="hidden">
{% if houseId %} {% if houseId %}
<input type="text" name="houseId" value="{{houseId}}" hidden="hidden"> <input type="text" name="houseId" value="{{houseId}}" hidden="hidden">
{% endif %} {% endif %}
<input type="submit" id="submit" class="button action"> <input type="submit" id="submit" class="button action">
</form> </form>
<!-- Modal --> <!-- Modal -->
<!-- 新增房源弹出层 --> <!-- 新增房源弹出层 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
...@@ -243,7 +296,6 @@ ...@@ -243,7 +296,6 @@
<script> <script>
(function($){ (function($){
$(document).ready(function(){ $(document).ready(function(){
//主力房源中选择图片file的下标 //主力房源中选择图片file的下标
var i = 0; var i = 0;
//基本信息的联动AJAX //基本信息的联动AJAX
...@@ -279,19 +331,21 @@ ...@@ -279,19 +331,21 @@
}); });
}); });
//推荐房源的联动AJAX //根据上方选择的城市,选择推荐房源的默认城市
$("#cityId").change(function(){ $("#recHouseBt").click(function(){
var cityId = $(this).val(); $('#cityId').find('option').remove();
var area = $("#areaId");
var acreage =$("#acreage");
var price = $("#price");
$('#areaId').find('option:not(:first-child)').remove(); $('#areaId').find('option:not(:first-child)').remove();
$('#plateId').find('option:not(:first-child)').remove(); $('#plateId').find('option:not(:first-child)').remove();
$('#price').find('option:not(:first-child)').remove(); $('#price').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove(); $('#acreage').find('option:not(:first-child)').remove();
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
var acreage =$("#acreage");
//城市联动区域 var price = $("#price");
var cityId = $("#baseCity").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
var area = $("#areaId");
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
...@@ -300,6 +354,7 @@ ...@@ -300,6 +354,7 @@
addOption(json,area); addOption(json,area);
} }
}); });
//城市联动房子面积 //城市联动房子面积
$.ajax({ $.ajax({
type: "GET", type: "GET",
...@@ -318,6 +373,23 @@ ...@@ -318,6 +373,23 @@
addOption(json,price); addOption(json,price);
} }
}); });
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&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);
}
}
});
}); });
//区域联动板块 //区域联动板块
...@@ -338,7 +410,7 @@ ...@@ -338,7 +410,7 @@
}); });
//推荐房源下显示图片信息以及房名 //推荐房源下显示图片信息以及房名
$("#cityId,#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){ $("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val(); var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val(); var room = $("#room").val();
...@@ -353,14 +425,21 @@ ...@@ -353,14 +425,21 @@
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=1", data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=1",
success:function(json){ success:function(json){
var result = json.result; var result = json.result;
var urlParams = getUrlParmas();
for(var i = 0; i <result.length; i++){ for(var i = 0; i <result.length; i++){
var name = result[i]["name"]; var name = result[i]["name"];
var id = result[i]['id']; var id = result[i]['id'];
var imgUrl = json.images[id]; var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100}); var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name); var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
if(urlParams["id"]){
if(urlParams["id"]!=id){
$("#houseList").append(li); $("#houseList").append(li);
} }
}else{
$("#houseList").append(li);
}
}
} }
}); });
}); });
...@@ -370,13 +449,15 @@ ...@@ -370,13 +449,15 @@
$searchtext = $("#searchtext").val(); $searchtext = $("#searchtext").val();
$("#houseList").find("li").remove(); $("#houseList").find("li").remove();
$.ajax({ $.ajax({
type: "GET", type: "post",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&searchtext="+$searchtext, data: "action=searchHouse&searchText="+$searchtext,
success:function(json){ success:function(json){
for(var i = 0; i <=json.length-1; i++){ var result = json.result;
var name = json[i]["name"]; for(var i = 0; i < result.length; i++){
var imgUrl = json[i]["path"]; 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 img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name); var li = $("<li>").addClass("addImg").append(img).append(name);
$("#houseList").append(li); $("#houseList").append(li);
...@@ -385,18 +466,21 @@ ...@@ -385,18 +466,21 @@
}); });
}) })
//搜索对应城市的置业顾问 //根据上方选择的城市,选择推荐置业顾问的默认城市
$("#consultCity").change(function(){ $("#recConsultantBt").click(function(){
var consulCityId = $("#consultCity").val(); $('#consultCity').find('option').remove();
var consultantName =$("#consultantName").val();
$("#consultantList").find("li").remove(); $("#consultantList").find("li").remove();
var consulCityId = $("#baseCity").val();
var consultantName =$("#consultantName").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",consulCityId).append(cityName);
$("#consultCity").append(option);
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "/tospur/wp-admin/admin-ajax.php", url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName, data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){ success:function(json){
for( for(var i = 0; i <=json.length-1; i++){
var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"]; var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"]; var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100}); var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
...@@ -537,6 +621,21 @@ ...@@ -537,6 +621,21 @@
} }
} }
function getUrlParmas(){
var href = location.search.substr(1,location.search.length-1);
var params = href.split("&");
var map = {};
for(item in params){
var key = params[item].split("=")[0] || "";
var value = params[item].split("=")[1] || "";
map[key] = value;
}
return map;
}
$("#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
});
}); });
})(jQuery); })(jQuery);
......
<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="{{page}}"/>
<input type="hidden" name="hasSearch" value="1"/>
<select id="listCity" name="listCity">
{% if hasSearch and options.cityName %}
<option value="{{options.cityId}}"> {{options.cityName}}</option>
{% else %}
<option value="0"> 城市</option>
{% endif %}
</select>
<select id="listDistrict" name="listDistrict">
{% if hasSearch and options.districtName %}
<option value="{{options.districtId}}"> {{options.districtName}}</option>
{% else %}
<option value="0">区域</option>
{% endif %}
</select>
<select id="listPlate" name="listPlate">
{% if hasSearch and options.districtName and options.plateName %}
<option value="{{options.plateId}}">{{options.plateName}}</option>
{% else %}
<option value="0">板块</option>
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
<option value="{{buildPropertyId}}"> {{buildProperty}}</option>
{% else %}
<option value="0"> 房型</option>
{% endif %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% endif %}
</select>
<select id="characteristic" name="characteristic">
<option value ="">特色</option>
<option value ="">满5</option>
<option value ="">唯一住房</option>
</select>
<select name="status" name="status">
{% if hasSearch and status %}
{% for item in status %}
<option value="{{ item.status_id }}">{{ item.status_name }}</option>
{% endfor %}
{% else %}
<option value="-1">状态</option>
{% endif %}
<option value="0">未审核</option>
<option value="1">审核</option>
<option value="2">自售</option>
<option value="3">他售</option>
<option value="4">无效</option>
<option value="5">重激活</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 -->
{{function("addSecTable")}}
</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>
...@@ -13,6 +13,7 @@ class Config { ...@@ -13,6 +13,7 @@ class Config {
const DIC_AREA_TABLE = 'dic_area'; const DIC_AREA_TABLE = 'dic_area';
const DIC_UNITPRICERANGE_TABLE = 'dic_unitpricerange'; const DIC_UNITPRICERANGE_TABLE = 'dic_unitpricerange';
const DIC_TOTALPRICE_TABLE = 'dic_totalprice'; const DIC_TOTALPRICE_TABLE = 'dic_totalprice';
const DIC_RENTALPRICE_TABLE = 'dic_rentalprice';
const DIC_PHOTOTYPE_TABLE = "dic_phototype"; const DIC_PHOTOTYPE_TABLE = "dic_phototype";
const TOSPUR_ORGANIZATION_TABLE = 'tospur_organization'; const TOSPUR_ORGANIZATION_TABLE = 'tospur_organization';
const TOSPUR_CONSULTANT = 'tospur_consultant'; const TOSPUR_CONSULTANT = 'tospur_consultant';
...@@ -23,7 +24,6 @@ class Config { ...@@ -23,7 +24,6 @@ class Config {
const TOSPUR_VIEW_HOUSE_TABLE = 'tospur_view_house'; const TOSPUR_VIEW_HOUSE_TABLE = 'tospur_view_house';
const TOSPUR_VERIFY_TABLE = 'tospur_verify'; const TOSPUR_VERIFY_TABLE = 'tospur_verify';
const WP_USERS_TABLE = 'wp_users'; const WP_USERS_TABLE = 'wp_users';
const DIC_RENTALPRICE_TABLE = 'dic_rentalprice';
//sync url //sync url
......
...@@ -63,6 +63,180 @@ class InsertDao{ ...@@ -63,6 +63,180 @@ class InsertDao{
return 505; return 505;
} }
} }
public static function addMainImage($houseId,$data){
global $wpdb;
//图片信息
$uploadedfile = $_FILES['files'];
//主力房源的图片与房子信息关联插入数据库
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'])) {
$uploadFileName = end(explode("/",$url));
//上传成功后将图片信息存入tospur_image表
$insert_image_array = array(
'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) {
return 501;
}
//获取插入图片的id
$imgid = $wpdb->insert_id;
//房源类型、面积与图片关联表
if($data[$key]["type"] == "0"){
$houseTypeArea = array(
'house_id' => $houseId,
"buildproperty_id" => $data["$key"]["buildProperty"],
"house_area" => $data["$key"]["housearea"],
"image_id" => $imgid
);
$houseTypeAreaRes = $wpdb->insert('a_district_area', $houseTypeArea);
if (!$houseTypeAreaRes) {
return 502;
}
}
//将房源id与图片id储存到关联表中
$house_img_array = array(
'house_id' => $houseId,
'image_id' => $imgid,
);
$houseImgRes = $wpdb->insert('a_house_image', $house_img_array);
if (!$houseImgRes) {
return 503;
}
} else {
return $movefile['error'];
}
}
}
}
}
public static function addRecommend($houseId,$data){
global $wpdb;
if(isset($data["recommend"])){
//插入推荐房源id与添加新房id到关联表a_house_recommend
foreach($data["recommend"] as $value){
$a_house_recommendArray = array(
"house_id" => $houseId,
"recommend_id" =>$value
);
$a_house_recommendRes = $wpdb->insert(Config::A_HOUSE_RECOMMEND_TABLE, $a_house_recommendArray);
if(!$a_house_recommendRes){
return 504;
}
}
}
}
public static function addRecConsultant($houseId,$data){
global $wpdb;
if($data["recConsultant"]){
//插入推荐置业顾问user_id与新房id到关联表a_house_recommend
foreach($data["recConsultant"] as $val){
$a_house_userArray = array(
"user_id" => $val,
"house_id" => $houseId,
"user_type" =>1
);
$a_house_userRes = $wpdb->replace(Config::A_HOUSE_USER_TABLE,$a_house_userArray);
if(!$a_house_userRes){
return 505;
}
}
}
}
public static function addHouseTag($tags, $house_id)
{
global $wpdb;
$arr = array(',' => ',');
$in = explode(',', strtr($tags, $arr));
//string
$tags_string = InsertDao::arrayToString($in);
//房源的标签id数组
$tags_ids = array();
//查询存在的标签
$sql = "select * from tospur_tag where name in " . $tags_string;
$has_tags_result = $wpdb->get_results($sql);
//排除存在的标签,剩下未有的标签和存在标签id数组
foreach ($has_tags_result as $key => $value) {
if (($key = array_search($value->name, $in)) !== false) {
unset($in[$key]);
}
$tags_ids[] = $value->id;
}
//添加未有的标签
foreach ($in as $value) {
$insert = $wpdb->insert(
'tospur_tag',
array(
'name' => $value
)
);
if($insert){
$tags_ids[] = $wpdb->insert_id;
}
}
//删除该房源的标签关联后,添加新的标签关联
$wpdb->delete(
'a_house_tag',
array(
'house_id' => $house_id
)
);
foreach ($tags_ids as $value) {
$wpdb->insert(
'a_house_tag',
array(
'house_id' => $house_id,
'tag_id' => $value
)
);
}
}
public static function arrayToString($array)
{
$string = "(";
$length = count($array);
$i = 0;
foreach ($array as $key => $value) {
$i++;
$string .= "'" . $value . "'";
if ($i != $length) {
$string .= ",";
}
}
$string .= ")";
return $string;
}
} }
......
...@@ -5,7 +5,7 @@ require_once(PLUGIN_DIR . 'Tools/Image.php'); ...@@ -5,7 +5,7 @@ require_once(PLUGIN_DIR . 'Tools/Image.php');
class SearchDao class SearchDao
{ {
public static function ajax_serachCity() public static function ajax_searchCity()
{ {
wp_send_json(SearchDao::searchCity($_GET["cityId"], $_GET['districtId'])); wp_send_json(SearchDao::searchCity($_GET["cityId"], $_GET['districtId']));
} }
...@@ -162,12 +162,13 @@ class SearchDao ...@@ -162,12 +162,13 @@ class SearchDao
'rentalPrice' => $_POST['rentalPrice'], 'rentalPrice' => $_POST['rentalPrice'],
'searchText' => $_POST['searchText'], 'searchText' => $_POST['searchText'],
'houseType' => $_POST['houseType'], 'houseType' => $_POST['houseType'],
'feature' => $_POST['feature'],
'userType' => $_POST['userType'], 'userType' => $_POST['userType'],
'userId' => $_POST['userId'], 'userId' => $_POST['userId'],
'index' => $_POST['index'] 'index' => $_POST['index']
) )
); );
$array = SearchDao::get_house_image_and_tags($house_result); $array = SearchDao::get_house_list($house_result);
wp_send_json($array); wp_send_json($array);
} }
...@@ -175,20 +176,32 @@ class SearchDao ...@@ -175,20 +176,32 @@ class SearchDao
{ {
global $wpdb; global $wpdb;
$params = array(); $params = array();
$buildpropertySql = null; $addSql = null;
$addWhereSql = null;
$orderbySql = null; $orderbySql = null;
if ($array['houseType'] == 0) { 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". $addSql = " 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"; " 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"; $orderbySql = " group by th.id order by th.creattime DESC";
}else if ($array['houseType'] == 1||$array['houseType'] == 2) { }else if ($array['houseType'] == 1) {
$buildpropertySql = " left join (select value as bp_value,literal as bp_literal from dic_buildproperty) dbp on th.buildproperty_id = dbp.bp_value"; $addSql = " left join (select value as bp_value,literal as bp_literal from dic_buildproperty) dbp on th.buildproperty_id = dbp.bp_value";
if ($array['feature'] > -1) {
$addSql .= " left join (select house_id,tag_id from a_house_tag) aht on th.id = aht.house_id";
$addWhereSql = " and tag_id = ".$array['feature'];
}
$orderbySql = " order by th.creattime DESC";
}else if($array['houseType'] == 2){
$addSql = " 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"; $orderbySql = " order by th.creattime DESC";
} }
$sql = "select * from tospur_house th". $sql = "select th.id,th.house_type,th.name,th.latest_news,th.address,th.average_price,th.community_name,th.covered_area,th.total_price,th.decoration,th.rent,".
$buildpropertySql. "ti.path,dr.literal,dbp.bp_literal,(SELECT GROUP_CONCAT(left(tt.name,3)) from a_house_tag aht".
" LEFT JOIN tospur_tag tt on tt.id = aht.tag_id".
" where aht.house_id = th.id) as tags from tospur_house th".
$addSql.
" left join dic_city dc on th.plate_id = dc.plateId". " 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". " left join (select id as rid,value as r_value,literal from dic_room) dr on th.room_id = dr.r_value".
" left join (select id as image_id,path from tospur_image) ti on ti.image_id = th.frontCover_id".
" where 1=1"; " where 1=1";
if ($array['cityId'] > -1) { if ($array['cityId'] > -1) {
$params[] = $array['cityId']; $params[] = $array['cityId'];
...@@ -204,7 +217,11 @@ class SearchDao ...@@ -204,7 +217,11 @@ class SearchDao
} }
if ($array['buildPropertyId'] > -1) { if ($array['buildPropertyId'] > -1) {
$params[] = $array['buildPropertyId']; $params[] = $array['buildPropertyId'];
$sql = $sql . " and buildproperty_id=%d"; if ($array['houseType'] == 0) {
$sql = $sql . " and ada.buildproperty_id=%d";
}else{
$sql = $sql . " and th.buildproperty_id=%d";
}
} }
if ($array['roomId'] > -1) { if ($array['roomId'] > -1) {
$params[] = $array['roomId']; $params[] = $array['roomId'];
...@@ -220,7 +237,7 @@ class SearchDao ...@@ -220,7 +237,7 @@ class SearchDao
$priceArray = explode("-", $array['totalPrice']); $priceArray = explode("-", $array['totalPrice']);
$params[] = $priceArray[0]; $params[] = $priceArray[0];
$params[] = $priceArray[1]; $params[] = $priceArray[1];
$sql = $sql . " and total_price between %d and %d"; $sql = $sql . " and total_price/10000 between %d and %d";
} }
if ($array['rentalPrice'] > -1) { if ($array['rentalPrice'] > -1) {
$priceArray = explode("-", $array['rentalPrice']); $priceArray = explode("-", $array['rentalPrice']);
...@@ -243,6 +260,9 @@ class SearchDao ...@@ -243,6 +260,9 @@ class SearchDao
$sql = $sql . " and (name like '%s' or address like '%s')"; $sql = $sql . " and (name like '%s' or address like '%s')";
} }
if($addWhereSql){
$sql = $sql . $addWhereSql;
}
$sql = $sql . $orderbySql; $sql = $sql . $orderbySql;
if ($array['index'] > -1) { if ($array['index'] > -1) {
...@@ -285,7 +305,7 @@ class SearchDao ...@@ -285,7 +305,7 @@ class SearchDao
return $result; return $result;
} }
public static function get_house_image_and_tags($house_result) public static function get_house_list($house_result)
{ {
$array = array(); $array = array();
if ($house_result) { if ($house_result) {
...@@ -294,19 +314,8 @@ class SearchDao ...@@ -294,19 +314,8 @@ class SearchDao
foreach ($house_result as $key => $value) { foreach ($house_result as $key => $value) {
$house_id = $value->id; $house_id = $value->id;
$house_ids[] = $house_id; $house_ids[] = $house_id;
} if($value->path){
$tag_result = SearchDao::search_house_tag($house_ids); $value->path = home_url() . Image::getImage($value->path,'small');
//标签
if ($tag_result) {
foreach ($tag_result as $key => $value) {
$array['tags'][$value->house_id][] = $value->name;
}
}
//图片
$image_result = SearchDao::search_house_image($house_ids);
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; $array['result'] = $house_result;
...@@ -316,22 +325,9 @@ class SearchDao ...@@ -316,22 +325,9 @@ class SearchDao
return $array; return $array;
} }
public static function search_house_image($house_ids) public static function searchFeature()
{ {
$string = '(' . implode(',', array_map('intval', $house_ids)) . ')'; $sql = 'select id,name as value from '.Config::TOSPUR_TAG_TABLE.' where type = 1;';
$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 ' . $string . ' group by house_id';
global $wpdb;
return $wpdb->get_results($sql);
}
public static function search_house_tag($house_ids)
{
$string = '(' . implode(',', array_map('intval', $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 ' . $string;
global $wpdb; global $wpdb;
return $wpdb->get_results($sql); return $wpdb->get_results($sql);
} }
...@@ -387,16 +383,22 @@ class SearchDao ...@@ -387,16 +383,22 @@ class SearchDao
where ti.image_type in (1,5) and house_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"; in (select recommend_id from a_house_recommend where house_id = %d) group by house_id";
$recommends = $wpdb->get_results($wpdb->prepare($recommendSql,$hid)); $recommends = $wpdb->get_results($wpdb->prepare($recommendSql,$hid));
if(count($recommends) == 0){
$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 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){ foreach($recommends as $key => $value){
$value->path = Image::getImage($value->path,'small'); $value->path = Image::getImage($value->path,'small');
} }
$context['recommends'] = $recommends; $context['recommends'] = $recommends;
$consultantSql = 'select id,name,mobile,imageUrl,s.average_score from tospur_consultant c $consultantSql = "select id,name,mobile,imageUrl,s.average_score from tospur_consultant c
LEFT JOIN (select consultant_id,sum(score)/count(score) as average_score LEFT JOIN (select consultant_id,sum(score)/count(score) as average_score
from tospur_consultant_score from tospur_consultant_score
where valid=1 group by consultant_id) s on c.id = s.consultant_id where valid=1 group by consultant_id) s on c.id = s.consultant_id
where id in(select user_id from a_house_user where user_type = 1 and house_id = %d limit {$consultantLimit});'; where id in(select user_id from a_house_user where user_type = 1 and house_id = %d) limit {$consultantLimit};";
$consultant = $wpdb->get_results($wpdb->prepare($consultantSql,$hid)); $consultant = $wpdb->get_results($wpdb->prepare($consultantSql,$hid));
$context['consultant'] = $consultant; $context['consultant'] = $consultant;
...@@ -420,69 +422,57 @@ class SearchDao ...@@ -420,69 +422,57 @@ class SearchDao
return $context; return $context;
} }
public static function addHouseTag($tags, $house_id) public static function searchHouseTag($houseId){
{
global $wpdb; global $wpdb;
$arr = array(',' => ','); $sql = "select tt.name from a_house_tag aht
$in = explode(',', strtr($tags, $arr)); LEFT JOIN tospur_tag tt on aht.tag_id = tt.id
//string where aht.house_id = %d;";
$tags_string = SearchDao::arrayToString($in); $results = $wpdb->get_results($wpdb->prepare($sql,$houseId));
//房源的标签id数组 $tags = array();
$tags_ids = array(); foreach($results as $item){
//查询存在的标签 $tags[] =$item->name;
$sql = "select * from tospur_tag where name in " . $tags_string;
$has_tags_result = $wpdb->get_results($sql);
//排除存在的标签,剩下未有的标签和存在标签id数组
foreach ($has_tags_result as $key => $value) {
if (($key = array_search($value->name, $in)) !== false) {
unset($in[$key]);
}
$tags_ids[] = $value->id;
}
//添加未有的标签
foreach ($in as $value) {
$insert = $wpdb->insert(
'tospur_tag',
array(
'name' => $value
)
);
if($insert){
$tags_ids[] = $wpdb->insert_id;
} }
return implode(",",$tags);
} }
//删除该房源的标签关联后,添加新的标签关联
$wpdb->delete( public static function searchStatusType($statusType){
'a_house_tag', global $wpdb;
array( $sql="select status_type,status_id,status_name from tospur_status where status_type = %d";
'house_id' => $house_id $results = $wpdb->get_results($wpdb->prepare($sql,$statusType));
) return $results;
);
foreach ($tags_ids as $value) {
$wpdb->insert(
'a_house_tag',
array(
'house_id' => $house_id,
'tag_id' => $value
)
);
}
} }
public static function arrayToString($array) public static function searchForCDP($cityId=null,$districtId=null,$plateId=null){
{ global $wpdb;
$string = "("; $selectName = "";
$length = count($array); $where = " where 1=1 ";
$i = 0; $params = array();
foreach ($array as $key => $value) { if($cityId != 0){
$i++; $where .= " and cityId = %d";
$string .= "'" . $value . "'"; $selectName = "cityId,cityName";
if ($i != $length) { $params[] = $cityId;
$string .= ",";
} }
if($districtId != 0){
$where .= " and districtId = %d";
$selectName = "cityId,cityName,districtId,districtName";
$params[] = $districtId;
} }
$string .= ")"; if($plateId != 0){
return $string; $where .= " and plateId = %d";
$selectName = "cityId,cityName,districtId,districtName,plateId,plateName";
$params[] = $plateId;
}
$result = $wpdb->get_row($wpdb->prepare('select ' . $selectName . ' from ' . Config::DIC_CITY_TABLE . $where,$params));
return $result;
} }
public static function searchStatus($type=null,$status=null){
global $wpdb;
if($status!=null && $type!=null){
$sql = "select status_id,status_name from tospur_status where status_type =".$type." and status_id =".$status;
$result = $wpdb->get_results($sql);
}
return $result;
}
} }
\ No newline at end of file
...@@ -121,7 +121,7 @@ class consultantScoreList extends WP_List_Table ...@@ -121,7 +121,7 @@ class consultantScoreList extends WP_List_Table
{ {
global $wpdb; global $wpdb;
$per_page = 5; $per_page = 10;
$columns = $this->get_columns(); $columns = $this->get_columns();
$hidden = array(); $hidden = array();
$sortable = $this->get_sortable_columns(); $sortable = $this->get_sortable_columns();
......
...@@ -12,6 +12,7 @@ add_action('init', 'tospur_init'); ...@@ -12,6 +12,7 @@ add_action('init', 'tospur_init');
function tospur_init() function tospur_init()
{ {
require_once(PLUGIN_DIR . 'Config.php');
require_once(PLUGIN_DIR . 'Tools/TCSync.php'); require_once(PLUGIN_DIR . 'Tools/TCSync.php');
require_once(PLUGIN_DIR . 'Tools/Image.php'); require_once(PLUGIN_DIR . 'Tools/Image.php');
require_once(PLUGIN_DIR . 'Dao/SearchDao.php'); require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
...@@ -19,6 +20,10 @@ function tospur_init() ...@@ -19,6 +20,10 @@ function tospur_init()
require_once(PLUGIN_DIR . 'Admin/newHouseList.php'); require_once(PLUGIN_DIR . 'Admin/newHouseList.php');
require_once(PLUGIN_DIR . 'Admin/secHandHouse.php'); require_once(PLUGIN_DIR . 'Admin/secHandHouse.php');
require_once(PLUGIN_DIR . 'Admin/secHandHouseList.php'); require_once(PLUGIN_DIR . 'Admin/secHandHouseList.php');
require_once(PLUGIN_DIR . 'Admin/rentHouse.php');
require_once(PLUGIN_DIR . 'Admin/rentHouseList.php');
require_once(PLUGIN_DIR . 'Admin/feature.php');
require_once(PLUGIN_DIR . 'Admin/introduction.php');
require_once('consultant_score.php'); require_once('consultant_score.php');
require_once('view_house.php'); require_once('view_house.php');
add_action('admin_menu', 'reset_menu'); add_action('admin_menu', 'reset_menu');
...@@ -29,8 +34,8 @@ function tospur_init() ...@@ -29,8 +34,8 @@ function tospur_init()
function tospur_theme_format(){ function tospur_theme_format(){
//移除 //移除
add_filter('admin_footer_text', tospur_remove_admin_footer_text, 1000); add_filter('admin_footer_text', 'tospur_remove_admin_footer_text', 1000);
add_filter('update_footer', tospur_remove_admin_footer_upgrade, 1000); add_filter('update_footer', 'tospur_remove_admin_footer_upgrade', 1000);
add_action('login_enqueue_scripts', 'tospur_login_logo'); add_action('login_enqueue_scripts', 'tospur_login_logo');
//admin bar //admin bar
add_action('wp_before_admin_bar_render', 'tospur_remove_admin_bar'); add_action('wp_before_admin_bar_render', 'tospur_remove_admin_bar');
...@@ -71,8 +76,8 @@ function tospur_register_script_style(){ ...@@ -71,8 +76,8 @@ function tospur_register_script_style(){
function tospur_ajax_set() function tospur_ajax_set()
{ {
add_action('wp_ajax_serachCity', 'SearchDao::ajax_serachCity'); add_action('wp_ajax_serachCity', 'SearchDao::ajax_searchCity');
add_action('wp_ajax_nopriv_serachCity', 'SearchDao::ajax_serachCity'); add_action('wp_ajax_nopriv_serachCity', 'SearchDao::ajax_searchCity');
add_action('wp_ajax_searchArea', 'SearchDao::ajax_searchArea'); add_action('wp_ajax_searchArea', 'SearchDao::ajax_searchArea');
add_action('wp_ajax_nopriv_searchArea', 'SearchDao::ajax_searchArea'); add_action('wp_ajax_nopriv_searchArea', 'SearchDao::ajax_searchArea');
add_action('wp_ajax_searchBuildProperty', 'SearchDao::ajax_searchBuildProperty'); add_action('wp_ajax_searchBuildProperty', 'SearchDao::ajax_searchBuildProperty');
...@@ -85,10 +90,14 @@ function tospur_ajax_set() ...@@ -85,10 +90,14 @@ function tospur_ajax_set()
add_action('wp_ajax_nopriv_searchTotalPrice', 'SearchDao::ajax_searchTotalPrice'); add_action('wp_ajax_nopriv_searchTotalPrice', 'SearchDao::ajax_searchTotalPrice');
add_action('wp_ajax_searchOrganization', 'SearchDao::ajax_searchOrganization'); add_action('wp_ajax_searchOrganization', 'SearchDao::ajax_searchOrganization');
add_action('wp_ajax_nopriv_searchOrganization', 'SearchDao::ajax_searchOrganization'); add_action('wp_ajax_nopriv_searchOrganization', 'SearchDao::ajax_searchOrganization');
add_action( 'wp_ajax_searchHouse', 'SearchDao::ajax_searchHouse' ); add_action('wp_ajax_searchHouse', 'SearchDao::ajax_searchHouse');
add_action( 'wp_ajax_nopriv_searchHouse', 'SearchDao::ajax_searchHouse'); add_action('wp_ajax_nopriv_searchHouse', 'SearchDao::ajax_searchHouse');
add_action( 'wp_ajax_searchConsultant', 'SearchDao::ajax_searchConsultant' ); add_action('wp_ajax_searchConsultant', 'SearchDao::ajax_searchConsultant');
add_action( 'wp_ajax_nopriv_searchConsultant', 'SearchDao::ajax_searchConsultant'); add_action('wp_ajax_nopriv_searchConsultant', 'SearchDao::ajax_searchConsultant');
add_action('wp_ajax_add_feature', 'feature::ajax_add_feature');
add_action('wp_ajax_nopriv_add_feature', 'feature::ajax_add_feature');
add_action('wp_ajax_submit_introduction', 'introduction::ajax_submit_introduction');
add_action('wp_ajax_nopriv_submit_introduction', 'introduction::ajax_submit_introduction');
//后台处理 置业顾问评分 //后台处理 置业顾问评分
add_action('wp_ajax_valid_consultant_score', 'valid_consultant_score'); add_action('wp_ajax_valid_consultant_score', 'valid_consultant_score');
//后台处理 置业顾问 //后台处理 置业顾问
...@@ -129,10 +138,15 @@ function update_consultant() ...@@ -129,10 +138,15 @@ function update_consultant()
function reset_menu() function reset_menu()
{ {
add_menu_page("sync", "同步数据", "manage_options", "1", "do_sync"); add_menu_page("sync", "同步数据", "manage_options", "1", "do_sync");
add_menu_page('nesHouseList','新房列表', 'activate_plugins', 'newHouseList', 'newHouseList', 'dashicons-menu', 6); add_menu_page('nesHouseList','新房列表', 'moderate_comments', 'newHouseList', 'newHouseList', 'dashicons-menu', 6);
add_submenu_page('newHouseList', 'newHouse_title', '添加新房', 'activate_plugins', 'newHouse', 'House::init_view'); add_submenu_page('newHouseList', '添加新房', '添加新房', 'moderate_comments', 'newHouse', 'House::init_view');
add_menu_page('secHandHouseList','二手房列表', 'activate_plugins', 'secHandHouseList', 'secHandHouseList', 'dashicons-menu', 7); add_menu_page('secHandHouseList','二手房列表', 'moderate_comments', 'secHandHouseList', 'secHandHouseList', 'dashicons-menu', 7);
add_submenu_page('secHandHouseList', 'newHouse_title', '添加二手房', 'activate_plugins', 'secHandHouse', 'SecHandHouse::secHandHouse_html'); add_submenu_page('secHandHouseList', '添加二手房', '添加二手房', 'moderate_comments', 'secHandHouse', 'SecHandHouse::secHandHouse_html');
add_submenu_page('secHandHouseList', '特色列表', '特色列表', 'moderate_comments', 'feature_list', 'feature::feature_list_html');
add_submenu_page('secHandHouseList', '添加特色', '添加特色', 'moderate_comments', 'add_feature', 'feature::add_feature_html');
add_menu_page('rentHouseList','租房列表', 'moderate_comments', 'rentHouseList', 'rentHouseList', 'dashicons-menu', 8);
add_submenu_page('rentHouseList', '添加租房', '添加租房', 'moderate_comments', 'rentHouse', 'RentHouse::rentHouse_html');
add_menu_page("introduction", "诚信宣言", "editor", "introduction", "introduction::introduction_html", 'dashicons-menu', 9);
//移除更新信息 //移除更新信息
remove_action( 'admin_notices', 'update_nag', 3 ); remove_action( 'admin_notices', 'update_nag', 3 );
global $menu; global $menu;
...@@ -168,7 +182,7 @@ function reset_menu() ...@@ -168,7 +182,7 @@ function reset_menu()
function do_sync() function do_sync()
{ {
//TCSync::user_sync(); TCSync::user_sync();
//TCSync::organization_sync(); TCSync::organization_sync();
TCSync::other_sync(); TCSync::other_sync();
} }
...@@ -85,7 +85,7 @@ class viewHouseList extends WP_List_Table ...@@ -85,7 +85,7 @@ class viewHouseList extends WP_List_Table
{ {
global $wpdb; global $wpdb;
$per_page = 5; $per_page = 10;
$columns = $this->get_columns(); $columns = $this->get_columns();
$hidden = array(); $hidden = array();
//$sortable = $this->get_sortable_columns(); //$sortable = $this->get_sortable_columns();
......
<?php <?php
require_once('const.php');
$context = array(); $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
$context['url'] = home_url(); $context['url'] = home_url();
Timber::render('comment.html', $context); $user = wp_get_current_user();
$user_id = $user->ID;
if ($user_id == 0) {
wp_redirect($const_login_page);
} else {
$context['user_id'] = $user_id;
Timber::render('comment.html', $context);
}
?> ?>
\ No newline at end of file
...@@ -19,4 +19,25 @@ $const_consultant_info_page = home_url() . '/?page=consultant_info'; ...@@ -19,4 +19,25 @@ $const_consultant_info_page = home_url() . '/?page=consultant_info';
//置业顾问 评分 //置业顾问 评分
$const_score_page = home_url() . '/?page=score'; $const_score_page = home_url() . '/?page=score';
//用户table
define('wp_users_table', 'wp_users');
//房源table
define('tospur_house_table', 'tospur_house');
//预约看房table
define('tospur_view_house_table', 'tospur_view_house');
//置业顾问table
define('tospur_consultant_table', 'tospur_consultant');
//置业顾问table
define('tospur_consultant_score_table', 'tospur_consultant_score');
//验证码table
define('tospur_verify_table', 'tospur_verify');
//图片table
define('tospur_image_table', 'tospur_image');
//房源图片关联table
define('a_house_image_table', 'a_house_image');
//标签table
define('tospur_tag_table', 'tospur_tag');
//房源标签关联table
define('a_house_tag_table', 'a_house_tag');
?> ?>
\ No newline at end of file
<?php <?php
require_once('const.php');
$context = array(); $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
$context['url'] = home_url(); $context['url'] = home_url();
...@@ -11,11 +10,16 @@ if ($user_id != 0) { ...@@ -11,11 +10,16 @@ if ($user_id != 0) {
$current_user = wp_get_current_user(); $current_user = wp_get_current_user();
$consultant_id = isset($_GET['consultant_id'])?$_GET['consultant_id']:$current_user->ID; $consultant_id = isset($_GET['consultant_id'])?$_GET['consultant_id']:$current_user->ID;
$context['consultant_id'] = $consultant_id; $context['consultant_id'] = $consultant_id;
$context['consultant_name'] = get_user_by('id', $consultant_id)->display_name;
$context['consultant'] = get_consultant_info($consultant_id); $context['consultant'] = get_consultant_info($consultant_id);
$context['consultant_mobile'] = $_GET['mobile'];
$context['consultant_score_url'] = $const_score_page . '&consultant_id=' . $consultant_id; $context['consultant_score_url'] = $const_score_page . '&consultant_id=' . $consultant_id;
$context['default_head'] = get_avatar_url(1);
Timber::render('consultant_info.html', $context);
}else{
wp_redirect($const_login_page);
exit;
} }
Timber::render('consultant_info.html', $context);
?> ?>
\ No newline at end of file
...@@ -4,20 +4,27 @@ $context = array(); ...@@ -4,20 +4,27 @@ $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
$context['url'] = home_url(); $context['url'] = home_url();
require_once(WP_PLUGIN_DIR . "/tospur/Dao/SearchDao.php"); $current_user = wp_get_current_user();
$city = SearchDao::searchCity(); $user_id = $current_user->ID;
$context['city'] = $city; if ($user_id != 0) {
$city_id = $_GET['city_id']; require_once(WP_PLUGIN_DIR . "/tospur/Dao/SearchDao.php");
if (!isset($city_id)) { $city = SearchDao::searchCity();
$context['city'] = $city;
$city_id = $_GET['city_id'];
if (!isset($city_id)) {
$city_id = $city[0]->id; $city_id = $city[0]->id;
} }
foreach ($city as $value) { foreach ($city as $value) {
if ($value->id == $city_id) { if ($value->id == $city_id) {
$context['city_name'] = $value->value; $context['city_name'] = $value->value;
} }
} }
$context['city_id'] = $city_id; $context['city_id'] = $city_id;
$context['default_head'] = get_avatar_url(1);
Timber::render('consultant_list.html', $context);
Timber::render('consultant_list.html', $context);
}else{
wp_redirect($const_login_page);
exit;
}
?> ?>
\ No newline at end of file
/* animation sets */
/* move from / to */
.pt-page-moveToLeft {
-webkit-animation: moveToLeft .6s ease both;
animation: moveToLeft .6s ease both;
}
.pt-page-moveFromLeft {
-webkit-animation: moveFromLeft .6s ease both;
animation: moveFromLeft .6s ease both;
}
.pt-page-moveToRight {
-webkit-animation: moveToRight .6s ease both;
animation: moveToRight .6s ease both;
}
.pt-page-moveFromRight {
-webkit-animation: moveFromRight .6s ease both;
animation: moveFromRight .6s ease both;
}
.pt-page-moveToTop {
-webkit-animation: moveToTop .6s ease both;
animation: moveToTop .6s ease both;
}
.pt-page-moveFromTop {
-webkit-animation: moveFromTop .6s ease both;
animation: moveFromTop .6s ease both;
}
.pt-page-moveToBottom {
-webkit-animation: moveToBottom .6s ease both;
animation: moveToBottom .6s ease both;
}
.pt-page-moveFromBottom {
-webkit-animation: moveFromBottom .6s ease both;
animation: moveFromBottom .6s ease both;
}
/* fade */
.pt-page-fade {
-webkit-animation: fade .7s ease both;
animation: fade .7s ease both;
}
/* move from / to and fade */
.pt-page-moveToLeftFade {
-webkit-animation: moveToLeftFade .7s ease both;
animation: moveToLeftFade .7s ease both;
}
.pt-page-moveFromLeftFade {
-webkit-animation: moveFromLeftFade .7s ease both;
animation: moveFromLeftFade .7s ease both;
}
.pt-page-moveToRightFade {
-webkit-animation: moveToRightFade .7s ease both;
animation: moveToRightFade .7s ease both;
}
.pt-page-moveFromRightFade {
-webkit-animation: moveFromRightFade .7s ease both;
animation: moveFromRightFade .7s ease both;
}
.pt-page-moveToTopFade {
-webkit-animation: moveToTopFade .7s ease both;
animation: moveToTopFade .7s ease both;
}
.pt-page-moveFromTopFade {
-webkit-animation: moveFromTopFade .7s ease both;
animation: moveFromTopFade .7s ease both;
}
.pt-page-moveToBottomFade {
-webkit-animation: moveToBottomFade .7s ease both;
animation: moveToBottomFade .7s ease both;
}
.pt-page-moveFromBottomFade {
-webkit-animation: moveFromBottomFade .7s ease both;
animation: moveFromBottomFade .7s ease both;
}
/* move to with different easing */
.pt-page-moveToLeftEasing {
-webkit-animation: moveToLeft .7s ease-in-out both;
animation: moveToLeft .7s ease-in-out both;
}
.pt-page-moveToRightEasing {
-webkit-animation: moveToRight .7s ease-in-out both;
animation: moveToRight .7s ease-in-out both;
}
.pt-page-moveToTopEasing {
-webkit-animation: moveToTop .7s ease-in-out both;
animation: moveToTop .7s ease-in-out both;
}
.pt-page-moveToBottomEasing {
-webkit-animation: moveToBottom .7s ease-in-out both;
animation: moveToBottom .7s ease-in-out both;
}
/********************************* keyframes **************************************/
/* move from / to */
@-webkit-keyframes moveToLeft {
from { }
to { -webkit-transform: translateX(-100%); }
}
@keyframes moveToLeft {
from { }
to { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveFromLeft {
from { -webkit-transform: translateX(-100%); }
}
@keyframes moveFromLeft {
from { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveToRight {
from { }
to { -webkit-transform: translateX(100%); }
}
@keyframes moveToRight {
from { }
to { -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveFromRight {
from { -webkit-transform: translateX(100%); }
}
@keyframes moveFromRight {
from { -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveToTop {
from { }
to { -webkit-transform: translateY(-100%); }
}
@keyframes moveToTop {
from { }
to { -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveFromTop {
from { -webkit-transform: translateY(-100%); }
}
@keyframes moveFromTop {
from { -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveToBottom {
from { }
to { -webkit-transform: translateY(100%); }
}
@keyframes moveToBottom {
from { }
to { -webkit-transform: translateY(100%); transform: translateY(100%); }
}
@-webkit-keyframes moveFromBottom {
from { -webkit-transform: translateY(100%); }
}
@keyframes moveFromBottom {
from { -webkit-transform: translateY(100%); transform: translateY(100%); }
}
/* fade */
@-webkit-keyframes fade {
from { }
to { opacity: 0.3; }
}
@keyframes fade {
from { }
to { opacity: 0.3; }
}
/* move from / to and fade */
@-webkit-keyframes moveToLeftFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(-100%); }
}
@keyframes moveToLeftFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveFromLeftFade {
from { opacity: 0.3; -webkit-transform: translateX(-100%); }
}
@keyframes moveFromLeftFade {
from { opacity: 0.3; -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveToRightFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(100%); }
}
@keyframes moveToRightFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveFromRightFade {
from { opacity: 0.3; -webkit-transform: translateX(100%); }
}
@keyframes moveFromRightFade {
from { opacity: 0.3; -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveToTopFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(-100%); }
}
@keyframes moveToTopFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveFromTopFade {
from { opacity: 0.3; -webkit-transform: translateY(-100%); }
}
@keyframes moveFromTopFade {
from { opacity: 0.3; -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveToBottomFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(100%); }
}
@keyframes moveToBottomFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(100%); transform: translateY(100%); }
}
@-webkit-keyframes moveFromBottomFade {
from { opacity: 0.3; -webkit-transform: translateY(100%); }
}
@keyframes moveFromBottomFade {
from { opacity: 0.3; -webkit-transform: translateY(100%); transform: translateY(100%); }
}
/* scale and fade */
.pt-page-scaleDown {
-webkit-animation: scaleDown .7s ease both;
animation: scaleDown .7s ease both;
}
.pt-page-scaleUp {
-webkit-animation: scaleUp .7s ease both;
animation: scaleUp .7s ease both;
}
.pt-page-scaleUpDown {
-webkit-animation: scaleUpDown .5s ease both;
animation: scaleUpDown .5s ease both;
}
.pt-page-scaleDownUp {
-webkit-animation: scaleDownUp .5s ease both;
animation: scaleDownUp .5s ease both;
}
.pt-page-scaleDownCenter {
-webkit-animation: scaleDownCenter .4s ease-in both;
animation: scaleDownCenter .4s ease-in both;
}
.pt-page-scaleUpCenter {
-webkit-animation: scaleUpCenter .4s ease-out both;
animation: scaleUpCenter .4s ease-out both;
}
/********************************* keyframes **************************************/
/* scale and fade */
@-webkit-keyframes scaleDown {
from { }
to { opacity: 0; -webkit-transform: scale(.8); }
}
@keyframes scaleDown {
from { }
to { opacity: 0; -webkit-transform: scale(.8); transform: scale(.8); }
}
@-webkit-keyframes scaleUp {
from { opacity: 0; -webkit-transform: scale(.8); }
}
@keyframes scaleUp {
from { opacity: 0; -webkit-transform: scale(.8); transform: scale(.8); }
}
@-webkit-keyframes scaleUpDown {
from { opacity: 0; -webkit-transform: scale(1.2); }
}
@keyframes scaleUpDown {
from { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
}
@-webkit-keyframes scaleDownUp {
from { }
to { opacity: 0; -webkit-transform: scale(1.2); }
}
@keyframes scaleDownUp {
from { }
to { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
}
@-webkit-keyframes scaleDownCenter {
from { }
to { opacity: 0; -webkit-transform: scale(.7); }
}
@keyframes scaleDownCenter {
from { }
to { opacity: 0; -webkit-transform: scale(.7); transform: scale(.7); }
}
@-webkit-keyframes scaleUpCenter {
from { opacity: 0; -webkit-transform: scale(.7); }
}
@keyframes scaleUpCenter {
from { opacity: 0; -webkit-transform: scale(.7); transform: scale(.7); }
}
/* rotate sides first and scale */
.pt-page-rotateRightSideFirst {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateRightSideFirst .8s both ease-in;
animation: rotateRightSideFirst .8s both ease-in;
}
.pt-page-rotateLeftSideFirst {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateLeftSideFirst .8s both ease-in;
animation: rotateLeftSideFirst .8s both ease-in;
}
.pt-page-rotateTopSideFirst {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateTopSideFirst .8s both ease-in;
animation: rotateTopSideFirst .8s both ease-in;
}
.pt-page-rotateBottomSideFirst {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateBottomSideFirst .8s both ease-in;
animation: rotateBottomSideFirst .8s both ease-in;
}
/* flip */
.pt-page-flipOutRight {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutRight .5s both ease-in;
animation: flipOutRight .5s both ease-in;
}
.pt-page-flipInLeft {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInLeft .5s both ease-out;
animation: flipInLeft .5s both ease-out;
}
.pt-page-flipOutLeft {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutLeft .5s both ease-in;
animation: flipOutLeft .5s both ease-in;
}
.pt-page-flipInRight {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInRight .5s both ease-out;
animation: flipInRight .5s both ease-out;
}
.pt-page-flipOutTop {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutTop .5s both ease-in;
animation: flipOutTop .5s both ease-in;
}
.pt-page-flipInBottom {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInBottom .5s both ease-out;
animation: flipInBottom .5s both ease-out;
}
.pt-page-flipOutBottom {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutBottom .5s both ease-in;
animation: flipOutBottom .5s both ease-in;
}
.pt-page-flipInTop {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInTop .5s both ease-out;
animation: flipInTop .5s both ease-out;
}
/* rotate fall */
.pt-page-rotateFall {
-webkit-transform-origin: 0% 0%;
transform-origin: 0% 0%;
-webkit-animation: rotateFall 1s both ease-in;
animation: rotateFall 1s both ease-in;
}
/* rotate newspaper */
.pt-page-rotateOutNewspaper {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: rotateOutNewspaper .5s both ease-in;
animation: rotateOutNewspaper .5s both ease-in;
}
.pt-page-rotateInNewspaper {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: rotateInNewspaper .5s both ease-out;
animation: rotateInNewspaper .5s both ease-out;
}
/* push */
.pt-page-rotatePushLeft {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotatePushLeft .8s both ease;
animation: rotatePushLeft .8s both ease;
}
.pt-page-rotatePushRight {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotatePushRight .8s both ease;
animation: rotatePushRight .8s both ease;
}
.pt-page-rotatePushTop {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotatePushTop .8s both ease;
animation: rotatePushTop .8s both ease;
}
.pt-page-rotatePushBottom {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotatePushBottom .8s both ease;
animation: rotatePushBottom .8s both ease;
}
/* pull */
.pt-page-rotatePullRight {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotatePullRight .5s both ease;
animation: rotatePullRight .5s both ease;
}
.pt-page-rotatePullLeft {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotatePullLeft .5s both ease;
animation: rotatePullLeft .5s both ease;
}
.pt-page-rotatePullTop {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotatePullTop .5s both ease;
animation: rotatePullTop .5s both ease;
}
.pt-page-rotatePullBottom {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotatePullBottom .5s both ease;
animation: rotatePullBottom .5s both ease;
}
/* fold */
.pt-page-rotateFoldRight {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateFoldRight .7s both ease;
animation: rotateFoldRight .7s both ease;
}
.pt-page-rotateFoldLeft {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateFoldLeft .7s both ease;
animation: rotateFoldLeft .7s both ease;
}
.pt-page-rotateFoldTop {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateFoldTop .7s both ease;
animation: rotateFoldTop .7s both ease;
}
.pt-page-rotateFoldBottom {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateFoldBottom .7s both ease;
animation: rotateFoldBottom .7s both ease;
}
/* unfold */
.pt-page-rotateUnfoldLeft {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateUnfoldLeft .7s both ease;
animation: rotateUnfoldLeft .7s both ease;
}
.pt-page-rotateUnfoldRight {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateUnfoldRight .7s both ease;
animation: rotateUnfoldRight .7s both ease;
}
.pt-page-rotateUnfoldTop {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateUnfoldTop .7s both ease;
animation: rotateUnfoldTop .7s both ease;
}
.pt-page-rotateUnfoldBottom {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateUnfoldBottom .7s both ease;
animation: rotateUnfoldBottom .7s both ease;
}
/* room walls */
.pt-page-rotateRoomLeftOut {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateRoomLeftOut .8s both ease;
animation: rotateRoomLeftOut .8s both ease;
}
.pt-page-rotateRoomLeftIn {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateRoomLeftIn .8s both ease;
animation: rotateRoomLeftIn .8s both ease;
}
.pt-page-rotateRoomRightOut {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateRoomRightOut .8s both ease;
animation: rotateRoomRightOut .8s both ease;
}
.pt-page-rotateRoomRightIn {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateRoomRightIn .8s both ease;
animation: rotateRoomRightIn .8s both ease;
}
.pt-page-rotateRoomTopOut {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateRoomTopOut .8s both ease;
animation: rotateRoomTopOut .8s both ease;
}
.pt-page-rotateRoomTopIn {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateRoomTopIn .8s both ease;
animation: rotateRoomTopIn .8s both ease;
}
.pt-page-rotateRoomBottomOut {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateRoomBottomOut .8s both ease;
animation: rotateRoomBottomOut .8s both ease;
}
.pt-page-rotateRoomBottomIn {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateRoomBottomIn .8s both ease;
animation: rotateRoomBottomIn .8s both ease;
}
/* cube */
.pt-page-rotateCubeLeftOut {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCubeLeftOut .6s both ease-in;
animation: rotateCubeLeftOut .6s both ease-in;
}
.pt-page-rotateCubeLeftIn {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCubeLeftIn .6s both ease-in;
animation: rotateCubeLeftIn .6s both ease-in;
}
.pt-page-rotateCubeRightOut {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCubeRightOut .6s both ease-in;
animation: rotateCubeRightOut .6s both ease-in;
}
.pt-page-rotateCubeRightIn {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCubeRightIn .6s both ease-in;
animation: rotateCubeRightIn .6s both ease-in;
}
.pt-page-rotateCubeTopOut {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCubeTopOut .6s both ease-in;
animation: rotateCubeTopOut .6s both ease-in;
}
.pt-page-rotateCubeTopIn {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCubeTopIn .6s both ease-in;
animation: rotateCubeTopIn .6s both ease-in;
}
.pt-page-rotateCubeBottomOut {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCubeBottomOut .6s both ease-in;
animation: rotateCubeBottomOut .6s both ease-in;
}
.pt-page-rotateCubeBottomIn {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCubeBottomIn .6s both ease-in;
animation: rotateCubeBottomIn .6s both ease-in;
}
/* carousel */
.pt-page-rotateCarouselLeftOut {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCarouselLeftOut .8s both ease;
animation: rotateCarouselLeftOut .8s both ease;
}
.pt-page-rotateCarouselLeftIn {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCarouselLeftIn .8s both ease;
animation: rotateCarouselLeftIn .8s both ease;
}
.pt-page-rotateCarouselRightOut {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCarouselRightOut .8s both ease;
animation: rotateCarouselRightOut .8s both ease;
}
.pt-page-rotateCarouselRightIn {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCarouselRightIn .8s both ease;
animation: rotateCarouselRightIn .8s both ease;
}
.pt-page-rotateCarouselTopOut {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCarouselTopOut .8s both ease;
animation: rotateCarouselTopOut .8s both ease;
}
.pt-page-rotateCarouselTopIn {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCarouselTopIn .8s both ease;
animation: rotateCarouselTopIn .8s both ease;
}
.pt-page-rotateCarouselBottomOut {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCarouselBottomOut .8s both ease;
animation: rotateCarouselBottomOut .8s both ease;
}
.pt-page-rotateCarouselBottomIn {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCarouselBottomIn .8s both ease;
animation: rotateCarouselBottomIn .8s both ease;
}
/* sides */
.pt-page-rotateSidesOut {
-webkit-transform-origin: -50% 50%;
transform-origin: -50% 50%;
-webkit-animation: rotateSidesOut .5s both ease-in;
animation: rotateSidesOut .5s both ease-in;
}
.pt-page-rotateSidesIn {
-webkit-transform-origin: 150% 50%;
transform-origin: 150% 50%;
-webkit-animation: rotateSidesIn .5s both ease-out;
animation: rotateSidesIn .5s both ease-out;
}
/* slide */
.pt-page-rotateSlideOut {
-webkit-animation: rotateSlideOut 1s both ease;
animation: rotateSlideOut 1s both ease;
}
.pt-page-rotateSlideIn {
-webkit-animation: rotateSlideIn 1s both ease;
animation: rotateSlideIn 1s both ease;
}
/********************************* keyframes **************************************/
/* rotate sides first and scale */
@-webkit-keyframes rotateRightSideFirst {
0% { }
40% { -webkit-transform: rotateY(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateRightSideFirst {
0% { }
40% { -webkit-transform: rotateY(15deg); transform: rotateY(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@-webkit-keyframes rotateLeftSideFirst {
0% { }
40% { -webkit-transform: rotateY(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateLeftSideFirst {
0% { }
40% { -webkit-transform: rotateY(-15deg); transform: rotateY(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@-webkit-keyframes rotateTopSideFirst {
0% { }
40% { -webkit-transform: rotateX(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateTopSideFirst {
0% { }
40% { -webkit-transform: rotateX(15deg); transform: rotateX(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@-webkit-keyframes rotateBottomSideFirst {
0% { }
40% { -webkit-transform: rotateX(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateBottomSideFirst {
0% { }
40% { -webkit-transform: rotateX(-15deg); transform: rotateX(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
/* flip */
@-webkit-keyframes flipOutRight {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@keyframes flipOutRight {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(90deg); transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInLeft {
from { -webkit-transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@keyframes flipInLeft {
from { -webkit-transform: translateZ(-1000px) rotateY(-90deg); transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipOutLeft {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@keyframes flipOutLeft {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(-90deg); transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInRight {
from { -webkit-transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@keyframes flipInRight {
from { -webkit-transform: translateZ(-1000px) rotateY(90deg); transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@-webkit-keyframes flipOutTop {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
@keyframes flipOutTop {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(90deg); transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInBottom {
from { -webkit-transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@keyframes flipInBottom {
from { -webkit-transform: translateZ(-1000px) rotateX(-90deg); transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipOutBottom {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@keyframes flipOutBottom {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(-90deg); transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInTop {
from { -webkit-transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
@keyframes flipInTop {
from { -webkit-transform: translateZ(-1000px) rotateX(90deg); transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
/* fall */
@-webkit-keyframes rotateFall {
0% { -webkit-transform: rotateZ(0deg); }
20% { -webkit-transform: rotateZ(10deg); -webkit-animation-timing-function: ease-out; }
40% { -webkit-transform: rotateZ(17deg); }
60% { -webkit-transform: rotateZ(16deg); }
100% { -webkit-transform: translateY(100%) rotateZ(17deg); }
}
@keyframes rotateFall {
0% { -webkit-transform: rotateZ(0deg); transform: rotateZ(0deg); }
20% { -webkit-transform: rotateZ(10deg); transform: rotateZ(10deg); -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
40% { -webkit-transform: rotateZ(17deg); transform: rotateZ(17deg); }
60% { -webkit-transform: rotateZ(16deg); transform: rotateZ(16deg); }
100% { -webkit-transform: translateY(100%) rotateZ(17deg); transform: translateY(100%) rotateZ(17deg); }
}
/* newspaper */
@-webkit-keyframes rotateOutNewspaper {
from { }
to { -webkit-transform: translateZ(-3000px) rotateZ(360deg); opacity: 0; }
}
@keyframes rotateOutNewspaper {
from { }
to { -webkit-transform: translateZ(-3000px) rotateZ(360deg); transform: translateZ(-3000px) rotateZ(360deg); opacity: 0; }
}
@-webkit-keyframes rotateInNewspaper {
from { -webkit-transform: translateZ(-3000px) rotateZ(-360deg); opacity: 0; }
}
@keyframes rotateInNewspaper {
from { -webkit-transform: translateZ(-3000px) rotateZ(-360deg); transform: translateZ(-3000px) rotateZ(-360deg); opacity: 0; }
}
/* push */
@-webkit-keyframes rotatePushLeft {
from { }
to { opacity: 0; -webkit-transform: rotateY(90deg); }
}
@keyframes rotatePushLeft {
from { }
to { opacity: 0; -webkit-transform: rotateY(90deg); transform: rotateY(90deg); }
}
@-webkit-keyframes rotatePushRight {
from { }
to { opacity: 0; -webkit-transform: rotateY(-90deg); }
}
@keyframes rotatePushRight {
from { }
to { opacity: 0; -webkit-transform: rotateY(-90deg); transform: rotateY(-90deg); }
}
@-webkit-keyframes rotatePushTop {
from { }
to { opacity: 0; -webkit-transform: rotateX(-90deg); }
}
@keyframes rotatePushTop {
from { }
to { opacity: 0; -webkit-transform: rotateX(-90deg); transform: rotateX(-90deg); }
}
@-webkit-keyframes rotatePushBottom {
from { }
to { opacity: 0; -webkit-transform: rotateX(90deg); }
}
@keyframes rotatePushBottom {
from { }
to { opacity: 0; -webkit-transform: rotateX(90deg); transform: rotateX(90deg); }
}
/* pull */
@-webkit-keyframes rotatePullRight {
from { opacity: 0; -webkit-transform: rotateY(-90deg); }
}
@keyframes rotatePullRight {
from { opacity: 0; -webkit-transform: rotateY(-90deg); transform: rotateY(-90deg); }
}
@-webkit-keyframes rotatePullLeft {
from { opacity: 0; -webkit-transform: rotateY(90deg); }
}
@keyframes rotatePullLeft {
from { opacity: 0; -webkit-transform: rotateY(90deg); transform: rotateY(90deg); }
}
@-webkit-keyframes rotatePullTop {
from { opacity: 0; -webkit-transform: rotateX(-90deg); }
}
@keyframes rotatePullTop {
from { opacity: 0; -webkit-transform: rotateX(-90deg); transform: rotateX(-90deg); }
}
@-webkit-keyframes rotatePullBottom {
from { opacity: 0; -webkit-transform: rotateX(90deg); }
}
@keyframes rotatePullBottom {
from { opacity: 0; -webkit-transform: rotateX(90deg); transform: rotateX(90deg); }
}
/* fold */
@-webkit-keyframes rotateFoldRight {
from { }
to { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); }
}
@keyframes rotateFoldRight {
from { }
to { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
}
@-webkit-keyframes rotateFoldLeft {
from { }
to { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); }
}
@keyframes rotateFoldLeft {
from { }
to { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateFoldTop {
from { }
to { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); }
}
@keyframes rotateFoldTop {
from { }
to { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
}
@-webkit-keyframes rotateFoldBottom {
from { }
to { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); }
}
@keyframes rotateFoldBottom {
from { }
to { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
}
/* unfold */
@-webkit-keyframes rotateUnfoldLeft {
from { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); }
}
@keyframes rotateUnfoldLeft {
from { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateUnfoldRight {
from { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); }
}
@keyframes rotateUnfoldRight {
from { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
}
@-webkit-keyframes rotateUnfoldTop {
from { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); }
}
@keyframes rotateUnfoldTop {
from { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
}
@-webkit-keyframes rotateUnfoldBottom {
from { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); }
}
@keyframes rotateUnfoldBottom {
from { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
}
/* room walls */
@-webkit-keyframes rotateRoomLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); }
}
@keyframes rotateRoomLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); transform: translateX(-100%) rotateY(90deg); }
}
@-webkit-keyframes rotateRoomLeftIn {
from { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); }
}
@keyframes rotateRoomLeftIn {
from { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); transform: translateX(100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateRoomRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); }
}
@keyframes rotateRoomRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); transform: translateX(100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateRoomRightIn {
from { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); }
}
@keyframes rotateRoomRightIn {
from { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); transform: translateX(-100%) rotateY(90deg); }
}
@-webkit-keyframes rotateRoomTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); }
}
@keyframes rotateRoomTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); transform: translateY(-100%) rotateX(-90deg); }
}
@-webkit-keyframes rotateRoomTopIn {
from { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); }
}
@keyframes rotateRoomTopIn {
from { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); transform: translateY(100%) rotateX(90deg); }
}
@-webkit-keyframes rotateRoomBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); }
}
@keyframes rotateRoomBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); transform: translateY(100%) rotateX(90deg); }
}
@-webkit-keyframes rotateRoomBottomIn {
from { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); }
}
@keyframes rotateRoomBottomIn {
from { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); transform: translateY(-100%) rotateX(-90deg); }
}
/* cube */
@-webkit-keyframes rotateCubeLeftOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
100% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); }
}
@keyframes rotateCubeLeftOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
100% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateCubeLeftIn {
0% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
}
@keyframes rotateCubeLeftIn {
0% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
}
@-webkit-keyframes rotateCubeRightOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
100% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); }
}
@keyframes rotateCubeRightOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
100% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
}
@-webkit-keyframes rotateCubeRightIn {
0% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
}
@keyframes rotateCubeRightIn {
0% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
}
@-webkit-keyframes rotateCubeTopOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
100% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); }
}
@keyframes rotateCubeTopOut {
0% {}
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
100% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
}
@-webkit-keyframes rotateCubeTopIn {
0% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
}
@keyframes rotateCubeTopIn {
0% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
}
@-webkit-keyframes rotateCubeBottomOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
100% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); }
}
@keyframes rotateCubeBottomOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
100% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
}
@-webkit-keyframes rotateCubeBottomIn {
0% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
}
@keyframes rotateCubeBottomIn {
0% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
}
/* carousel */
@-webkit-keyframes rotateCarouselLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-150%) scale(.4) rotateY(-65deg); }
}
@keyframes rotateCarouselLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-150%) scale(.4) rotateY(-65deg); transform: translateX(-150%) scale(.4) rotateY(-65deg); }
}
@-webkit-keyframes rotateCarouselLeftIn {
from { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@keyframes rotateCarouselLeftIn {
from { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@-webkit-keyframes rotateCarouselRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@keyframes rotateCarouselRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@-webkit-keyframes rotateCarouselRightIn {
from { opacity: .3; -webkit-transform: translateX(-200%) scale(.4) rotateY(-65deg); }
}
@keyframes rotateCarouselRightIn {
from { opacity: .3; -webkit-transform: translateX(-200%) scale(.4) rotateY(-65deg); transform: translateX(-200%) scale(.4) rotateY(-65deg); }
}
@-webkit-keyframes rotateCarouselTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
@keyframes rotateCarouselTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
@-webkit-keyframes rotateCarouselTopIn {
from { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@keyframes rotateCarouselTopIn {
from { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@-webkit-keyframes rotateCarouselBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@keyframes rotateCarouselBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@-webkit-keyframes rotateCarouselBottomIn {
from { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
@keyframes rotateCarouselBottomIn {
from { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
/* sides */
@-webkit-keyframes rotateSidesOut {
from { }
to { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(90deg); }
}
@keyframes rotateSidesOut {
from { }
to { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(90deg); transform: translateZ(-500px) rotateY(90deg); }
}
@-webkit-keyframes rotateSidesIn {
from { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(-90deg); }
}
@keyframes rotateSidesIn {
from { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(-90deg); transform: translateZ(-500px) rotateY(-90deg); }
}
/* slide */
@-webkit-keyframes rotateSlideOut {
0% { }
25% { opacity: .5; -webkit-transform: translateZ(-500px); }
75% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
100% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
}
@keyframes rotateSlideOut {
0% { }
25% { opacity: .5; -webkit-transform: translateZ(-500px); transform: translateZ(-500px); }
75% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); transform: translateZ(-500px) translateX(-200%); }
100% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); transform: translateZ(-500px) translateX(-200%); }
}
@-webkit-keyframes rotateSlideIn {
0%, 25% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(200%); }
75% { opacity: .5; -webkit-transform: translateZ(-500px); }
100% { opacity: 1; -webkit-transform: translateZ(0) translateX(0); }
}
@keyframes rotateSlideIn {
0%, 25% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(200%); transform: translateZ(-500px) translateX(200%); }
75% { opacity: .5; -webkit-transform: translateZ(-500px); transform: translateZ(-500px); }
100% { opacity: 1; -webkit-transform: translateZ(0) translateX(0); transform: translateZ(0) translateX(0); }
}
/* animation delay classes */
.pt-page-delay100 {
-webkit-animation-delay: .1s;
animation-delay: .1s;
}
.pt-page-delay180 {
-webkit-animation-delay: .180s;
animation-delay: .180s;
}
.pt-page-delay200 {
-webkit-animation-delay: .2s;
animation-delay: .2s;
}
.pt-page-delay300 {
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
.pt-page-delay400 {
-webkit-animation-delay: .4s;
animation-delay: .4s;
}
.pt-page-delay500 {
-webkit-animation-delay: .5s;
animation-delay: .5s;
}
.pt-page-delay700 {
-webkit-animation-delay: .7s;
animation-delay: .7s;
}
.pt-page-delay1000 {
-webkit-animation-delay: 1s;
animation-delay: 1s;
}
\ 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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -340,12 +366,14 @@ a:hover { ...@@ -340,12 +366,14 @@ a:hover {
} }
#wrapper #scroller ul { #wrapper #scroller ul {
margin-bottom: 0; margin-bottom: 0;
padding: 0 15px; padding: 0 10px;
} }
#wrapper #scroller ul li { #wrapper #scroller ul li {
color: #636363; color: #636363;
padding: 20px 0; padding: 20px 0;
border-bottom: 1px solid #7d7d7d; border-bottom: 1px solid #7d7d7d;
position: relative;
height: 94px;
} }
#wrapper #scroller ul li p { #wrapper #scroller ul li p {
padding-left: 15px; padding-left: 15px;
...@@ -357,6 +385,34 @@ a:hover { ...@@ -357,6 +385,34 @@ a:hover {
font-weight: bold; font-weight: bold;
margin-bottom: 2px; margin-bottom: 2px;
} }
#wrapper #scroller ul li p.accept {
position: absolute;
top: 28px;
right: 10px;
}
#wrapper #scroller ul li p.accept .btn {
color: #ffffff;
font-weight: bold;
margin: 0;
padding: 6px 12px;
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;
}
#wrapper #scroller ul li p.accept .btn:active {
background-color: #117bb9;
}
#wrapper #scroller ul li p.accept .btn:focus {
outline: 0;
}
.modal .modal-booking { .modal .modal-booking {
width: 320px; width: 320px;
height: 276px; height: 276px;
...@@ -374,18 +430,23 @@ a:hover { ...@@ -374,18 +430,23 @@ a:hover {
-webkit-border-top-right-radius: 8px; -webkit-border-top-right-radius: 8px;
} }
.modal .modal-booking .modal-content ul li { .modal .modal-booking .modal-content ul li {
height: 60px;
line-height: 60px; line-height: 60px;
color: #959595; color: #959595;
font-size: 22px; font-size: 22px;
border-top: 1px solid #7d7d7d; border-top: 1px solid #959595;
width: 100%;
height: 60px;
background: url("../img/blue_leftarrow_icon.png") no-repeat;
background-size: 30px 30px;
-webkit-background-size: 30px 30px;
background-position: 95% center;
} }
.modal .modal-booking .modal-content ul li .iconfont { .modal .modal-booking .modal-content ul li:last-child:active {
color: #008cd7; border-bottom-left-radius: 8px;
font-size: 18px; border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
} }
.modal .modal-booking .modal-content ul li .iconfont:after { .modal .modal-booking .modal-content ul li:active {
content: "\e603"; background-color: #e9e9e9;
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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -338,15 +364,15 @@ a:hover { ...@@ -338,15 +364,15 @@ a:hover {
} }
.main form ul { .main form ul {
margin-bottom: 30%; margin-bottom: 30%;
color: #636363;
font-size: 15px;
background-color: #ffffff;
border-top: 1px solid #008cd7; border-top: 1px solid #008cd7;
} }
.main form ul li { .main form ul li {
width: 100%; width: 100%;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
color: #636363;
font-size: 15px;
background-color: #ffffff;
border-bottom: 1px solid #008cd7; border-bottom: 1px solid #008cd7;
} }
.main form ul li label { .main form ul li label {
...@@ -383,18 +409,26 @@ a:hover { ...@@ -383,18 +409,26 @@ a:hover {
margin-bottom: 0; margin-bottom: 0;
text-align: center; text-align: center;
} }
.main form ul li p select { .main form ul li p .form-control {
color: #636363;
font-size: 20px; font-size: 20px;
background-color: transparent; background-color: transparent;
border: 0; border: 0;
margin: 0 -8px; padding: 0;
margin: 0 -4px;
width: auto;
display: inline-block;
box-shadow: none;
-webkit-box-shadow: none;
-webkit-appearance: none;
} }
.main form .btn { .main form .btn {
width: 90%; width: 86%;
display: block;
color: #ffffff; color: #ffffff;
font-weight: bold;
margin: 0 auto; margin: 0 auto;
padding: 16px; padding: 8px;
display: block;
background-color: #008cd7; background-color: #008cd7;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
...@@ -407,3 +441,9 @@ a:hover { ...@@ -407,3 +441,9 @@ a:hover {
box-shadow: 0 2px 0 0 #117bb9; box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9; -webkit-box-shadow: 0 2px 0 0 #117bb9;
} }
.main form .btn:active {
background-color: #117bb9;
}
.main form .btn:focus {
outline: 0;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
html, body { height: 100%; }
.pt-perspective {
position: relative;
width: 100%;
height: 100%;
-webkit-perspective: 1200px;
-moz-perspective: 1200px;
perspective: 1200px;
}
.pt-page {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
visibility: hidden;
overflow: hidden;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.pt-page-current,
.no-js .pt-page {
visibility: visible;
z-index: 1;
}
.no-js body {
overflow: auto;
}
.pt-page-ontop {
z-index: 999;
}
/* Text Styles, Colors, Backgrounds */
.pt-page h1 {
position: absolute;
font-weight: 300;
font-size: 4.4em;
line-height: 1;
letter-spacing: 6px;
margin: 0;
top: 12%;
width: 100%;
text-align: center;
text-transform: uppercase;
word-spacing: -0.3em;
}
.pt-page h1 span {
font-family: 'Satisfy', serif;
font-weight: 400;
font-size: 40%;
text-transform: none;
word-spacing: 0;
letter-spacing: 0;
display: block;
opacity: 0.4;
}
.pt-page h1 strong {
color: rgba(0,0,0,0.1);
}
/* Triggers (menu and button) */
.pt-triggers {
position: absolute;
width: 300px;
z-index: 999999;
top: 12%;
left: 50%;
margin-top: 130px;
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.no-js .pt-triggers {
display: none;
}
.pt-triggers .dl-menuwrapper button,
.pt-touch-button {
border: none;
font-size: 13px;
font-weight: 700;
text-transform: uppercase;
margin: 10px 0 20px;
padding: 0px 20px;
line-height: 50px;
height: 50px;
letter-spacing: 1px;
width: 100%;
cursor: pointer;
display: block;
font-family: 'Lato', Calibri, Arial, sans-serif;
box-shadow: 0 3px 0 rgba(0,0,0,0.1);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.pt-touch-button {
background: #fff;
color: #aaa;
}
.pt-triggers .dl-menuwrapper button {
margin-bottom: 0;
}
.pt-touch-button:active {
box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
.touch .pt-triggers .dl-menuwrapper {
display: none;
}
.pt-message {
display: none;
position: absolute;
z-index: 99999;
bottom: 0;
left: 0;
width: 100%;
background: #da475c;
color: #fff;
text-align: center;
}
.pt-message p {
margin: 0;
line-height: 60px;
font-size: 26px;
}
.no-cssanimations .pt-message {
display: block;
}
@media screen and (max-width: 47.4375em) {
.pt-page h1 {
font-size: 3em;
}
.pt-triggers .dl-menuwrapper {
display: none;
}
}
@media screen and (max-height: 45.9em) {
.pt-triggers .dl-menuwrapper li a {
padding-top: 2px;
padding-bottom: 2px;
}
.pt-triggers .dl-menuwrapper li.dl-back:after, .dl-menuwrapper li > a:not(:only-child):after {
line-height: 24px;
}
}
@media screen and (max-height: 38em) {
.pt-triggers .dl-menuwrapper {
display: 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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -330,6 +356,84 @@ body { ...@@ -330,6 +356,84 @@ body {
a:hover { a:hover {
text-decoration: none; text-decoration: none;
} }
.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 span {
display: inline-block;
position: relative;
top: 4px;
width: 18px;
height: 18px;
background: url("../img/white_bottomarrow_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
}
.search .btn-group.open .btn span {
background-image: url("../img/white_toparrow_icon.png");
}
.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;
}
#wrapper { #wrapper {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
...@@ -342,19 +446,27 @@ a:hover { ...@@ -342,19 +446,27 @@ a:hover {
#wrapper #scroller { #wrapper #scroller {
padding-bottom: 5px; padding-bottom: 5px;
} }
#wrapper #scroller ul { #wrapper #scroller > div {
margin-bottom: 0;
}
#wrapper #scroller ul li {
width: 100%; width: 100%;
height: 106px; height: 116px;
}
#wrapper #scroller > div ul {
height: 100%;
margin: 0 10px;
padding: 15px 0; padding: 15px 0;
border-bottom: 1px solid #7d7d7d;
} }
#wrapper #scroller ul li ol { #wrapper #scroller > div ul li {
padding-right: 0; height: 100%;
padding: 0;
color: #636363;
font-size: 17px;
} }
#wrapper #scroller ul li ol img { #wrapper #scroller > div ul li:nth-child(2) {
width: 75px; padding: 0 15px;
}
#wrapper #scroller > div ul li img {
width: 85px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
...@@ -364,17 +476,19 @@ a:hover { ...@@ -364,17 +476,19 @@ a:hover {
-webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-right-radius: 3px;
} }
#wrapper #scroller ul li ol p { #wrapper #scroller > div ul li p {
height: 28px;
margin-bottom: 0;
}
#wrapper #scroller > div ul li p:nth-child(1) {
color: #000000; color: #000000;
font-size: 18px; font-size: 22px;
font-weight: bold; font-weight: bold;
height: 25px;
margin-bottom: 0;
} }
#wrapper #scroller ul li ol .btn { #wrapper #scroller > div ul li .btn {
width: 80%; width: 90%;
padding: 2px 0; padding: 2px 0;
margin-top: 24px; margin-top: 30px;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
...@@ -383,13 +497,11 @@ a:hover { ...@@ -383,13 +497,11 @@ a:hover {
-webkit-border-top-right-radius: 4px; -webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px; -webkit-border-bottom-right-radius: 4px;
}
#wrapper #scroller ul li ol .btn.btn-phone {
color: #ed6d00; color: #ed6d00;
border-color: #ed6d00; border-color: #ed6d00;
background-color: transparent; background-color: transparent;
} }
#wrapper #scroller ul li ol .btn.btn-phone span { #wrapper #scroller > div ul li .btn span {
width: 18px; width: 18px;
height: 18px; height: 18px;
background: url("../img/orange_phone_icon.png") no-repeat; background: url("../img/orange_phone_icon.png") no-repeat;
...@@ -398,25 +510,6 @@ a:hover { ...@@ -398,25 +510,6 @@ a:hover {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
#wrapper #scroller ul li ol .btn.btn-booking { #wrapper #scroller > div:active {
color: #008cd7; background-color: #e9e9e9;
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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -331,7 +357,7 @@ a:hover { ...@@ -331,7 +357,7 @@ a:hover {
text-decoration: none; text-decoration: none;
} }
.jumbotron { .jumbotron {
padding: 15px 20px 8px; padding: 15px 15px 8px;
margin-bottom: 0; margin-bottom: 0;
border-bottom: 1px solid #7d7d7d; border-bottom: 1px solid #7d7d7d;
background-color: transparent; background-color: transparent;
...@@ -354,7 +380,7 @@ a:hover { ...@@ -354,7 +380,7 @@ a:hover {
-webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-right-radius: 3px;
} }
.jumbotron ul li p { .jumbotron ul li p {
margin: 2px 0 0; margin-bottom: 0;
color: #636363; color: #636363;
font-size: 18px; font-size: 18px;
} }
...@@ -363,6 +389,29 @@ a:hover { ...@@ -363,6 +389,29 @@ a:hover {
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
} }
.jumbotron ul li .btn {
color: #ffffff;
font-weight: bold;
margin: 28px 0 0;
padding: 6px 12px;
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;
}
.jumbotron ul li .btn:active {
background-color: #117bb9;
}
.jumbotron ul li .btn:focus {
outline: 0;
}
.jumbotron h4 { .jumbotron h4 {
color: #000000; color: #000000;
font-size: 16px; font-size: 16px;
...@@ -388,114 +437,17 @@ a:hover { ...@@ -388,114 +437,17 @@ a:hover {
#wrapper #scroller { #wrapper #scroller {
padding-bottom: 45px; 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 { .footer {
width: 100%; width: 100%;
height: 45px; height: 45px;
background-color: rgba(0, 0, 0, 0.5); background-color: #f9f9f9;
} }
.footer .btn { .footer .btn {
width: 45%; width: 45%;
color: #ffffff;
font-weight: bold;
margin: 5px 2%; margin: 5px 2%;
padding: 1px; padding: 1px;
color: #ffffff;
background-color: #008cd7; background-color: #008cd7;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
...@@ -508,6 +460,12 @@ a:hover { ...@@ -508,6 +460,12 @@ a:hover {
box-shadow: 0 2px 0 0 #117bb9; box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9; -webkit-box-shadow: 0 2px 0 0 #117bb9;
} }
.footer .btn:active {
background-color: #117bb9;
}
.footer .btn:focus {
outline: 0;
}
.footer .btn.btn-wechat span { .footer .btn.btn-wechat span {
width: 30px; width: 30px;
height: 30px; height: 30px;
......
@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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -332,27 +358,25 @@ a:hover { ...@@ -332,27 +358,25 @@ a:hover {
} }
body { body {
height: auto; height: auto;
padding-bottom: 45px; padding-bottom: 50px;
} }
.collect { .collect {
position: fixed; position: fixed;
top: 10px; top: 10px;
right: 0; right: 0;
z-index: 999; z-index: 999;
width: 55px;
height: 35px;
line-height: 35px;
margin-bottom: 0; margin-bottom: 0;
padding-left: 10px;
color: #ffffff;
background-color: #008cd7;
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
-webkit-border-top-left-radius: 5px; -webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 5px;
} width: 50px;
.collect .iconfont { height: 35px;
font-size: 26px; background: url("../img/white_collect_icon.png") no-repeat;
background-size: 30px 30px;
-webkit-background-size: 30px 30px;
background-position: 5px center;
background-color: #008cd7;
} }
.addWrap { .addWrap {
width: 100%; width: 100%;
...@@ -375,7 +399,7 @@ body { ...@@ -375,7 +399,7 @@ body {
position: relative; position: relative;
} }
.addWrap .swipe .swipe-wrap div img { .addWrap .swipe .swipe-wrap div img {
max-width: 100%; width: 100%;
} }
.addWrap ul { .addWrap ul {
position: absolute; position: absolute;
...@@ -400,7 +424,7 @@ body { ...@@ -400,7 +424,7 @@ body {
opacity: 0.7; opacity: 0.7;
} }
.addWrap ul li.active { .addWrap ul li.active {
background-color: #ffffff; background-color: #898989;
} }
.detail_row { .detail_row {
width: 100%; width: 100%;
...@@ -410,16 +434,16 @@ body { ...@@ -410,16 +434,16 @@ body {
position: relative; position: relative;
border-bottom: 1px solid #b7b7b7; border-bottom: 1px solid #b7b7b7;
} }
.detail_row a .iconfont { .detail_row a span {
color: #b7b7b7; display: inline-block;
font-size: 12px; width: 18px;
font-weight: normal; height: 18px;
} background: url("../img/gray_toparrow_icon.png") no-repeat;
.detail_row a .iconfont:after { background-size: cover;
content: "\e602"; -webkit-background-size: cover;
} }
.detail_row a.collapsed .iconfont:after { .detail_row a.collapsed span {
content: "\e601"; background-image: url("../img/gray_bottomarrow_icon.png");
} }
.detail_row p { .detail_row p {
margin-bottom: 0; margin-bottom: 0;
...@@ -504,62 +528,50 @@ body { ...@@ -504,62 +528,50 @@ body {
} }
.detail_row #wrapper #scroller ul li p img { .detail_row #wrapper #scroller ul li p img {
width: 100%; width: 100%;
border-top-left-radius: 5px; border-top-left-radius: 6px;
border-top-right-radius: 5px; border-top-right-radius: 6px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 6px;
border-bottom-right-radius: 5px; border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 5px; -webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 5px; -webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-right-radius: 6px;
}
.detail_row #wrapper #scroller ul li p em {
font-style: normal;
font-size: 7px;
vertical-align: top;
} }
.detail_row #wrapper #scroller ul li:last-child { .detail_row #wrapper #scroller ul li:last-child {
margin-right: 0; margin-right: 0;
} }
.detail_row .map { .detail_row .map {
position: absolute; position: absolute;
top: 5px; top: 0;
right: 5px; left: 90px;
width: 40px; width: 40px;
height: 40px; height: 40px;
text-align: center;
}
.detail_row .map span {
width: 30px;
height: 30px;
background: url("../img/blue_map_icon.png") no-repeat; background: url("../img/blue_map_icon.png") no-repeat;
background-size: cover; background-size: 30px 30px;
-webkit-background-size: cover; -webkit-background-size: 30px 30px;
display: inline-block; background-position: center;
} }
.detail_row .infoCont li { .detail_row .map:active {
margin-bottom: 2px; transform: scale(1.1);
-webkit-transform: scale(1.1);
} }
.detail_row .infoCont li span { .detail_row .infoCont li span {
color: #000000; color: #000000;
} }
.detail_row .recommendCont { .detail_row.recommend {
overflow: hidden; border-bottom: 0;
zoom: 1; padding-bottom: 0;
} }
.detail_row .recommendCont li { .detail_row.recommend p {
margin: 10px 0 0 15px; margin-bottom: 0;
} }
.detail_row .recommendCont li p { .detail_row.recommend .recommendCont {
width: 100%; margin: 0 -10px;
padding-bottom: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: auto 100%;
-webkit-background-size: auto 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;
} }
.detail_row .peopleCont li { .detail_row .peopleCont li {
width: 100%; width: 100%;
...@@ -569,6 +581,9 @@ body { ...@@ -569,6 +581,9 @@ body {
.detail_row .peopleCont li ol { .detail_row .peopleCont li ol {
padding: 0; padding: 0;
} }
.detail_row .peopleCont li ol:nth-child(2) {
padding: 0 10px;
}
.detail_row .peopleCont li ol img { .detail_row .peopleCont li ol img {
width: 50px; width: 50px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
...@@ -628,18 +643,17 @@ body { ...@@ -628,18 +643,17 @@ body {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
.detail_row .peopleCont li ol:nth-child(2) {
padding: 0 10px;
}
.footer { .footer {
width: 100%; width: 100%;
height: 45px; height: 50px;
background-color: rgba(125, 125, 125, 0.9); background-color: #f9f9f9;
} }
.footer .btn { .footer > .btn {
width: 45%; width: 45%;
margin: 5px 2%;
color: #ffffff; color: #ffffff;
font-weight: bold;
margin: 8px 2%;
padding: 6px 12px;
background-color: #008cd7; background-color: #008cd7;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
...@@ -652,49 +666,98 @@ body { ...@@ -652,49 +666,98 @@ body {
box-shadow: 0 2px 0 0 #117bb9; box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9; -webkit-box-shadow: 0 2px 0 0 #117bb9;
} }
.footer > .btn:active {
background-color: #117bb9;
}
.footer > .btn:focus {
outline: 0;
}
.footer ul { .footer ul {
height: 100%; height: 100%;
margin-bottom: 0; margin-bottom: 0;
font-size: 0;
} }
.footer ul li { .footer ul li {
width: 60px;
height: 100%; height: 100%;
padding: 0; padding-right: 0;
color: #ffffff; color: #000000;
font-size: 10px;
} }
.footer ul li p { .footer ul li img {
margin-bottom: 0; width: 50px;
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;
}
.footer ul li div {
height: 25px;
} }
.footer ul li.phone { .footer ul li div span {
font-size: 18px;
font-weight: bold;
margin-right: 5px;
}
.footer ul li:nth-child(1) {
top: -5px;
}
.footer ul li:nth-child(3) {
font-size: 0;
}
.footer ul li:nth-child(3) .btn {
width: 50%;
height: 100%;
color: #ffffff;
font-size: 12px;
margin: 0;
padding: 0;
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;
}
.footer ul li:nth-child(3) .btn.btn-phone {
background-color: #0caae5; background-color: #0caae5;
} }
.footer ul li.phone p:nth-child(1) { .footer ul li:nth-child(3) .btn.btn-phone span {
width: 100%; display: block;
}
.footer ul li:nth-child(3) .btn.btn-phone span:nth-child(1) {
width: 30px;
height: 30px; height: 30px;
background: url("../img/white_phone_icon.png") no-repeat; background: url("../img/white_phone_icon.png") no-repeat;
background-size: auto 100%; background-size: cover;
-webkit-background-size: auto 100%; -webkit-background-size: cover;
background-position: center; margin: 0 auto;
} }
.footer ul li.wechat { .footer ul li:nth-child(3) .btn.btn-wechat {
background-color: #00a99d; background-color: #00a99d;
} }
.footer ul li.wechat p:nth-child(1) { .footer ul li:nth-child(3) .btn.btn-wechat span {
width: 100%; display: block;
}
.footer ul li:nth-child(3) .btn.btn-wechat span:nth-child(1) {
width: 30px;
height: 30px; height: 30px;
background: url("../img/white_wechat_icon.png") no-repeat; background: url("../img/white_bespeak_icon.png") no-repeat;
background-size: auto 100%; background-size: cover;
-webkit-background-size: auto 100%; -webkit-background-size: cover;
background-position: center; margin: 0 auto;
}
.footer ul li:nth-child(3) .btn:active {
background-color: #898989;
} }
.modal #carousel_wrapper { .modal #carousel_wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background-color: #000000;
} }
.modal #carousel_wrapper #carousel_scroller { .modal #carousel_wrapper #carousel_scroller {
height: 100%; height: 100%;
...@@ -713,20 +776,6 @@ body { ...@@ -713,20 +776,6 @@ body {
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
} }
.modal #carousel_wrapper #carousel_scroller ul li p {
margin-bottom: 0;
width: 100%;
height: 100%;
display: table;
}
.modal #carousel_wrapper #carousel_scroller ul li p span {
display: table-cell;
vertical-align: middle;
text-align: center;
}
.modal #carousel_wrapper #carousel_scroller ul li p span img {
max-width: 100%;
}
.modal #carousel_wrapper .indicators { .modal #carousel_wrapper .indicators {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
...@@ -752,3 +801,20 @@ body { ...@@ -752,3 +801,20 @@ body {
.modal #carousel_wrapper .indicators li.carousel_active { .modal #carousel_wrapper .indicators li.carousel_active {
opacity: 1; opacity: 1;
} }
.modal p {
margin-bottom: 0;
width: 100%;
height: 100%;
display: table;
}
.modal p span {
display: table-cell;
vertical-align: middle;
text-align: center;
}
.modal p span img {
max-width: 100%;
}
.modal-backdrop.in {
opacity: 1;
}
@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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -344,6 +370,12 @@ a:hover { ...@@ -344,6 +370,12 @@ a:hover {
margin: 20% 0; margin: 20% 0;
color: #ffffff; color: #ffffff;
font-weight: bold; font-weight: bold;
width: 100%;
height: 34px;
background: url("../img/logo.png") no-repeat;
background-size: 150px 34px;
-webkit-background-size: 150px 34px;
background-position: center;
} }
.container-fluid form .has-feedback { .container-fluid form .has-feedback {
margin-bottom: 0; margin-bottom: 0;
...@@ -437,10 +469,14 @@ a:hover { ...@@ -437,10 +469,14 @@ a:hover {
-webkit-border-bottom-right-radius: 4px; -webkit-border-bottom-right-radius: 4px;
pointer-events: auto; pointer-events: auto;
} }
.container-fluid form .has-feedback.code .form-control-feedback:active {
background-color: #088aa9;
}
.container-fluid form .btn { .container-fluid form .btn {
color: #ffffff; color: #ffffff;
font-weight: bold;
margin: 12% 0 5%; margin: 12% 0 5%;
padding: 16px; padding: 8px;
background-color: #008cd7; background-color: #008cd7;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
...@@ -453,6 +489,12 @@ a:hover { ...@@ -453,6 +489,12 @@ a:hover {
box-shadow: 0 2px 0 0 #117bb9; box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9; -webkit-box-shadow: 0 2px 0 0 #117bb9;
} }
.container-fluid form .btn:active {
background-color: #117bb9;
}
.container-fluid form .btn:focus {
outline: 0;
}
.container-fluid form .btn.btn-register { .container-fluid form .btn.btn-register {
margin-top: 20%; margin-top: 20%;
} }
...@@ -469,6 +511,12 @@ a:hover { ...@@ -469,6 +511,12 @@ a:hover {
margin: 0 5px; margin: 0 5px;
background-color: rgba(255, 255, 255, 0.4); background-color: rgba(255, 255, 255, 0.4);
} }
.container-fluid form a:active {
color: #636363;
}
.container-fluid form a:active span {
background-color: #636363;
}
.container-fluid form a.link-register { .container-fluid form a.link-register {
margin-top: 30%; margin-top: 30%;
padding-bottom: 25px; 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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -357,10 +383,11 @@ a:hover { ...@@ -357,10 +383,11 @@ a:hover {
} }
.container-fluid .btn { .container-fluid .btn {
width: 94%; width: 94%;
display: block;
color: #ffffff; color: #ffffff;
font-weight: bold;
margin: 10% auto; margin: 10% auto;
padding: 16px; padding: 8px;
display: block;
background-color: #008cd7; background-color: #008cd7;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
...@@ -373,3 +400,9 @@ a:hover { ...@@ -373,3 +400,9 @@ a:hover {
box-shadow: 0 2px 0 0 #117bb9; box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9; -webkit-box-shadow: 0 2px 0 0 #117bb9;
} }
.container-fluid .btn:active {
background-color: #117bb9;
}
.container-fluid .btn:focus {
outline: 0;
}
@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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -330,16 +356,94 @@ body { ...@@ -330,16 +356,94 @@ body {
a:hover { a:hover {
text-decoration: none; text-decoration: none;
} }
.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 span {
display: inline-block;
position: relative;
top: 4px;
width: 18px;
height: 18px;
background: url("../img/white_bottomarrow_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
}
.search .btn-group.open .btn span {
background-image: url("../img/white_toparrow_icon.png");
}
.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;
}
.search .has-feedback { .search .has-feedback {
width: 75%; width: 75%;
} }
.search .has-feedback .form-control { .search .has-feedback .form-control {
color: #b7b7b7; color: #acacac;
border-color: #117bb9; border-color: #117bb9;
-webkit-appearance: none; -webkit-appearance: none;
} }
.search .has-feedback .form-control::-webkit-input-placeholder { .search .has-feedback .form-control::-webkit-input-placeholder {
color: #b7b7b7; color: #acacac;
} }
.search .has-feedback .form-control-feedback { .search .has-feedback .form-control-feedback {
top: 3px; top: 3px;
...@@ -380,19 +484,18 @@ a:hover { ...@@ -380,19 +484,18 @@ a:hover {
box-shadow: none; box-shadow: none;
-webkit-box-shadow: none; -webkit-box-shadow: none;
} }
.btn-group-justified .btn-group .btn .iconfont { .btn-group-justified .btn-group .btn span {
color: #b7b7b7; display: inline-block;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.btn-group-justified .btn-group .btn .iconfont:after {
content: "\e601";
position: relative; position: relative;
top: -2px; top: 4px;
width: 18px;
height: 18px;
background: url("../img/gray_bottomarrow_icon.png") no-repeat;
background-size: cover;
-webkit-background-size: cover;
} }
.btn-group-justified .btn-group.open .btn .iconfont:after { .btn-group-justified .btn-group.open .btn span {
content: "\e602"; background-image: url("../img/gray_toparrow_icon.png");
} }
.btn-group-justified .btn-group .dropdown-menu { .btn-group-justified .btn-group .dropdown-menu {
left: 0; left: 0;
...@@ -458,110 +561,15 @@ a:hover { ...@@ -458,110 +561,15 @@ a:hover {
#wrapper #scroller { #wrapper #scroller {
padding-bottom: 45px; 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 { .footer {
width: 100%; width: 100%;
height: 45px; height: 45px;
line-height: 45px; line-height: 45px;
color: #008cd7;
font-size: 22px;
font-weight: bold;
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.9);
} }
.footer a {
color: #7d7d7d;
font-size: 20px;
font-weight: bold;
display: block;
}
@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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -330,3 +356,91 @@ body { ...@@ -330,3 +356,91 @@ body {
a:hover { a:hover {
text-decoration: none; text-decoration: none;
} }
#tabWrapper {
position: absolute;
z-index: 1;
top: 40px;
bottom: 0;
left: 0;
width: 100%;
overflow: hidden;
}
#tabWrapper #tabScroller {
padding-bottom: 15px;
}
#tabWrapper #tabScroller .tab-pane ul li {
width: 100%;
height: 60px;
line-height: 60px;
border-bottom: 1px solid #008cd7;
color: #898989;
font-size: 18px;
}
#tabWrapper #tabScroller .tab-pane ul li:nth-child(odd) {
background-color: #ffffff;
}
#tabWrapper #tabScroller .tab-pane ul li.arrow {
width: 100%;
height: 60px;
background: url("../img/gray_leftarrow_icon.png") no-repeat;
background-size: 30px 30px;
-webkit-background-size: 30px 30px;
background-position: 95% center;
}
#tabWrapper #tabScroller .tab-pane ul li label {
color: #000000;
margin-bottom: 0;
padding: 0 0 0 10px;
}
#tabWrapper #tabScroller .tab-pane ul li p {
margin-bottom: 0;
padding: 0;
height: 100%;
}
#tabWrapper #tabScroller .tab-pane ul li p .form-control {
color: #898989;
font-size: 18px;
background-color: transparent;
border: 0;
display: inline-block;
box-shadow: none;
-webkit-box-shadow: none;
-webkit-appearance: none;
}
#tabWrapper #tabScroller .tab-pane ul li p .form-control::-webkit-outer-spin-button,
#tabWrapper #tabScroller .tab-pane ul li p .form-control::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
#tabWrapper #tabScroller .tab-pane > p {
padding-right: 15px;
color: #898989;
}
#tabWrapper #tabScroller .tab-pane .btn {
width: 86%;
display: block;
color: #ffffff;
font-weight: bold;
margin: 20% auto 0;
padding: 8px;
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;
}
#tabWrapper #tabScroller .tab-pane .btn:active {
background-color: #117bb9;
}
#tabWrapper #tabScroller .tab-pane .btn:focus {
outline: 0;
}
#tabWrapper #tabScroller .tab-pane:last-child .btn {
margin-top: 5%;
}
.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;
}
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.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;
font-size: 16px;
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 {
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.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;
}
.header {
width: 100%;
height: 106px;
padding-top: 10px;
border-bottom: 1px solid #7d7d7d;
font-size: 18px;
color: #000000;
}
.header ul {
overflow: hidden;
}
.header ul:nth-child(2) li {
text-align: center;
}
#wrapper {
position: absolute;
z-index: 1;
top: 106px;
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: 60px;
line-height: 60px;
font-size: 20px;
border-bottom: 1px solid #008cd7;
}
#wrapper #scroller ul li p {
margin-bottom: 0;
text-align: center;
}
#wrapper #scroller ul li:nth-child(odd) {
background-color: #ffffff;
}
@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 { .tab {
width: 100%; width: 100%;
height: 40px; height: 40px;
...@@ -122,6 +27,117 @@ ...@@ -122,6 +27,117 @@
.tab li.active .btn:after { .tab li.active .btn:after {
background-color: #008cd7; background-color: #008cd7;
} }
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog { .modal .modal-dialog {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -134,6 +150,7 @@ ...@@ -134,6 +150,7 @@
} }
.modal .modal-dialog .modal-content { .modal .modal-dialog .modal-content {
color: #000000; color: #000000;
font-size: 16px;
border: 0; border: 0;
border-top-left-radius: 8px; border-top-left-radius: 8px;
border-top-right-radius: 8px; border-top-right-radius: 8px;
...@@ -153,9 +170,18 @@ ...@@ -153,9 +170,18 @@
padding-top: 15px; padding-top: 15px;
} }
.modal .modal-dialog .modal-content p { .modal .modal-dialog .modal-content p {
font-size: 16px;
margin: 12px 20px 14px; margin: 12px 20px 14px;
} }
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn { .modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0; border-top-color: #cfd0d0;
background-color: transparent; background-color: transparent;
...@@ -342,101 +368,3 @@ a:hover { ...@@ -342,101 +368,3 @@ a:hover {
#wrapper #scroller { #wrapper #scroller {
padding-bottom: 5px; 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;
}
.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;
}
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.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;
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;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.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;
}
.row:active {
background-color: #e9e9e9;
}
.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;
font-size: 16px;
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 {
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.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 {
width: 100%;
padding-bottom: 5%;
}
.main ul li {
margin: 0 15px;
padding: 13px 0;
border-bottom: 1px solid #b7b7b7;
color: #7d7d7d;
font-size: 18px;
overflow: hidden;
}
.main ul li label {
margin-bottom: 0;
padding: 5px 0 0 4px;
}
.main ul li p {
margin-bottom: 0;
padding: 0;
}
.main ul li p .form-control {
color: #7d7d7d;
font-size: 18px;
background-color: transparent;
border-color: transparent;
display: inline-block;
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;
}
.main ul li p .form-control::-webkit-input-placeholder {
color: #7d7d7d;
}
.main ul li p .form-control::-webkit-outer-spin-button,
.main ul li p .form-control::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
.main ul li p .form-control.width-sm {
width: 45px;
}
.main ul li p textarea.form-control {
resize: none;
background-color: #ffffff;
border-color: #e9e9e9;
}
.main ul li:last-child {
border-bottom: 0;
}
.main ul li:last-child label {
margin-bottom: 18px;
}
.main .btn {
width: 86%;
display: block;
color: #ffffff;
font-weight: bold;
margin: 0 auto;
padding: 8px;
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;
}
.main .btn:active {
background-color: #117bb9;
}
.main .btn:focus {
outline: 0;
}
<?php <?php
define('tospur_view_house_table', 'tospur_view_house'); require_once('const.php');
class dao class dao
{ {
...@@ -48,9 +48,9 @@ class dao ...@@ -48,9 +48,9 @@ class dao
public static function search_view_house_by_user_id($user_id) public static function search_view_house_by_user_id($user_id)
{ {
global $wpdb; global $wpdb;
$sql = "select v.house_id,v.date,v.time,v.consultant_id,v.handle,h.name from " . tospur_view_house_table . " v " . $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 " . 'left join ' . tospur_house_table . ' h on v.house_id = h.id ' .
"where v.user_id = " . $user_id . " order by v.date desc"; 'where v.user_id = ' . $user_id . ' order by v.date desc';
return $wpdb->get_results($sql); return $wpdb->get_results($sql);
} }
...@@ -58,9 +58,9 @@ class dao ...@@ -58,9 +58,9 @@ class dao
public static function search_view_house_by_consultant_id($consultant_id) public static function search_view_house_by_consultant_id($consultant_id)
{ {
global $wpdb; global $wpdb;
$sql = "select v.id,v.house_id,v.date,v.time,v.user_id,v.handle,h.name from " . tospur_view_house_table . " v " . $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 " . 'left join ' . tospur_house_table . ' h on v.house_id = h.id ' .
"where v.consultant_id = " . $consultant_id . " order by v.date desc"; 'where v.consultant_id = ' . $consultant_id . ' order by v.date desc';
return $wpdb->get_results($sql); return $wpdb->get_results($sql);
} }
...@@ -74,7 +74,7 @@ class dao ...@@ -74,7 +74,7 @@ class dao
'valid' => $valid 'valid' => $valid
); );
global $wpdb; global $wpdb;
$result = $wpdb->insert('tospur_consultant_score', $insert_consultant_score_array); $result = $wpdb->insert(tospur_consultant_score_table, $insert_consultant_score_array);
return $result; return $result;
} }
...@@ -82,17 +82,17 @@ class dao ...@@ -82,17 +82,17 @@ class dao
public static function search_consultant_info($consultant_id) public static function search_consultant_info($consultant_id)
{ {
global $wpdb; global $wpdb;
$sql = "select c.*,u.display_name,s.average_score from tospur_consultant c " . $sql = 'select c.*,u.display_name,s.average_score from ' . tospur_consultant_table . ' c ' .
"left join wp_users u on c.id = u.ID " . 'left join ' . wp_users_table . ' 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 " . 'left join (select consultant_id,sum(score)/count(score) as average_score from ' . tospur_consultant_score_table . ' group by consultant_id) s ' .
"on c.id = s.consultant_id where c.id = " . $consultant_id; 'on c.id = s.consultant_id where c.id = ' . $consultant_id;
return $wpdb->get_row($sql); return $wpdb->get_row($sql);
} }
public static function update_consultant_score($score_id, $valid) public static function update_consultant_score($score_id, $valid)
{ {
global $wpdb; global $wpdb;
$result = $wpdb->update('tospur_consultant_score', array( $result = $wpdb->update(tospur_consultant_score_table, array(
'valid' => $valid 'valid' => $valid
), array( ), array(
'id' => $score_id 'id' => $score_id
...@@ -103,9 +103,9 @@ class dao ...@@ -103,9 +103,9 @@ class dao
public static function search_tospur_verify($phone, $code) public static function search_tospur_verify($phone, $code)
{ {
global $wpdb; global $wpdb;
$sql = "select code from tospur_verify where phone = " . $phone . " and status = 0 " . $sql = 'select code from ' . tospur_verify_table . ' where phone = ' . $phone . ' and status = 0 ' .
"and create_time > NOW() - INTERVAL 30 MINUTE " . 'and create_time > NOW() - INTERVAL 30 MINUTE ' .
"order by create_time desc limit 1"; 'order by create_time desc limit 1';
return $wpdb->get_var($sql); return $wpdb->get_var($sql);
} }
...@@ -118,14 +118,14 @@ class dao ...@@ -118,14 +118,14 @@ class dao
'status' => 0 'status' => 0
); );
global $wpdb; global $wpdb;
$result = $wpdb->insert('tospur_verify', $insert_tospur_verify_array); $result = $wpdb->insert(tospur_verify_table, $insert_tospur_verify_array);
return $result; return $result;
} }
public static function update_tospur_verify($phone) public static function update_tospur_verify($phone)
{ {
global $wpdb; global $wpdb;
$wpdb->update('tospur_verify', array( $wpdb->update(tospur_verify_table, array(
'status' => 1 'status' => 1
), array( ), array(
'phone' => $phone 'phone' => $phone
...@@ -135,27 +135,33 @@ class dao ...@@ -135,27 +135,33 @@ class dao
public static function search_consultant_by_city($city_id, $index) public static function search_consultant_by_city($city_id, $index)
{ {
global $wpdb; global $wpdb;
$consultant_sql = 'select c.*,u.display_name,s.average_score from tospur_consultant c ' . $consultant_sql = 'select c.*,u.display_name,s.average_score from ' . tospur_consultant_table . ' c ' .
'left join wp_users u on c.id = u.ID ' . 'left join ' . wp_users_table . ' u on c.id = u.ID ' .
'left join (select consultant_id,sum(score)/count(score) as average_score from tospur_consultant_score where valid=1 group by consultant_id) s on c.id = s.consultant_id ' . 'left join (select consultant_id,sum(score)/count(score) as average_score from ' . tospur_consultant_score_table . ' where valid=1 group by consultant_id) s on c.id = s.consultant_id ' .
'where cityid = ' . $city_id . ' LIMIT ' . $index . ',20;'; 'where cityid = ' . $city_id . ' LIMIT ' . $index . ',20;';
return $wpdb->get_results($consultant_sql); return $wpdb->get_results($consultant_sql);
} }
public static function search_house_image($house_ids) public static function search_house_image($house_ids)
{ {
$sql = 'select ahi.house_id,ti.path from a_house_image ahi' . $string = '(' . implode(',', array_map('intval', $house_ids)) . ')';
' left join tospur_image ti on ahi.image_id = ti.id' . $sql = 'select * from (select ahi.house_id,ti.path,ti.image_type,case ti.image_type ' .
' where ti.image_type in (1,5) and house_id in ' . $house_ids . ' group by house_id'; 'when 1 then 1 ' .
'when 5 then 1 ' .
'ELSE 2 ' .
'end as type from ' . a_house_image_table . ' ahi ' .
'left join ' . tospur_image_table . ' ti on ahi.image_id = ti.id ' .
'where house_id in ' . $string . ' order by type) as image group by house_id;';
global $wpdb; global $wpdb;
return $wpdb->get_results($sql); return $wpdb->get_results($sql);
} }
public static function search_house_tag($house_ids) public static function search_house_tag($house_ids)
{ {
$sql = 'select aht.house_id,tt.name from a_house_tag aht' . $string = '(' . implode(',', array_map('intval', $house_ids)) . ')';
' left join tospur_tag tt on aht.tag_id = tt.id' . $sql = 'select aht.house_id,tt.name from ' . a_house_tag_table . ' aht' .
' where house_id in ' . $house_ids; ' left join ' . tospur_tag_table . ' tt on aht.tag_id = tt.id' .
' where house_id in ' . $string;
global $wpdb; global $wpdb;
return $wpdb->get_results($sql); return $wpdb->get_results($sql);
} }
......
<?php <?php
require_once(WP_PLUGIN_DIR."/tospur/Config.php"); require_once(WP_PLUGIN_DIR."/tospur/Config.php");
require_once(WP_PLUGIN_DIR."/tospur/Dao/SearchDao.php");
$context = array(); $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
$context['siteUrl'] = get_site_url(); $context['siteUrl'] = get_site_url();
if(isset($_GET['hid'])){ if(isset($_GET['hid'])){
$hid = $_GET['hid']; $hid = $_GET['hid'];
$context['hid'] = $hid; $context['hid'] = $hid;
$sql = "select * from ".Config::TOSPUR_HOUSE_TABLE." where id = %d"; $context = array_merge($context,SearchDao::getDetailInfo($hid));
$result = $wpdb->get_row($wpdb->prepare($sql,$hid)); $houseType = $context['result']->house_type;
$context['result'] = $result; if($houseType !=0){
Timber::render('detailOther.html', $context);
}else
$context['cityName'] = SearchDao::getCityNameWithId($result->city_id);
$mainImagesSql = "SELECT db.literal as type,ada.house_area as area,ti.path FROM ".Config::A_DISTRICT_AREA_TABLE." ada
LEFT JOIN ".Config::DIC_BUILDPROPERTY_TABLE." db on db.value = ada.buildproperty_id
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
LEFT JOIN (select consultant_id,sum(score)/count(score) as average_score
from tospur_consultant_score
where valid=1 group by consultant_id) s on c.id = s.consultant_id
where id in(select user_id from a_house_user where user_type = 1 and house_id = %d);';
$consultant = $wpdb->get_results($wpdb->prepare($consultantSql,$hid));
$context['consultant'] = $consultant;
$imagesSql = 'select * from tospur_image ti
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); Timber::render('detail.html', $context);
}else{ }else{
Timber::render('error.html', $context); Timber::render('error.html', $context);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -50,6 +50,12 @@ function page_template($template) ...@@ -50,6 +50,12 @@ function page_template($template)
case 'map': case 'map':
$page = $theme . '/map.php'; $page = $theme . '/map.php';
break; break;
case 'loan_calculator':
$page = $theme . '/loan_calculator.php';
break;
case 'loan_result':
$page = $theme . '/loan_result.php';
break;
} }
return $page; return $page;
} else { } else {
...@@ -177,64 +183,30 @@ function get_consultant() ...@@ -177,64 +183,30 @@ function get_consultant()
} }
} }
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_search_house', 'SearchDao::ajax_searchHouse');
add_action('wp_ajax_nopriv_search_house', 'SearchDao::ajax_searchHouse'); add_action('wp_ajax_nopriv_search_house', 'SearchDao::ajax_searchHouse');
function get_house_image_and_tags($house_result) add_action('wp_ajax_submit_comment', 'submit_comment');
function submit_comment()
{ {
$array = array(); $user_id = $_POST['user_id'];
if ($house_result) { $content = $_POST['content'];
$array['code'] = 2000; if (isset($user_id) && isset($content)) {
$house_ids = array(); $data = array(
foreach ($house_result as $key => $value) { 'comment_post_ID' => 1,
$house_id = $value->id; 'comment_content' => $content,
$house_ids[] = $house_id; 'comment_parent' => 0,
} 'user_id' => $user_id,
$string = '(' . implode(',', array_map('intval', $house_ids)) . ')'; 'comment_date' => current_time('mysql'),
$tag_result = dao::search_house_tag($string); 'comment_approved' => 1,
//标签 );
if ($tag_result) { wp_insert_comment($data);
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'); add_action('wp_ajax_add_collect', 'add_collect');
function add_collect($house_id){ function add_collect($house_id)
{
$insert_a_house_user_array = array( $insert_a_house_user_array = array(
'user_id' => get_current_user_id(), 'user_id' => get_current_user_id(),
'house_id' => $_POST["hid"], 'house_id' => $_POST["hid"],
...@@ -253,16 +225,18 @@ function add_collect($house_id){ ...@@ -253,16 +225,18 @@ function add_collect($house_id){
} }
add_filter('login_redirect', 'new_login_redirect', 10, 3); add_filter('login_redirect', 'new_login_redirect', 10, 3);
function new_login_redirect($redirect_to, $request, $user ){ function new_login_redirect($redirect_to, $request, $user)
if($user-ID>0) { {
if ($user - ID > 0) {
$role = $user->roles[0]; $role = $user->roles[0];
if ($role == 'administrator' || $role == 'editor') { if ($role == 'administrator' || $role == 'editor') {
return admin_url('admin.php?page=newHouseList'); return admin_url('admin.php?page=newHouseList');
} else { } else {
return site_url(); return site_url();
} }
}else{ } else {
return $redirect_to; return $redirect_to;
} }
} }
?> ?>
\ No newline at end of file
...@@ -2,29 +2,38 @@ ...@@ -2,29 +2,38 @@
$context = array(); $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
require_once(WP_PLUGIN_DIR."/tospur/Dao/SearchDao.php"); require_once(WP_PLUGIN_DIR . "/tospur/Dao/SearchDao.php");
$cityId = 1; $cityId = 1;
if($_GET['cityId']) if ($_GET['cityId'])
$cityId = $_GET['cityId']; $cityId = $_GET['cityId'];
$houseType = 0;
if ($_GET['houseType'])
$houseType = $_GET['houseType'];
$context['cityId'] = $cityId; $context['cityId'] = $cityId;
$context['houseType'] = $houseType;
$context['cityName'] = SearchDao::getCityNameWithId($cityId); $context['cityName'] = SearchDao::getCityNameWithId($cityId);
$context['select']['city'] = SearchDao::searchCity(); $context['select']['city'] = SearchDao::searchCity();
$context['select']['district'] = SearchDao::searchCity($cityId); $context['select']['district'] = SearchDao::searchCity($cityId);
$plateArray = array(); $plateArray = array();
foreach($context['select']['district'] as $item){ foreach ($context['select']['district'] as $item) {
$plateArray[$item->id] = array(); $plateArray[$item->id] = array();
foreach(SearchDao::searchCity($cityId,$item->id) as $i){ foreach (SearchDao::searchCity($cityId, $item->id) as $i) {
$plateArray[$item->id][] = $i; $plateArray[$item->id][] = $i;
} }
} }
$context['select']['plate'] = json_encode($plateArray); $context['select']['plate'] = json_encode($plateArray);
$context['select']['buildProperty'] = SearchDao::searchBuildProperty(); $context['select']['buildProperty'] = SearchDao::searchBuildProperty();
$context['select']['room'] = json_encode(SearchDao::searchRoom()); $context['select']['room'] = json_encode(SearchDao::searchRoom());
$context['select']['feature'] = json_encode(SearchDao::searchFeature());
$context['select']['unitPriceRange'] = SearchDao::searchUnitPriceRange($cityId); $context['select']['unitPriceRange'] = SearchDao::searchUnitPriceRange($cityId);
$context['select']['totalPrice'] = SearchDao::searchTotalPrice($cityId); if ($houseType == 2) {
$context['select']['rentalPrice'] = SearchDao::searchRentalPrice($cityId);
} else {
$context['select']['totalPrice'] = SearchDao::searchTotalPrice($cityId);
}
$context['select']['area'] = json_encode(SearchDao::searchArea($cityId)); $context['select']['area'] = json_encode(SearchDao::searchArea($cityId));
$context['site_url'] = site_url(); $context['url'] = home_url();
Timber::render('index.html', $context); Timber::render('index.html', $context);
?> ?>
\ No newline at end of file
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-cssanimations-csstransitions-touch-shiv-cssclasses-prefixed-teststyles-testprop-testallprops-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.cssanimations=function(){return F("animationName")},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,e.prefixed=function(a,b,c){return b?F(a,b,c):F(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file
var PageTransitions = (function() {
var $main = $( '#pt-main' ),
$pages = $main.children( 'div.pt-page' ),
pagesCount = $pages.length,
current = 0,
isAnimating = false,
endCurrPage = false,
endNextPage = false,
animEndEventNames = {
'WebkitAnimation' : 'webkitAnimationEnd',
'OAnimation' : 'oAnimationEnd',
'msAnimation' : 'MSAnimationEnd',
'animation' : 'animationend'
},
// animation end event name
animEndEventName = animEndEventNames[ Modernizr.prefixed( 'animation' ) ],
// support css animations
support = Modernizr.cssanimations;
function init() {
$pages.each( function() {
var $page = $( this );
$page.data( 'originalClassList', $page.attr( 'class' ) );
} );
$pages.eq( current ).addClass( 'pt-page-current' );
}
function nextPage(options) {
var animation = (options.animation) ? options.animation : options;
if( isAnimating ) {
return false;
}
isAnimating = true;
var $currPage = $pages.eq( current );
if(options.showPage >= 0){
if( options.showPage < pagesCount ) {
current = options.showPage;
}
else {
current = 0;
}
}
var $nextPage = $pages.eq( current ).addClass( 'pt-page-current' ),
outClass = '', inClass = '';
switch( animation ) {
case 1:
outClass = 'pt-page-moveToLeft';
inClass = 'pt-page-moveFromRight';
break;
case 2:
outClass = 'pt-page-moveToRight';
inClass = 'pt-page-moveFromLeft';
break;
case 3:
outClass = 'pt-page-moveToTop';
inClass = 'pt-page-moveFromBottom';
break;
case 4:
outClass = 'pt-page-moveToBottom';
inClass = 'pt-page-moveFromTop';
break;
case 5:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromRight pt-page-ontop';
break;
case 6:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromLeft pt-page-ontop';
break;
case 7:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromBottom pt-page-ontop';
break;
case 8:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromTop pt-page-ontop';
break;
case 9:
outClass = 'pt-page-moveToLeftFade';
inClass = 'pt-page-moveFromRightFade';
break;
case 10:
outClass = 'pt-page-moveToRightFade';
inClass = 'pt-page-moveFromLeftFade';
break;
case 11:
outClass = 'pt-page-moveToTopFade';
inClass = 'pt-page-moveFromBottomFade';
break;
case 12:
outClass = 'pt-page-moveToBottomFade';
inClass = 'pt-page-moveFromTopFade';
break;
case 13:
outClass = 'pt-page-moveToLeftEasing pt-page-ontop';
inClass = 'pt-page-moveFromRight';
break;
case 14:
outClass = 'pt-page-moveToRightEasing pt-page-ontop';
inClass = 'pt-page-moveFromLeft';
break;
case 15:
outClass = 'pt-page-moveToTopEasing pt-page-ontop';
inClass = 'pt-page-moveFromBottom';
break;
case 16:
outClass = 'pt-page-moveToBottomEasing pt-page-ontop';
inClass = 'pt-page-moveFromTop';
break;
case 17:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromRight pt-page-ontop';
break;
case 18:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromLeft pt-page-ontop';
break;
case 19:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromBottom pt-page-ontop';
break;
case 20:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromTop pt-page-ontop';
break;
case 21:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-scaleUpDown pt-page-delay300';
break;
case 22:
outClass = 'pt-page-scaleDownUp';
inClass = 'pt-page-scaleUp pt-page-delay300';
break;
case 23:
outClass = 'pt-page-moveToLeft pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 24:
outClass = 'pt-page-moveToRight pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 25:
outClass = 'pt-page-moveToTop pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 26:
outClass = 'pt-page-moveToBottom pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 27:
outClass = 'pt-page-scaleDownCenter';
inClass = 'pt-page-scaleUpCenter pt-page-delay400';
break;
case 28:
outClass = 'pt-page-rotateRightSideFirst';
inClass = 'pt-page-moveFromRight pt-page-delay200 pt-page-ontop';
break;
case 29:
outClass = 'pt-page-rotateLeftSideFirst';
inClass = 'pt-page-moveFromLeft pt-page-delay200 pt-page-ontop';
break;
case 30:
outClass = 'pt-page-rotateTopSideFirst';
inClass = 'pt-page-moveFromTop pt-page-delay200 pt-page-ontop';
break;
case 31:
outClass = 'pt-page-rotateBottomSideFirst';
inClass = 'pt-page-moveFromBottom pt-page-delay200 pt-page-ontop';
break;
case 32:
outClass = 'pt-page-flipOutRight';
inClass = 'pt-page-flipInLeft pt-page-delay500';
break;
case 33:
outClass = 'pt-page-flipOutLeft';
inClass = 'pt-page-flipInRight pt-page-delay500';
break;
case 34:
outClass = 'pt-page-flipOutTop';
inClass = 'pt-page-flipInBottom pt-page-delay500';
break;
case 35:
outClass = 'pt-page-flipOutBottom';
inClass = 'pt-page-flipInTop pt-page-delay500';
break;
case 36:
outClass = 'pt-page-rotateFall pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 37:
outClass = 'pt-page-rotateOutNewspaper';
inClass = 'pt-page-rotateInNewspaper pt-page-delay500';
break;
case 38:
outClass = 'pt-page-rotatePushLeft';
inClass = 'pt-page-moveFromRight';
break;
case 39:
outClass = 'pt-page-rotatePushRight';
inClass = 'pt-page-moveFromLeft';
break;
case 40:
outClass = 'pt-page-rotatePushTop';
inClass = 'pt-page-moveFromBottom';
break;
case 41:
outClass = 'pt-page-rotatePushBottom';
inClass = 'pt-page-moveFromTop';
break;
case 42:
outClass = 'pt-page-rotatePushLeft';
inClass = 'pt-page-rotatePullRight pt-page-delay180';
break;
case 43:
outClass = 'pt-page-rotatePushRight';
inClass = 'pt-page-rotatePullLeft pt-page-delay180';
break;
case 44:
outClass = 'pt-page-rotatePushTop';
inClass = 'pt-page-rotatePullBottom pt-page-delay180';
break;
case 45:
outClass = 'pt-page-rotatePushBottom';
inClass = 'pt-page-rotatePullTop pt-page-delay180';
break;
case 46:
outClass = 'pt-page-rotateFoldLeft';
inClass = 'pt-page-moveFromRightFade';
break;
case 47:
outClass = 'pt-page-rotateFoldRight';
inClass = 'pt-page-moveFromLeftFade';
break;
case 48:
outClass = 'pt-page-rotateFoldTop';
inClass = 'pt-page-moveFromBottomFade';
break;
case 49:
outClass = 'pt-page-rotateFoldBottom';
inClass = 'pt-page-moveFromTopFade';
break;
case 50:
outClass = 'pt-page-moveToRightFade';
inClass = 'pt-page-rotateUnfoldLeft';
break;
case 51:
outClass = 'pt-page-moveToLeftFade';
inClass = 'pt-page-rotateUnfoldRight';
break;
case 52:
outClass = 'pt-page-moveToBottomFade';
inClass = 'pt-page-rotateUnfoldTop';
break;
case 53:
outClass = 'pt-page-moveToTopFade';
inClass = 'pt-page-rotateUnfoldBottom';
break;
case 54:
outClass = 'pt-page-rotateRoomLeftOut pt-page-ontop';
inClass = 'pt-page-rotateRoomLeftIn';
break;
case 55:
outClass = 'pt-page-rotateRoomRightOut pt-page-ontop';
inClass = 'pt-page-rotateRoomRightIn';
break;
case 56:
outClass = 'pt-page-rotateRoomTopOut pt-page-ontop';
inClass = 'pt-page-rotateRoomTopIn';
break;
case 57:
outClass = 'pt-page-rotateRoomBottomOut pt-page-ontop';
inClass = 'pt-page-rotateRoomBottomIn';
break;
case 58:
outClass = 'pt-page-rotateCubeLeftOut pt-page-ontop';
inClass = 'pt-page-rotateCubeLeftIn';
break;
case 59:
outClass = 'pt-page-rotateCubeRightOut pt-page-ontop';
inClass = 'pt-page-rotateCubeRightIn';
break;
case 60:
outClass = 'pt-page-rotateCubeTopOut pt-page-ontop';
inClass = 'pt-page-rotateCubeTopIn';
break;
case 61:
outClass = 'pt-page-rotateCubeBottomOut pt-page-ontop';
inClass = 'pt-page-rotateCubeBottomIn';
break;
case 62:
outClass = 'pt-page-rotateCarouselLeftOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselLeftIn';
break;
case 63:
outClass = 'pt-page-rotateCarouselRightOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselRightIn';
break;
case 64:
outClass = 'pt-page-rotateCarouselTopOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselTopIn';
break;
case 65:
outClass = 'pt-page-rotateCarouselBottomOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselBottomIn';
break;
case 66:
outClass = 'pt-page-rotateSidesOut';
inClass = 'pt-page-rotateSidesIn pt-page-delay200';
break;
case 67:
outClass = 'pt-page-rotateSlideOut';
inClass = 'pt-page-rotateSlideIn';
break;
}
$currPage.addClass( outClass ).on( animEndEventName, function() {
$currPage.off( animEndEventName );
endCurrPage = true;
if( endNextPage ) {
onEndAnimation( $currPage, $nextPage );
}
} );
$nextPage.addClass( inClass ).on( animEndEventName, function() {
$nextPage.off( animEndEventName );
endNextPage = true;
if( endCurrPage ) {
onEndAnimation( $currPage, $nextPage );
}
} );
if( !support ) {
onEndAnimation( $currPage, $nextPage );
}
}
function onEndAnimation( $outpage, $inpage ) {
endCurrPage = false;
endNextPage = false;
resetPage( $outpage, $inpage );
isAnimating = false;
}
function resetPage( $outpage, $inpage ) {
$outpage.attr( 'class', $outpage.data( 'originalClassList' ) );
$inpage.attr( 'class', $inpage.data( 'originalClassList' ) + ' pt-page-current' );
}
init();
return {
init : init,
nextPage : nextPage
};
})();
\ No newline at end of file
...@@ -48,7 +48,11 @@ function ajaxSendCode(ajaxUrl, self, phone, validate) { ...@@ -48,7 +48,11 @@ function ajaxSendCode(ajaxUrl, self, phone, validate) {
myModal.modal('show'); myModal.modal('show');
break; break;
case 2002: case 2002:
notice.html('<span>请输入有效的手机号</span>'); if(validate == 1){
notice.html('<span>此手机号码尚未注册</span>');
}else{
notice.html('<span>此手机号码已注册</span>');
}
myModal.modal('show'); myModal.modal('show');
self.bind('click', {ajaxUrl: ajaxUrl, validate: validate}, clickSendCode); self.bind('click', {ajaxUrl: ajaxUrl, validate: validate}, clickSendCode);
break; break;
...@@ -59,6 +63,13 @@ function ajaxSendCode(ajaxUrl, self, phone, validate) { ...@@ -59,6 +63,13 @@ function ajaxSendCode(ajaxUrl, self, phone, validate) {
}); });
} }
function phoneAddValidate(){
var phoneTest=/^(13[0-9]|15[0-35-9]|18[0-9]|14[57]|17[06-8])+\d{8}$/;
$.validator.addMethod("format", function(value, element){
return phoneTest.test(value);
}, '手机号码格式有误');
}
Date.prototype.Format = function (fmt) { Date.prototype.Format = function (fmt) {
var o = { var o = {
"M+": this.getMonth() + 1, "M+": this.getMonth() + 1,
...@@ -76,3 +87,90 @@ Date.prototype.Format = function (fmt) { ...@@ -76,3 +87,90 @@ Date.prototype.Format = function (fmt) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt; return fmt;
}; };
function scrollPullToRefresh(cb) {
var pullUpFlag = false;
var scroll = new IScroll('#wrapper', {
click: true
});
scroll.on("scrollStart", function () {
if (this.maxScrollY >= this.y && this.scrollerHeight > this.wrapperHeight && this.directionY == 1) {
pullUpFlag = true;
}
});
scroll.on("scrollEnd", function () {
if (pullUpFlag) {
pullUpFlag = false;
cb();
}
});
return scroll;
}
function ajax_get_house(url, loading, ajax_data, context) {
loading.show();
$.ajax({
type: 'POST',
url: url + '/wp-admin/admin-ajax.php/',
data: ajax_data,
success: function (data) {
loading.hide();
if (data.code == 2000) {
$.each(data.result, function (index, value) {
var houseType = value.house_type;
var template = $('#template_' + houseType).html();
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);
var price = value.average_price;
if (price.length > 4) {
price = (price / 10000).toFixed(2) + '万';
}
div.find('[data-attr=price]').html('<em>' + price + '</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 / 10000) + '万</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);
var rent = value.rent;
if (rent.length > 4) {
rent = (rent / 10000).toFixed(2) + '万';
}
div.find('[data-attr=price]').html('<em>' + rent + '</em>/月');
}
var image = div.find('[data-attr=image]');
if (value.path){
image.attr('src', value.path);
}else{
image.attr('src', url + '/wp-content/themes/tospur/img/img.jpg');
}
if (value.tags) {
var tagsArray = value.tags.split(',');
console.log(tagsArray);
$.each(tagsArray, function (k, v) {
if (k < 3) {
tags.prepend('<span class="label">' + v + '</span>');
}
});
}
div.bind("tap", function () {
window.location.href = url + '/?page=detail&hid=' + value.id;
});
context.append(div);
});
ajax_data.index += 10;
myScroll.refresh();
}
}
});
}
\ No newline at end of file
...@@ -6,14 +6,12 @@ $context['theme'] = get_template_directory_uri(); ...@@ -6,14 +6,12 @@ $context['theme'] = get_template_directory_uri();
$context['url'] = home_url(); $context['url'] = home_url();
$current_user = wp_get_current_user(); $current_user = wp_get_current_user();
$current_user_id = $current_user->ID; $current_user_id = $current_user->ID;
if ($current_user_id == 0) { if ($current_user_id != 0) {
$context['message'] = '请先登录';
} else {
$role = $current_user->roles[0]; $role = $current_user->roles[0];
$user_role = ''; $user_role = '';
$result = null; $result = null;
switch ($role) { switch ($role) {
case 'contributor': case 'subscriber':
$result = dao::search_view_house_by_user_id($current_user_id); $result = dao::search_view_house_by_user_id($current_user_id);
break; break;
case 'editor': case 'editor':
...@@ -25,8 +23,11 @@ if ($current_user_id == 0) { ...@@ -25,8 +23,11 @@ if ($current_user_id == 0) {
} else { } else {
$context['result'] = null; $context['result'] = null;
} }
}
Timber::render('list.html', $context); Timber::render('list.html', $context);
}else{
wp_redirect($const_login_page);
exit;
}
?> ?>
\ No newline at end of file
...@@ -33,9 +33,9 @@ if (is_user_logged_in()) { ...@@ -33,9 +33,9 @@ if (is_user_logged_in()) {
if (!is_wp_error($user)) { if (!is_wp_error($user)) {
wp_redirect($const_my_page); wp_redirect($const_my_page);
} else if ($user->get_error_code() == 'invalid_username') { } else if ($user->get_error_code() == 'invalid_username') {
$context['error'] = '请输入有效的用户名'; $context['error'] = '此手机号码/帐号尚未注册';
} else if ($user->get_error_code() == 'incorrect_password') { } else if ($user->get_error_code() == 'incorrect_password') {
$context['error'] = '您输入的密码无效'; $context['error'] = '您输入的密码有误';
} }
} }
} }
......
<?php <?php
require_once('const.php');
$context = array(); $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
......
...@@ -8,6 +8,9 @@ $current_user = wp_get_current_user(); ...@@ -8,6 +8,9 @@ $current_user = wp_get_current_user();
$user_id = $current_user->ID; $user_id = $current_user->ID;
if ($user_id != 0) { if ($user_id != 0) {
$context['user_id'] = $user_id; $context['user_id'] = $user_id;
}else{
wp_redirect($const_login_page);
exit;
} }
Timber::render('myHouse.html', $context); Timber::render('myHouse.html', $context);
......
...@@ -6,20 +6,12 @@ $context['url'] = home_url(); ...@@ -6,20 +6,12 @@ $context['url'] = home_url();
$current_user = wp_get_current_user(); $current_user = wp_get_current_user();
$user_id = $current_user->ID; $user_id = $current_user->ID;
if ($user_id != 0) { if ($user_id != 0) {
$date = current_time('Y-m-d');
$datetime = new DateTime($cureent_time . '+1 day');
$date = $datetime->format('Y-m-d');
$context['data'] = array(
'jt' => $date,
'mt' => new DateTime($date . '+1 day'),
'ht' => $date
);
$context['user_id'] = $user_id; $context['user_id'] = $user_id;
$context['house_id'] = $_GET['house_id']; $context['house_id'] = $_GET['house_id'];
$context['consultant_id'] = $_GET['consultant_id']; $context['consultant_id'] = $_GET['consultant_id'];
Timber::render('view.html', $context); Timber::render('view.html', $context);
}else{ }else{
wp_redirect(get_site_url()."?page=login"); wp_redirect($const_login_page);
exit; exit;
} }
......
...@@ -2,30 +2,59 @@ ...@@ -2,30 +2,59 @@
<html> <html>
<head lang="en"> <head lang="en">
<meta charset="UTF-8"> <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-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title></title> <title>信息反馈</title>
<style></style> <link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<script src="{{ theme }}/js/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="{{ theme }}/css/infoFeedback.css">
<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/jquery.mobile.custom.min.js"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
$('#submit').click(function () { var notice = $('#notice');
var content = $('#content').val(); var myModal = $('#myModal');
var textarea = $('#content');
$('#submit').tap(function () {
var content = textarea.val();
if (content.trim() == '') { if (content.trim() == '') {
alert('请输入评论内容!'); notice.html('请输入反馈内容');
} myModal.modal('show');
} else {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/', url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=submit_comment', data: 'action=submit_comment&user_id={{ user_id }}&content=' + content,
success: function (data) { success: function () {
textarea.val('');
notice.html('提交成功');
myModal.modal('show');
} }
}); });
}
}); });
}); });
</script> </script>
</head> </head>
<body> <body>
<div class="container-fluid">
<p>同策房屋的每一步,都感谢您的参与!(请输入反馈内容)</p>
<label for="content"></label>
<textarea class="form-control" rows="10" id="content"></textarea>
<button type="button" class="btn btn-lg" id="submit">提交</button>
</div>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content text-center">
<h4>提示</h4>
<p id="notice"></p>
<button type="button" class="btn btn-lg btn-block" data-dismiss="modal">确认</button>
</div>
</div>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -12,24 +12,29 @@ ...@@ -12,24 +12,29 @@
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script> <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/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/star-rating.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/star-rating.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/public.js"></script>
</head> </head>
<body> <body>
<div class="jumbotron"> <div class="jumbotron">
<ul class="list-unstyled"> <ul class="list-unstyled">
<li class="col-xs-4 text-center"> <li class="col-xs-4 text-center">
<img src="{{ consultant.imageUrl }}" data-attr=""> <img src="{{ consultant.imageUrl | default(default_head) }}" data-attr="">
</li> </li>
<li class="col-xs-8"> <li class="col-xs-5">
<p>{{ consultant.display_name }}</p> <p>{{ consultant.display_name }}</p>
<div class="star-rating rating-xs rating-disabled" style="font-size:12px;"> <div class="star-rating rating-xs rating-disabled" style="font-size:20px;height:30px;">
<div class="rating-container rating-gly-star" data-content=""> <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 class="rating-stars" data-content="" style="width: {{ consultant.average_score*20 }}%;" data-attr="score"></div>
</div> </div>
</div> </div>
<p>同策房屋</p> <p>同策房屋</p>
</li> </li>
<li class="col-xs-3">
<a href="{{ consultant_score_url }}" class="btn btn-block">评分</a>
</li>
</ul> </ul>
<h4>诚信宣言</h4> <h4>诚信宣言</h4>
<div id="people_wrapper"> <div id="people_wrapper">
...@@ -58,8 +63,12 @@ ...@@ -58,8 +63,12 @@
</div> </div>
</div> </div>
<footer class="footer navbar-fixed-bottom"> <footer class="footer navbar-fixed-bottom">
<button type="button" class="btn btn-wechat"><span></span>微信联系</button> <a class="btn btn-wechat">
<button type="button" class="btn btn-phone"><span></span>电话联系</button> <span></span>微信联系
</a>
<a href="tel:{{ consultant_mobile }}" class="btn btn-phone">
<span></span>电话联系
</a>
</footer> </footer>
<div class="loading" id="loading" style="display: none;"> <div class="loading" id="loading" style="display: none;">
<ul class="list-unstyled"> <ul class="list-unstyled">
...@@ -135,32 +144,26 @@ ...@@ -135,32 +144,26 @@
<script> <script>
var houseType = 0; var houseType = 0;
var userId = '{{ consultant_id }}';
var index = 0; var index = 0;
var myScroll; var myScroll;
var template; var template;
var loading; var loading;
$(document).ready(function () { $(document).ready(function () {
var searchData = {
action: 'search_house',
cityId: {{ consultant.cityId }},
houseType: houseType,
userType: 1,
userId: {{ consultant_id }},
index: 0
};
var tabPane = $('[data-house=' + houseType + ']'); var tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html(); template = $('#template_' + houseType).html();
loading = $('#loading'); loading = $('#loading');
ajax_get_house(tabPane); ajax_get_house('{{ url }}', loading, searchData, tabPane);
var pullUpFlag = false;
var peopleScroll = new IScroll('#people_wrapper'); var peopleScroll = new IScroll('#people_wrapper');
myScroll = new IScroll('#wrapper', { myScroll = scrollPullToRefresh(function(){
scrollbars: true, ajax_get_house('{{ url }}', loading, searchData, tabPane);
click: true
});
myScroll.on("scrollStart", function () {
if (this.maxScrollY >= this.y) {
pullUpFlag = true;
}
});
myScroll.on("scrollEnd", function () {
if (pullUpFlag) {
pullUpFlag = false;
ajax_get_house(tabPane);
}
}); });
var aTab = $('a[data-toggle=tab]'); var aTab = $('a[data-toggle=tab]');
aTab.on('show.bs.tab', function (e) { aTab.on('show.bs.tab', function (e) {
...@@ -170,69 +173,16 @@ ...@@ -170,69 +173,16 @@
houseType = $(e.target).parent().index(); houseType = $(e.target).parent().index();
tabPane = $('[data-house=' + houseType + ']'); tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html(); template = $('#template_' + houseType).html();
index = 0; searchData.houseType = houseType;
searchData.index = 0;
myScroll.scrollTo(0, 0); myScroll.scrollTo(0, 0);
setTimeout(function () { setTimeout(function () {
myScroll.refresh(); myScroll.refresh();
ajax_get_house(tabPane); ajax_get_house('{{ url }}', loading, searchData, tabPane);
}, 200); }, 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> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -7,17 +7,18 @@ ...@@ -7,17 +7,18 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title>置业顾问</title> <title>置业顾问</title>
<link rel="stylesheet" href="{{ theme }}/css/bootstrap.min.css"> <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"> <link rel="stylesheet" href="{{ theme }}/css/star-rating.min.css">
<link rel="stylesheet" href="{{ theme }}/css/consultantList.css">
<script src="{{ theme }}/js/iscroll.js"></script> <script src="{{ theme }}/js/iscroll.js"></script>
<script src="{{ theme }}/js/jquery.min.js"></script> <script src="{{ theme }}/js/jquery.min.js"></script>
<script src="{{ theme }}/js/jquery.mobile.custom.min.js"></script> <script src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script src="{{ theme }}/js/star-rating.min.js"></script> <script src="{{ theme }}/js/star-rating.min.js"></script>
<script src="{{ theme }}/js/public.js"></script>
</head> </head>
<body> <body>
<div class="search"> <div class="search">
<div class="btn-group pull-left" id="cityGroup"> <div class="btn-group pull-left" id="cityGroup">
<a class="btn" id="cityName">{{ city_name }}<i class="iconfont"></i></a> <a class="btn" id="cityName">{{ city_name }}<span></span></a>
<div id="city_wrapper" class="dropdown-menu"> <div id="city_wrapper" class="dropdown-menu">
<div id="city_scroller"> <div id="city_scroller">
{% for item in city %} {% for item in city %}
...@@ -29,27 +30,28 @@ ...@@ -29,27 +30,28 @@
</div> </div>
<div id="wrapper"> <div id="wrapper">
<div id="scroller"> <div id="scroller">
<ul class="list-unstyled" id="consultantList"></ul>
</div> </div>
</div> </div>
<div id="template" style="display: none"> <div id="template" style="display: none">
<ol class="col-xs-3"> <ul class="list-unstyled">
<li class="col-xs-3">
<img data-attr="image"> <img data-attr="image">
</ol> </li>
<ol class="col-xs-4"> <li class="col-xs-5">
<p data-attr="name"></p> <p data-attr="name"></p>
<div class="star-rating rating-xs rating-disabled" style="font-size:12px;"> <div class="star-rating rating-xs rating-disabled" style="font-size:19px;height:28px;">
<div class="rating-container rating-gly-star" data-content=""> <div class="rating-container rating-gly-star" data-content="">
<div class="rating-stars" data-content="" style="" data-attr="score"></div> <div class="rating-stars" data-content="" style="" data-attr="score"></div>
</div> </div>
</div> </div>
<p>同策房屋</p> <p>同策房屋</p>
</ol> </li>
<ol class="col-xs-5"> <li class="col-xs-4">
<a class="btn btn-phone" data-attr="mobile"> <a class="btn btn-phone" data-attr="mobile">
<span></span>电话联系 <span></span>电话联系
</a> </a>
</ol> </li>
</ul>
</div> </div>
<div class="loading" id="loading" style="display: none;"> <div class="loading" id="loading" style="display: none;">
<ul class="list-unstyled"> <ul class="list-unstyled">
...@@ -91,25 +93,11 @@ ...@@ -91,25 +93,11 @@
} }
cityScroll.refresh(); cityScroll.refresh();
}); });
var pullUpFlag = false;
cityScroll = new IScroll('#city_wrapper',{ cityScroll = new IScroll('#city_wrapper',{
click: true click: true
}); });
myScroll = new IScroll('#wrapper',{ myScroll = scrollPullToRefresh(function(){
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(); ajax_get_consultant();
}
}); });
template = $('#template').html(); template = $('#template').html();
ajax_get_consultant(); ajax_get_consultant();
...@@ -125,23 +113,27 @@ ...@@ -125,23 +113,27 @@
loading.hide(); loading.hide();
if (data.code == 2000) { if (data.code == 2000) {
$.each(data.result, function (index, value) { $.each(data.result, function (index, value) {
var li = $('<li>'); var div = $('<div>');
li.append(template); div.append(template);
li.find('[data-attr=name]').text(value.display_name); div.find('[data-attr=name]').text(value.display_name);
li.find('[data-attr=score]').attr('style', 'width: '+ value.average_score*20+'%'); div.find('[data-attr=score]').attr('style', 'width: '+ value.average_score*20+'%');
li.find('[data-attr=image]').attr('src', value.imageUrl); var head = value.imageUrl;
if(!head){
head = '{{ default_head }}';
}
div.find('[data-attr=image]').attr('src', head);
var infoUrl; var infoUrl;
if(value.mobile){ if(value.mobile){
li.find('[data-attr=mobile]').attr('href', 'tel:' + value.mobile); div.find('[data-attr=mobile]').attr('href', 'tel:' + value.mobile);
infoUrl = consultant_info_url + '&consultant_id=' + value.id + '&mobile=' + value.mobile; infoUrl = consultant_info_url + '&consultant_id=' + value.id + '&mobile=' + value.mobile;
}else{ }else{
li.find('[data-attr=mobile]').attr('disabled',true); div.find('[data-attr=mobile]').attr('disabled',true);
infoUrl = consultant_info_url + '&consultant_id=' + value.id; infoUrl = consultant_info_url + '&consultant_id=' + value.id;
} }
li.tap(function(e){ div.tap(function(e){
window.location.href = infoUrl; window.location.href = infoUrl;
}); });
$('#consultantList').append(li); $('#scroller').append(div);
}); });
$('input[data-attr=score]').rating({ $('input[data-attr=score]').rating({
size: 'xs', size: 'xs',
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/star-rating.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/star-rating.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var myScroll; var myScroll;
var carouselScroll; var carouselScroll;
...@@ -45,12 +44,6 @@ ...@@ -45,12 +44,6 @@
$(document).ready(function(){ $(document).ready(function(){
$("#slider").bind("tap",function(){ $("#slider").bind("tap",function(){
$("#carousel_wrapper").parent().show(); $("#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', { carouselScroll = new IScroll('#carousel_wrapper', {
bounce: false, bounce: false,
scrollX: true, scrollX: true,
...@@ -64,6 +57,11 @@ ...@@ -64,6 +57,11 @@
$("#carousel_indicator li").removeClass("carousel_active"); $("#carousel_indicator li").removeClass("carousel_active");
$("#carousel_indicator li").eq(this.currentPage.pageX).addClass("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; return false;
}); });
$("#carousel_wrapper").parent().bind("click",function(){ $("#carousel_wrapper").parent().bind("click",function(){
...@@ -86,6 +84,10 @@ ...@@ -86,6 +84,10 @@
}); });
}); });
$('#calculator').bind('tap',function(){
window.location.href = '{{ siteUrl }}/?page=loan_calculator';
});
$(".map").bind("tap",function(){ $(".map").bind("tap",function(){
location.href = "{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}"; location.href = "{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}";
}); });
...@@ -95,7 +97,6 @@ ...@@ -95,7 +97,6 @@
<body> <body>
<p class="collect"> <p class="collect">
<i class="iconfont">&#xe604;</i>
</p> </p>
<!-- 图片滚动 --> <!-- 图片滚动 -->
...@@ -124,22 +125,9 @@ ...@@ -124,22 +125,9 @@
均价:<span><em>{{(result.average_price/10000)|round(2, 'floor')}}万</em>/m<em>2</em></span> 均价:<span><em>{{(result.average_price/10000)|round(2, 'floor')}}万</em>/m<em>2</em></span>
</li> </li>
<li class="col-xs-5"> <li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button> <button type="button" class="btn btn-xs" id="calculator">房贷计算器</button>
</li> </li>
</ul> </ul>
<!-- 二手房详细 -->
<!-- <ul class="list-unstyled">
<li class="col-xs-7">房源编号:CS0200000001</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button>
</li>
<li class="col-xs-7 price">
均价:<span><em>20000元</em></span>
</li>
<li class="col-xs-5">单价:</li>
</ul> -->
<!-- 二手房详细 -->
</div> </div>
<div class="detail_row"> <div class="detail_row">
<p class="detail_title">最新动态</p> <p class="detail_title">最新动态</p>
...@@ -169,7 +157,6 @@ ...@@ -169,7 +157,6 @@
<li>周边配套:{{result.periphery}}</li> <li>周边配套:{{result.periphery}}</li>
</ul> </ul>
<p class="map"> <p class="map">
<span></span>
</p> </p>
</div> </div>
<div class="detail_row"> <div class="detail_row">
...@@ -205,6 +192,7 @@ ...@@ -205,6 +192,7 @@
<p class="detail_title">置业顾问</p> <p class="detail_title">置业顾问</p>
<ul class="list-unstyled peopleCont"> <ul class="list-unstyled peopleCont">
{% for item in consultant %} {% for item in consultant %}
<a href="{{siteUrl}}?page=consultant_info&consultant_id={{ item.id }}">
<li> <li>
<ol class="col-xs-2 text-center"> <ol class="col-xs-2 text-center">
{% if item.imageUrl %} {% if item.imageUrl %}
...@@ -215,7 +203,7 @@ ...@@ -215,7 +203,7 @@
</ol> </ol>
<ol class="col-xs-4"> <ol class="col-xs-4">
<p>{{item.name}}</p> <p>{{item.name}}</p>
<div class="star-rating rating-xs rating-disabled" style="font-size:16px;height:25px;"> <div class="star-rating rating-xs rating-disabled" style="font-size:15px;height:25px;">
<div class="rating-container rating-gly-star" data-content=""> <div class="rating-container rating-gly-star" data-content="">
<div class="rating-stars" data-content="" style="width: {{item.average_score*2*10}}%;"></div> <div class="rating-stars" data-content="" style="width: {{item.average_score*2*10}}%;"></div>
</div> </div>
...@@ -234,6 +222,7 @@ ...@@ -234,6 +222,7 @@
</a> </a>
</ol> </ol>
</li> </li>
</a>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
......
<!DOCTYPE html>
<html>
<head>
<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>{{result.community_name}}</title>
<!--CSS-->
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/detail.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/swipe.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/star-rating.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript">
var myScroll;
var carouselScroll;
window.addEventListener("load",function(){
var bullets = document.getElementById('indicator').getElementsByTagName('li');
window.mySwipe = new Swipe(document.getElementById('slider'), {
auto: 3000,
callback: function(pos) {
var i = bullets.length;
while (i--) {
bullets[i].className = ' ';
}
bullets[pos].className = 'active';
}
});
myScroll = new IScroll('#wrapper', {
eventPassthrough: true,
scrollX: true,
scrollY: false,
preventDefault: false,
click: true
});
},false);
$(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,
scrollY: false,
momentum: false,
snap: true,
snapSpeed: 400,
click: true
});
carouselScroll.on('scrollEnd',function(){
$("#carousel_indicator li").removeClass("carousel_active");
$("#carousel_indicator li").eq(this.currentPage.pageX).addClass("carousel_active");
});
return false;
});
$("#carousel_wrapper").parent().bind("click",function(){
$(this).hide();
return false;
});
$(".collect").bind("tap",function(){
$.ajax({
type: 'POST',
url: '{{ siteUrl }}/wp-admin/admin-ajax.php/',
data: 'action=add_collect&hid={{hid}}',
success: function (data) {
if (data.code == 2000) {
alert('收藏成功');
} else {
alert('收藏失败');
}
}
});
});
$(".map").bind("tap",function(){
location.href = "{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}";
});
$(".col-xs-2").bind("tap",function(){
location.href = "{{siteUrl}}?page=consultant_info&consultant_id={{ consultant[0].id }}";
});
});
</script>
</head>
<body>
<p class="collect">
</p>
<!-- 图片滚动 -->
<div class="addWrap">
<div id="slider" class="swipe">
<div class="swipe-wrap">
{% for item in images %}
<div>
<img src="{{siteUrl}}{{item.path}}">
</div>
{% endfor %}
</div>
</div>
<ul id="indicator" class="list-inline text-center">
{% for i in 1..images|length %}
<li {% if loop.index0 == 0 %}class="active"{% endif %}></li>
{% endfor %}
</ul>
</div>
<!-- /图片滚动 -->
<div class="detail_row priceCont">
<p class="detail_title">{{result.name}}</p>
<ul class="list-unstyled">
<li class="col-xs-7">房源编号:{{result.house_number}}</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs" id="calculator">房贷计算器</button>
</li>
<li class="col-xs-7 price">
售价:<span><em>{{(result.total_price/10000)|round(2, 'floor')}}万</em></span>
</li>
<li class="col-xs-5">单价:{{(result.average_price/10000)|round(2, 'floor')}}万</li>
</ul>
</div>
<div class="detail_row">
<a class="collapsed" data-toggle="collapse" href="#collapseExample">
<p class="detail_title">基本信息<i class="iconfont pull-right"></i></p>
</a>
<ul class="list-unstyled collapse infoCont" id="collapseExample">
<li>户型:{{result.covered_area}}</li>
<li>面积:{{result.covered_area}}</li>
<li>楼层:{{result.floor}}</li>
<li>朝向:{{result.faceto}}</li>
<li>装修:{{result.decoration}}</li>
<li>年代:{{result.age}}</li>
</ul>
</div>
<div class="detail_row">
<p class="detail_title">房源点评</p>
<p>{{result.overview}}</p>
</div>
<div class="detail_row">
<p class="detail_title">位置及周边</p>
<ul class="list-unstyled">
<li>地址:{{result.address}}</li>
<li>交通线路:{{result.traffic}}</li>
<li>周边配套:{{result.periphery}}</li>
</ul>
<p class="map">
</p>
</div>
<div class="detail_row">
<p class="detail_title pull-left">推荐房源</p>
<ul class="list-unstyled recommendCont">
{% for item in recommends %}
<a href="{{siteUrl}}?page=detail&hid={{item.id}}"><li class="col-xs-3"><p style="background-image:url({{siteUrl}}{{ item.path }});"></p></li></a>
{% endfor %}
</ul>
</div>
{% if consultant[0] %}
<footer class="footer navbar-fixed-bottom">
<ul class="list-unstyled">
<li class="col-xs-2">
{% if item.imageUrl %}
<img src="{{ consultant[0].imageUrl }}">
{% else %}
<img src="{{ theme }}/img/head.png">
{% endif %}
</li>
<li class="col-xs-5">
<div>
<span class="pull-left">{{consultant[0].name}}</span>
<div class="star-rating rating-xs rating-disabled" style="font-size:14px;height:25px;">
<div class="rating-container rating-gly-star" data-content="">
<div class="rating-stars" data-content="" style="width: {{consultant[0].average_score*2*10}}%;"></div>
</div>
</div>
</div>
<div>置业顾问</div>
</li>
<li class="col-xs-5 text-right">
{% if consultant[0].mobile %}
<a href="tel:{{consultant[0].mobile}}" class="btn btn-phone">
<span></span>
<span>电话联系</span>
</a>
{% endif %}
<!--<a href="#" class="btn btn-wechat">
<span></span>
<span>微信联系</span>
</a>-->
</li>
</ul>
<!-- 二手房详细 -->
</footer>
{% endif %}
<div class="modal">
<div id="carousel_wrapper">
<div id="carousel_scroller">
<ul class="list-inline text-nowrap">
{% for item in images %}
<li>
<p>
<span><img src="{{siteUrl}}{{item.path}}"></span>
</p>
</li>
{% endfor %}
</ul>
</div>
<ul id="carousel_indicator" class="list-inline text-center indicators">
{% for i in 1..images|length %}
<li></li>
{% endfor %}
</ul>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head lang="en"> <head lang="en">
<meta charset="UTF-8"> <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-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title>忘记密码</title> <title>忘记密码</title>
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
$(document).ready(function () { $(document).ready(function () {
var notice = $('#notice'); var notice = $('#notice');
var myModal = $('#myModal'); var myModal = $('#myModal');
phoneAddValidate();
$('#forgetForm').validate({ $('#forgetForm').validate({
onkeyup: false, onkeyup: false,
onfocusout: false, onfocusout: false,
...@@ -24,13 +25,20 @@ ...@@ -24,13 +25,20 @@
required: true, required: true,
minlength: 11, minlength: 11,
maxlength: 11, maxlength: 11,
digits: true digits: true,
format: true
}, },
code: 'required', code: 'required',
password: 'required' password: 'required'
}, },
messages: { messages: {
phone: '请输入11位手机号', phone: {
required: '请输入11位手机号码',
minlength: '请输入11位手机号码',
maxlength: '请输入11位手机号码',
digits: '手机号码格式有误',
format: '手机号码格式有误'
},
code: '请输入验证码', code: '请输入验证码',
password: '请输入新密码' password: '请输入新密码'
}, },
...@@ -61,8 +69,7 @@ ...@@ -61,8 +69,7 @@
<div class="container-fluid text-center"> <div class="container-fluid text-center">
<form id="forgetForm" method="post"> <form id="forgetForm" method="post">
<h2>忘记密码</h2> <h2></h2>
<p class="has-feedback username"> <p class="has-feedback username">
<label for="phone" class="sr-only">用户名</label> <label for="phone" class="sr-only">用户名</label>
<input type="tel" name="phone" id="phone" class="form-control input-lg" placeholder="手机号码"> <input type="tel" name="phone" id="phone" class="form-control input-lg" placeholder="手机号码">
......
...@@ -6,231 +6,39 @@ ...@@ -6,231 +6,39 @@
<meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/> <meta name="format-detection" content="telephone=no"/>
<title>列表</title> <title>{% if houseType == 0%}新房列表{% elseif houseType == 1 %}二手房列表{% elseif houseType == 2 %}租房列表{% endif %}</title>
<!--CSS-->
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/list.css"> <link rel="stylesheet" type="text/css" href="{{ theme }}/css/list.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/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script> <script type="text/javascript" src="{{ theme }}/js/public.js"></script>
<script type="text/javascript">
var myScroll;
var cityScroll;
var areaScroll;
var urbanAreaScroll;
var buildPropertyScroll;
var acreageScroll;
var priceScroll;
var otherScroll;
var scrollList = [];
window.addEventListener("load",function(){
myScroll = new IScroll('#wrapper',{
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
});
scrollList.push(cityScroll);
areaScroll = new IScroll('#area_wrapper',{
click: true
});
scrollList.push(areaScroll);
urbanAreaScroll = new IScroll('#urbanArea_wrapper',{
click: true
});
scrollList.push(urbanAreaScroll);
buildPropertyScroll = new IScroll('#buildProperty_wrapper',{
click: true
});
scrollList.push(buildPropertyScroll);
totalPriceScroll = new IScroll('#totalPrice_wrapper',{
click: true
});
scrollList.push(totalPriceScroll);
otherScroll = new IScroll('#other_wrapper',{
click: true
});
scrollList.push(otherScroll);
},false);
document.addEventListener('touchmove', function(e){ e.preventDefault(); });
var plate = {{select.plate}};
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");
parent.addClass("open");
}
$.each(scrollList,function(i,item){
item.refresh();
});
});
$("#district_scroller > a").bind('tap',function(){
$("#district_scroller > a").removeClass("active-bg");
$(this).addClass("active-bg");
$("#urbanArea_scroller").children(":not(:first)").remove();
if($(this).attr("data-id") != undefined){
$.each(plate[$(this).attr("data-id")],function(i,item){
$("#urbanArea_scroller").append('<a data-id="'+item.id+'">'+item.value+'</a>');
});
}
urbanAreaScroll.refresh();
});
var other = $("#other_scroller");
var other_item = room;
var roomAndAcreageKey = "id";
$.each(other_item,function(i,item){
other.append('<a data-id="'+item[roomAndAcreageKey]+'">'+item.value+'</a>');
});
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 == 'roomId'){
other_item = room;
other.attr("type","roomId");
roomAndAcreageKey = "id";
}else if(id == 'acreage'){
other_item = area;
other.attr("type","acreage");
roomAndAcreageKey = "value";
}
$.each(other_item,function(i,item){
var dataId = item.id;
other.append('<a data-id="'+item[roomAndAcreageKey]+'">'+item.value+'</a>');
});
otherScroll.refresh();
});
$(".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"):-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:"search_house",
cityId:{{cityId}},
districtId:-1,
plateId:-1,
totalPrice:-1,
buildPropertyId:-1,
roomId:-1,
acreage:-1,
searchText:'',
index:0
};
function getHouse(){
$.ajax({
type: "POST",
url: "/tospur/wp-admin/admin-ajax.php",
data: searchData,
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>');
});
}
div.bind("tap",function(){
location.href = "{{site_url}}/?page=detail&hid="+value.id;
});
scroller.append(div);
});
searchData.index += 10;
myScroll.refresh();
}
}
});
}
</script>
</head> </head>
<body> <body>
<div class="search"> <div class="search">
<div class="btn-group pull-left"> <div class="btn-group pull-left">
<a class="btn">{{cityName}}<i class="iconfont"></i></a> <a class="btn">{{cityName}}<span></span></a>
<div id="city_wrapper" class="dropdown-menu"> <div id="city_wrapper" class="dropdown-menu">
<div id="city_scroller"> <div id="city_scroller">
{% for item in select.city %} {% for item in select.city %}
<a href="{{site_url}}?cityId={{item.id}}">{{item.value}}</a> <a href="{{ url }}?houseType={{ houseType }}&cityId={{ item.id }}"{% if(item.id == cityId) %} class="active"{% endif %}>{{ item.value }}</a>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div> </div>
<div class="has-feedback pull-right"> <div class="has-feedback pull-right">
<input type="text" class="form-control" placeholder="输入楼盘名/地段名搜索"> <form id="searchForm" method="post">
<i class="iconfont form-control-feedback">&#xe600;</i> <input type="text" class="form-control" placeholder="输入楼盘名/地段名搜索" id="searchText">
<span class="glyphicon glyphicon-search form-control-feedback" id="searchBtn"></span>
</form>
</div> </div>
</div> </div>
<div class="btn-group-justified"> <div class="btn-group-justified">
<div class="btn-group"> <div class="btn-group">
<a href="#" class="btn">区域<i class="iconfont"></i></a> <a href="#" class="btn">区域<span></span></a>
<div class="dropdown-menu"> <div class="dropdown-menu">
<div id="area_wrapper" class="col-xs-5 left-menu"> <div id="area_wrapper" class="col-xs-5 left-menu">
<div type="districtId" id="district_scroller"> <div type="districtId" id="district_scroller">
...@@ -243,51 +51,78 @@ ...@@ -243,51 +51,78 @@
<div id="urbanArea_wrapper" class="col-xs-7 right-menu"> <div id="urbanArea_wrapper" class="col-xs-7 right-menu">
<div type="plateId" id="urbanArea_scroller"> <div type="plateId" id="urbanArea_scroller">
<a href="#">不限</a> <a href="#" class="active">不限</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a class="btn">价格<i class="iconfont"></i></a> <a class="btn">价格<span></span></a>
<div id="totalPrice_wrapper" class="dropdown-menu"> <div id="price_wrapper" class="dropdown-menu">
{% if select.totalPrice %}
<div type="totalPrice" id="totalPrice_scroller"> <div type="totalPrice" id="totalPrice_scroller">
<a href="#">不限</a> <a href="#" class="active">不限</a>
{% for item in select.totalPrice %} {% for item in select.totalPrice %}
<a data-id="{{item.value}}">{{item.value}}</a> <a data-id="{{item.value}}">{{item.value}}</a>
{% endfor %} {% endfor %}
</div> </div>
{% endif %}
{% if select.rentalPrice %}
<div type="rentalPrice" id="rentalPrice_scroller">
<a href="#" class="active">不限</a>
{% for item in select.rentalPrice %}
<a data-id="{{item.value}}">{{item.value}}</a>
{% endfor %}
</div>
{% endif %}
</div> </div>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a href="#" class="btn">房型<i class="iconfont"></i></a> <a href="#" class="btn">房型<span></span></a>
<div id="buildProperty_wrapper" class="dropdown-menu"> <div id="buildProperty_wrapper" class="dropdown-menu">
<div type="buildPropertyId" id="buildProperty_scroller"> <div type="buildPropertyId" id="buildProperty_scroller">
<a href="#">不限</a> <a href="#" class="active">不限</a>
{% for item in select.buildProperty %} {% for item in select.buildProperty %}
<a data-id="{{item.id}}">{{item.value}}</a> <a data-id="{{item.id}}">{{item.value}}</a>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div> </div>
{% if houseType == 2 %}
<div class="btn-group"> <div class="btn-group">
<a href="#" class="btn">更多<i class="iconfont"></i></a> <a href="#" class="btn">面积<span></span></a>
<div id="other_wrapper" class="dropdown-menu">
<div id="other_scroller">
<a href="#" class="active">不限</a>
{% for item in select.area %}
<a data-id="{{item.id}}">{{item.value}}</a>
{% endfor %}
</div>
</div>
</div>
{% else %}
<div class="btn-group">
<a href="#" class="btn">更多<span></span></a>
<div class="dropdown-menu"> <div class="dropdown-menu">
<div class="col-xs-5 left-menu"> <div class="col-xs-5 left-menu">
<div> <div>
<a id="roomId" class="active-bg">类型</a> <a id="acreage" class="active-bg">面积</a>
<a id="acreage">面积</a> {% if houseType == 0 %}
<a id="roomId">类型</a>
{% else %}
<a id="feature">特色</a>
{% endif %}
</div> </div>
</div> </div>
<div id="other_wrapper" class="col-xs-7 right-menu"> <div id="other_wrapper" class="col-xs-7 right-menu">
<div id="other_scroller"> <div id="other_scroller">
<a href="#">不限</a> <a href="#" class="active">不限</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{% endif %}
</div> </div>
<div id="wrapper"> <div id="wrapper">
...@@ -295,9 +130,30 @@ ...@@ -295,9 +130,30 @@
</div> </div>
</div> </div>
<footer class="footer text-center navbar-fixed-bottom"> <footer class="footer text-center navbar-fixed-bottom">
拨打400-123-4567 <a href="tel:400-123-4567">400-123-4567</a>
</footer> </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"> <div id="template_0" style="display: none">
<p> <p>
<img src="" data-attr="image"> <img src="" data-attr="image">
...@@ -348,5 +204,163 @@ ...@@ -348,5 +204,163 @@
</ul> </ul>
</div> </div>
<script type="text/javascript">
var myScroll;
var cityScroll;
var areaScroll;
var urbanAreaScroll;
var buildPropertyScroll;
var acreageScroll;
var priceScroll;
var otherScroll;
var scrollList = [];
var houseType = {{ houseType }};
window.addEventListener("load",function(){
myScroll = scrollPullToRefresh(function(){
ajax_get_house('{{ url }}', loading, searchData, scroller);
});
scrollList.push(myScroll);
cityScroll = new IScroll('#city_wrapper',{
click: true
});
scrollList.push(cityScroll);
areaScroll = new IScroll('#area_wrapper',{
click: true
});
scrollList.push(areaScroll);
urbanAreaScroll = new IScroll('#urbanArea_wrapper',{
click: true
});
scrollList.push(urbanAreaScroll);
buildPropertyScroll = new IScroll('#buildProperty_wrapper',{
click: true
});
scrollList.push(buildPropertyScroll);
priceScroll = new IScroll('#price_wrapper',{
click: true
});
scrollList.push(priceScroll);
otherScroll = new IScroll('#other_wrapper',{
click: true
});
scrollList.push(otherScroll);
},false);
document.addEventListener('touchmove', function(e){ e.preventDefault(); });
var plate = {{select.plate}};
var room = {{select.room}};
var area = {{select.area}};
var feature = {{select.feature}};
var scroller;
var loading;
$(document).ready(function(){
scroller = $('#scroller');
loading = $('#loading');
$(".btn-group > a").bind('tap',function(){
var parent = $(this).parent();
if(parent.hasClass("open")){
$(".btn-group").removeClass("open");
}else{
$(".btn-group").removeClass("open");
parent.addClass("open");
}
$.each(scrollList,function(i,item){
item.refresh();
});
});
$("#district_scroller > a").bind('tap',function(){
$("#district_scroller > a").removeClass("active-bg");
$(this).addClass("active-bg");
$("#urbanArea_scroller").children(":not(:first)").remove();
if($(this).attr("data-id") != undefined){
$.each(plate[$(this).attr("data-id")],function(i,item){
$("#urbanArea_scroller").append('<a data-id="'+item.id+'">'+item.value+'</a>');
});
}
urbanAreaScroll.refresh();
});
var other = $("#other_scroller");
var other_item = area;
var roomAndAcreageKey = "value";
$.each(other_item,function(i,item){
other.append('<a data-id="'+item[roomAndAcreageKey]+'">'+item.value+'</a>');
});
other.attr("type","acreage");
$("#roomId,#acreage,#feature").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 == 'roomId'){
other_item = room;
other.attr("type","roomId");
roomAndAcreageKey = "id";
}else if(id == 'acreage'){
other_item = area;
other.attr("type","acreage");
roomAndAcreageKey = "value";
}else if(id == 'feature'){
other_item = feature;
other.attr("type","feature");
roomAndAcreageKey = "id";
}
if(searchData[id] != -1){
other.children(":first").removeClass('active');
}else{
other.children(":first").addClass('active');
}
$.each(other_item,function(i,item){
var active = searchData[id]==item[roomAndAcreageKey]?' class="active"':'';
other.append('<a data-id="'+item[roomAndAcreageKey]+'"'+active+'>'+item.value+'</a>');
});
otherScroll.refresh();
});
$(".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"):-1;
if($(this).attr("data-action") != "open"){
//do somthing
$(this).parent().find('a').removeClass('active');
$(this).addClass('active');
$(".btn-group").removeClass("open");
scroller.html('');
ajax_get_house('{{ url }}', loading, searchData, scroller);
}
}
});
$('#searchBtn').bind('tap',function(){
searchNameAndAddress();
});
$('#searchForm').submit(function(){
searchNameAndAddress();
return false;
});
ajax_get_house('{{ url }}', loading, searchData, scroller);
});
function searchNameAndAddress(){
searchData.index = 0;
searchData.searchText = $('#searchText').val();
scroller.html('');
ajax_get_house('{{ url }}', loading, searchData, scroller);
}
var searchData = {
action: 'search_house',
cityId: {{ cityId }},
districtId: -1,
plateId: -1,
totalPrice: -1,
rentalPrice: -1,
buildPropertyId: -1,
roomId: -1,
acreage: -1,
searchText: '',
feature: -1,
houseType: houseType,
index: 0
};
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head lang="en"> <head lang="en">
<meta charset="UTF-8"> <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-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title></title> <title></title>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script> <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/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
</head> </head>
<body> <body>
{% if result %} {% if result %}
...@@ -22,24 +23,15 @@ ...@@ -22,24 +23,15 @@
<li> <li>
<p>楼盘名:{{ item.name }}</p> <p>楼盘名:{{ item.name }}</p>
<p>预约时间:{{ item.date }} {{ item.time }}</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.user_id %}
{% if item.handle==0 %} {% if item.handle==0 %}
<p data-name="handle" data-id="{{ item.id }}">接受</p> <p class="accept">
{% else %} <button type="button" class="btn btn-lg" data-name="handle" data-id="{{ item.id }}">接受</button>
<p>已接受</p> </p>
{% endif %} {% endif %}
{% endif %} {% endif %}
</li> </li>
</ul> </ul>
{% else %}
{{ message }}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
...@@ -49,9 +41,9 @@ ...@@ -49,9 +41,9 @@
<div class="modal-content text-center"> <div class="modal-content text-center">
<h3>您还未预约过看房信息。<br>马上去预约看房!</h3> <h3>您还未预约过看房信息。<br>马上去预约看房!</h3>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li>新房<i class="iconfont"></i></li> <li>新房</li>
<li>二手房<i class="iconfont"></i></li> <li>二手房</li>
<li>租房<i class="iconfont"></i></li> <li>租房</li>
</ul> </ul>
</div> </div>
</div> </div>
...@@ -61,10 +53,9 @@ ...@@ -61,10 +53,9 @@
$(document).ready(function () { $(document).ready(function () {
{% if result %} {% if result %}
var myScroll = new IScroll('#wrapper',{ var myScroll = new IScroll('#wrapper',{
scrollbars: true,
click: true click: true
}); });
$('[data-name=handle]').click(function () { $('[data-name=handle]').tap(function () {
var self = $(this); var self = $(this);
var id = self.data('id'); var id = self.data('id');
$.ajax({ $.ajax({
...@@ -73,7 +64,7 @@ ...@@ -73,7 +64,7 @@
data: 'action=handle_view_house&id=' + id, data: 'action=handle_view_house&id=' + id,
success: function (data) { success: function (data) {
if (data.code == 2000) { if (data.code == 2000) {
self.html('已接受'); self.parent().remove();
alert('接受成功'); alert('接受成功');
} else { } else {
alert('接受失败'); alert('接受失败');
...@@ -84,8 +75,9 @@ ...@@ -84,8 +75,9 @@
{% else %} {% else %}
var myModal = $('#myModal'); var myModal = $('#myModal');
myModal.modal('show'); myModal.modal('show');
myModal.find('li').click(function(){ myModal.find('li').tap(function(){
window.location.href = '{{ url }}'; var index = $(this).index();
window.location.href = '{{ url }}/?houseType=' + index;
}); });
{% endif %} {% endif %}
}); });
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
<script type="text/javascript" src="{{ theme }}/js/gftools.js"></script> <script type="text/javascript" src="{{ theme }}/js/gftools.js"></script>
</head> </head>
<body> <body>
{% set commerce_rate = 5.15 %}
{% set accumulationFund_rate = 3.25 %}
<div id="pt-main" class="pt-perspective"> <div id="pt-main" class="pt-perspective">
<div class="pt-page pt-page-1"> <div class="pt-page pt-page-1">
<ul id="tab" class="list-unstyled btn-group-justified tab"> <ul id="tab" class="list-unstyled btn-group-justified tab">
...@@ -35,8 +36,9 @@ ...@@ -35,8 +36,9 @@
</li> </li>
</ul> </ul>
<div class="tab-content"> <div id="tabWrapper">
<div class="tab-pane fade in active" id="commerce_loan"> <div id="tabScroller" class="tab-content">
<div class="tab-pane fade in active" id="commerce_loan">
<ul class="list-unstyled"> <ul class="list-unstyled">
<li> <li>
<label class="col-xs-3">房价总额:</label> <label class="col-xs-3">房价总额:</label>
...@@ -105,17 +107,17 @@ ...@@ -105,17 +107,17 @@
<label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label> <label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
<p class="col-xs-7"> <p class="col-xs-7">
<input type="number" class="form-control" data-id="rate" value="5.4"> <input type="number" class="form-control" data-id="rate" value="{{ commerce_rate }}">
</p> </p>
<p class="col-xs-2">%</p> <p class="col-xs-2">%</p>
</li> </li>
</ul> </ul>
<p class="text-right">商业贷款利率5.40%</p> <p class="text-right">商业贷款利率{{ commerce_rate }}%</p>
<input type="submit" value="开始计算" class="btn btn-lg"> <input type="submit" value="开始计算" class="btn btn-lg">
</div> </div>
<div class="tab-pane fade" id="accumulationFund_loan"> <div class="tab-pane fade" id="accumulationFund_loan">
<ul class="list-unstyled"> <ul class="list-unstyled">
<li> <li>
<label class="col-xs-3">房价总额:</label> <label class="col-xs-3">房价总额:</label>
...@@ -184,17 +186,17 @@ ...@@ -184,17 +186,17 @@
<label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label> <label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
<p class="col-xs-7"> <p class="col-xs-7">
<input type="number" class="form-control" data-id="rate" value="3.5"> <input type="number" class="form-control" data-id="rate" value="{{ accumulationFund_rate }}">
</p> </p>
<p class="col-xs-2">%</p> <p class="col-xs-2">%</p>
</li> </li>
</ul> </ul>
<p class="text-right">公积金贷款利率3.50%</p> <p class="text-right">公积金贷款利率{{ accumulationFund_rate }}%</p>
<input type="submit" value="开始计算" class="btn btn-lg"> <input type="submit" value="开始计算" class="btn btn-lg">
</div> </div>
<div class="tab-pane fade" id="combined_loan"> <div class="tab-pane fade" id="combined_loan">
<ul class="list-unstyled"> <ul class="list-unstyled">
<li> <li>
<label class="col-xs-3">房价总额:</label> <label class="col-xs-3">房价总额:</label>
...@@ -302,15 +304,16 @@ ...@@ -302,15 +304,16 @@
<label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label> <label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
<p class="col-xs-7"> <p class="col-xs-7">
<input type="number" class="form-control" data-id="rate" value="5.4"> <input type="number" class="form-control" data-id="rate" value="{{ commerce_rate }}">
</p> </p>
<p class="col-xs-2">%</p> <p class="col-xs-2">%</p>
</li> </li>
</ul> </ul>
<p class="text-right">公积金贷款利率3.50% 商业贷款利率5.40%</p> <p class="text-right">公积金贷款利率{{ accumulationFund_rate }}% 商业贷款利率{{ commerce_rate }}%</p>
<input type="submit" value="开始计算" class="btn btn-lg"> <input type="submit" value="开始计算" class="btn btn-lg">
</div> </div>
</div>
</div> </div>
</div> </div>
<div class="pt-page pt-page-2"> <div class="pt-page pt-page-2">
...@@ -352,7 +355,22 @@ ...@@ -352,7 +355,22 @@
<script> <script>
var daikuan_money = 0; var daikuan_money = 0;
var page = 0; var page = 0;
var tabScroll;
var resultScroll;
var resultList;
$(document).ready(function () { $(document).ready(function () {
tabScroll = new IScroll('#tabWrapper',{
click: true
});
resultScroll = new IScroll('#wrapper', {
click: true
});
$('#tab a').click(function(){
tabScroll.scrollTo(0,0);
setTimeout(function(){
tabScroll.refresh();
},200);
});
var notice = $('#notice'); var notice = $('#notice');
var myModal = $('#myModal'); var myModal = $('#myModal');
$('[data-id=fangjia_money]').change(function () { $('[data-id=fangjia_money]').change(function () {
...@@ -382,22 +400,20 @@ ...@@ -382,22 +400,20 @@
notice.html('请输入利率'); notice.html('请输入利率');
myModal.modal('show'); myModal.modal('show');
} else { } else {
var resultList = $('#result'); resultList = $('#result');
if (tabId == 'combined_loan') { if (tabId == 'combined_loan') {
var accumulationFund_money = Number(tab.find('[data-id=daikuan_money]').val().trim()); var accumulationFund_money = Number(tab.find('[data-id=daikuan_money]').val().trim());
var commerce_money = Number(tab.find('[data-id=commerce_money]').val().trim()); var commerce_money = Number(tab.find('[data-id=commerce_money]').val().trim());
var accumulationFund_year = Number(tab.find('[data-id=accumulationFund_year]').val()); var accumulationFund_year = Number(tab.find('[data-id=accumulationFund_year]').val());
var commerce_year = Number(tab.find('[data-id=commerce_year]').val()); var commerce_year = Number(tab.find('[data-id=commerce_year]').val());
var accumulationFund_result = loan_calc(accumulationFund_money, accumulationFund_year, 3.5); var accumulationFund_result = loan_calc(accumulationFund_money, accumulationFund_year, {{ accumulationFund_rate }});
var commerce_result = loan_calc(commerce_money, commerce_year, rate); var commerce_result = loan_calc(commerce_money, commerce_year, rate);
console.log(accumulationFund_result);
console.log(commerce_result);
$('#money').text('贷款总额:' + (accumulationFund_money + commerce_money).toFixed(2) + '万元'); $('#money').text('贷款总额:' + (accumulationFund_money + commerce_money).toFixed(2) + '万元');
$('#acpi_interest').text(Math.round(accumulationFund_result.acpi.interest + commerce_result.acpi.interest)); $('#acpi_interest').text(Math.round(accumulationFund_result.acpi.interest + commerce_result.acpi.interest));
$('#ac_interest').text(Math.round(accumulationFund_result.ac.interest + commerce_result.ac.interest)); $('#ac_interest').text(Math.round(accumulationFund_result.ac.interest + commerce_result.ac.interest));
//公积金按揭年数 > //公积金按揭年数 > 商业贷款按揭年数
if (accumulationFund_result.loan_period >= commerce_result.loan_period) { if (accumulationFund_result.loan_period >= commerce_result.loan_period) {
$('#month').text('贷款月数:' + result.loan_period); $('#month').text('贷款月数:' + accumulationFund_result.loan_period);
$.each(accumulationFund_result.ac.monthlyPayment, function (index, value) { $.each(accumulationFund_result.ac.monthlyPayment, function (index, value) {
var payment = commerce_result.ac.monthlyPayment[index]; var payment = commerce_result.ac.monthlyPayment[index];
var commerce_monthlyPayment = commerce_result.acpi.monthlyPayment; var commerce_monthlyPayment = commerce_result.acpi.monthlyPayment;
...@@ -410,6 +426,7 @@ ...@@ -410,6 +426,7 @@
'<p class="col-xs-4">' + Math.round(value + payment) + '</p></li>'); '<p class="col-xs-4">' + Math.round(value + payment) + '</p></li>');
}); });
} else { } else {
$('#month').text('贷款月数:' + commerce_result.loan_period);
$.each(commerce_result.ac.monthlyPayment, function (index, value) { $.each(commerce_result.ac.monthlyPayment, function (index, value) {
var payment = accumulationFund_result.ac.monthlyPayment[index]; var payment = accumulationFund_result.ac.monthlyPayment[index];
var accumulationFund_monthlyPayment = accumulationFund_result.acpi.monthlyPayment; var accumulationFund_monthlyPayment = accumulationFund_result.acpi.monthlyPayment;
...@@ -436,10 +453,7 @@ ...@@ -436,10 +453,7 @@
'<p class="col-xs-4">' + Math.round(value) + '</p></li>'); '<p class="col-xs-4">' + Math.round(value) + '</p></li>');
}); });
} }
var scroll = new IScroll('#wrapper', { resultScroll.refresh();
scrollbars: true,
click: true
});
page = 1; page = 1;
window.location.href = '#result'; window.location.href = '#result';
PageTransitions.nextPage({ PageTransitions.nextPage({
...@@ -450,16 +464,18 @@ ...@@ -450,16 +464,18 @@
return false; return false;
}); });
window.addEventListener("popstate", function(e) { if (window.location.hash == '#result') {
window.history.back();
}
window.addEventListener("popstate", function (e) {
if (window.location.hash == '' && page == 1) { if (window.location.hash == '' && page == 1) {
console.log(page);
page = 0; page = 0;
PageTransitions.nextPage({ PageTransitions.nextPage({
animation: 2, animation: 2,
showPage: page showPage: page
}); });
}else if(page == 0){ resultList.html('');
window.history.back(); resultScroll.refresh();
} }
}); });
}); });
......
...@@ -52,8 +52,7 @@ ...@@ -52,8 +52,7 @@
<div class="container-fluid text-center"> <div class="container-fluid text-center">
<form id="loginForm" method="post"> <form id="loginForm" method="post">
<h2>登录</h2> <h2></h2>
<p class="has-feedback username"> <p class="has-feedback username">
<label for="phone" class="sr-only">用户名</label> <label for="phone" class="sr-only">用户名</label>
<input type="tel" name="phone" id="phone" class="form-control input-lg" placeholder="手机号码/账号"> <input type="tel" name="phone" id="phone" class="form-control input-lg" placeholder="手机号码/账号">
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script> <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/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script> <script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/public.js"></script>
</head> </head>
<body> <body>
<ul id="tab" class="list-unstyled btn-group-justified tab"> <ul id="tab" class="list-unstyled btn-group-justified tab">
...@@ -105,30 +107,23 @@ ...@@ -105,30 +107,23 @@
<script> <script>
var houseType = 0; var houseType = 0;
var userId = '{{ user_id }}'; var userId = '{{ user_id }}';
var index = 0;
var myScroll; var myScroll;
var template; var template;
var loading; var loading;
$(document).ready(function () { $(document).ready(function () {
var searchData = {
action: 'search_house',
houseType: houseType,
userType: 0,
userId: userId,
index: 0
};
var tabPane = $('[data-house=' + houseType + ']'); var tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html(); template = $('#template_' + houseType).html();
loading = $('#loading'); loading = $('#loading');
ajax_get_my_house(tabPane); ajax_get_house('{{ url }}', loading, searchData, tabPane);
var pullUpFlag = false; myScroll = scrollPullToRefresh(function(){
myScroll = new IScroll('#wrapper', { ajax_get_house('{{ url }}', loading, searchData, tabPane);
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]'); var aTab = $('a[data-toggle=tab]');
aTab.on('show.bs.tab', function (e) { aTab.on('show.bs.tab', function (e) {
...@@ -138,71 +133,16 @@ ...@@ -138,71 +133,16 @@
houseType = $(e.target).parent().index(); houseType = $(e.target).parent().index();
tabPane = $('[data-house=' + houseType + ']'); tabPane = $('[data-house=' + houseType + ']');
template = $('#template_' + houseType).html(); template = $('#template_' + houseType).html();
index = 0; searchData.houseType = houseType;
searchData.index = 0;
myScroll.scrollTo(0, 0); myScroll.scrollTo(0, 0);
setTimeout(function () { setTimeout(function () {
myScroll.refresh(); myScroll.refresh();
ajax_get_my_house(tabPane); ajax_get_house('{{ url }}', loading, searchData, tabPane);
}, 200); }, 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) {
if (k < 3) {
tags.prepend('<span class="label">' + v + '</span>');
}
});
}
tabPane.append(div);
});
index += 10;
myScroll.refresh();
} else {
}
}
});
}
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
$(document).ready(function () { $(document).ready(function () {
var notice = $('#notice'); var notice = $('#notice');
var myModal = $('#myModal'); var myModal = $('#myModal');
phoneAddValidate();
$('#registerForm').validate({ $('#registerForm').validate({
onkeyup: false, onkeyup: false,
onfocusout: false, onfocusout: false,
...@@ -24,13 +25,20 @@ ...@@ -24,13 +25,20 @@
required: true, required: true,
minlength: 11, minlength: 11,
maxlength: 11, maxlength: 11,
digits: true digits: true,
format: true
}, },
code: 'required', code: 'required',
password: 'required' password: 'required'
}, },
messages: { messages: {
phone: '请输入11位手机号码', phone: {
required: '请输入11位手机号码',
minlength: '请输入11位手机号码',
maxlength: '请输入11位手机号码',
digits: '手机号码格式有误',
format: '手机号码格式有误'
},
code: '请输入验证码', code: '请输入验证码',
password: '请输入密码' password: '请输入密码'
}, },
...@@ -61,8 +69,7 @@ ...@@ -61,8 +69,7 @@
<div class="container-fluid text-center"> <div class="container-fluid text-center">
<form id="registerForm" method="post"> <form id="registerForm" method="post">
<h2>注册</h2> <h2></h2>
<p class="has-feedback username"> <p class="has-feedback username">
<label for="phone" class="sr-only">用户名</label> <label for="phone" class="sr-only">用户名</label>
<input tabindex="1" 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="手机号码">
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
<html> <html>
<head lang="en"> <head lang="en">
<meta charset="UTF-8"> <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-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title></title> <title>评分</title>
<style></style>
<link rel="stylesheet" href="{{ theme }}/css/bootstrap.min.css"> <link rel="stylesheet" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ theme }}/css/star-rating.min.css"> <link rel="stylesheet" href="{{ theme }}/css/star-rating.min.css">
<script src="{{ theme }}/js/jquery.min.js"></script> <script src="{{ theme }}/js/jquery.min.js"></script>
...@@ -23,7 +22,6 @@ ...@@ -23,7 +22,6 @@
showCaption: false, showCaption: false,
hoverEnabled: false, hoverEnabled: false,
starCaptions: function (data) { starCaptions: function (data) {
console.log(data);
score = data; score = data;
$(this).val(score); $(this).val(score);
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bookingSeeHouse.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.min.js"></script>
<script src="{{ theme }}/js/jquery.validate.js"></script> <script src="{{ theme }}/js/jquery.validate.js"></script>
<script src="{{ theme }}/js/bootstrap.min.js"></script>
<script src="{{ theme }}/js/date-selector.js"></script> <script src="{{ theme }}/js/date-selector.js"></script>
<script src="{{ theme }}/js/public.js"></script> <script src="{{ theme }}/js/public.js"></script>
<script> <script>
...@@ -17,33 +18,45 @@ ...@@ -17,33 +18,45 @@
var ds = new DateSelector('year', 'month', 'day', { var ds = new DateSelector('year', 'month', 'day', {
MaxYear: new Date().getFullYear() + 1 MaxYear: new Date().getFullYear() + 1
}); });
var inputDate = $('#date'); var inputDate = $('#date');
var viewForm = $('#viewForm'); var viewForm = $('#viewForm');
var notice = $('#notice');
var myModal = $('#myModal');
viewForm.submit(function () { viewForm.submit(function () {
var dayValue = Number($('input[name=day]:checked').val()); var dayValue = Number($('input[name=day]:checked').val());
var date = new Date(); var date = new Date();
var indexTime = $('#index').find('option:selected').text();
var min_time = indexTime.split('-')[0];
var specified_time;
switch (dayValue) { switch (dayValue) {
case 3: case 3:
inputDate.val(ds.Year + '-' + ds.Month + '-' + ds.Day); specified_time = new Date(ds.Year + '/' + ds.Month + '/' + ds.Day + ' ' + min_time).getTime();
break; break;
default: default:
date.setTime(date.getTime() + dayValue * 24 * 60 * 60 * 1000); specified_time = new Date(date.Format('yyyy/MM/dd') + ' ' + min_time).getTime() + dayValue * 24 * 60 * 60 * 1000;
inputDate.val(date.Format('yyyy-MM-dd'));
break; break;
} }
if (specified_time > date.getTime()) {
date.setTime(specified_time);
inputDate.val(date.Format('yyyy-MM-dd'));
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/', url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=view_house&' + viewForm.serialize(), data: 'action=view_house&' + viewForm.serialize(),
success: function (data) { success: function (data) {
if (data.code == 2000) { if (data.code == 2000) {
alert('预约成功'); notice.html('预约成功');
myModal.modal('show');
} else { } else {
alert('预约失败'); notice.html('预约失败');
myModal.modal('show');
} }
} }
}); });
} else {
notice.text('预约看房需提前至少一小时');
myModal.modal('show');
}
return false; return false;
}); });
}); });
...@@ -78,20 +91,11 @@ ...@@ -78,20 +91,11 @@
</label> </label>
<p class="col-xs-7"> <p class="col-xs-7">
<select id="year"> <select id="year" class="form-control"></select>
<option value="2015">2015</option>
<option value="2016">2016</option>
</select>
<label for="year"></label> <label for="year"></label>
<select id="month"> <select id="month" class="form-control"></select>
<option value="8">8</option>
<option value="9">9</option>
</select>
<label for="month"></label> <label for="month"></label>
<select id="day"> <select id="day" class="form-control"></select>
<option value="8">14</option>
<option value="9">15</option>
</select>
<label for="day"></label> <label for="day"></label>
</p> </p>
</li> </li>
...@@ -102,7 +106,7 @@ ...@@ -102,7 +106,7 @@
</label> </label>
<p class="col-xs-7"> <p class="col-xs-7">
<select id="index" name="index"> <select id="index" name="index" class="form-control">
<option value="0">9:00-10:00</option> <option value="0">9:00-10:00</option>
<option value="1">10:00-11:00</option> <option value="1">10:00-11:00</option>
<option value="2">11:00-12:00</option> <option value="2">11:00-12:00</option>
...@@ -122,5 +126,16 @@ ...@@ -122,5 +126,16 @@
<input type="submit" id="view_submit" value="提交" class="btn btn-lg"> <input type="submit" id="view_submit" value="提交" class="btn btn-lg">
</form> </form>
</div> </div>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content text-center">
<h4>提示</h4>
<p id="notice"></p>
<button type="button" class="btn btn-lg btn-block" data-dismiss="modal">确认</button>
</div>
</div>
</div>
</body> </body>
</html> </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