Commit 5cfde9dd by felix

后台更新

parent 80e4219f
......@@ -8,8 +8,10 @@ class House extends Tospur_House{
public static function init_view(){
wp_enqueue_script('jquery-ui');
wp_enqueue_script('bootstrapjs');
wp_enqueue_script('validate');
wp_enqueue_style('jquery-ui_css');
wp_enqueue_style('bootstrapcss');
wp_enqueue_style('bootstrapMinCss');
global $wpdb;
$type = $_POST["type"];
......@@ -56,7 +58,6 @@ class House extends Tospur_House{
}
}else{
$result = House::data_insert($insert_tospur_house_array);
print_r($result);
if($result != 200){
$wpdb->query("ROLLBACK");
print_r($result);;
......
......@@ -7,6 +7,7 @@ class SecHandHouse extends Tospur_House{
public static function secHandHouse_html(){
wp_enqueue_script('bootstrapjs');
wp_enqueue_style('bootstrapcss');
wp_enqueue_style('bootstrapMinCss');
global $wpdb;
$type = $_POST["type"];
$context = array();
......@@ -69,6 +70,7 @@ class SecHandHouse extends Tospur_House{
$context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id);
$context["mark"] = SearchDao::searchHouseTag($_GET['id']);
$context["featureOld"] = SearchDao::searchFeatureByHouse($_GET['id']);
}
$context['role'] = SecHandHouse::getCurrentRole();
$context["city"] = SearchDao::searchCity();
......@@ -144,7 +146,6 @@ class SecHandHouse extends Tospur_House{
$wpdb->delete(Config::A_HOUSE_USER_TABLE,array("house_id" => $houseId));
InsertDao::addRecConsultant($houseId,$data);
// $wpdb->delete(Config::A_HOUSE_TAG_TABLE,array("house_id" => $houseId));
$wpdb->query(
$wpdb->prepare(
"DELETE FROM a_house_tag
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -285,7 +285,7 @@
<script>
(function($){
$(document).ready(function(){
var titleFlag = 0;
//主力房源中选择图片file的下标
var i = 0;
//基本信息的联动AJAX
......@@ -482,14 +482,29 @@
//新增房源相册
$("#housePicture").click(function(){
var checkBox = $("<input>").attr({"type":"radio","name":"frontCover","value":i});
var picDelet = $("<input>").attr({"type":"button","value":"删除"}).addClass("picDelet");
var picDelet = $("<input>").attr({"type":"button","value":"删除"}).addClass("button action picDelet");
var file = $("<input>").attr({"type":"file","name":"files["+i+"]"}).addClass("picFiles");
var select = $("<select>").attr("name","data["+i+"][type]");
var checkTd = $("<th>").append(checkBox);
var picDeletTd = $("<td>").append(picDelet);
var selectTd = $("<th>").append(select);
var fileTd = $("<th>").append(file);
{% for item in photoType %}
select.append($("<option>").attr("value",{{item.id}}).append('{{item.value}}'));
{% endfor%}
var p = $("<p>").append(checkBox).append(select).append(file).append(picDelet);
var p = $("<p>").append(checkTd).append(selectTd).append(fileTd).append(picDeletTd);
var fontA = $("<font>").append("设为封面");
var fontB = $("<font>").append("类型");
var fontC = $("<font>").append("相册");
var tdA = $("<th>").append(fontA);
var tdB = $("<th>").append(fontB);
var tdC = $("<th>").append(fontC);
var titleP = $("<p>").append(tdA).append(tdB).append(tdC);
$("#picList").append(p);
if( titleFlag== 0){
$("#picList").before(titleP);
titleFlag = 1
}
i++
});
......
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