Merge branch 'YOUFANGAPP1.1.1' of http://192.168.0.27/dev0/youfang-app into YOUFANGAPP1.1.1

This commit is contained in:
bayi
2018-05-02 11:32:52 +08:00
25 changed files with 561 additions and 322 deletions
+6 -3
View File
@@ -12,6 +12,7 @@ em{font-style:normal;color:#333;}
em.up{color:#EB5F34;}
em.down{color:#88D053;}
*/
::../../images{display:none;}
.dn{display:none;}
.di{display:inline;}
@@ -450,7 +451,6 @@ input::-webkit-input-placeholder{
.cardNearbyName{margin-top:0;margin-bottom:0;padding-bottom:0.3rem;}
.cardNearbyName span{font-size:0.75rem;}
.cardNearbyBox{width:100%;background:#f3f3f3;overflow-x:auto;}
.cardNearbyBox::-webkit-scrollbar{display:none;}
.cardNearbyWin{width:22.5rem;margin-left:0.25rem;overflow:hidden;}
.cardNearby{width:6.75rem;border-radius:0.16rem;float:left;margin-right:0;color:#333;}
.cardNearby div{padding-top:0;padding-bottom:0;}
@@ -459,14 +459,13 @@ input::-webkit-input-placeholder{
.cardNearby .card-footer{font-size:0.65rem;color:#999;min-height:1.5rem;margin-top:-0.2rem;}
.cardNearbyBox01{background:none;margin-top:-0.5rem;}
.cardNearbyBox01 .cardNearbyWin{margin-bottom:0.25rem;}
.cardNearbyBox01 .cardNearby../../images{margin-bottom:0.25rem;}
.cardNearbyBox01 .cardNearby{border:solid 1px #e7e7e7;}
.cardNearbyBox01 .cardNearby .card-header{padding-top:0.25rem;line-height:1.2rem;}
.arrow-up{font-size:0;line-height:0;border-width:10px;border-color:#f3f3f3;border-top-width:0;border-style:dashed;border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;position:absolute;bottom:0;left:16%;}
.cardRentBox{width:100%;background:#fff;overflow-x:auto;border-bottom:solid 1px #e7e7e7;}
.cardRentBox::-webkit-scrollbar{display:none;}
.cardRentWin{width:25rem;overflow:hidden;margin-left:0.75rem;border-left:solid 1px #e7e7e7;}
.cardRent{border-radius:0;border-right:solid 1px #e7e7e7;box-shadow:none;float:left;margin:0;}
.cardRent .card-content-inner{font-size:0.7rem;color:#EB5F34;padding:0.5rem 0.75rem;}
@@ -1146,6 +1145,10 @@ input::-webkit-input-placeholder{
.tabs .noData img{width:30%;margin:0 auto;margin-top:3rem;}
.topic .topicContent.homeBox{overflow-x:auto;}
.topic .topicContent .topicContent_center.homeWin{width:540px;overflow:hidden;}
.topic .topicContent .topicContent_center.homeWin div{width:90px;}
/* 出错页面 */
.contentError{padding-top:30%;}
.contentError img{width:30%;margin:0 auto;}
+4 -1
View File
@@ -36,7 +36,10 @@
<em>网络加载异常</em>
<p>请返回重试或检查网络设置</p>
<div class="content-block">
<p><a onclick="plus.runtime.restart()" class="button button-big button-round theme">返回重试</a></p>
<p>
<a onclick="plus.runtime.restart()" class="button button-big button-round theme">重启应用</a>
<a onclick="back(),plus.nativeUI.closeWaiting();" class="button button-big button-round theme">返回刷新</a>
</p>
</div>
</div>
</div>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

+118 -27
View File
@@ -12,9 +12,17 @@ var mapLoadCount = 0;
function doAddCollect(){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
doAddCollect();
})
return;
@@ -32,7 +40,9 @@ function addCollect(){
$(".collection01").hide();
$(".collection02").show();
$.toast("随时掌握小区动态");
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
}
})
@@ -49,7 +59,9 @@ function doRemoveCollect(){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
doRemoveCollect();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
})
return;
} else {
@@ -67,9 +79,14 @@ function removeCollect(){
$(".collection01").show();
$.toast("取消关注");
}
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
plus.webview.getWebviewById('yfindex.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
})
.catch(function (error) {
console.log(error);
@@ -77,20 +94,21 @@ function removeCollect(){
}
//图表 初始化
function inintChart(){
var type = $("#trendDiv1 a.active").attr("t-v");
/* 小区均价分析 */
loadLineData(city, region, name, 6)
loadLineData(city, region, name, type)
/* 小区租金走势 */
loadRentTrends(city, region, name,2);
}
function clickLineChart(e){
$("#trendDiv1 a").removeClass("active")
$(e).addClass("active")
function clickLineChart(type){
if(mode == "kLine"){
loadKLineData(city, region, name);
loadKLineData(city, region, name, type)
}else if(mode == "line"){
loadLineData(city, region, name);
loadLineData(city, region, name, type);
}
}
@@ -102,7 +120,8 @@ function lineChart() {
$(".icon-chart01").show();
$("#chart01a").css("z-index","-1");
$("#chart01").css("z-index","1");
loadKLineData(city, region, name);
var type = $("#trendDiv1 a.active").attr("t-v");
loadKLineData(city, region, name, type);
}
function kLineChart() {
mode = "line"
@@ -110,7 +129,8 @@ function kLineChart() {
$(".icon-chart01a").show();
$("#chart01").css("z-index","-1");
$("#chart01a").css("z-index","1");
var type = $("#trendDiv1 a.active").attr("t-v");
loadLineData(city, region, name, type);
};
@@ -127,9 +147,41 @@ function showLoadRentTrends(type) {
}
function loadKLineData(city, region, name){
var type = $("#trendDiv1 a.active").attr("t-v");
axios.get("/rest/trend/kData", {
function loadKLineData(city, region, name, type){
if(type == "36"){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{
$("#trendDiv1 a").removeClass("active")
$("a[t-v='36']").addClass("active")
doLoadKLineData(city, region, name, type)
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
})
return;
} else {
$("#trendDiv1 a").removeClass("active")
$("a[t-v='36']").addClass("active")
doLoadKLineData(city, region, name, type)
}
}else{
$("#trendDiv1 a").removeClass("active")
if(type == 12){
$("a[t-v='12']").addClass("active")
}else{
$("a[t-v='6']").addClass("active")
}
doLoadKLineData(city, region, name, type)
}
}
function doLoadKLineData(city, region, name, type){
axios.get("/rest/trend/kData", {
params: {
city: city,
region:region,
@@ -178,9 +230,17 @@ function showTrends(v){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
showTrends(v);
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
})
return;
} else {
@@ -522,6 +582,7 @@ function showRentChart2(categories, series, roomDatas){
},
yAxis: {
type: 'value',
scale: true,
axisLine: {
lineStyle: {
color: '#ccc'
@@ -611,8 +672,42 @@ myChart03.setOption(option03,true);
//曲线图
function loadLineData(city, region, name){
var type = $("#trendDiv1 a.active").attr("t-v");
function loadLineData(city, region, name, type){
//var type = $("#trendDiv1 a.active").attr("t-v");
if(type == "36"){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{
$("#trendDiv1 a").removeClass("active")
$("a[t-v='36']").addClass("active")
doLoadLineData(city, region, name, type)
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
})
return;
} else {
$("#trendDiv1 a").removeClass("active")
$("a[t-v='36']").addClass("active")
doLoadLineData(city, region, name, type)
}
}else{
$("#trendDiv1 a").removeClass("active")
if(type == 12){
$("a[t-v='12']").addClass("active")
}else{
$("a[t-v='6']").addClass("active")
}
doLoadLineData(city, region, name, type)
}
}
function doLoadLineData(city, region, name, type){
axios.get("/rest/trend/distTrends", {
params: {
city: city,
@@ -639,11 +734,7 @@ function loadLineData(city, region, name){
//option01b.xAxis.data = times
//option01b.series.data = districtTrends
showLineChart(times, districtTrends);
}
}).catch(function (error) {
console.log(error);
+33
View File
@@ -39,3 +39,36 @@ function doSavePageLog(data) {
console.log(error);
});
}
/**
* 记录用户行为日志
*/
function saveBehaviorLog(event,dataMap) {
var page = document.getElementsByTagName("title")[0].innerHTML;
var device = plus.device.uuid;
var model = plus.device.model;
plus.geolocation.getCurrentPosition(function(p){
baidu_city = p.address.city;
baidu_lng = p.coords.longitude;
baidu_lat = p.coords.latitude;
baidu_address = p.address.street;
doSaveBehaviorLog({page:page, lng:baidu_lng, lat:baidu_lat, province:baidu_province, city:baidu_city, region:baidu_region, address:baidu_address, device:device, model:model,event:event,businessData:dataMap});
}, function(e){
doSaveBehaviorLog({page:page, device:device, model:model,event:event,businessData:dataMap});
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);
}
function doSaveBehaviorLog(data) {
axios.post("/rest/log/saveBehaviorLog", data).then(function (response) {
}).catch(function (error) {
console.log(error);
});
}
+27 -9
View File
@@ -198,9 +198,17 @@ function clickTrend(city, type){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
clickTrend(city, type);
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
})
return;
} else {
@@ -543,9 +551,13 @@ function collectCity(city, type){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
collectCity(city, type)
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
//plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
})
return;
} else {
@@ -562,7 +574,9 @@ function collectCity(city, type){
// plus.webview.getWebviewById('views/house/houseDetail.html').reload();
},function(){
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
//loadMyCollectCity();
});
@@ -602,13 +616,17 @@ function docollectCity(city, type){
//loadMyCollectCity();
$("a[href='#tabQuotation1']").click();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
//reloadMyFocus();
//reloadCityPotentialRanking()
//reloadCityIncreaseRanking()
}else if(msg == "关注成功"){
cityInfoVue.$data.collecd = true;
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
//reloadMyFocus();
//reloadCityPotentialRanking()
//reloadCityIncreaseRanking()
+11 -3
View File
@@ -528,10 +528,18 @@ function showRegionInfo(city){
function collectCity(city, index){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
collectCity(city)
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
})
return;
+2 -2
View File
@@ -78,10 +78,10 @@ function shareMessage(msg,s){
var ss=shares['weixin'];
ss&&ss.nativeClient&&(shareBts.push({title:'微信朋友圈',s:ss,x:'WXSceneTimeline'}),
shareBts.push({title:'微信好友',s:ss,x:'WXSceneSession'}));
ss=shares['qq'];
/* ss=shares['qq'];
ss&&ss.nativeClient&&shareBts.push({title:'QQ',s:ss});
ss=shares['sinaweibo'];
ss&&shareBts.push({title:'新浪微博',s:ss});
ss&&shareBts.push({title:'新浪微博',s:ss});*/
// 弹出分享列表
shareBts.length>0?plus.nativeUI.actionSheet({title:'分享链接',cancel:'取消',buttons:shareBts},function(e){
(e.index>0)&&shareAction(shareBts[e.index-1],true);
+6 -2
View File
@@ -118,10 +118,11 @@
var self = plus.webview.currentWebview();
for (var i = 0; i < 4; i++) {
var temp = {};
var sub = plus.webview.create(subpages[i], subpages[i], subpage_style);
if (i > 0) {
sub.hide();
/*var sub = plus.webview.create(subpages[i], subpages[i], subpage_style);
sub.hide();*/
}else{
var sub = plus.webview.create(subpages[i], subpages[i], subpage_style);
temp[subpages[i]] = "true";
mui.extend(aniShow,temp);
}
@@ -142,6 +143,9 @@
//显示目标选项卡
//若为iOS平台或非首次显示,则直接显示
if(mui.os.ios||aniShow[targetTab]){
if(plus.webview.getWebviewById(targetTab)==null){
plus.webview.create(targetTab, targetTab, subpage_style)
}
plus.webview.show(targetTab);
}else{
//否则,使用fade-in动画,且保存变量
+3 -3
View File
@@ -7,7 +7,7 @@
"id": "H5693FF3D",/*应用的标识,创建应用时自动生成,勿手动修改*/
"name": "有房",/*应用名称,程序桌面图标名称*/
"version": {
"name": "1.1.1",/*应用版本名称*/
"name": "1.1.6",/*应用版本名称*/
"code": "20109"
},
"description": "有房,围绕房产提供全方位数据分析的房产及金融服务平台,通过个性化的智能推荐,定制专属的个人投资或购房计划,多维度管理自有房产并提供房产融资通道。",/*应用描述信息*/
@@ -154,8 +154,8 @@
],
"frameworks": [], /*调用Native.js调用原生Objective-c API需要引用的FrameWork,如需调用GameCenter,则添加"GameKit.framework"*/
"plistcmds": [
"Set :NSLocationWhenInUseUsageDescription 根据您的位置信息,您可随时掌握所在位置周边房产的行情。",
"Set :NSLocationAlwaysUsageDescription 根据您的位置信息,您可随时掌握所在位置周边房产的行情。"
"Set :NSLocationAlwaysUsageDescription 根据您的位置信息,您可随时掌握所在位置周边房产的行情。",
"Set :NSLocationWhenInUseUsageDescription 根据您的位置信息,您可随时掌握所在位置周边房产的行情。"
]
},
"google": {
+15 -10
View File
@@ -31,7 +31,7 @@
<div class="page-group">
<div class="page page-current">
<header class="bar bar-nav barBorder">
<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
<span class="icon icon-left"></span>
</button>
<h1 class="title">我要置换</h1>
@@ -63,7 +63,7 @@
<div class="item-title-row">
<div class="item-title">置换房产</div>
<div class="item-after">
<input type="text" id="input_house01" class="textAlignRight" placeholder="+添加房产">
<input type="text" id="input_house01" class="textAlignRight" placeholder="+添加房产" onclick="openAddHouse()">
</div>
</div>
</div>
@@ -273,7 +273,7 @@
</li>
<li>
<a href="01_index02_loanEvaluation04_inputInfo.html" class="item-link item-content">
<a onclick="openAddHouse()" class="item-link item-content">
<div class="item-media"><img src="../../images/addHouse.png" style="width:1.8rem;"></div>
<div class="item-inner" style="margin-left:0.55rem;">
<div class="item-subtitle">
@@ -1255,7 +1255,7 @@ $.config = {router: false}
<script>
var dCity = "上海"
var hsId = "196310294262185984"
var hsId = ""
var baseInfo = new Vue({
el: '#step1',
data:{
@@ -1349,10 +1349,10 @@ var step2Vue = new Vue({
}
})
//document.addEventListener('plusready', onPlusReady, false);
//function onPlusReady() {
// var self = plus.webview.currentWebview();
// hsId = self.hsId
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
hsId = self.hsId
if(hsId){
//如果是修改置换建议,则默认将值填入
axios.get(BASE_PATH + "/rest/changeHouse/loadHouseSubInfo",{
@@ -1398,7 +1398,7 @@ var step2Vue = new Vue({
console.log(error);
});
}
//}
}
//填充房产价格信息
function addBaseHouseInfo(obj){
@@ -1761,7 +1761,7 @@ $("#getSuggest_btn").click(function(){
axios.post(BASE_PATH + "/rest/changeHouse/add", datas).then(function (response) {
var hsId = response.data.data;
if(hsId){
clicked('views/changeHouse/result.html',true,false,{},{hsId:hsId});
clicked('/views/changeHouse/result.html',true,false,{},{hsId:hsId});
}
$.hideIndicator();
@@ -1817,6 +1817,11 @@ $("#citySearchInp").bind('keyup', function() {
search();
});
function openAddHouse(){
alert("ssss")
clicked('/views/house/add.html',true,false,{},{});
}
</script>
</body>
+31 -86
View File
@@ -33,7 +33,7 @@
<div class="page-group">
<div class="page page-current">
<header class="bar bar-nav barBorder">
<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
<span class="icon icon-left"></span>
</button>
<h1 class="title">置换方案建议</h1>
@@ -97,8 +97,8 @@
<ul class="list-container">
<li v-for="ob in results">
<a href="01_index04_districtDetail.html" class="item-content">
<div class="item-inner">
<a class="item-content">
<div class="item-inner" @click="clickDistrict(ob.city, ob.region, ob.name, ob.id)">
<div class="item-title-row">
<div class="item-title">{{ob.name}}</div>
<div class="item-after"><em>¥{{ob.price}}元/㎡</em></div>
@@ -157,18 +157,23 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script>
//var hsId = "195941444484071424"
var hsId = "195930529403502592"
var hsId = ""
var hsId = "196310294262185984"
var region = ""
var tag = ""
var sort = ""
var baseInfo ;
// 加载flag
var loading = false;
// 最多可加载的条目
var maxItems = 100;
// 每次加载添加多少条目
var itemsPerLoad = 8;
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
hsId = self.hsId
baseInfo = new Vue({
initHouseSubtitution();
function initHouseSubtitution(){
baseInfo = new Vue({
el: '#resultDiv',
data:{
matchCount:0,
@@ -252,16 +257,21 @@ function onPlusReady() {
loading = false;
$.attachInfiniteScroll($('.infinite-scroll'))
addItems(itemsPerLoad, 0);
},
clickDistrict: function(city, region, name, rid){
clicked('/views/district/detail.html',true,false,{},{city:city,region:region,name:name,rid:rid});
}
},
created:function(){
this.loadHsInfo();
}
});
});
}
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
hsId = self.hsId
baseInfo.loadHsInfo();
addItems(0, 0)
}
@@ -306,78 +316,10 @@ $(".order").on("click", function () {
$(".order i").addClass("icon-up");
});
/* 全部区域 */
/*$("#select_region .button").on("click", function () {
$(this).parents(".topic").find(".button").removeClass("active");
$(this).addClass("active");
var text = $("#select_region .button").eq(0).hasClass("active");
if(text){
$(".region a").text("全部区域");
}else{
$(".region a").text($(this).text());
}
$(".mask").hide();
$("#select_region").hide();
$(".region").removeClass("active");
$(".region i").removeClass("icon-up");
});*/
/* 小区标签 */
/*$(".reset_btn").on("click", function () {
$("#select_filter .button").removeClass("active");
});
$(".confirm_btn").on("click", function () {
$(".mask").hide();
$("#select_filter").hide();
$(".filter").removeClass("active");
$(".filter i").removeClass("icon-up");
});*/
/*$("#select_filter .button").on("click", function () {
if($(this).hasClass("active")){
$(this).removeClass("active");
}else{
$(this).addClass("active");
}
});*/
/* 智能排序 */
/*$("#select_order li").on("click", function () {
$(this).parents("#select_order").find(".item-title").removeClass("active");
$(this).parents("#select_order").find(".item-title i").removeClass("icon-check");
$(this).find(".item-title").addClass("active");
$(this).find(".item-title i").addClass("icon-check");
$(".order a").text($(this).text());
$(".mask").hide();
$("#select_order").hide();
$(".order").removeClass("active");
$(".order i").removeClass("icon-up");
});*/
/* 点击空白处隐藏 */
/*$(".mask").on("click", function () {
$(".mask").hide();
$("#select_region").hide();
$("#select_filter").hide();
$("#select_order").hide();
$(".region").removeClass("active");
$(".region i").removeClass("icon-up");
$(".filter").removeClass("active");
$(".filter i").removeClass("icon-up");
$(".order").removeClass("active");
$(".order i").removeClass("icon-up");
});*/
/* 页面底部无限加载事件 */
$.init()
// 加载flag
var loading = false;
// 最多可加载的条目
var maxItems = 100;
// 每次加载添加多少条目
var itemsPerLoad = 8;
addItems(0, 0)
function addItems(number, lastIndex) {
@@ -397,7 +339,10 @@ function addItems(number, lastIndex) {
pageSize:itemsPerLoad
}
}).then(function (response) {
var datas = response.data.data
var totalCount = response.data.data.totalCount
baseInfo.matchCount = totalCount
var datas = response.data.data.ret
if(datas){
for(var i=0;i<datas.length;i++){
var ob = datas[i]
@@ -99,6 +99,7 @@ Vue.component('base-info-component', {
loadDistrictInfo:function(){
axios.get("/rest/districts/detail", {
params: {
rid:rid,
city: city,
region:region,
name: name
@@ -107,6 +108,12 @@ Vue.component('base-info-component', {
var vo = response.data.data.detail
var cityPrice = response.data.data.cityPrice
var collected = response.data.data.collected
var sr = response.data.data.substitutionResult
var hs = response.data.data.houseSubstitution;
var house = response.data.data.houseInfo;
if(hs && sr){
addSubstitution(sr, hs, house);
}
if(cityPrice){
baseInfo.cityPrice = cityPrice
}
@@ -246,3 +253,55 @@ function getStarContent(starScore){
return html;
}
function addSubstitution(sr, hs, house){
var s = "购买 "+sr.name;
if(sr.intentionArea==0){
s += "50平米以下"
}else if(sr.intentionArea==1){
s += "50-70平米"
}else if(sr.intentionArea==2){
s += "70-90平米"
}else if(sr.intentionArea==3){
s += "90-110平米"
}else if(sr.intentionArea==4){
s += "110-150平米"
}else if(sr.intentionArea==5){
s += "150-200平米"
}else if(sr.intentionArea==6){
s += "200-300平米"
}else if(sr.intentionArea==7){
s += "300平米以上"
}
s += "的房子,总价预计约为"
if(sr.intentionArea==0){
s += parseInt(sr.maxTotalPrice/10000)+"万以内"
}else if(sr.intentionArea==7){
s += parseInt(sr.minTotalPrice/10000)+"万以上"
}else{
s += parseInt(sr.minTotalPrice/10000)+"-"+parseInt(sr.maxTotalPrice/10000)+"万"
}
var soufu_min=((sr.minTotalPrice * hs.shoufu/100)/10000)
var soufu_max=((sr.maxTotalPrice * hs.shoufu/100)/10000)
var initPrice = 0;
if(hs.substitutionType==1){
initPrice = hs.curMoney + house.totalPrice/10000;
}else if(hs.substitutionType==0){
initPrice = hs.curMoney
}
if(initPrice < soufu_min){
s +=",资金缺口约为"+((soufu_min-initPrice)-(soufu_max-initPrice))+"万";
}else if(initPrice > soufu_min && initPrice < soufu_max){
s += ",资金缺口约为"+(soufu_max-initPrice)+"万";
}else if(initPrice > soufu_max){
s += "。";
}
// <#if advertisement?? && advertisement.content?? && advertisement.content?length gt 0>
// <a <#if advertisement.link?? && advertisement.link?length gt 0>onclick="openUrl('${basePath}/message/openView?url=${basePath}/mad/adUrlLoad?adid=${advertisement.id!?c}')"</#if> ><#if advertisement.content??>${advertisement.content!}</#if><i class="icon icon-right icon-right01"></i></a></p>
// </#if>
$("#suggestDiv").text(s);
}
@@ -58,7 +58,9 @@ Vue.component('city_increase_ranking',{
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if (plus.webview.getWebviewById('views/house/houseDetail.html') != null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
}else{
//$(event.target).parent().children().removeClass("dn");
//$(event.target).addClass("dn");
@@ -80,7 +82,9 @@ Vue.component('city_increase_ranking',{
}
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
// loadMyCollectCity()
if(type == 0){
@@ -97,11 +101,17 @@ Vue.component('city_increase_ranking',{
console.log(error)
})
},function(){
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if (plus.webview.getWebviewById('views/house/houseDetail.html') != null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
});
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html') != null) {
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
}
})
}else{
@@ -77,7 +77,10 @@ Vue.component('city_potential_ranking',{
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
}else{
//$(event.target).parent().children().removeClass("dn");
//$(event.target).addClass("dn");
@@ -96,7 +99,10 @@ Vue.component('city_potential_ranking',{
}
}
}
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
reloadMyFocus()
reloadCityIncreaseRanking()
@@ -106,11 +112,16 @@ Vue.component('city_potential_ranking',{
console.log(error)
})
},function(){
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
});
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
}
})
}else{
+9 -10
View File
@@ -63,6 +63,10 @@
<h1 class="title">{{name}}</h1>
</header>
<div class="content">
<div class="topBg topBg02" id="suggestDiv">
<p>购买 龙盛佳苑 90-110㎡ 的房子,总价预计约为<em>587-717万</em>。<br><a href="">查看详情<i class="icon icon-right icon-right01"></i></a></p>
</div>
<div class="list-block media-list topList">
<ul>
<li>
@@ -122,9 +126,9 @@
</div>
<div class="content-block" id="trendDiv1">
<div class="buttons-row theme">
<a class="tab-link button active" onclick="clickLineChart(this)" t-v="6">半年</a>
<a class="tab-link button" onclick="clickLineChart(this)" t-v="12">一年</a>
<a class="tab-link button" onclick="clickLineChart(this)" t-v="36">三年</a>
<a class="tab-link button active" onclick="clickLineChart(6)" t-v="6">半年</a>
<a class="tab-link button" onclick="clickLineChart(12)" t-v="12">一年</a>
<a class="tab-link button" onclick="clickLineChart(36)" t-v="36">三年</a>
</div>
</div>
</div>
@@ -268,8 +272,8 @@ $.config = {router: false}
<script>
var city = "上海"
var region = "长宁"
var name = "新泾三村"
var region = "青浦"
var name = "南山雨果"
var mode = "line"
var lat;
var lng;
@@ -379,11 +383,6 @@ $(document).ready(function () {
});
</script>
<script>
var t1 = window.setInterval(loadMap,1000);
function loadMap(){
if(lng && lat){
@@ -344,8 +344,13 @@ function addManagement(id, houseStatus, liveStatus){
var status = response.data.status;
if(status){
$.toast(response.data.data);
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
}else{
$.toast(response.data.message);
}
+22 -6
View File
@@ -1845,9 +1845,17 @@ function checkIsLogin(){
}else{
addEvaluation();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
}
})
}else{
@@ -1891,15 +1899,23 @@ function addEvaluation(){
if(response.data.data!=null && response.data.data.success){
$("#evaluation_btn").removeAttr("disabled");
var id = response.data.data.id;
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){
getRequestId();
})
}else{
$("#evaluation_btn").removeAttr("disabled");
$.toast(response.data.message);
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
}
})
.catch(function (error) {
+46 -10
View File
@@ -64,7 +64,7 @@
<div class="item-title"><label><b>{{name}}</b></label><span class="span01">{{cityRegion}}</span></div>
</div>
<div class="item-title-row">
<div class="item-title"><small>{{houseRoomNum}}&nbsp;&nbsp;{{area}}m&nbsp;&nbsp;{{floor_height}}</small></div>
<div class="item-title"><small>{{houseRoomNum}}&nbsp;&nbsp;{{area}}m²&nbsp;&nbsp;{{floor_height}}</small></div>
</div>
</div>
</div>
@@ -226,7 +226,40 @@
</div>
</div>
</div>
<div class="topic">
<div class="topic">
<div class="topicTitle">小区走势分析</div>
<div class="topicContent" style="padding:0;padding-bottom:0.75rem;">
<div class="topicTitle topicTitle01" style="position:relative;">均价&nbsp;&nbsp;
<div class="icon01Box">
<i class="icon icon-chart01a" onclick="lineChart()"></i>
<i class="icon icon-chart01 dn" onclick="kLineChart()"></i>
</div>
<div class="content-block" id="trendDiv1">
<div class="buttons-row theme">
<a class="tab-link button active" onclick="clickLineChart(6)" t-v="6">半年</a>
<a class="tab-link button" onclick="clickLineChart(12)" t-v="12">一年</a>
<a class="tab-link button" onclick="clickLineChart(36)" t-v="36">三年</a>
</div>
</div>
</div>
<div class="chart01Box">
<div class="chart" id="chart01a"></div>
<div class="chart" id="chart01"></div>
</div>
<div class="topicTitle topicTitle01" style="position:relative;border-top:solid 1px #e7e7e7;">租金
<div class="content-block">
<div class="buttons-row theme" id="trendDiv2">
<a t-v="2" id="trendDivTab2" class="tab-link button active" onclick="showLoadRentTrends(2)">半年</a>
<a t-v="3" id="trendDivTab3" class="tab-link button" onclick="showLoadRentTrends(3)">一年</a>
</div>
</div>
</div>
<div class="chart" id="chart02"></div>
</div>
</div>
<!--<div class="topic">
<div class="topicTitle">小区走势分析</div>
<div class="topicContent" style="padding:0;padding-bottom:0.75rem;">
<div class="topicTitle topicTitle01" style="position:relative;">均价
@@ -249,7 +282,8 @@
</div>
<div class="chart" id="chart02"></div>
</div>
</div>
</div>-->
<div class="topic" v-show="rentRooms.length>0">
<div class="topicTitle" style="border-bottom:solid 1px #e7e7e7;">小区本月租金</div>
<div class="topicContent" style="padding:0.5rem 0;">
@@ -329,6 +363,7 @@ var name;
var oriCity;
var oriRegion;
var oriName;
var mode = "line"
//扩展API加载完毕,现在可以正常调用扩展API
function onPlusReady(){
var self = plus.webview.currentWebview();
@@ -529,10 +564,14 @@ function addManagement(id, houseStatus, liveStatus){
}).then(function (response) {
var status = response.data.status;
if(status){
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
$.toast("修改状态成功!");
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}else{
$.toast(response.data.message);
}
@@ -561,10 +600,7 @@ function loadMap(){
}
function loadChart(){
if(city && region && name){
/* 小区均价分析 */
loadKLineData(city, region, name);
/* 小区租金走势 */
loadRentTrends(city, region, name);
inintChart(city, region, name);
window.clearInterval(t2);
}
}
+10 -3
View File
@@ -1571,10 +1571,17 @@ function addFocus(city){
reloadMyFocus()
reloadCityIncreaseRanking()
reloadCityPotentialRanking()
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
var curDatas = response.data.data
if(curDatas && curDatas.length>=0){
if(!IsInArray(curDatas, city)){
@@ -155,7 +155,9 @@ function addManagement(id, houseStatus, liveStatus){
$.toast(response.data.data);
$('.loadingBgDiv').show();
checkIsLogin();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
//plus.webview.getWebviewById('yfindex.html').reload();
}else{
$.toast(response.data.message);
+12 -4
View File
@@ -137,7 +137,7 @@ var city;
var region;
//var picUrl = '_www/logo.png';
var picUrl = '../../img/default_share.png';
var picUrl = '_www/img/default_share.png';
//新闻评论列表
@@ -504,9 +504,17 @@ $(".collection").on("click", function () {
function doCollect() {
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload()
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
doCollect();
})
return;
+11 -3
View File
@@ -121,9 +121,17 @@ function logout() {
localStorage.removeItem("user_token");
localStorage.removeItem("user_token_add_time");
//退出登录之前loading下个人中心
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
timer.start();
}
+83 -121
View File
@@ -9,7 +9,6 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="../../css/sm.css">
<link rel="stylesheet" href="../../css/light7-swiper.min.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/theme-orange.css">
@@ -51,45 +50,26 @@
<img src="../../images/headPortrait.png">
<p><a class="button theme" href="#" onclick="gotoLogin()" >立即登录</a></p>
</div>
<div class="topic" style="">
<div class="topicContent" style="padding-left:0;padding-right:0;padding-bottom:0;">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="topicContent_center home">
<div>
<i class="icon icon-personal01"></i>
<span>公积金查询</span>
</div>
<div>
<i class="icon icon-personal02"></i>
<span>算税费</span>
</div>
<div onclick="window.location.href='#'">
<i class="icon icon-personal03"></i>
<span>贷款评估</span>
</div>
<div>
<i class="icon icon-personal04"></i>
<span>算房贷</span>
</div>
</div>
</div>
<div class="swiper-slide">
<div class="topicContent_center home">
<div>
<i class="icon icon-personal01"></i>
<span>公积金查询</span>
</div>
<div>
<i class="icon icon-personal02"></i>
<span>算税费</span>
</div>
</div>
</div>
<div class="topic">
<div class="topicContent homeBox" style="padding-left:0;padding-right:0;">
<div class="topicContent_center home homeWin">
<div>
<i class="icon icon-personal01"></i>
<span>公积金查询</span>
</div>
<div class="swiper-pagination"></div>
</div>
<div>
<i class="icon icon-personal02"></i>
<span>算税费</span>
</div>
<div onclick="window.location.href='#'">
<i class="icon icon-personal03"></i>
<span>贷款评估</span>
</div>
<div>
<i class="icon icon-personal04"></i>
<span>算房贷</span>
</div>
</div>
</div>
</div>
<div class="buttons-tab fixed-tab theme" data-offset="44">
@@ -141,52 +121,29 @@
<p id="user_mobile"><br><span class="tag"><!--<small>土豪</small>--></span></p>
</div>
<div class="topic">
<div class="topicContent" style="padding-left:0;padding-right:0;padding-bottom:0;">
<div class="swiper-container">
<div class="swiper-wrapper" id="toolList">
<div class="swiper-slide">
<div class="topicContent_center home">
<div>
<i class="icon icon-personal01"></i>
<span>公积金查询</span>
</div>
<div>
<i class="icon icon-personal02"></i>
<span>算税费</span>
</div>
<div onclick="window.location.href='#'">
<i class="icon icon-personal03"></i>
<span>贷款评估</span>
</div>
<div>
<i class="icon icon-personal04"></i>
<span>算房贷</span>
</div>
</div>
</div>
<!--<div class="swiper-slide">
<div class="topicContent_center home">
<div>
<i class="icon icon-personal01"></i>
<span>公积金查询</span>
</div>
<div>
<i class="icon icon-personal02"></i>
<span>算税费</span>
</div>
</div>
</div>-->
<!--<div class="swiper-slide">
<div class="topicContent_center home">
<div>
<img v-bind:src="t.iconUrl" style="width:45px;height:45px;margin:0 auto;" v-on:click="goto(t.url)">
<span>{{t.toolName}}</span>
</div>
</div>
</div>-->
<div class="topicContent homeBox" style="padding-left:0;padding-right:0;">
<div class="topicContent_center home homeWin" id="toolList">
<div>
<i class="icon icon-personal01"></i>
<span>公积金查询</span>
</div>
<div class="swiper-pagination"></div>
</div>
<div>
<i class="icon icon-personal02"></i>
<span>算税费</span>
</div>
<div onclick="window.location.href='#'">
<i class="icon icon-personal03"></i>
<span>贷款评估</span>
</div>
<div>
<i class="icon icon-personal04"></i>
<span>算房贷</span>
</div>
<div v-for="(t,index) in merchantTools">
<img v-bind:src="t.iconUrl" style="width:45px;height:45px;margin:0 auto;" v-on:click="goto(t.url)">
<span>{{t.toolName}}</span>
</div>
</div>
</div>
</div>
<div class="buttons-tab fixed-tab theme" data-offset="44" id="tab" v-cloak>
@@ -292,14 +249,9 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/user/myFocus.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/user/myCollect.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/user/myHouse.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/light7-swiper.min.js" charset="utf-8"></script>
<script>
/* tab滑动 */
$(function() {
$(".swiper-container").swiper();
});
/* 说明-房产等级 */
$(document).on('click','.alert-text-title', function () {
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
@@ -319,17 +271,20 @@ var tab = new Vue({
mc_num:"0"
}
})
//var toolList = new Vue({
// el:"#toolList",
// data:{
// merchantTools:[]
// },
// method:{
// goto:function(url){
// alert(url)
// }
// }
//})
var toolList = new Vue({
el:"#toolList",
data:{
merchantTools:[]
},
methods:{
goto:function(url){
alert(url)
if (url != null && url != "") {
clicked('../webview_embed.html', true,false,{},{url:url})
}
}
}
})
//判断是否登录
function checkIsLogin(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
@@ -353,9 +308,14 @@ function checkIsLogin(){
//跳转登录方法, 考虑回调
function gotoLogin(){
clicked('/views/user/codeSms.html',true,false,{},{},function(){
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
//plus.webview.getWebviewById('yfindex.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
checkIsLogin();
})
}
@@ -484,22 +444,24 @@ document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){
axios.get(BASE_PATH + "/rest/usertool/merchantToolList",{params:{position:0}}).then(function(response){
var toolList = response.data.data;
var html = "";
for(var i=0;i<toolList.length;i++){
html += (i%4==0?'':'<div class="swiper-slide">')+
(i%4==0?'':'<div class="topicContent_center home">')+
'<div>'+
'<img src="'+toolList[i].iconUrl+'" style="width:45px;height:45px;margin:0 auto;" onclick="goto(\''+toolList[i].url+'\')">'+
'<span>'+toolList[i].toolName+'</span>'+
'</div>'+
(i%4==3?'':'</div>')+
(i%4==3?'':'</div>');
}
if(toolList.length%4!=3){
html += '</div>'+'</div>';
}
$("#toolList").append(html);
toolList.merchantTools = response.data.data;
/* 获取homeWin div个数并计算homeWin宽度 */
$(".homeWin").css("width",(90*(4+response.data.data.length))+"px");
// var html = "";
// for(var i=0;i<toolList.length;i++){
// html += (i%4==0?'':'<div class="swiper-slide">')+
// (i%4==0?'':'<div class="topicContent_center home">')+
// '<div>'+
// '<img src="'+toolList[i].iconUrl+'" style="width:45px;height:45px;margin:0 auto;" onclick="goto(\''+toolList[i].url+'\')">'+
// '<span>'+toolList[i].toolName+'</span>'+
// '</div>'+
// (i%4==3?'':'</div>')+
// (i%4==3?'':'</div>');
// }
// if(toolList.length%4!=3){
// html += '</div>'+'</div>';
// }
// $("#toolList").append(html);
}).catch(function(error){
console.log(error);
});
+10 -4
View File
@@ -118,7 +118,7 @@
<div class="content-block-title cardNearbyName" id="nearAddress"><i class="icon icon-address02"></i><span id="nearDistrictSpan"></span><i class="icon arrow-up"></i></div>
<div class="cardNearbyBox" id="nearDistricts">
</div>
<div class="content-block-title recommend" id="todayNews">今日推荐</div>
<div class="content-block-title recommend dn" id="todayNews">今日推荐</div>
<div id="newsList">
</div>
@@ -1221,6 +1221,7 @@ var lat = 0;
var lng = 0;
var address = "";
var cat;
var todayDeployFlag = true;
var timestamp1 = new Date().getTime();
document.addEventListener('plusready', onPlusReady, false);
//扩展API加载完毕,现在可以正常调用扩展API
@@ -1228,7 +1229,6 @@ function onPlusReady(){
getPosition();
versionUpdate();
}
// 获取当前用户位置
function getPosition(){
plus.geolocation.getCurrentPosition(function(p){
@@ -1257,7 +1257,7 @@ function getPosition(){
$("#input_city").text(city);
}
localStorage.setItem("init_city", city);
addLocation(lat,lng);
//addLocation(lat,lng);
$(".nowCity").text(city);
/*city="北京";
region="";
@@ -1281,7 +1281,7 @@ function getPosition(){
$("#input_city").text(city);
initRegionSelect(city);
localStorage.setItem("init_city", city);
addLocation(lat,lng);
//addLocation(lat,lng);
initBaseInfo(city,"","",0,0);
$("#ShangHaiDiv").show();
$("#otherCityDiv").hide();
@@ -1556,13 +1556,19 @@ function initNews(page){
// 加载完毕,则注销无限加载事件,以防不必要的加载
$.detachInfiniteScroll($('.infinite-scroll'));
}
if(page==1 && response.data.data.list.length == 0){
$("#todayNews").hide();
}else{
$("#todayNews").show();
}
for(var i in response.data.data.list){
dataObj.push(response.data.data.list[i])
if(dataObj[i].todayDeploy && todayDeployFlag){
todayDeployFlag = false;
$("#todayNews").show();
}
}
lastIndex = $('.cardInfo').length;
itemsPerLoad = response.data.data.list.length;