add
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 22 KiB |
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,770 @@
|
||||
var colorList = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
|
||||
var labelFont = 'bold 12px Sans-serif';
|
||||
|
||||
var dates;
|
||||
var data;
|
||||
var volumes;
|
||||
|
||||
var myChart01 = echarts.init(document.getElementById('chart01'));
|
||||
var curOption;
|
||||
|
||||
//小区详情
|
||||
function loadDistrictInfo(){
|
||||
axios.get("/rest/districts/detail", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
name: name
|
||||
}
|
||||
}).then(function (response) {
|
||||
var vo = response.data.data.detail
|
||||
var cityPrice = response.data.data.cityPrice
|
||||
var collected = response.data.data.collected
|
||||
if(cityPrice){
|
||||
baseInfo.cityPrice = cityPrice
|
||||
}
|
||||
if(collected){
|
||||
baseInfo.collect = true;
|
||||
}else{
|
||||
baseInfo.collect = false;
|
||||
}
|
||||
if(vo){
|
||||
if(vo.avgPrice){
|
||||
lat = vo.lat2;
|
||||
lng = vo.lng2;
|
||||
|
||||
loadMapPoi();
|
||||
|
||||
baseInfo.city = vo.city
|
||||
baseInfo.region = vo.region
|
||||
baseInfo.address = vo.address;
|
||||
baseInfo.districtName = vo.name
|
||||
baseInfo.avgPrice = vo.avgPrice;
|
||||
baseInfo.oneMonthUpDownRange = vo.oneMonthUpDownRange;
|
||||
|
||||
if(vo.rank){
|
||||
baseInfo.priceRate = vo.rank.substring(0, vo.rank.indexOf("/"));
|
||||
}
|
||||
|
||||
//baseInfo.cityPrice = vo.cityPrice;
|
||||
|
||||
var finishDate = ""
|
||||
if(vo.finishBuildingDate){
|
||||
if(vo.finishBuildingDate.indexOf("~")!=-1){
|
||||
finishDate = vo.finishBuildingDate.replace("年","");
|
||||
}else{
|
||||
finishDate = vo.finishBuildingDate.substring(0,4)+"年"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
baseInfo.finishBuildingDate = finishDate;
|
||||
baseInfo.householdCount = vo.householdCount;
|
||||
baseInfo.cubagePercent = vo.cubagePercent;
|
||||
baseInfo.carSiteCount = vo.carSiteCount;
|
||||
baseInfo.virescencePercent = vo.virescencePercent;
|
||||
baseInfo.estateCharge = vo.estateCharge;
|
||||
baseInfo.moreArea = vo.moreArea;
|
||||
baseInfo.developer = vo.developer;
|
||||
baseInfo.estateCompany = vo.estateCompany;
|
||||
|
||||
address = vo.address;
|
||||
tags = vo.poiTags;
|
||||
|
||||
if(vo.poiTags){
|
||||
if(vo.poiTags.length>=3){
|
||||
baseInfo.tags = vo.poiTags.slice(0,3);
|
||||
}else{
|
||||
baseInfo.tags = vo.poiTags;
|
||||
}
|
||||
}
|
||||
|
||||
loadNearDistrict(vo.lat2, vo.lng2);
|
||||
}else{
|
||||
$("#noDataDiv").show()
|
||||
baseInfo.districtName = "小区详情"
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//附近小区
|
||||
function loadNearDistrict(lat, lng){
|
||||
axios.get("/rest/districts/nearDistrict", {
|
||||
params: {
|
||||
lat: lat,
|
||||
lng:lng
|
||||
}
|
||||
}).then(function (response) {
|
||||
var datas = response.data.data
|
||||
if(datas){
|
||||
var ret = []
|
||||
for(var v in datas){
|
||||
var o = datas[v]
|
||||
if(o.city == city && o.district == region && o.name == name){
|
||||
continue;
|
||||
}else{
|
||||
if(ret.length <= 5){
|
||||
ret.push(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
baseInfo.nearDists = ret;
|
||||
|
||||
$("#nearDistDiv .cardNearbyWin").css("width",(7.5*ret.length)+"rem");
|
||||
}else{
|
||||
$("#nearDistDiv").hide()
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function loadKLineData(city, region, name){
|
||||
axios.get("/rest/trend/kData", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
name:name
|
||||
}
|
||||
}).then(function (response) {
|
||||
var datas = response.data.data
|
||||
if(datas){
|
||||
var trends = [];
|
||||
var counts = [];
|
||||
var times = []
|
||||
var haveCount = false;
|
||||
for(var d in datas){
|
||||
times.push(d);
|
||||
|
||||
var prices = new Array();
|
||||
for(var m in datas[d]){
|
||||
prices.push(datas[d][m]);
|
||||
}
|
||||
trends.push(prices);
|
||||
if(haveCount==false && datas[d][4]){
|
||||
haveCount = true;
|
||||
}
|
||||
counts.push(datas[d][4]);
|
||||
}
|
||||
|
||||
// if(haveCount){
|
||||
option01.xAxis[0].data = times
|
||||
option01.xAxis[1].data = times
|
||||
//option01.series[0].data = counts
|
||||
option01.series[0].data = trends
|
||||
curOption = option01;
|
||||
myChart01.setOption(option01,true);
|
||||
// }else{
|
||||
// option02.xAxis[0].data = times
|
||||
// option02.xAxis[1].data = times
|
||||
// option02.series[0].data = trends
|
||||
// curOption = option02;
|
||||
// myChart01.setOption(option02,true);
|
||||
// }
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
$("#trendDiv1 a").click(function(){
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
$(this).addClass("active")
|
||||
var v = $(this).attr("t-v");
|
||||
if(v == "1"){
|
||||
curOption.dataZoom[0].start = 95
|
||||
}else if(v == "3"){
|
||||
curOption.dataZoom[0].start = 90
|
||||
}else if(v == "6"){
|
||||
curOption.dataZoom[0].start = 80
|
||||
}else if(v == "12"){
|
||||
curOption.dataZoom[0].start = 50
|
||||
}else if(v == "24"){
|
||||
curOption.dataZoom[0].start = 0
|
||||
}else if(v == "36"){
|
||||
curOption.dataZoom[0].start = 0
|
||||
}
|
||||
myChart01.setOption(curOption,true);
|
||||
});
|
||||
|
||||
|
||||
var option01 = {
|
||||
animation: false,
|
||||
color: colorList,
|
||||
title: {
|
||||
text: null,
|
||||
left: 'center'
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
top: 30,
|
||||
data: ['均价', '成交量']
|
||||
},
|
||||
tooltip: {
|
||||
triggerOn: 'none',
|
||||
transitionDuration: 0,
|
||||
confine: true,
|
||||
bordeRadius: 4,
|
||||
borderWidth: 1,
|
||||
borderColor: '#333',
|
||||
backgroundColor: 'rgba(255,255,255,0.9)',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: '#333'
|
||||
},
|
||||
formatter: function (params) {
|
||||
var res = params[0].seriesName + ' ' + params[0].name;
|
||||
res += '<br/> 月初 : ' + params[0].value[1];
|
||||
res += '<br/> 月末 : ' + params[0].value[2];
|
||||
res += '<br/> 最低 : ' + params[0].value[3];
|
||||
res += '<br/> 最高 : ' + params[0].value[4];
|
||||
res += '<br/> '+params[0].seriesName + ' : ' +params[0].value;
|
||||
return res;
|
||||
},
|
||||
position: function (pos, params, el, elRect, size) {
|
||||
var obj = {
|
||||
top: 60
|
||||
};
|
||||
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
||||
return obj;
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
link: [{
|
||||
xAxisIndex: [0, 1]
|
||||
}]
|
||||
},
|
||||
dataZoom: [{
|
||||
type: 'slider',
|
||||
xAxisIndex: [0, 1],
|
||||
realtime: false,
|
||||
start: 50,
|
||||
end: 100,
|
||||
top: 65,
|
||||
height: 20,
|
||||
handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '120%'
|
||||
}, {
|
||||
type: 'inside',
|
||||
xAxisIndex: [0, 1],
|
||||
start: 40,
|
||||
end: 70,
|
||||
top: 30,
|
||||
height: 20
|
||||
}],
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
data: dates,
|
||||
boundaryGap : false,
|
||||
axisLine: { lineStyle: { color: '#666' } },
|
||||
axisLabel: {
|
||||
formatter: function (value) {
|
||||
return echarts.format.formatTime('MM-dd', value);
|
||||
}
|
||||
},
|
||||
min: 'dataMin',
|
||||
max: 'dataMax',
|
||||
axisPointer: {
|
||||
show: true
|
||||
}
|
||||
}, {
|
||||
type: 'category',
|
||||
gridIndex: 1,
|
||||
data: dates,
|
||||
scale: false,
|
||||
boundaryGap : false,
|
||||
splitLine: {show: false},
|
||||
axisLabel: {show: false},
|
||||
axisTick: {show: false},
|
||||
axisLine: {lineStyle: { color: '#fff' } },
|
||||
splitNumber: 20,
|
||||
min: 'dataMin',
|
||||
max: 'dataMax',
|
||||
axisPointer: {
|
||||
//type: 'shadow',
|
||||
label: {show: false},
|
||||
triggerTooltip: true,
|
||||
handle: {
|
||||
show: true,
|
||||
margin: -20,
|
||||
color: '#F18D00'
|
||||
}
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
name: '均价(元/㎡)',
|
||||
nameRotate: 90,
|
||||
nameLocation: 'center',
|
||||
nameGap: 5,
|
||||
position: 'right',
|
||||
nameTextStyle: {
|
||||
color: '#999'
|
||||
},
|
||||
scale: true,
|
||||
splitNumber: 2,
|
||||
axisLine: { lineStyle: { color: '#999' } },
|
||||
splitLine: { show: true },
|
||||
axisTick: { show: false },
|
||||
axisLabel: {
|
||||
inside: true,
|
||||
formatter: '{value}\n'
|
||||
}
|
||||
}, {
|
||||
name: '成交量(套)',
|
||||
nameRotate: 90,
|
||||
nameLocation: 'center',
|
||||
nameGap: 5,
|
||||
position: 'right',
|
||||
nameTextStyle: {
|
||||
color: '#999'
|
||||
},
|
||||
scale: true,
|
||||
gridIndex: 1,
|
||||
splitNumber: 2,
|
||||
axisLabel: {show: false},
|
||||
axisLine: {show: false},
|
||||
axisTick: {show: false},
|
||||
splitLine: {show: false}
|
||||
}],
|
||||
grid: [{
|
||||
left: 20,
|
||||
right: 20,
|
||||
top: 110,
|
||||
height: 120
|
||||
}, {
|
||||
left: 20,
|
||||
right: 20,
|
||||
height: 40,
|
||||
top: 260
|
||||
}],
|
||||
graphic: [{
|
||||
type: 'group',
|
||||
left: 'center',
|
||||
top: 70,
|
||||
width: 300,
|
||||
bounding: 'raw'
|
||||
}],
|
||||
series: [/*{
|
||||
name: '成交量',
|
||||
type: 'bar',
|
||||
xAxisIndex: 1,
|
||||
yAxisIndex: 1,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#87cefa'
|
||||
},
|
||||
emphasis: {
|
||||
color: 'black'
|
||||
}
|
||||
},
|
||||
data: volumes
|
||||
}, */{
|
||||
type: 'candlestick',
|
||||
name: '均价',
|
||||
data: data,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#EB5F34',
|
||||
color0: '#88D053',
|
||||
borderColor: '#EB5F34',
|
||||
borderColor0: '#88D053'
|
||||
},
|
||||
emphasis: {
|
||||
color: 'black',
|
||||
color0: '#333',
|
||||
borderColor: 'black',
|
||||
borderColor0: '#333'
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
/*var option02 = {
|
||||
animation: false,
|
||||
color: colorList,
|
||||
title: {
|
||||
text: null,
|
||||
left: 'center'
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
top: 30,
|
||||
data: ['均价']
|
||||
},
|
||||
tooltip: {
|
||||
triggerOn: 'none',
|
||||
transitionDuration: 0,
|
||||
confine: true,
|
||||
bordeRadius: 4,
|
||||
borderWidth: 1,
|
||||
borderColor: '#333',
|
||||
backgroundColor: 'rgba(255,255,255,0.9)',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: '#333'
|
||||
},
|
||||
formatter: function (params) {
|
||||
var res = params[0].seriesName + ' ' + params[0].name;
|
||||
res += '<br/> 月初 : ' + params[0].value[1]
|
||||
res += '<br/> 月末 : ' + params[0].value[2];
|
||||
res += '<br/> 最低 : ' + params[0].value[3];
|
||||
res += '<br/> 最高 : ' + params[0].value[4];
|
||||
return res;
|
||||
},
|
||||
position: function (pos, params, el, elRect, size) {
|
||||
var obj = {
|
||||
top: 60
|
||||
};
|
||||
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
||||
return obj;
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
link: [{
|
||||
xAxisIndex: [0, 1]
|
||||
}]
|
||||
},
|
||||
dataZoom: [{
|
||||
type: 'slider',
|
||||
xAxisIndex: [0, 1],
|
||||
realtime: false,
|
||||
start: 50,
|
||||
end: 100,
|
||||
top: 65,
|
||||
height: 20,
|
||||
handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '120%'
|
||||
}, {
|
||||
type: 'inside',
|
||||
xAxisIndex: [0, 1],
|
||||
start: 40,
|
||||
end: 70,
|
||||
top: 30,
|
||||
height: 20
|
||||
}],
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
data: dates,
|
||||
boundaryGap : false,
|
||||
axisLine: { lineStyle: { color: '#999' } },
|
||||
axisLabel: {
|
||||
formatter: function (value) {
|
||||
return echarts.format.formatTime('yy-MM', value);
|
||||
}
|
||||
},
|
||||
min: 'dataMin',
|
||||
max: 'dataMax',
|
||||
axisPointer: {
|
||||
show: true
|
||||
}
|
||||
}, {
|
||||
type: 'category',
|
||||
gridIndex: 1,
|
||||
data: dates,
|
||||
scale: true,
|
||||
boundaryGap : false,
|
||||
splitLine: {show: false},
|
||||
axisLabel: {show: false},
|
||||
axisTick: {show: false},
|
||||
axisLine: { lineStyle: { color: '#fff' } },
|
||||
splitNumber: 20,
|
||||
min: 'dataMin',
|
||||
max: 'dataMax',
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
label: {show: false},
|
||||
triggerTooltip: true,
|
||||
handle: {
|
||||
show: true,
|
||||
margin: 30,
|
||||
color: '#B80C00'
|
||||
}
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
name: '均价(元/㎡)',
|
||||
nameRotate: 90,
|
||||
nameLocation: 'center',
|
||||
nameGap: 5,
|
||||
position: 'right',
|
||||
nameTextStyle: {
|
||||
color: '#999'
|
||||
},
|
||||
scale: true,
|
||||
splitNumber: 2,
|
||||
axisLine: { lineStyle: { color: '#999' } },
|
||||
splitLine: { show: true },
|
||||
axisTick: { show: false },
|
||||
axisLabel: {
|
||||
inside: true,
|
||||
formatter: '{value}\n'
|
||||
}
|
||||
}, {
|
||||
name: '成交量(套)',
|
||||
nameRotate: 90,
|
||||
nameLocation: 'center',
|
||||
nameGap: 5,
|
||||
position: 'right',
|
||||
nameTextStyle: {
|
||||
color: '#999'
|
||||
},
|
||||
scale: true,
|
||||
gridIndex: 1,
|
||||
splitNumber: 2,
|
||||
axisLabel: {show: false},
|
||||
axisLine: {show: false},
|
||||
axisTick: {show: false},
|
||||
splitLine: {show: false}
|
||||
}],
|
||||
grid: [{
|
||||
left: 20,
|
||||
right: 20,
|
||||
top: 110,
|
||||
height: 120
|
||||
}, {
|
||||
left: 20,
|
||||
right: 20,
|
||||
height: 40,
|
||||
top: 260
|
||||
}],
|
||||
graphic: [{
|
||||
type: 'group',
|
||||
left: 'center',
|
||||
top: 70,
|
||||
width: 300,
|
||||
bounding: 'raw'
|
||||
}],
|
||||
series: [ {
|
||||
type: 'candlestick',
|
||||
name: '均价',
|
||||
data: data,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#ff4500',
|
||||
color0: '#22ac38',
|
||||
borderColor: '#ff4500',
|
||||
borderColor0: '#22ac38'
|
||||
},
|
||||
emphasis: {
|
||||
color: 'black',
|
||||
color0: '#444',
|
||||
borderColor: 'black',
|
||||
borderColor0: '#444'
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
$("#trendDiv2 a").click(function(){
|
||||
$("#trendDiv2 a").removeClass("active")
|
||||
$(this).addClass("active")
|
||||
//var v = $(this).attr("t-v");
|
||||
loadRentTrends(city, region, name);
|
||||
});
|
||||
|
||||
/* 小区租金走势 */
|
||||
|
||||
function loadRentTrends(city, region, name){
|
||||
var type = $("#trendDiv2 a.active").attr("t-v")
|
||||
axios.get("/rest/trend/distRentTrends", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
name:name,
|
||||
type:type
|
||||
}
|
||||
}).then(function (response) {
|
||||
var re = response.data.data
|
||||
|
||||
|
||||
var categories = new Array();
|
||||
var series = new Array();
|
||||
|
||||
var m = re.times;
|
||||
var pm = re.distMap
|
||||
var rooms = re.rooms;
|
||||
|
||||
if(m && rooms.length>0){
|
||||
|
||||
for(var i=0;i<m.length;i++){
|
||||
categories.push(m[i]);
|
||||
}
|
||||
|
||||
for(var k in rooms){
|
||||
var room = rooms[k]
|
||||
var distM = pm[room];
|
||||
var distObj = new Object();
|
||||
var distDatas = new Array();
|
||||
|
||||
for(var i=0;i<m.length;i++){
|
||||
if(distM[m[i]] == undefined){
|
||||
distDatas.push(null);
|
||||
} else {
|
||||
distDatas.push(distM[m[i]]);
|
||||
}
|
||||
}
|
||||
distObj.name = room+"室"
|
||||
distObj.data = distDatas;
|
||||
distObj.type = 'line';
|
||||
distObj.symbolSize = 0;
|
||||
series.push(distObj);
|
||||
}
|
||||
|
||||
//showRentChart(categories, series);
|
||||
showRentChart2(categories, series);
|
||||
}else{
|
||||
//没数据
|
||||
$("#tabRentDiv").addClass("dn");
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function showRentChart2(categories, series){
|
||||
|
||||
|
||||
var option03 = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
textStyle: {
|
||||
fontFamily: 'arial,华文细黑',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
grid:{
|
||||
x: 54,
|
||||
y: 10,
|
||||
x2: 16,
|
||||
y2: 60,
|
||||
borderWidth: 1
|
||||
},
|
||||
color: ['#F88C9F', '#FFBF5C', '#AAD672', '#78CDE6', '#AE94E9'],
|
||||
legend: {
|
||||
y: 'bottom',
|
||||
textStyle: {
|
||||
fontFamily: '华文细黑',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
itemWidth: 16,
|
||||
itemHeight: 8
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#ccc'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontFamily: 'arial',
|
||||
color: '#666'
|
||||
}
|
||||
},
|
||||
data: categories,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#ccc'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontFamily: 'arial',
|
||||
color: '#666'
|
||||
}
|
||||
}
|
||||
},
|
||||
series:series
|
||||
};
|
||||
|
||||
var myChart02 = echarts.init(document.getElementById('chart02'));
|
||||
myChart02.setOption(option03,true);
|
||||
}
|
||||
|
||||
/* 小区评级 */
|
||||
function loadDistrictLevel(){
|
||||
var option03 = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: '{d} : {c}'
|
||||
},
|
||||
calculable: true,
|
||||
radar: [
|
||||
{
|
||||
indicator: [
|
||||
{text: '活跃度评级', max: 100},
|
||||
{text: '板块评级', max: 100},
|
||||
{text: '教育评级', max: 100},
|
||||
{text: '物业评级', max: 100},
|
||||
],
|
||||
radius: 70,
|
||||
name: {
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
splitArea: {
|
||||
areaStyle: {
|
||||
color: ['rgba(136,208,83,0.20)',
|
||||
'rgba(255,255,255,1)', 'rgba(136,208,83,0.20)',
|
||||
'rgba(255,255,255,1)', 'rgba(136,208,83,0.20)'],
|
||||
shadowColor: 'rgba(136,208,83,0.20)',
|
||||
shadowBlur: 10
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(136,208,83,0.50)'
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(136,208,83,0.25)'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '',
|
||||
type: 'radar',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: {
|
||||
type: 'default'
|
||||
},
|
||||
color: 'rgba(136,208,83,0.9)'
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{
|
||||
name: '',
|
||||
value: [25.29, 85.13, 36.42, 57.23]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
var myChart03 = echarts.init(document.getElementById('chart03'));
|
||||
myChart03.setOption(option03,true);
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>位置及周边</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||
<style type="text/css">
|
||||
.page > header.bar {background: #F18D00;}
|
||||
</style>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=9E99D3540e4dafb7894f7b9fe27fa6b5"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav theme">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<button class="button button-link button-nav pull-right" onclick="openMapWindow()">
|
||||
地图
|
||||
</button>
|
||||
<h1 class="title">位置及周边</h1>
|
||||
</header>
|
||||
<div class="content contentList">
|
||||
<div class="content-block-title">地铁</div>
|
||||
<div class="list-block media-list" id="subway">
|
||||
</div>
|
||||
<input type="hidden" id="lat" value="${lat}">
|
||||
<input type="hidden" id="lng" value="${lng}">
|
||||
<div class="content-block-title">公交</div>
|
||||
<div class="list-block media-list" id="bus">
|
||||
</div>
|
||||
<div class="content-block-title">学校</div>
|
||||
<div class="list-block media-list" id="school">
|
||||
</div>
|
||||
<div class="content-block-title">医院</div>
|
||||
<div class="list-block media-list" id="hos">
|
||||
</div>
|
||||
<div class="content-block-title">银行</div>
|
||||
<div class="list-block media-list" id="bank">
|
||||
</div>
|
||||
<div class="content-block-title">购物</div>
|
||||
<div class="list-block media-list" id="buy">
|
||||
</div>
|
||||
<div class="content-block-title">房屋</div>
|
||||
<div class="list-block media-list" id="hs">
|
||||
</div>
|
||||
<div class="content-block-title">嫌恶</div>
|
||||
<div class="list-block media-list" id="xw">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||
|
||||
<script>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
Zepto = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type='text/javascript' src='../../js/district/district-map.js' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||
|
||||
<script>
|
||||
var minObj = {};
|
||||
var maxObj = {};
|
||||
var lat = 31.292437
|
||||
var lng = 121.48703
|
||||
var name = "新泾三村"
|
||||
var city = "上海"
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
function onPlusReady() {
|
||||
var self = plus.webview.currentWebview();
|
||||
city = self.city
|
||||
region = self.region
|
||||
name = self.name;
|
||||
lat = self.lat
|
||||
lng = self.lng
|
||||
|
||||
initMapConfig();
|
||||
mapConfig.init();
|
||||
}
|
||||
|
||||
function openMapWindow(){
|
||||
clicked('arround.html',true,false,{},{city:city,name:name,lat:lat,lng:lng});
|
||||
}
|
||||
|
||||
|
||||
var mapConfig = {
|
||||
/* 初始化入口*/
|
||||
init: function () {
|
||||
var that = this;
|
||||
that.lat = lat;
|
||||
that.lng = lng;
|
||||
var searchType = {'地铁':'subway', '公交':'bus', '学校':'school', '医院':'hos', '银行':'bank','购物':'buy','房屋':'hs','嫌恶':'xw'}
|
||||
for(var i in searchType){
|
||||
that.getnear_s(i,10,searchType[i]);
|
||||
}
|
||||
/* console.log(minObj);
|
||||
console.log(maxObj); */
|
||||
|
||||
},
|
||||
|
||||
/* 计算两点间距离*/
|
||||
getShortDistance: function (lon1, lat1, lon2, lat2) {
|
||||
// PI
|
||||
var DEF_PI = 3.14159265359;
|
||||
// 2*PI
|
||||
var DEF_2PI = 6.28318530712;
|
||||
// PI/180.0
|
||||
var DEF_PI180 = 0.01745329252;
|
||||
// radius of earth
|
||||
var DEF_R = 6370693.5;
|
||||
var ew1, ns1, ew2, ns2, dx, dy, dew, distance;
|
||||
// 角度转换为弧度
|
||||
ew1 = lon1 * DEF_PI180;
|
||||
ns1 = lat1 * DEF_PI180;
|
||||
ew2 = lon2 * DEF_PI180;
|
||||
ns2 = lat2 * DEF_PI180;
|
||||
|
||||
// 经度差
|
||||
dew = ew1 - ew2;
|
||||
// 若跨东经和西经180 度,进行调整
|
||||
if (dew > DEF_PI) {
|
||||
dew = DEF_2PI - dew;
|
||||
} else if (dew < -DEF_PI) {
|
||||
dew = DEF_2PI + dew;
|
||||
}
|
||||
// 东西方向长度(在纬度圈上的投影长度)
|
||||
dx = DEF_R * Math.cos(ns1) * dew;
|
||||
|
||||
// 南北方向长度(在经度圈上的投影长度)
|
||||
dy = DEF_R * (ns1 - ns2);
|
||||
|
||||
// 勾股定理求斜边长
|
||||
distance = Math.sqrt(dx * dx + dy * dy);
|
||||
return parseInt(distance);
|
||||
},
|
||||
|
||||
/* 按距离希尔排序*/
|
||||
shellSort: function (arr) {
|
||||
for (var step = arr.length >> 1; step > 0; step >>= 1) {
|
||||
for (var i = 0; i < step; ++i) {
|
||||
for (var j = i + step; j < arr.length; j += step) {
|
||||
var k = j, value = arr[j].distance, tmp = arr[j];
|
||||
while (k >= step && arr[k - step].distance > value) {
|
||||
arr[k] = arr[k - step];
|
||||
k -= step;
|
||||
}
|
||||
arr[k] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
},
|
||||
array_in_array: function (arr1, arr2) {
|
||||
if ('undefined' != typeof arr1 && 'undefined' != typeof arr2) {
|
||||
for (var key in arr1) {
|
||||
for (var key2 in arr2) {
|
||||
if ('string' == typeof arr2[key2] && 'string' == typeof arr1[key] && arr2[key2].indexOf(arr1[key]) >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* 获取周围信息
|
||||
* @param type 小分类
|
||||
* @param count 需要搜索的最大个数
|
||||
* @param view_count 非展开状态下显示个数
|
||||
* @param limit 搜索距离(m)
|
||||
* @param limit_count 页面上展示最大个数
|
||||
* @param parentType 大分类
|
||||
* @returns null
|
||||
*/
|
||||
getnear_s: function (name, count,type) {
|
||||
var that = this;
|
||||
|
||||
var onLocalSearch = function (resData) {
|
||||
/* 判断状态是否正确*/
|
||||
if (localSearch.getStatus() == BMAP_STATUS_SUCCESS) {
|
||||
var resultArr = [];
|
||||
var subwayMap = {};
|
||||
/* 处理百度返回信息*/
|
||||
for (var i = 0; i < resData.getCurrentNumPois(); i++) {
|
||||
var info = resData.getPoi(i);
|
||||
|
||||
/* 过滤地铁中的地铁口*/
|
||||
info['address'] = info['address'] ? info['address'] : '';
|
||||
if ('subway' == type && (!that.array_in_array(that.type_tags[type], info.tags) || info['address'].indexOf('线') < 0)) {
|
||||
continue;
|
||||
}
|
||||
if ('subway' == type) {
|
||||
if(subwayMap[info.title]==info.address){
|
||||
continue;
|
||||
}else{
|
||||
subwayMap[info.title]=info.address;
|
||||
}
|
||||
}
|
||||
|
||||
/* 计算距离*/
|
||||
info.distance = that.getShortDistance(that.lng, that.lat, info.point.lng, info.point.lat);
|
||||
resultArr.push(info);
|
||||
}
|
||||
resData._pois = that.shellSort(resultArr);
|
||||
var html = '<ul>';
|
||||
var html2 = '<ul>';
|
||||
for (var i = 0; i < resData._pois.length; i++) {
|
||||
if(i<2){
|
||||
html+='<li><a class="item-content"><div class="item-inner"><div class="item-title-row">'+
|
||||
'<div class="item-title">'+resData._pois[i].title+'</div><div class="item-after">'+resData._pois[i].distance+'米</div>'+
|
||||
'</div><div class="item-subtitle"><span>'+resData._pois[i].address+'</span></div></div></a></li>';
|
||||
}
|
||||
if(i==2){
|
||||
html+='<p class="moreList"><i class="icon icon-down"></i></p>';
|
||||
}
|
||||
html2+='<li><a class="item-content"><div class="item-inner"><div class="item-title-row">'+
|
||||
'<div class="item-title">'+resData._pois[i].title+'</div><div class="item-after">'+resData._pois[i].distance+'米</div>'+
|
||||
'</div><div class="item-subtitle"><span>'+resData._pois[i].address+'</span></div></div></a></li>';
|
||||
|
||||
}
|
||||
html2+='<p class="lessList"><i class="icon icon-up"></i></p></ul>';
|
||||
html+='</ul>';
|
||||
$("#"+type).html(html);
|
||||
minObj[type]=html;
|
||||
maxObj[type]=html2;
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
};
|
||||
var localSearch = new BMap.LocalSearch(new BMap.Point(that.lng, that.lat), {onSearchComplete: onLocalSearch});
|
||||
localSearch.setPageCapacity(count);
|
||||
localSearch.searchNearby(name,new BMap.Point(that.lng, that.lat),2000);
|
||||
}
|
||||
}
|
||||
function initMapConfig(){
|
||||
mapConfig.map = null,
|
||||
mapConfig.defaultZoom= 13,
|
||||
mapConfig.cityx=121.356766,
|
||||
mapConfig.cityy=31.213703,
|
||||
zoom=14,
|
||||
/* 获取附近楼盘url的参数*/
|
||||
mapConfig.params= {
|
||||
x1: 121.356766,
|
||||
y1: 31.213703,
|
||||
distance: '2',
|
||||
strNewCode: ''
|
||||
},
|
||||
|
||||
/* 用来存储当前页面上所有点的信息*/
|
||||
mapConfig.markerList= {},
|
||||
|
||||
/* 地图边界:可用来控制地图的显示范围*/
|
||||
mapConfig.markerBounds= new BMap.Bounds(),
|
||||
mapConfig.iType= 'hs',
|
||||
mapConfig.house_type= {zz: '住宅', sp: '商铺', xzl: '写字楼', bs: '别墅'},
|
||||
|
||||
/* 以下是周边查询的***/
|
||||
mapConfig.have_arr= {
|
||||
hs: '',
|
||||
jj: '',
|
||||
zs: '',
|
||||
bus: '',
|
||||
subway: '',
|
||||
ct: '',
|
||||
bank: '',
|
||||
school: '',
|
||||
hos: '',
|
||||
buy: '',
|
||||
park: '',
|
||||
parking: '',
|
||||
gas: '',
|
||||
ktv: '',
|
||||
bar: '',
|
||||
cinema: '',
|
||||
beauty: '',
|
||||
cafe: '',
|
||||
kindergarten: '',
|
||||
primarysc: '',
|
||||
middlesc: '',
|
||||
university: '',
|
||||
traffic: '',
|
||||
xw:'',
|
||||
fun: ''
|
||||
},
|
||||
mapConfig.have_arr_new= {
|
||||
bus: '公交',
|
||||
subway: '地铁',
|
||||
ct: '餐饮',
|
||||
bank: '银行',
|
||||
school: '学校',
|
||||
hos: '医院',
|
||||
buy: '购物',
|
||||
park: '公园',
|
||||
parking: '停车场',
|
||||
gas: '加油站',
|
||||
supermark: '超市',
|
||||
ktv: 'KTV',
|
||||
bar: '酒吧',
|
||||
cinema: '电影院',
|
||||
beauty: '美容院',
|
||||
cafe: '咖啡厅',
|
||||
kindergarten: '幼儿园',
|
||||
primarysc: '小学',
|
||||
middlesc: '中学',
|
||||
university: '大学',
|
||||
traffic: '交通',
|
||||
fun: '娱乐',
|
||||
xw:'嫌恶',
|
||||
hs: '小区'
|
||||
},
|
||||
// 需要删除的点集合包含路线,搜附近type为other的点
|
||||
mapConfig.toDelterMarkers= [],
|
||||
// 已描点集合
|
||||
mapConfig.house_near_p= [],
|
||||
|
||||
/* 打开标注框方法集***/
|
||||
mapConfig.openTip= [],
|
||||
|
||||
/* 标注获得焦点方法集***/
|
||||
mapConfig.focusInfoWinFuns= [],
|
||||
|
||||
/* 标注失去焦点方法集***/
|
||||
mapConfig.blurInfoWinFuns= [],
|
||||
|
||||
/* 具有小分类的周边搜索***/
|
||||
mapConfig.house_near_merge= {
|
||||
traffic: ['subway', 'bus', 'parking', 'gas'],
|
||||
// 商业包含娱乐 超市 餐饮 银行 公园
|
||||
business: ['fun', 'supermark', 'ct', 'bank', 'park'],
|
||||
// 娱乐
|
||||
fun: ['ktv', 'bar', 'cinema', 'beauty', 'cafe'],
|
||||
buy: ['buy','supermark'],
|
||||
school: ['kindergarten', 'primarysc', 'middlesc', 'university']
|
||||
},
|
||||
|
||||
/* 大分类列表***/
|
||||
mapConfig.search_wrap= ['hs', 'traffic', 'fun', 'supermark', 'ct', 'bank', 'hos', 'park', 'school','buy'],
|
||||
|
||||
/* 需要进行搜索返回值过滤的周边***/
|
||||
mapConfig.type_tags= {subway: ['地铁']},
|
||||
|
||||
/* 获取周边条数*/
|
||||
mapConfig.maxMarker_count= 20,
|
||||
|
||||
// 列表中初始化可看到的元素
|
||||
mapConfig.view_count= 8,
|
||||
/* 获取周边范围(m)*/
|
||||
mapConfig.limit= 2000,
|
||||
|
||||
/* 驾车查询的参数*/
|
||||
mapConfig.searchdrive= {start: '', x1: '', y1: '', sstatus: '', end: '', x2: '', y2: '', estatus: '', type: '', tag: ''},
|
||||
mapConfig.sstartname= null,
|
||||
mapConfig.sendname= null,
|
||||
mapConfig.tag= null
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('body').on('click' , '.moreList' , function(){
|
||||
var typeName = $(this).parent().parent()[0].getAttribute('id');
|
||||
$("#"+typeName).html(maxObj[typeName]);
|
||||
});
|
||||
|
||||
$('body').on('click' , '.lessList' , function(){
|
||||
var typeName = $(this).parent().parent()[0].getAttribute('id');
|
||||
$("#"+typeName).html(minObj[typeName]);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,132 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>位置及周边</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||
<style>
|
||||
.topic .topicContent .topicContent_center div em{font-size:0.75rem;}
|
||||
.mark-icon-box { width: 24px; height: 30px; position: absolute; z-index: 98; }
|
||||
.mark-icon-box .mark-icon {
|
||||
width: 20px;
|
||||
height: 30px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 24px;
|
||||
background: url(../../images/dw.png) no-repeat;
|
||||
}
|
||||
.page > header.bar {background: #F18D00;}
|
||||
</style>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=9E99D3540e4dafb7894f7b9fe27fa6b5"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav theme">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left" ></span>
|
||||
</button>
|
||||
<button class="button button-link button-nav pull-right" onclick="openPoiDetail()">
|
||||
详情
|
||||
</button>
|
||||
<h1 class="title">位置及周边</h1>
|
||||
</header>
|
||||
<nav class="bar bar-tab">
|
||||
<a class="tab-item external active" id="bus">
|
||||
<span class="icon icon-around01"></span>
|
||||
<span class="tab-label">公交</span>
|
||||
</a>
|
||||
<a class="tab-item external" id="subway">
|
||||
<span class="icon icon-around02"></span>
|
||||
<span class="tab-label">地铁</span>
|
||||
</a>
|
||||
<a class="tab-item external" id="school">
|
||||
<span class="icon icon-around03"></span>
|
||||
<span class="tab-label">学校</span>
|
||||
</a>
|
||||
<a class="tab-item external" id="hos">
|
||||
<span class="icon icon-around04"></span>
|
||||
<span class="tab-label">医院</span>
|
||||
</a>
|
||||
<a class="tab-item external" id="bank">
|
||||
<span class="icon icon-around05"></span>
|
||||
<span class="tab-label">银行</span>
|
||||
</a>
|
||||
<a class="tab-item external" id="supermark">
|
||||
<span class="icon icon-around06"></span>
|
||||
<span class="tab-label">购物</span>
|
||||
</a>
|
||||
<a class="tab-item external" id="hs">
|
||||
<span class="icon icon-around07"></span>
|
||||
<span class="tab-label">房屋</span>
|
||||
</a>
|
||||
<a class="tab-item external" id="id="xianwu"">
|
||||
<span class="icon icon-around08"></span>
|
||||
<span class="tab-label">嫌恶</span>
|
||||
</a>
|
||||
</nav>
|
||||
<div class="content">
|
||||
<div class="districtMap01" id="districtMap"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "></script>
|
||||
<script type="text/javascript">
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
Zepto = $
|
||||
$.config = {router: false}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type='text/javascript' src='../../js/district/district-map.js' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||
<script>
|
||||
var lat = 31.292437
|
||||
var lng = 121.48703
|
||||
var name = "新泾三村"
|
||||
var city = "上海"
|
||||
|
||||
//loadMapPoi();
|
||||
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
function onPlusReady() {
|
||||
var self = plus.webview.currentWebview();
|
||||
lat = self.lat
|
||||
lng = self.lng
|
||||
city = self.city
|
||||
name = self.name
|
||||
loadMapPoi();
|
||||
}
|
||||
|
||||
function openPoiDetail(){
|
||||
clicked('aroundDetail.html',true,false,{},{city:city,name:name,lat:lat,lng:lng});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1503,7 +1503,7 @@ function initNearDistricts(cityParam,latParam,lngParam,regionParam,order,minPric
|
||||
textStr = textName.substr(0,5)+ "...";
|
||||
}
|
||||
|
||||
html += '<div class="card cardNearby" onclick="openUrl(\''+BASE_PATH+'/district/details?city='+response.data.data.dtos[i].city+'®ion='+response.data.data.dtos[i].district+'&name='+response.data.data.dtos[i].name+'\')"><div class="card-header">'+
|
||||
html += '<div class="card cardNearby" onclick="openDistWindow('+response.data.data.dtos[i].city+','+response.data.data.dtos[i].district+','+response.data.data.dtos[i].name+')"><div class="card-header">'+
|
||||
textStr+
|
||||
'</div><div class="card-content"><div class="card-content-inner">'+response.data.data.dtos[i].avgPrice+'元/㎡</div></div><div class="card-footer">'+
|
||||
'距您'+response.data.data.dtos[i].distance+'m</div></div>';
|
||||
@@ -1889,7 +1889,7 @@ function addItems(number, lastIndex) {
|
||||
tagStr += '</span></div>';
|
||||
}
|
||||
html += '<li>'+
|
||||
'<a onclick="openUrl(\''+BASE_PATH+'/district/details?city='+dataObj2[i].city+'®ion='+dataObj2[i].region+'&name='+dataObj2[i].districtName+'\')" class="external item-content">'+
|
||||
'<a onclick="openDistWindow(\''+dataObj2[i].city+'\',\''+dataObj2[i].region+'\',\''+dataObj2[i].districtName+'\')" class="external item-content">'+
|
||||
'<div class="item-inner"><div class="item-title-row"><div class="item-title">'+
|
||||
dataObj2[i].districtName+'</div><div class="item-after"><em>¥'+dataObj2[i].avgPrice+'元/㎡</em></div></div><div class="item-title-row">'+
|
||||
'<div class="item-title"><i class="icon icon-address03"></i><small>'+
|
||||
@@ -2604,6 +2604,9 @@ function openNewsView(newId) {
|
||||
}
|
||||
}
|
||||
|
||||
function openDistWindow(city, region, name){
|
||||
clicked('views/district/detail.html',true,false,{},{city:city,region:region,name:name});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
/* 获取附近小区名称字数,截取附近小区名称前5字,并添加... */
|
||||
|
||||
Reference in New Issue
Block a user