This commit is contained in:
zongzhimin
2018-04-11 15:53:59 +08:00
parent 67ad07dc56
commit ffdd93facf
+118 -110
View File
@@ -142,119 +142,127 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script>
var houseStatus = ""
var hid = '104631167348637696';
var house_info = new Vue({
el:'#house_info',
data:{
name:"",
city_region:"",
house_type:""
}
})
var house_price = new Vue({
el:"#house_price",
data:{
total_price:"",
avg_price:"",
percentage_30:"",
arrow:"",
city:"",
compare_word:"",
compare_money:"",
words:""
}
})
// var evaluate_msg = new Vue({
// el:"#evaluate_msg",
// data:{
// evaluate_percent:"",
// evaluate_words:"",
// arrow:"",
// msg:""
// }
// })
var price_feedback = new Vue({
el:"#price_feedback",
data:{
},
methods:{
feedback:function(i,event){
if($(event.target).hasClass("theme")){
return;
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){
var self = plus.webview.currentWebview();
var hid = self.hid;
init();
var houseStatus = ""
// hid = '104631167348637696';
var house_info = new Vue({
el:'#house_info',
data:{
name:"",
city_region:"",
house_type:""
}
})
var house_price = new Vue({
el:"#house_price",
data:{
total_price:"",
avg_price:"",
percentage_30:"",
arrow:"",
city:"",
compare_word:"",
compare_money:"",
words:""
}
})
// var evaluate_msg = new Vue({
// el:"#evaluate_msg",
// data:{
// evaluate_percent:"",
// evaluate_words:"",
// arrow:"",
// msg:""
// }
// })
var price_feedback = new Vue({
el:"#price_feedback",
data:{
},
methods:{
feedback:function(i,event){
if($(event.target).hasClass("theme")){
return;
}
//return;
axios.post("/rest/evaluate/feedBack",{
hid:hid,
reason:i
}).then(function(response){
}).catch(function(error){console.log(error)})
}
//return;
axios.post("/rest/evaluate/feedBack",{
hid:hid,
reason:i
}).then(function(response){
}).catch(function(error){console.log(error)})
}
}
})
})
axios.get("/rest/evaluate/queryHouseInfo",{
params:{id : hid}
}).then(function(response){
if(response.data.status){
h = response.data.data
house_info.name = h.name
house_info.city_region = h.city+"-"+h.region
house_info.house_type = (h.roomCount==0?"":h.roomCount+"室")+(h.hallCount==0?"":h.hallCount+"厅 ")+(h.area==0?"":h.area+"m ")+((h.floor==0||h.height==0)?"":h.floor+"/"+h.height+"层")
house_price.total_price = h.totalPrice==0?"暂无":(h.totalPrice/10000).toFixed(0)
house_price.avg_price = h.avgPrice==0?"暂无":h.avgPrice
house_price.percentage_30=h.oneMonthUpDownRange==0?"暂无":h.oneMonthUpDownRange
if(h.oneMonthUpDownRange<0){
house_price.arrow="icon icon-arrow-green"
house_price.percentage_30=-h.oneMonthUpDownRange
}else if(h.oneMonthUpDownRange>0){
house_price.arrow="icon icon-arrow-red"
house_price.percentage_30=h.oneMonthUpDownRange
}else{
house_price.percentage_30="暂无"
}
house_price.city=h.city
if(h.compareMoney<0){
house_price.compare_word="低"
house_price.words="元"
house_price.compare_money=-h.compareMoney
}else if(h.compareMoney>0){
house_price.compare_word="高"
house_price.words="元"
house_price.compare_money=h.compareMoney
}else{
house_price.compare_money="相等"
}
// if(h.evaluatePercent<0){
// evaluate_msg.evaluate_words="下跌概率"
// evaluate_msg.arrow="icon icon-arrow-green"
// evaluate_msg.evaluate_percent=-h.evaluatePercent
// }else if(h.evaluatePercent>0){
// evaluate_msg.evaluate_words="上涨概率"
// evaluate_msg.arrow="icon icon-arrow-red"
// evaluate_msg.evaluate_percent=h.evaluatePercent
// }else{
// evaluate_msg.evaluate_words="暂无"
// }
// evaluate_msg.msg=h.evaluateMsg
$("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
loadingChart(h.city,h.region,h.name,2)
//按照时间范围加载数据
$(".avgPriceTrend a").click(function(){
var type = $(this).attr("data-id");
$(".avgPriceTrend a").removeClass("active")
$(this).addClass('active');
loadingChart(h.city,h.region,h.name,type);
});
houseStatus = h.houseStatus;
}
}).catch(function(error){
console.log(error)
})
}
axios.get("/rest/evaluate/queryHouseInfo",{
params:{id : hid}
}).then(function(response){
if(response.data.status){
h = response.data.data
house_info.name = h.name
house_info.city_region = h.city+"-"+h.region
house_info.house_type = (h.roomCount==0?"":h.roomCount+"室")+(h.hallCount==0?"":h.hallCount+"厅 ")+(h.area==0?"":h.area+"m ")+((h.floor==0||h.height==0)?"":h.floor+"/"+h.height+"层")
house_price.total_price = h.totalPrice==0?"暂无":(h.totalPrice/10000).toFixed(0)
house_price.avg_price = h.avgPrice==0?"暂无":h.avgPrice
house_price.percentage_30=h.oneMonthUpDownRange==0?"暂无":h.oneMonthUpDownRange
if(h.oneMonthUpDownRange<0){
house_price.arrow="icon icon-arrow-green"
house_price.percentage_30=-h.oneMonthUpDownRange
}else if(h.oneMonthUpDownRange>0){
house_price.arrow="icon icon-arrow-red"
house_price.percentage_30=h.oneMonthUpDownRange
}else{
house_price.percentage_30="暂无"
}
house_price.city=h.city
if(h.compareMoney<0){
house_price.compare_word="低"
house_price.words="元"
house_price.compare_money=-h.compareMoney
}else if(h.compareMoney>0){
house_price.compare_word="高"
house_price.words="元"
house_price.compare_money=h.compareMoney
}else{
house_price.compare_money="相等"
}
// if(h.evaluatePercent<0){
// evaluate_msg.evaluate_words="下跌概率"
// evaluate_msg.arrow="icon icon-arrow-green"
// evaluate_msg.evaluate_percent=-h.evaluatePercent
// }else if(h.evaluatePercent>0){
// evaluate_msg.evaluate_words="上涨概率"
// evaluate_msg.arrow="icon icon-arrow-red"
// evaluate_msg.evaluate_percent=h.evaluatePercent
// }else{
// evaluate_msg.evaluate_words="暂无"
// }
// evaluate_msg.msg=h.evaluateMsg
$("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
loadingChart(h.city,h.region,h.name,2)
//按照时间范围加载数据
$(".avgPriceTrend a").click(function(){
var type = $(this).attr("data-id");
$(".avgPriceTrend a").removeClass("active")
$(this).addClass('active');
loadingChart(h.city,h.region,h.name,type);
});
houseStatus = h.houseStatus;
}
}).catch(function(error){
console.log(error)
})
//添加管理AJAX请求
function addManagement(id, houseStatus, liveStatus){