Commit c824ea31 by felix

每日一更

parent 99b3aec2
<?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 {
...@@ -60,6 +61,7 @@ class House { ...@@ -60,6 +61,7 @@ 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["city"] = SearchDao::searchCity(); $context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty(); $context["buildProperty"] = SearchDao::searchBuildProperty();
...@@ -70,8 +72,10 @@ class House { ...@@ -70,8 +72,10 @@ class House {
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));
$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 +91,18 @@ class House { ...@@ -87,15 +91,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,82 +111,13 @@ class House { ...@@ -104,82 +111,13 @@ 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));
InsertDao::addRecommend($houseId,$data);
private static function addMainImage($houseid){ $wpdb->delete(Config::A_HOUSE_USER_TABLE,array("house_id" => $houseId));
global $wpdb; InsertDao::addRecConsultant($houseId,$data);
//图片信息
$uploadedfile = $_FILES['files']; InsertDao::addHouseTag($_POST['mark'],$houseId);
$data = $_POST["data"];
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'];
}
}
}
}
} }
public static function data_insert($insert_tospur_house_array){ public static function data_insert($insert_tospur_house_array){
...@@ -196,109 +134,18 @@ class House { ...@@ -196,109 +134,18 @@ class House {
if (!$houseRes) { if (!$houseRes) {
return 500; return 500;
} }
$houseid = $wpdb->insert_id; $houseId = $wpdb->insert_id;
if(!SearchDao::setHouseNumber($houseid,$insert_tospur_house_array['house_type'],$insert_tospur_house_array['city_id'])){ if(!SearchDao::setHouseNumber($houseId,$insert_tospur_house_array['house_type'],$insert_tospur_house_array['city_id'])){
return 510; return 510;
} }
//图片信息 InsertDao::addMainImage($houseId,$data);
$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::addRecommend($houseId,$data);
//插入推荐房源id与添加新房id到关联表a_house_recommend
foreach($data["recommend"] as $value){ InsertDao::addRecConsultant($houseId,$data);
$a_house_recommendArray = array(
"house_id" => $houseid, InsertDao::addHouseTag($_POST['mark'],$houseId);
"recommend_id" =>$value
);
$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;
} }
......
...@@ -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':
...@@ -65,7 +65,7 @@ class newHouseList extends WP_List_Table ...@@ -65,7 +65,7 @@ class newHouseList extends WP_List_Table
'average_price' => '单价', 'average_price' => '单价',
'developer' => '开发商', 'developer' => '开发商',
'check_in_time' => '入住时间', 'check_in_time' => '入住时间',
'building_type' => '建筑类型', 'room_id' => '建筑类型',
'property_age' => '产权年限', 'property_age' => '产权年限',
'decoration' => '装修状况', 'decoration' => '装修状况',
'covered_area' => '建筑面积', 'covered_area' => '建筑面积',
...@@ -89,7 +89,7 @@ class newHouseList extends WP_List_Table ...@@ -89,7 +89,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 +166,7 @@ class newHouseList extends WP_List_Table ...@@ -166,6 +166,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 +197,7 @@ class newHouseList extends WP_List_Table ...@@ -196,7 +197,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 +208,7 @@ class newHouseList extends WP_List_Table ...@@ -207,7 +208,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,
......
...@@ -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,6 +34,7 @@ class RentHouse{ ...@@ -33,6 +34,7 @@ class RentHouse{
'traffic' => $_POST['traffic'], 'traffic' => $_POST['traffic'],
'periphery' => $_POST['periphery'], 'periphery' => $_POST['periphery'],
'status' =>$_POST['status'], 'status' =>$_POST['status'],
'creattime' => date("Y-m-d H:i:s"),
'house_type' => 2 'house_type' => 2
); );
if($type==3){ if($type==3){
...@@ -65,6 +67,7 @@ class RentHouse{ ...@@ -65,6 +67,7 @@ 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["city"] = SearchDao::searchCity(); $context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty(); $context["buildProperty"] = SearchDao::searchBuildProperty();
...@@ -81,82 +84,17 @@ class RentHouse{ ...@@ -81,82 +84,17 @@ class RentHouse{
$uploadedfile = $_FILES['files']; $uploadedfile = $_FILES['files'];
//房源与类型以及面积信息 //房源与类型以及面积信息
$data = $_POST["data"]; $data = $_POST["data"];
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE flat="' .$_POST['flat'] . '" and suite="' . $_POST["suite"] . '" and house_type=2', OBJECT); $res = $wpdb->get_results('SELECT * FROM tospur_house WHERE flat="' .$_POST['flat'] . '" and suite="' . $_POST["suite"] . '" 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 +106,34 @@ class RentHouse{ ...@@ -168,36 +106,34 @@ 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;
} }
} }
...@@ -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,6 +33,7 @@ class SecHandHouse{ ...@@ -32,6 +33,7 @@ class SecHandHouse{
'traffic' => $_POST['traffic'], 'traffic' => $_POST['traffic'],
'periphery' => $_POST['periphery'], 'periphery' => $_POST['periphery'],
'status' =>$_POST['status'], 'status' =>$_POST['status'],
'creattime' => date("Y-m-d H:i:s"),
'house_type' => 1 'house_type' => 1
); );
if($type==2){ if($type==2){
...@@ -51,7 +53,7 @@ class SecHandHouse{ ...@@ -51,7 +53,7 @@ class SecHandHouse{
$result = SecHandHouse::secHouseData_insert($insert_tospur_house_array); $result = SecHandHouse::secHouseData_insert($insert_tospur_house_array);
if ($result != 200) { if ($result != 200) {
$wpdb->query("ROLLBACK"); $wpdb->query("ROLLBACK");
print_r($wpdb->last_error);; print_r($wpdb->last_error);
echo "二手房房源新增失败"; echo "二手房房源新增失败";
} else { } else {
$wpdb->query("COMMIT"); $wpdb->query("COMMIT");
...@@ -64,6 +66,7 @@ class SecHandHouse{ ...@@ -64,6 +66,7 @@ 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["city"] = SearchDao::searchCity(); $context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty(); $context["buildProperty"] = SearchDao::searchBuildProperty();
...@@ -81,81 +84,18 @@ class SecHandHouse{ ...@@ -81,81 +84,18 @@ class SecHandHouse{
//房源与类型以及面积信息 //房源与类型以及面积信息
$data = $_POST["data"]; $data = $_POST["data"];
//获取新房信息,存入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 flat="' .$_POST['flat'] . '" and suite="' . $_POST["suite"] . '" 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 +106,35 @@ class SecHandHouse{ ...@@ -166,38 +106,35 @@ 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;
} }
} }
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
<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"></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>
<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}}" class="regular-text code"></td>
</tr> </tr>
...@@ -63,7 +67,7 @@ ...@@ -63,7 +67,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 %}
...@@ -174,9 +178,9 @@ ...@@ -174,9 +178,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,7 +199,15 @@ ...@@ -195,7 +199,15 @@
<tr> <tr>
<th><label for="traffic">推荐房源</label></th> <th><label for="traffic">推荐房源</label></th>
<td> <td>
<div id="houseImg"></div><br /> <div id="houseImg">
{% 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"> <button type="button" class="button action" data-toggle="modal" data-target="#myModal">
添加房源 添加房源
</button> </button>
...@@ -204,7 +216,15 @@ ...@@ -204,7 +216,15 @@
<tr> <tr>
<th><label for="periphery">置业顾问</label></th> <th><label for="periphery">置业顾问</label></th>
<td> <td>
<div id="consultantImg"></div><br /> <div id="consultantImg">
{% 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"> <button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
选择置业顾问 选择置业顾问
</button> </button>
...@@ -599,7 +619,7 @@ ...@@ -599,7 +619,7 @@
} }
} }
$("#preview,#picList").on("click",".existsCancel",function(){ $("#preview,#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove(); $(this).parent().remove();
}); });
}); });
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
<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"></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>
<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"></td>
</tr> </tr>
...@@ -71,7 +75,33 @@ ...@@ -71,7 +75,33 @@
<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">{{result.overview}}</textarea></td>
</tr> </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>
</tbody> </tbody>
</table> </table>
<h2 class="title">位置及周边</h2> <h2 class="title">位置及周边</h2>
...@@ -102,7 +132,25 @@ ...@@ -102,7 +132,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>
...@@ -120,7 +168,15 @@ ...@@ -120,7 +168,15 @@
<tr> <tr>
<th><label for="consultant">置业顾问</label></th> <th><label for="consultant">置业顾问</label></th>
<td> <td>
<div id="consultantImg"></div><br /> <div id="consultantImg">
{% 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"> <button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
选择置业顾问 选择置业顾问
</button> </button>
...@@ -327,15 +383,22 @@ ...@@ -327,15 +383,22 @@
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);
}
}else{
$("#houseList").append(li); $("#houseList").append(li);
} }
} }
}
}); });
}); });
...@@ -511,6 +574,21 @@ ...@@ -511,6 +574,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);
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
<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"></td>
</tr> </tr>
<tr> <tr>
<th><label for="housename">标签:</label></th>
<td> <input name="mark" id="mark" type="text" value="{{mark}}" class="regular-text code"></td>
</tr>
<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"></td>
</tr> </tr>
...@@ -127,16 +131,42 @@ ...@@ -127,16 +131,42 @@
<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">
{% 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"> <button type="button" class="button action" data-toggle="modal" data-target="#myModal">
添加房源 添加房源
</button> </button>
...@@ -145,7 +175,15 @@ ...@@ -145,7 +175,15 @@
<tr> <tr>
<th><label for="consultant">置业顾问</label></th> <th><label for="consultant">置业顾问</label></th>
<td> <td>
<div id="consultantImg"></div><br /> <div id="consultantImg">
{% 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"> <button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
选择置业顾问 选择置业顾问
</button> </button>
...@@ -353,14 +391,21 @@ ...@@ -353,14 +391,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);
}
}
} }
}); });
}); });
...@@ -537,6 +582,21 @@ ...@@ -537,6 +582,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);
......
...@@ -6,17 +6,20 @@ class Config { ...@@ -6,17 +6,20 @@ class Config {
const A_HOUSE_IMAGE_TABLE = 'a_house_image'; const A_HOUSE_IMAGE_TABLE = 'a_house_image';
const A_HOUSE_RECOMMEND_TABLE = 'a_house_recommend'; const A_HOUSE_RECOMMEND_TABLE = 'a_house_recommend';
const A_HOUSE_USER_TABLE = 'a_house_user'; const A_HOUSE_USER_TABLE = 'a_house_user';
const A_HOUSE_TAG_TABLE = 'a_house_tag';
const DIC_CITY_TABLE = 'dic_city'; const DIC_CITY_TABLE = 'dic_city';
const DIC_ROOM_TABLE = 'dic_room'; const DIC_ROOM_TABLE = 'dic_room';
const DIC_BUILDPROPERTY_TABLE = 'dic_buildproperty'; const DIC_BUILDPROPERTY_TABLE = 'dic_buildproperty';
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';
const TOSPUR_HOUSE_TABLE = 'tospur_house'; const TOSPUR_HOUSE_TABLE = 'tospur_house';
const TOSPUR_IMAGE_TABLE = 'tospur_image'; const TOSPUR_IMAGE_TABLE = 'tospur_image';
const TOSPUR_TAG_TABLE = 'tospur_tag';
//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;
}
} }
......
...@@ -170,7 +170,7 @@ class SearchDao ...@@ -170,7 +170,7 @@ class SearchDao
$buildpropertySql. $buildpropertySql.
" 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".
" where 1=1"; " where 1=1 and status = 1";
if ($array['cityId'] > -1) { if ($array['cityId'] > -1) {
$params[] = $array['cityId']; $params[] = $array['cityId'];
$sql = $sql . " and cityId=%d"; $sql = $sql . " and cityId=%d";
...@@ -269,8 +269,7 @@ class SearchDao ...@@ -269,8 +269,7 @@ class SearchDao
$house_id = $value->id; $house_id = $value->id;
$house_ids[] = $house_id; $house_ids[] = $house_id;
} }
$string = '(' . implode(',', array_map('intval', $house_ids)) . ')'; $tag_result = SearchDao::search_house_tag($house_ids);
$tag_result = SearchDao::search_house_tag($string);
//标签 //标签
if ($tag_result) { if ($tag_result) {
foreach ($tag_result as $key => $value) { foreach ($tag_result as $key => $value) {
...@@ -278,7 +277,7 @@ class SearchDao ...@@ -278,7 +277,7 @@ class SearchDao
} }
} }
//图片 //图片
$image_result = SearchDao::search_house_image($string); $image_result = SearchDao::search_house_image($house_ids);
if ($image_result) { if ($image_result) {
foreach ($image_result as $key => $value) { foreach ($image_result as $key => $value) {
$array['images'][$value->house_id] = home_url() . Image::getImage($value->path,'small'); $array['images'][$value->house_id] = home_url() . Image::getImage($value->path,'small');
...@@ -293,18 +292,24 @@ class SearchDao ...@@ -293,18 +292,24 @@ class SearchDao
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 ' . Config::A_HOUSE_IMAGE_TABLE . ' ahi ' .
'left join ' . Config::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 ' . Config::A_HOUSE_TAG_TABLE . ' aht' .
' where house_id in ' . $house_ids; ' left join ' . Config::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);
} }
...@@ -360,19 +365,24 @@ class SearchDao ...@@ -360,19 +365,24 @@ 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;
if($type == 'edit'){ if($type == 'edit'){
$imagesSql = 'select * from a_house_image ahi $imagesSql = 'select * from a_house_image ahi
LEFT JOIN tospur_image ti on ti.id = ahi.image_id LEFT JOIN tospur_image ti on ti.id = ahi.image_id
...@@ -393,69 +403,17 @@ class SearchDao ...@@ -393,69 +403,17 @@ 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); return implode(",",$tags);
//排除存在的标签,剩下未有的标签和存在标签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;
} }
} }
\ No newline at end of file
...@@ -94,9 +94,13 @@ class TCSync { ...@@ -94,9 +94,13 @@ class TCSync {
foreach($result['data']['UnitPriceRange'] as $item){ foreach($result['data']['UnitPriceRange'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(Config::DIC_UNITPRICERANGE_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min'))); $wpdb->query(TCSync::create_insert_update_sql(Config::DIC_UNITPRICERANGE_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));
//print_r(TCSync::create_insert_update_sql(Config::DIC_AREA,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));print_r("<br />"); //print_r(TCSync::create_insert_update_sql(Config::DIC_UNITPRICERANGE_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));print_r("<br />");
} }
foreach($result['data']['RentalPrice'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(Config::DIC_RENTALPRICE_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));
//print_r(TCSync::create_insert_update_sql(Config::DIC_RENTALPRICE_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));print_r("<br />");
}
} }
} }
......
...@@ -19,6 +19,8 @@ function tospur_init() ...@@ -19,6 +19,8 @@ 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('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');
...@@ -133,6 +135,8 @@ function reset_menu() ...@@ -133,6 +135,8 @@ function reset_menu()
add_submenu_page('newHouseList', 'newHouse_title', '添加新房', 'activate_plugins', 'newHouse', 'House::init_view'); add_submenu_page('newHouseList', 'newHouse_title', '添加新房', 'activate_plugins', 'newHouse', 'House::init_view');
add_menu_page('secHandHouseList','二手房列表', 'activate_plugins', 'secHandHouseList', 'secHandHouseList', 'dashicons-menu', 7); add_menu_page('secHandHouseList','二手房列表', 'activate_plugins', 'secHandHouseList', 'secHandHouseList', 'dashicons-menu', 7);
add_submenu_page('secHandHouseList', 'newHouse_title', '添加二手房', 'activate_plugins', 'secHandHouse', 'SecHandHouse::secHandHouse_html'); add_submenu_page('secHandHouseList', 'newHouse_title', '添加二手房', 'activate_plugins', 'secHandHouse', 'SecHandHouse::secHandHouse_html');
add_menu_page('rentHouseList','租房列表', 'activate_plugins', 'rentHouseList', 'rentHouseList', 'dashicons-menu', 8);
add_submenu_page('rentHouseList', 'rentHouse_title', '添加租房', 'activate_plugins', 'rentHouse', 'RentHouse::rentHouse_html');
//移除更新信息 //移除更新信息
remove_action( 'admin_notices', 'update_nag', 3 ); remove_action( 'admin_notices', 'update_nag', 3 );
global $menu; global $menu;
...@@ -168,7 +172,7 @@ function reset_menu() ...@@ -168,7 +172,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();
} }
...@@ -14,85 +14,6 @@ ...@@ -14,85 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -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;
...@@ -134,6 +55,7 @@ ...@@ -134,6 +55,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 +75,18 @@ ...@@ -153,9 +75,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,7 +271,7 @@ a:hover { ...@@ -340,7 +271,7 @@ 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;
...@@ -378,14 +309,23 @@ a:hover { ...@@ -378,14 +309,23 @@ a:hover {
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;
} }
.modal .modal-booking .modal-content ul li .iconfont { .modal .modal-booking .modal-content ul li .iconfont {
color: #008cd7; color: #008cd7;
font-size: 18px; font-size: 18px;
position: absolute;
right: 20px;
} }
.modal .modal-booking .modal-content ul li .iconfont:after { .modal .modal-booking .modal-content ul li .iconfont:after {
content: "\e603"; content: "\e603";
position: absolute; }
right: 20px; .modal .modal-booking .modal-content ul li:last-child:active {
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
}
.modal .modal-booking .modal-content ul li:active {
background-color: #e9e9e9;
} }
...@@ -14,85 +14,6 @@ ...@@ -14,85 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -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;
...@@ -134,6 +55,7 @@ ...@@ -134,6 +55,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 +75,18 @@ ...@@ -153,9 +75,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;
...@@ -405,14 +336,14 @@ a:hover { ...@@ -405,14 +336,14 @@ a:hover {
} }
#wrapper #scroller .row p img { #wrapper #scroller .row p img {
height: 100%; height: 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;
} }
#wrapper #scroller .row ul { #wrapper #scroller .row ul {
height: 100%; height: 100%;
...@@ -431,10 +362,16 @@ a:hover { ...@@ -431,10 +362,16 @@ a:hover {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
#wrapper #scroller .row ul li span {
margin-right: 15px;
}
#wrapper #scroller .row ul li span:last-child {
margin-right: 0;
}
#wrapper #scroller .row ul li.address { #wrapper #scroller .row ul li.address {
margin-top: 2px;
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
margin-top: 2px;
} }
#wrapper #scroller .row ul li.address span:nth-child(1) { #wrapper #scroller .row ul li.address span:nth-child(1) {
color: #000000; color: #000000;
...@@ -455,6 +392,14 @@ a:hover { ...@@ -455,6 +392,14 @@ a:hover {
border: 1px solid #acacac; border: 1px solid #acacac;
margin: 0 5px 0 0; margin: 0 5px 0 0;
vertical-align: middle; 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;
} }
#wrapper #scroller .row ul li:last-child span { #wrapper #scroller .row ul li:last-child span {
color: #000000; color: #000000;
...@@ -482,9 +427,8 @@ a:hover { ...@@ -482,9 +427,8 @@ a:hover {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
white-space: normal; white-space: normal;
} }
#wrapper #scroller .row ul li span:nth-child(2), #wrapper #scroller .row:active {
#wrapper #scroller .row ul li span:nth-child(3) { background-color: #e9e9e9;
margin-left: 15px;
} }
.footer { .footer {
width: 100%; width: 100%;
...@@ -493,9 +437,10 @@ a:hover { ...@@ -493,9 +437,10 @@ a:hover {
} }
.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 +453,9 @@ a:hover { ...@@ -508,6 +453,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;
} }
.footer .btn:active {
background-color: #117bb9;
}
.footer .btn.btn-wechat span { .footer .btn.btn-wechat span {
width: 30px; width: 30px;
height: 30px; height: 30px;
......
...@@ -14,85 +14,6 @@ ...@@ -14,85 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -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;
...@@ -134,6 +55,7 @@ ...@@ -134,6 +55,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 +75,18 @@ ...@@ -153,9 +75,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,7 +263,7 @@ a:hover { ...@@ -332,7 +263,7 @@ a:hover {
} }
body { body {
height: auto; height: auto;
padding-bottom: 45px; padding-bottom: 50px;
} }
.collect { .collect {
position: fixed; position: fixed;
...@@ -504,14 +435,14 @@ body { ...@@ -504,14 +435,14 @@ 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:last-child { .detail_row #wrapper #scroller ul li:last-child {
margin-right: 0; margin-right: 0;
...@@ -524,6 +455,10 @@ body { ...@@ -524,6 +455,10 @@ body {
height: 40px; height: 40px;
text-align: center; text-align: center;
} }
.detail_row .map:active {
transform: scale(1.1);
-webkit-transform: scale(1.1);
}
.detail_row .map span { .detail_row .map span {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -552,14 +487,14 @@ body { ...@@ -552,14 +487,14 @@ body {
background-position: center; background-position: center;
background-size: auto 100%; background-size: auto 100%;
-webkit-background-size: auto 100%; -webkit-background-size: auto 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 .peopleCont li { .detail_row .peopleCont li {
width: 100%; width: 100%;
...@@ -569,6 +504,9 @@ body { ...@@ -569,6 +504,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 +566,17 @@ body { ...@@ -628,18 +566,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: rgba(125, 125, 125, 0.9);
} }
.footer .btn { .footer > .btn {
width: 45%; width: 45%;
margin: 5px 2%;
color: #ffffff; color: #ffffff;
font-weight: bold;
margin: 5px 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,42 +589,88 @@ body { ...@@ -652,42 +589,88 @@ 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 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 div span {
font-size: 18px;
font-weight: bold;
}
.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.phone { .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_wechat_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%;
......
...@@ -14,85 +14,6 @@ ...@@ -14,85 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -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;
...@@ -134,6 +55,7 @@ ...@@ -134,6 +55,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 +75,18 @@ ...@@ -153,9 +75,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;
...@@ -437,10 +368,16 @@ a:hover { ...@@ -437,10 +368,16 @@ 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 {
font-size: 22px;
display: block;
color: #ffffff; color: #ffffff;
font-weight: bold;
margin: 12% 0 5%; margin: 12% 0 5%;
padding: 16px; padding: 14px;
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 +390,9 @@ a:hover { ...@@ -453,6 +390,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 form .btn:active {
background-color: #117bb9;
}
.container-fluid form .btn.btn-register { .container-fluid form .btn.btn-register {
margin-top: 20%; margin-top: 20%;
} }
...@@ -469,6 +409,12 @@ a:hover { ...@@ -469,6 +409,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;
......
...@@ -14,85 +14,6 @@ ...@@ -14,85 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -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;
...@@ -134,6 +55,7 @@ ...@@ -134,6 +55,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 +75,18 @@ ...@@ -153,9 +75,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 +261,95 @@ body { ...@@ -330,16 +261,95 @@ 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 .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
position: relative;
top: -2px;
left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
}
.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;
}
.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;
...@@ -384,12 +394,12 @@ a:hover { ...@@ -384,12 +394,12 @@ a:hover {
color: #b7b7b7; color: #b7b7b7;
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
margin-left: 5px; position: relative;
top: -2px;
left: 5px;
} }
.btn-group-justified .btn-group .btn .iconfont:after { .btn-group-justified .btn-group .btn .iconfont:after {
content: "\e601"; content: "\e601";
position: relative;
top: -2px;
} }
.btn-group-justified .btn-group.open .btn .iconfont:after { .btn-group-justified .btn-group.open .btn .iconfont:after {
content: "\e602"; content: "\e602";
...@@ -475,14 +485,14 @@ a:hover { ...@@ -475,14 +485,14 @@ a:hover {
} }
#wrapper #scroller .row p img { #wrapper #scroller .row p img {
height: 100%; height: 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;
} }
#wrapper #scroller .row ul { #wrapper #scroller .row ul {
height: 100%; height: 100%;
...@@ -501,10 +511,16 @@ a:hover { ...@@ -501,10 +511,16 @@ a:hover {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
#wrapper #scroller .row ul li span {
margin-right: 15px;
}
#wrapper #scroller .row ul li span:last-child {
margin-right: 0;
}
#wrapper #scroller .row ul li.address { #wrapper #scroller .row ul li.address {
margin-top: 2px;
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
margin-top: 2px;
} }
#wrapper #scroller .row ul li.address span:nth-child(1) { #wrapper #scroller .row ul li.address span:nth-child(1) {
color: #000000; color: #000000;
...@@ -525,6 +541,14 @@ a:hover { ...@@ -525,6 +541,14 @@ a:hover {
border: 1px solid #acacac; border: 1px solid #acacac;
margin: 0 5px 0 0; margin: 0 5px 0 0;
vertical-align: middle; 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;
} }
#wrapper #scroller .row ul li:last-child span { #wrapper #scroller .row ul li:last-child span {
color: #000000; color: #000000;
...@@ -552,16 +576,15 @@ a:hover { ...@@ -552,16 +576,15 @@ a:hover {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
white-space: normal; white-space: normal;
} }
#wrapper #scroller .row ul li span:nth-child(2), #wrapper #scroller .row:active {
#wrapper #scroller .row ul li span:nth-child(3) { background-color: #e9e9e9;
margin-left: 15px;
} }
.footer { .footer {
width: 100%; width: 100%;
height: 45px; height: 45px;
line-height: 45px; line-height: 45px;
color: #008cd7; color: #008cd7;
font-size: 22px; font-size: 24px;
font-weight: bold; font-weight: bold;
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.9);
} }
...@@ -14,85 +14,6 @@ ...@@ -14,85 +14,6 @@
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -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;
...@@ -134,6 +55,7 @@ ...@@ -134,6 +55,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 +75,18 @@ ...@@ -153,9 +75,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;
...@@ -359,14 +290,14 @@ a:hover { ...@@ -359,14 +290,14 @@ a:hover {
} }
#wrapper #scroller .row p img { #wrapper #scroller .row p img {
height: 100%; height: 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;
} }
#wrapper #scroller .row ul { #wrapper #scroller .row ul {
height: 100%; height: 100%;
...@@ -385,10 +316,16 @@ a:hover { ...@@ -385,10 +316,16 @@ a:hover {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
#wrapper #scroller .row ul li span {
margin-right: 15px;
}
#wrapper #scroller .row ul li span:last-child {
margin-right: 0;
}
#wrapper #scroller .row ul li.address { #wrapper #scroller .row ul li.address {
margin-top: 2px;
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
margin-top: 2px;
} }
#wrapper #scroller .row ul li.address span:nth-child(1) { #wrapper #scroller .row ul li.address span:nth-child(1) {
color: #000000; color: #000000;
...@@ -409,6 +346,14 @@ a:hover { ...@@ -409,6 +346,14 @@ a:hover {
border: 1px solid #acacac; border: 1px solid #acacac;
margin: 0 5px 0 0; margin: 0 5px 0 0;
vertical-align: middle; 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;
} }
#wrapper #scroller .row ul li:last-child span { #wrapper #scroller .row ul li:last-child span {
color: #000000; color: #000000;
...@@ -436,7 +381,6 @@ a:hover { ...@@ -436,7 +381,6 @@ a:hover {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
white-space: normal; white-space: normal;
} }
#wrapper #scroller .row ul li span:nth-child(2), #wrapper #scroller .row:active {
#wrapper #scroller .row ul li span:nth-child(3) { background-color: #e9e9e9;
margin-left: 15px;
} }
<?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";
$result = $wpdb->get_row($wpdb->prepare($sql,$hid));
$context['result'] = $result;
$context['cityName'] = SearchDao::getCityNameWithId($result->city_id); $context['cityName'] = SearchDao::getCityNameWithId($result->city_id);
$context = array_merge($context,SearchDao::getDetailInfo($hid));
$mainImagesSql = "SELECT db.literal as type,ada.house_area as area,ti.path FROM ".Config::A_DISTRICT_AREA_TABLE." ada $houseType = $context['result']->house_type;
LEFT JOIN ".Config::DIC_BUILDPROPERTY_TABLE." db on db.value = ada.buildproperty_id if($houseType !=0){
LEFT JOIN ".Config::TOSPUR_IMAGE_TABLE." ti on ti.id = ada.image_id Timber::render('detailOther.html', $context);
where ada.house_id = %d"; }else
$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);
......
...@@ -8,19 +8,19 @@ if ($_POST) { ...@@ -8,19 +8,19 @@ if ($_POST) {
$code = $_POST['code']; $code = $_POST['code'];
$password = $_POST['password']; $password = $_POST['password'];
if (!$phone) { if (!$phone) {
$context['phoneError'] = '请输入11位手机号'; $context['error'] = '请输入11位手机号';
} else if (!$code) { } else if (!$code) {
$context['codeError'] = '请输入验证码'; $context['error'] = '请输入验证码';
} else if (!$password) { } else if (!$password) {
$context['passwordError'] = '请输入新密码'; $context['error'] = '请输入新密码';
} else { } else {
$search_code = dao::search_tospur_verify($phone, $code); $search_code = dao::search_tospur_verify($phone, $code);
if ($code == $search_code) { if ($code == $search_code) {
wp_set_password($password, $user->data->ID); wp_set_password($password, $user->data->ID);
dao::update_tospur_verify($phone); dao::update_tospur_verify($phone);
echo '成功修改密码'; $context['error'] = '成功修改密码';
} else { } else {
$context['codeError'] = '请输入正确的验证码'; $context['error'] = '验证码错误';
} }
} }
} }
......
...@@ -5,9 +5,13 @@ $context['theme'] = get_template_directory_uri(); ...@@ -5,9 +5,13 @@ $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;
$houseType = 0;
if($_GET['cityId']) if($_GET['cityId'])
$cityId = $_GET['cityId']; $cityId = $_GET['cityId'];
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);
...@@ -25,6 +29,6 @@ $context['select']['unitPriceRange'] = SearchDao::searchUnitPriceRange($cityId); ...@@ -25,6 +29,6 @@ $context['select']['unitPriceRange'] = SearchDao::searchUnitPriceRange($cityId);
$context['select']['totalPrice'] = SearchDao::searchTotalPrice($cityId); $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
/*! /*!
* Bootstrap v3.3.5 (http://getbootstrap.com) * Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); /*!
\ No newline at end of file * Generated using the Bootstrap Customizer (http://v3.bootcss.com/customize/?id=94068cdaefbebe75f1f9)
* Config saved to config.json and https://gist.github.com/94068cdaefbebe75f1f9
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(e,s){return this.each(function(){var n=t(this),a=n.data("bs.modal"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);a||n.data("bs.modal",a=new i(this,o)),"string"==typeof e?a[e](s):o.show&&a.show(s)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var s=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){s.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(s.$element)&&(s.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&s.$element.hasClass("fade");s.$element.parent().length||s.$element.appendTo(s.$body),s.$element.show().scrollTop(0),s.adjustDialog(),n&&s.$element[0].offsetWidth,s.$element.addClass("in"),s.enforceFocus();var a=t.Event("shown.bs.modal",{relatedTarget:e});n?s.$dialog.one("bsTransitionEnd",function(){s.$element.trigger("focus").trigger(a)}).emulateTransitionEnd(i.TRANSITION_DURATION):s.$element.trigger("focus").trigger(a)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var s=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&n;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;a?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){s.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):o()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var s=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=s,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var s=t(this),n=s.attr("href"),a=t(s.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),o=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},a.data(),s.data());s.is("a")&&i.preventDefault(),a.one("show.bs.modal",function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",function(){s.is(":visible")&&s.trigger("focus")})}),e.call(a,o,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var s=t(this),n=s.data("bs.tab");n||s.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),s=e.data("target");if(s||(s=e.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),a=t.Event("hide.bs.tab",{relatedTarget:e[0]}),o=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(a),e.trigger(o),!o.isDefaultPrevented()&&!a.isDefaultPrevented()){var r=t(s);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,s,n){function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var o=s.find("> .active"),r=n&&t.support.transition&&(o.length&&o.hasClass("fade")||!!s.find("> .fade").length);o.length&&r?o.one("bsTransitionEnd",a).emulateTransitionEnd(i.TRANSITION_DURATION):a(),o.removeClass("in")};var s=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=s,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(e){var i,s=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(s)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),a=t.extend({},s.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&a.toggle&&/show|hide/.test(e)&&(a.toggle=!1),n||i.data("bs.collapse",n=new s(this,a)),"string"==typeof e&&n[e]()})}var s=function(e,i){this.$element=t(e),this.options=t.extend({},s.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};s.VERSION="3.3.5",s.TRANSITION_DURATION=350,s.DEFAULTS={toggle:!0},s.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},s.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var a=t.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(s.TRANSITION_DURATION)[o](this.$element[0][l])}}}},s.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(s.TRANSITION_DURATION):n.call(this)}}},s.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},s.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,s){var n=t(s);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},s.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=s,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(s){var n=t(this);n.attr("data-target")||s.preventDefault();var a=e(n),o=a.data("bs.collapse"),r=o?"toggle":n.data();i.call(a,r)})}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,s=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(s).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);
\ No newline at end of file
...@@ -76,3 +76,83 @@ Date.prototype.Format = function (fmt) { ...@@ -76,3 +76,83 @@ 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', {
scrollbars: true,
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();
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>');
}
});
}
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
...@@ -31,7 +31,7 @@ if ($_POST) { ...@@ -31,7 +31,7 @@ if ($_POST) {
$context['error'] = '抱歉,用户名已存在'; $context['error'] = '抱歉,用户名已存在';
} }
} else { } else {
$context['error'] = '请输入正确的验证码'; $context['error'] = '验证码错误';
} }
} }
} }
......
...@@ -19,7 +19,7 @@ if ($user_id != 0) { ...@@ -19,7 +19,7 @@ if ($user_id != 0) {
$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(home_url()."?page=login");
exit; exit;
} }
......
...@@ -12,14 +12,20 @@ ...@@ -12,14 +12,20 @@
<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=""> {% if consultant.imageUrl != "" %}
<img src="{{ consultant.imageUrl}}" data-attr="">
{% else %}
<img src="{{ theme }}/img/head.png " data-attr="">
{% endif %}
</li> </li>
<li class="col-xs-8"> <li class="col-xs-8">
<p>{{ consultant.display_name }}</p> <p>{{ consultant.display_name }}</p>
...@@ -141,26 +147,20 @@ ...@@ -141,26 +147,20 @@
var template; var template;
var loading; var loading;
$(document).ready(function () { $(document).ready(function () {
var searchData = {
action: 'get_my_house',
houseType: houseType,
userType: 1,
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_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 +170,16 @@ ...@@ -170,69 +170,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
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<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">
...@@ -91,25 +92,11 @@ ...@@ -91,25 +92,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();
...@@ -129,7 +116,7 @@ ...@@ -129,7 +116,7 @@
li.append(template); li.append(template);
li.find('[data-attr=name]').text(value.display_name); li.find('[data-attr=name]').text(value.display_name);
li.find('[data-attr=score]').attr('style', 'width: '+ value.average_score*20+'%'); li.find('[data-attr=score]').attr('style', 'width: '+ value.average_score*20+'%');
li.find('[data-attr=image]').attr('src', value.imageUrl); li.find('[data-attr=image]').attr('src', value.imageUrl!=""?value.imageUrl:"{{ theme }}/img/head.png");
var infoUrl; var infoUrl;
if(value.mobile){ if(value.mobile){
li.find('[data-attr=mobile]').attr('href', 'tel:' + value.mobile); li.find('[data-attr=mobile]').attr('href', 'tel:' + value.mobile);
......
...@@ -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(){
...@@ -205,6 +203,7 @@ ...@@ -205,6 +203,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 +214,7 @@ ...@@ -215,7 +214,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 +233,7 @@ ...@@ -234,6 +233,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">
<i class="iconfont">&#xe604;</i>
</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 price">
均价:<span><em>2.35万</em>/m<em>2</em></span>
</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button>
</li>
</ul>-->
<!-- 二手房详细 -->
<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">房贷计算器</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">
<span></span>
</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
...@@ -5,13 +5,20 @@ ...@@ -5,13 +5,20 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-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>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/form.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/public.js"></script> <script src="{{ theme }}/js/public.js"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
var notice = $('#notice');
var myModal = $('#myModal');
$('#forgetForm').validate({ $('#forgetForm').validate({
onkeyup: false,
onfocusout: false,
rules: { rules: {
phone: { phone: {
required: true, required: true,
...@@ -26,39 +33,65 @@ ...@@ -26,39 +33,65 @@
phone: '请输入11位手机号', phone: '请输入11位手机号',
code: '请输入验证码', code: '请输入验证码',
password: '请输入新密码' password: '请输入新密码'
},
errorLabelContainer: "#notice",
errorElement: 'span',
invalidHandler: function () {
myModal.modal('show');
},
submitHandler: function (form) {
form.submit();
} }
}); });
notice.bind('DOMNodeInserted', function () {
$(this).children(':not(:first)').remove();
});
myModal.on('hide.bs.modal', function () {
notice.children().remove();
});
sendCodeBindClick("{{ url }}", 1); sendCodeBindClick("{{ url }}", 1);
{% if(error) %}
notice.html('<span>{{ error }}</span>');
myModal.modal('show');
{% endif %}
}); });
</script> </script>
</head> </head>
<body> <body>
<form id="forgetForm" method="post">
<p>
<label for="phone">用户名<br>
<input type="tel" name="phone" id="phone">
<label id="phone-error" class="error" for="phone">{{ phoneError }}</label>
</label>
</p>
<p> <div class="container-fluid text-center">
<label for="code">验证码<br> <form id="forgetForm" method="post">
<input type="text" name="code" id="code"> <h2>忘记密码</h2>
<label id="code-error" class="error" for="code">{{ codeError }}</label>
</label> <p class="has-feedback username">
<span id="send">发送验证码</span> <label for="phone" class="sr-only">用户名</label>
<input type="tel" name="phone" id="phone" class="form-control input-lg" placeholder="手机号码">
<span class="form-control-feedback"></span>
</p> </p>
<p> <p class="has-feedback code">
<label for="password">新密码<br> <label for="code" class="sr-only">验证码</label>
<input type="password" name="password" id="password"> <input type="text" name="code" id="code" class="form-control input-lg" placeholder="验证码">
<label id="password-error" class="error" for="password">{{ passwordError }}</label> <span id="send" class="form-control-feedback">发送验证码</span>
</label>
</p> </p>
<p class="submit"> <p class="has-feedback password">
<input type="submit" id="forget_submit" value="修改密码"> <label for="password" class="sr-only">新密码</label>
<input type="password" name="password" id="password" class="form-control input-lg" placeholder="新密码">
<span class="form-control-feedback"></span>
</p> </p>
</form> <input type="submit" id="forget_submit" value="修改密码" class="btn btn-lg btn-block">
</form>
</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
...@@ -10,204 +10,11 @@ ...@@ -10,204 +10,11 @@
<!--CSS--> <!--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>
...@@ -217,7 +24,7 @@ ...@@ -217,7 +24,7 @@
<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 }}?cityId={{item.id}}">{{item.value}}</a>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
...@@ -297,7 +104,28 @@ ...@@ -297,7 +104,28 @@
<footer class="footer text-center navbar-fixed-bottom"> <footer class="footer text-center navbar-fixed-bottom">
拨打400-123-4567 拨打400-123-4567
</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 +176,135 @@ ...@@ -348,5 +176,135 @@
</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 = [];
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);
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;
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 = 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");
scroller.html('');
ajax_get_house('{{ url }}', loading, searchData, scroller);
}
}
});
ajax_get_house('{{ url }}', loading, searchData, scroller);
});
var searchData = {
action: 'search_house',
cityId: {{cityId}},
districtId: -1,
plateId: -1,
totalPrice: -1,
buildPropertyId: -1,
roomId: -1,
acreage: -1,
searchText: '',
houseType:{{houseType}},
index: 0
};
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -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: 'get_my_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,69 +133,16 @@ ...@@ -138,69 +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) {
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
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