Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
Conflicts: fangija-zsyf/config.js
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
var rentPricesData = {rentPrices: []}
|
||||
Vue.component('room-rent-component', {
|
||||
template: `
|
||||
<div class="cardRentWin">
|
||||
<div class="card cardRent" v-for="dist in rentPrices">
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner"><em>{{dist.avgPrice}}</em> 元/月<br><small>{{dist.houseType}}室</small></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
data: function(){
|
||||
return rentPricesData;
|
||||
},
|
||||
methods: {
|
||||
loadRoomRent:function(){
|
||||
axios.get("/rest/trend/roomRent", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
name: name
|
||||
}
|
||||
}).then(function (response) {
|
||||
var datas = response.data.data
|
||||
if(datas){
|
||||
var ret = []
|
||||
for(var v in datas){
|
||||
var o = datas[v]
|
||||
ret.push(o);
|
||||
}
|
||||
rentPricesData.rentPrices = ret;
|
||||
|
||||
$("#roomDiv .cardRentWin").css("width",(6*ret.length)+"rem");
|
||||
}else{
|
||||
$("#roomDiv").hide()
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
this.loadRoomRent();
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user