@@ -1544,8 +1544,8 @@ function getPosition(){
);
}
/* 获取#region字数,截取#region前4字,并添加... */
-city="上海"
-init();
+/*city="上海"
+init();*/
function init(){
//显示附近地址
var nearAddressParam = address;
@@ -1570,7 +1570,6 @@ function init(){
}
})
.then(function (response) {
- alert("aa");
new Vue({
el: '#baseInfo',
data: {
@@ -1624,30 +1623,94 @@ function init(){
console.log(error);
});
+
//资讯列表
- /*axios.get(BASE_PATH+"/rest/news/list", {
+ axios.get(BASE_PATH+"/rest/news/list", {
params: {
city: cityParam,
page:1
}
})
.then(function (response) {
-
- //附近小区列表
- var html = '
';
- for(var i in response.data.data.dtos){
- html += '
'+response.data.data.dtos[i].name+
- '
'+response.data.data.dtos[i].avgPrice+'元/㎡
';
- }
- html += '
';
- $("#nearDistricts").html(html);
- $("#nearbyDistrictList").css("width",(7.5*response.data.data.dtos.length)+"rem");
-
+ var html = '';
+ for(var i in response.data.data.list){
+ if(response.data.data.list[i].type=="专题"){
+ html += '
'+
+ ''+
+ ''+
+ '
'+response.data.data.list[i].title+'
'+
+ ''+
+ '
';
+ }
+ /*if(response.data.data.list[i].type=="房源"){
+ html += '
'+
+ ''+
+ ''+
+ '
'+response.data.data.list[i].title+'今日推荐
'+
+ '
'+
+ '
浦东-周康
'+
+ '
'+
+ ''+
+ '
';
+ }*/
+ if(response.data.data.list[i].type=="活动"){
+ html += '