Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
var ret = []
|
||||
|
||||
function loadMyCollectCity(){
|
||||
function loadCurCity(city){
|
||||
axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) {
|
||||
var curDatas = response.data.data
|
||||
if(curDatas){
|
||||
if(curDatas && curDatas.length>0){
|
||||
if(IsInArray(curDatas, city)){
|
||||
cityInfoVue.$data.collecd = true;
|
||||
}else{
|
||||
@@ -183,6 +183,7 @@ function loadUpOrDownChart(downRate, upRate){
|
||||
|
||||
dataUp = [cityObj1, cityObj2]
|
||||
addUpChart(dataUp)
|
||||
$("#up_chart").parent().parent().show();
|
||||
}else{
|
||||
$("#up_chart").parent().parent().hide()
|
||||
}
|
||||
@@ -198,6 +199,7 @@ function loadUpOrDownChart(downRate, upRate){
|
||||
|
||||
dataDown = [cityObj3, cityObj4]
|
||||
addDownChart(dataDown)
|
||||
$("#down_chart").parent().parent().show();
|
||||
}else{
|
||||
$("#down_chart").parent().parent().hide()
|
||||
}
|
||||
@@ -464,9 +466,29 @@ function docollectCity(city){
|
||||
var msg = response.data.message;
|
||||
if(msg){
|
||||
if(msg == "取消关注成功"){
|
||||
cityInfoVue.$data.collecd = false;
|
||||
try{
|
||||
cityInfoVue.$data.collecd = false;
|
||||
|
||||
var da = cityDetaiVue.$data.citys
|
||||
if(da && da.length>0){
|
||||
var index = da.indexOf(city)
|
||||
if(index>0){
|
||||
da.splice(index, 1)
|
||||
cityDetaiVue.$data.citys = da;
|
||||
if(da.length>0){
|
||||
$("a[href='#tabQuotation0']").click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch(e){
|
||||
|
||||
}
|
||||
|
||||
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
}else if(msg == "关注成功"){
|
||||
cityInfoVue.$data.collecd = true;
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
}else{
|
||||
$.toast(msg);
|
||||
}
|
||||
@@ -478,3 +500,4 @@ function docollectCity(city){
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1620,7 +1620,8 @@
|
||||
"views/user/passLogin.html",
|
||||
"views/district/detail.html",
|
||||
"views/setting/setting.html",
|
||||
"views/user/codeSms.html"
|
||||
"views/user/codeSms.html",
|
||||
"views/house/detail.html"
|
||||
],
|
||||
"priority": 0
|
||||
},
|
||||
@@ -1668,7 +1669,25 @@
|
||||
"priority": 0
|
||||
},
|
||||
"views/house/houseDetail.html": {
|
||||
"resources": [],
|
||||
"resources": [
|
||||
"views/component/cityIncreaseRankingComponent.js",
|
||||
"js/echarts.js",
|
||||
"css/main.css",
|
||||
"js/axiosPlugin.js",
|
||||
"js/quotations/cityDetail.js",
|
||||
"js/light7.js",
|
||||
"views/component/cityPotentialRankingComponent.js",
|
||||
"js/cn.js",
|
||||
"views/component/myFocusComponent.js",
|
||||
"js/zepto.js",
|
||||
"css/city.css",
|
||||
"js/log/log_stat.js",
|
||||
"js/common.js",
|
||||
"js/axios.min.js",
|
||||
"js/vue.js",
|
||||
"views/component/cityChooseComponent.js",
|
||||
"js/highcharts-4.2.3.js"
|
||||
],
|
||||
"refer": [
|
||||
"views/house/regions.html",
|
||||
"views/district/detail.html",
|
||||
|
||||
@@ -238,8 +238,8 @@ $.config = {router: false}
|
||||
|
||||
<script>
|
||||
var city = "上海"
|
||||
var region = "长宁"
|
||||
var name = "新泾三村"
|
||||
var region = "嘉定"
|
||||
var name = "世盟壹天地"
|
||||
//var lat = 31.292437
|
||||
//var lng = 121.48703
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ $.config = {router: false}
|
||||
var date = new Date();
|
||||
var year = date.getFullYear()+'年';
|
||||
var month = date.getMonth()+1+'月';
|
||||
var city = "天津"
|
||||
var city = ""
|
||||
var cityInfoVue = new Vue({
|
||||
el: '#cityInfo',
|
||||
data: {
|
||||
@@ -166,11 +166,12 @@ function onPlusReady() {
|
||||
var self = plus.webview.currentWebview();
|
||||
var city = self.city
|
||||
cityInfoVue.$data.city = city;
|
||||
loadMyCollectCity();
|
||||
loadCurCity(city);
|
||||
loadCityPriceInfo(city)
|
||||
loadUpOrDown(city);
|
||||
loadHotDistrict(city)
|
||||
loadCityPricesAndCounts(city)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ function addManagement(id, houseStatus, liveStatus){
|
||||
}).then(function (response) {
|
||||
var status = response.data.status;
|
||||
if(status){
|
||||
$.toast(response.data.data);
|
||||
$.toast("修改状态成功!");
|
||||
//window.location.reload();
|
||||
}else{
|
||||
$.toast(response.data.message);
|
||||
|
||||
@@ -39,14 +39,14 @@
|
||||
<div class="content" >
|
||||
<div class="buttons-tab theme" id="tabCityDiv" >
|
||||
<a href="#tabQuotation1" class="tab-link active button">全国</a>
|
||||
<div v-for="o in citys">
|
||||
<a v-bind:href="o.hrefId" class="tab-link button" @click="clickCity(o.hrefId)">{{o.city}}</a>
|
||||
<div v-for="mycollectcity in citys" >
|
||||
<a class="tab-link button" @click="clickCity(mycollectcity)" v-bind:vcity="mycollectcity">{{mycollectcity}}</a>
|
||||
</div>
|
||||
<a href="#tabQuotation0" class="tab-link button">添加</a>
|
||||
</div>
|
||||
|
||||
<div class="tabs">
|
||||
<div id="tabQuotation1" class="tab active">
|
||||
<div id="tabQuotation1" class="tab active">
|
||||
<div class="card cardPrice cardPrice01 cardCity" id="countryInfo">
|
||||
<div class="card-header">
|
||||
<label>全国</label>
|
||||
@@ -167,92 +167,92 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="contentTabDiv">
|
||||
<div class="tab" v-for="(myCityMap,index) in cityDatas">
|
||||
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
|
||||
<div class="card-header">
|
||||
<label>{{myCityMap.city}}</label>
|
||||
<a v-if="myCityMap.colled" class="button collection collection02 " @click="collectCity(myCityMap.city, index)">取消</a>
|
||||
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city, index)">关注</a>
|
||||
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<span>当前参考均价</span>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice > 0">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
|
||||
<div class="card-content-inner" v-else>暂无</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<span v-if="myCityMap.oneMonthUpDownRange >= 0">
|
||||
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
||||
<label>近30天涨跌幅</label>
|
||||
|
||||
<div id="cityInfo" class="dn">
|
||||
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
|
||||
<div class="card-header">
|
||||
<label>{{myCityMap.city}}</label>
|
||||
<a v-if="collecd" class="button collection collection02 " @click="collectCity(myCityMap.city)">取消</a>
|
||||
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city)">关注</a>
|
||||
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<span>当前参考均价</span>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
|
||||
<div class="card-content-inner" v-else>暂无</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<span v-if="myCityMap.oneMonthUpDownRange >= 0">
|
||||
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
||||
<label>近30天涨跌幅</label>
|
||||
</span>
|
||||
<span v-else>
|
||||
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
||||
<label>近30天涨跌幅</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>{{myCityMap.rangeLevel}}</strong></em>
|
||||
<label>城市涨跌排名</label>
|
||||
</span>
|
||||
<span v-if="myCityMap.index < 50">
|
||||
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
||||
<label>下跌概率</label>
|
||||
</span>
|
||||
<span v-else>
|
||||
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
||||
<label>上涨概率</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="topic">
|
||||
<div class="topicTitle topicTitle02">{{myCityMap.time}}楼市行情<span><a @click="showRegionInfo(myCityMap.city)">区县涨跌详情<i class="icon icon-right"></i></a></span></div>
|
||||
<div class="topicContent" style="padding-top:0;">
|
||||
<div class="chartBox row">
|
||||
<span class="col-50">
|
||||
<div class="chart" id="up_chart"></div>
|
||||
</span>
|
||||
<span v-else>
|
||||
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
||||
<label>近30天涨跌幅</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>{{myCityMap.rangeLevel}}</strong></em>
|
||||
<label>城市涨跌排名</label>
|
||||
</span>
|
||||
<span v-if="myCityMap.index < 50">
|
||||
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
||||
<label>下跌概率</label>
|
||||
</span>
|
||||
<span v-else>
|
||||
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
||||
<label>上涨概率</label>
|
||||
<span class="col-50">
|
||||
<div class="chart" id="down_chart"></div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="topic">
|
||||
<div class="topicTitle topicTitle02">{{myCityMap.time}}楼市行情<span><a @click="showRegionInfo(myCityMap.city)">区县涨跌详情<i class="icon icon-right"></i></a></span></div>
|
||||
<div class="topicContent" style="padding-top:0;">
|
||||
<div class="chartBox row">
|
||||
<span class="col-50">
|
||||
<div class="chart" v-bind:id="myCityMap.numId_up_chart"></div>
|
||||
</span>
|
||||
<span class="col-50">
|
||||
<div class="chart" v-bind:id="myCityMap.numId_down_chart"></div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="topic" id="trendChartDiv">
|
||||
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势
|
||||
<div class="content-block">
|
||||
<div class="buttons-row theme" id="trendDiv">
|
||||
<a class="tab-link button active" v="2" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 2)">半年</a>
|
||||
<a class="tab-link button" v="3" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 3)">一年</a>
|
||||
<a class="tab-link button" v="5" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 5)">三年</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topic">
|
||||
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势
|
||||
<div class="content-block">
|
||||
<div class="buttons-row theme" v-bind:tid="index+1">
|
||||
<a class="tab-link button active" v="2" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 2, index+1)">半年</a>
|
||||
<a class="tab-link button" v="3" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 3, index+1)">一年</a>
|
||||
<a class="tab-link button" v="5" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 5, index+1)">三年</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topicContent" style="padding:0;">
|
||||
<div class="chart" v-bind:id="myCityMap.numId_price_chart"></div>
|
||||
</div>
|
||||
<div class="topicContent" style="padding:0;">
|
||||
<div class="chart" id="price_chart"></div>
|
||||
</div>
|
||||
|
||||
<div class="topic">
|
||||
<div class="topicTitle">热门小区</div>
|
||||
<div class="topicContent" style="padding:0;">
|
||||
<div class="cardNearbyBox cardNearbyBox01">
|
||||
<div class="cardNearbyWin" style="width: 38rem;">
|
||||
<div class="card cardNearby" v-for="nearDist in myCityMap.nears" @click="showDistrictDetail(index, myCityMap.city)">
|
||||
<div class="card-header">{{nearDist.sname}}</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner">{{nearDist.avgPrice==0?"暂无":nearDist.avgPrice+"元/㎡"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="topic">
|
||||
<div class="topicTitle">热门小区</div>
|
||||
<div class="topicContent" style="padding:0;">
|
||||
<div class="cardNearbyBox cardNearbyBox01">
|
||||
<div class="cardNearbyWin" style="width: 38rem;">
|
||||
<div class="card cardNearby" v-for="nearDist in nears" @click="showDistrictDetail(nearDist.city, nearDist.region, nearDist.name)">
|
||||
<div class="card-header">{{nearDist.sname}}</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner" v-if="nearDist.avgPrice">{{nearDist.avgPrice}}元/㎡</div>
|
||||
<div class="card-content-inner" v-else>暂无</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1210,9 +1210,36 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../component/cityChooseComponent.js"></script>
|
||||
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/highcharts-4.2.3.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/quotations/collectCity.js" ></script>
|
||||
<script type="text/javascript" src="../../js/quotations/cityDetail.js" ></script>
|
||||
|
||||
<script>
|
||||
var date = new Date();
|
||||
var year = date.getFullYear()+'年';
|
||||
var month = date.getMonth()+1+'月';
|
||||
var positionCity = "";
|
||||
var cityInfoVue = new Vue({
|
||||
el: '#cityInfo',
|
||||
data: {
|
||||
city:"",
|
||||
month:month,
|
||||
collecd:false,
|
||||
nears:[],
|
||||
myCityMap : []
|
||||
}
|
||||
});
|
||||
|
||||
var cityDetaiVue = new Vue({
|
||||
el: '#tabCityDiv',
|
||||
data: {
|
||||
citys:[]
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
function onPlusReady(){
|
||||
var city = "";
|
||||
@@ -1221,11 +1248,12 @@ $.config = {router: false}
|
||||
city = p.address.city;
|
||||
//region = p.address.district;
|
||||
if(city && city.endsWith("市")){
|
||||
city = city.substring(0, city.length-1)
|
||||
myCollectCitys.push(city);
|
||||
positionCity = city.substring(0, city.length-1)
|
||||
}
|
||||
//lng = p.coords.longitude;//获取到当前位置的经度
|
||||
//lat = p.coords.latitude;//获取到当前位置的纬度;
|
||||
|
||||
|
||||
loadMyCollectCity();
|
||||
}, function(e){
|
||||
},
|
||||
@@ -1265,17 +1293,7 @@ $.config = {router: false}
|
||||
coordsType:'bd09ll'
|
||||
}
|
||||
);
|
||||
/* 关注&已关注切换 */
|
||||
$(".collection01").on("click", function () {
|
||||
$(this).hide();
|
||||
$(this).next().show();
|
||||
$.toast("已关注");
|
||||
});
|
||||
$(".collection02").on("click", function () {
|
||||
$(this).hide();
|
||||
$(this).prev().show();
|
||||
$.toast("取消关注");
|
||||
});
|
||||
|
||||
|
||||
/* button状态切换 */
|
||||
$(".content-block .button").on("click", function () {
|
||||
@@ -1379,6 +1397,9 @@ $.config = {router: false}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
@@ -1414,19 +1435,32 @@ $(document).ready(function () {
|
||||
$("a[href='#tabQuotation1'],a[href='#tabQuotation0']").click(function(){
|
||||
$("#tabCityDiv a").removeClass("active");
|
||||
$("#contentTabDiv > .tab").removeClass("active");
|
||||
$("#cityInfo").hide()
|
||||
})
|
||||
|
||||
function clickCity(val){
|
||||
city = val;
|
||||
$("#cityInfo").show()
|
||||
$("#tabCityDiv a").removeClass("active");
|
||||
$("a[href="+val+"]").addClass("active");
|
||||
$("#contentTabDiv > .tab > div:first-child").each(function(){
|
||||
var href = $(this).attr("hrefid")
|
||||
if(val == href){
|
||||
$("div[hrefid="+href+"]").parent().addClass("active");
|
||||
}else{
|
||||
$("div[hrefid="+href+"]").parent().removeClass("active");
|
||||
}
|
||||
})
|
||||
// $("a[href="+val+"]").addClass("active");
|
||||
// $("#contentTabDiv > .tab > div:first-child").each(function(){
|
||||
// var href = $(this).attr("hrefid")
|
||||
// if(val == href){
|
||||
// $("div[hrefid="+href+"]").parent().addClass("active");
|
||||
// }else{
|
||||
// $("div[hrefid="+href+"]").parent().removeClass("active");
|
||||
// }
|
||||
// })
|
||||
$("a[vcity='"+val+"']").addClass("active");
|
||||
loadCurCity(city);
|
||||
loadCityPriceInfo(city)
|
||||
loadUpOrDown(city);
|
||||
loadHotDistrict(city)
|
||||
loadCityPricesAndCounts(city)
|
||||
|
||||
$("#trendDiv a").removeClass("active")
|
||||
$("#trendDiv a[v='2']").addClass("active")// 默认走势显示半年
|
||||
|
||||
$("#tabQuotation1").removeClass("active");
|
||||
$("#tabQuotation0").removeClass("active");
|
||||
|
||||
@@ -1490,7 +1524,7 @@ function addFocus(city){
|
||||
}else{
|
||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||
reloadMyFocus()
|
||||
createData(city, myDatasVue.$data.cityDatas.length);
|
||||
cityDetaiVue.$data.citys.push(city);
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
})
|
||||
@@ -1499,9 +1533,38 @@ function addFocus(city){
|
||||
}
|
||||
|
||||
function hotCity(city){
|
||||
clicked('../house/cityDetail.html',true,false,{},{city:city});
|
||||
clicked('../house/cityDetail.html',true,false,{},{city:city},function(){
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function loadMyCollectCity(){
|
||||
axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) {
|
||||
var curDatas = response.data.data
|
||||
if(curDatas && curDatas.length>0){
|
||||
if(positionCity){
|
||||
curDatas.splice(0,0, positionCity)
|
||||
}
|
||||
cityDetaiVue.$data.citys = curDatas;
|
||||
}else{
|
||||
if(positionCity){
|
||||
curDatas.splice(0,0, positionCity)
|
||||
}
|
||||
cityDetaiVue.$data.citys = curDatas;
|
||||
|
||||
$("#cityInfo").hide()
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -115,6 +115,11 @@ new Vue({
|
||||
$.toast("请输入密码");
|
||||
return;
|
||||
}
|
||||
var reg = /^[a-zA-Z0-9]{1,}$/;
|
||||
if (!reg.test(this.pass)){
|
||||
$.toast("请输入6位以上数字或字母");
|
||||
return;
|
||||
}
|
||||
if (this.pass.length < 7) {
|
||||
$.toast("请输入6位以上数字或字母");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user