diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css
index 02bcd60..d083bfa 100644
--- a/fangija-zsyf/css/main.css
+++ b/fangija-zsyf/css/main.css
@@ -478,13 +478,12 @@ input::-webkit-input-placeholder{
.recommend + .cardInfo{border-top:none;}
.cardInfo01{color:#333;}
-.cardInfo01 > img{width:100%;height:180px;}
+.cardInfo01 > img{width:100%;}
.cardInfo01 span{font-size:0.6rem;color:#666;}
.cardInfo01 .card-header{padding:0;font-size:0.85rem;}
.cardInfo01 .card-content-inner{padding:0;}
.cardInfo01 .card-footer{padding:0;}
-.cardInfo01a > img{height:142px;}
.cardInfo01a .card-content-inner .tag{display:block;margin-bottom:0.5rem;}
.cardInfo01a .card-content-inner .tag small{margin-left:0;margin-right:0.2rem;}
.cardInfo01a .card-footer span{font-size:0.7rem;color:#999;text-align:left;width:50%;}
diff --git a/fangija-zsyf/js/axiosPlugin.js b/fangija-zsyf/js/axiosPlugin.js
index b302d7b..531b3ee 100644
--- a/fangija-zsyf/js/axiosPlugin.js
+++ b/fangija-zsyf/js/axiosPlugin.js
@@ -11,7 +11,6 @@ axios.interceptors.request.use(function (config) {
return Promise.reject(error);
});
-var showTimeOutTime = 0;
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
try {
@@ -22,14 +21,7 @@ axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
try {
- if (error.toString().indexOf('timeout') > -1) {
- var curTime = new Date();
- if (curTime - showTimeOutTime > 5000) {
- plus.nativeUI.alert("请求超时");
- showTimeOutTime = new Date();
- }
- plus.nativeUI.closeWaiting();
- }else if(error=="Error: Network Error"){
+ if(error=="Error: Network Error" || error.toString().indexOf('timeout') > -1){
if(plus.webview.getWebviewById('error.html')==null){
clicked('error.html',true,false,{},{},function(){
window.location.reload();
diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js
index 70cf389..0f13b8d 100644
--- a/fangija-zsyf/js/user/myHouse.js
+++ b/fangija-zsyf/js/user/myHouse.js
@@ -128,12 +128,12 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
}else{
html += "其它";
}
- html += '立即申请';
+ //控制贷款按钮是否可以显示,便于ios版本审核
+ if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
+ html += '立即申请';
+ }else{
+ html += '';
+ }
}
$('#myhouse').append(html);
-}
-
-/* 说明-房产等级 */
-$(document).on('click','.alert-text-title', function () {
- $.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
-});
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html
index cc63ce0..969571d 100644
--- a/fangija-zsyf/main.html
+++ b/fangija-zsyf/main.html
@@ -1,6 +1,5 @@
-
+
我要贷款
@@ -333,7 +333,12 @@ var oriName;
function onPlusReady(){
var self = plus.webview.currentWebview();
houseId = self.houseId; //type为1时是我的房产
- //houseId="106777351102136320";
+ //控制贷款按钮是否可以显示,便于ios版本审核
+ if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
+ $('#gotoLoanApply').show();
+ }else{
+ $('#gotoLoanApply').hide();
+ }
init();
}
var baseInfo = new Vue({
diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html
index 8a12187..9dc2545 100644
--- a/fangija-zsyf/views/house/houseList.html
+++ b/fangija-zsyf/views/house/houseList.html
@@ -115,7 +115,7 @@ $.config = {router: false}
diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html
index 40b3e28..9bef9ff 100644
--- a/fangija-zsyf/views/house/houseManageList.html
+++ b/fangija-zsyf/views/house/houseManageList.html
@@ -104,7 +104,7 @@ $.config = {router: false}
diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html
index 14426db..030e992 100644
--- a/fangija-zsyf/views/user/userInfo.html
+++ b/fangija-zsyf/views/user/userInfo.html
@@ -251,7 +251,7 @@ $(document).on('click','.alert-text-title', function () {
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
});
-//初始化init
+//初始化init(init方法必须调用,屏蔽后,无线下拉刷新无效果)
$.init();
//定义个人手机号,贷款页面需要传参数
@@ -416,9 +416,11 @@ function openSettingPage() {
clicked('../setting/setting.html',true,false,{},{},function(){})
}
-$(document).ready(function () {
- checkIsLogin();
-});
+document.addEventListener('plusready', onPlusReady, false);
+
+function onPlusReady(){
+ checkIsLogin();
+}
diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html
index 4ac9ae3..f0d5702 100644
--- a/fangija-zsyf/yfindex.html
+++ b/fangija-zsyf/yfindex.html
@@ -1538,7 +1538,8 @@ function initNews(page){
axios.get("/rest/news/list", {
params: {
city: $("#input_city").text(),
- page:page
+ page:page,
+ deviceId:plus.device.uuid
}
})
.then(function (response) {
@@ -1591,44 +1592,85 @@ $("#region").click(function(e){
})*/
$("body").delegate(".vote01 .icon-light-grey", "click", function () {
+ if($(".vote01 .icon-light-grey").attr("class").indexOf("red") > 0){
+ $.toast("已投票");
+ return;
+ }
var id = $(this).attr("data-val");
var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split(" ")[0].replace("票",""))+1;
var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split(" ")[0].replace("票",""));
var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
var voteNoFavorCountRate = 100-voteFavorCountRate;
- $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
- $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
- $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
- $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
- doVote(id,0);
+ axios.get("/rest/news/vote", {
+ params: {
+ newsId: id,
+ type:0,
+ deviceId:plus.device.uuid
+ }
+ })
+ .then(function (response) {
+ if(!response.data.status){
+ $.toast(response.data.message);
+ } else {
+ if (!response.data.data){
+ $(".vote01 .icon-light-grey").addClass("icon-light-red");
+ $(".vote02 .icon-light-grey").removeClass("icon-light-blue");
+ $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
+ $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
+ $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
+ $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
+ } else {
+ $.toast("已投票");
+ }
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ $.toast("投票失败,请重试");
+ });
+
});
$("body").delegate(".vote02 .icon-light-grey", "click", function () {
+ if($(".vote01 .icon-light-grey").attr("class").indexOf("blue") > 0){
+ $.toast("已投票");
+ return;
+ }
var id = $(this).attr("data-val");
var voteFavorCount = parseInt($("#voteFavorCount_"+id).text().split(" ")[0].replace("票",""));
var voteNoFavorCount = parseInt($("#voteNoFavorCount_"+id).text().split(" ")[0].replace("票",""))+1;
var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
var voteNoFavorCountRate = 100-voteFavorCountRate;
- $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
- $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
- $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
- $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
- doVote(id,1);
-});
-
-function doVote(id,flag){
axios.get("/rest/news/vote", {
params: {
newsId: id,
- type:flag
+ type:1,
+ deviceId:plus.device.uuid
}
})
.then(function (response) {
+ if(!response.data.status){
+ $.toast(response.data.message);
+ } else {
+ if (!response.data.data){
+ $("#voteFavorCount_"+id).text(voteFavorCount+'票 '+voteFavorCountRate+'%');
+ $("#voteFavorCountRate_"+id).css("width",voteFavorCountRate+'%');
+ $("#voteNoFavorCount_"+id).text(voteNoFavorCount+'票 '+voteNoFavorCountRate+'%');
+ $("#voteNoFavorCountRate_"+id).css("width",voteNoFavorCountRate+'%');
+ $(".vote01 .icon-light-grey").removeClass("icon-light-red");
+ $(".vote02 .icon-light-grey").addClass("icon-light-blue");
+ } else {
+ $.toast("已投票");
+ }
+ }
})
.catch(function (error) {
console.log(error);
+ $.toast("投票失败,请重试");
});
-}
+
+});
+
function changeRegion(){
axios.get("/rest/index/home", {
@@ -1863,11 +1905,20 @@ function addItems(number, lastIndex) {
voteNoFavorCountRate = 100-voteFavorCountRate;
}
+ var colorClass = "icon-light-grey";
+ var colorClass2 = "icon-light-grey";
+ if (dataObj[i].vote) {
+ if (dataObj[i].voteType == 0) {
+ colorClass = "icon-light-grey icon-light-red";
+ } else {
+ colorClass2 = "icon-light-grey icon-light-blue";
+ }
+ }
html += '
'+
- ''+dataObj[i].voteFavorText+''+
+ ''+dataObj[i].voteFavorText+''+
'
'+
- '
'+dataObj[i].voteNoFavorText+''+
+ '
'+dataObj[i].voteNoFavorText+''+
'
V.S ';
}
}
@@ -2668,15 +2719,7 @@ function openDistWindow(city, region, name){
}
});*/
-/* 投票 */
-$("body").delegate(".vote01 .icon-light-grey", "click", function () {
- $(".vote01 .icon-light-grey").addClass("icon-light-red");
- $(".vote02 .icon-light-grey").removeClass("icon-light-blue");
-});
-$("body").delegate(".vote02 .icon-light-grey", "click", function () {
- $(".vote01 .icon-light-grey").removeClass("icon-light-red");
- $(".vote02 .icon-light-grey").addClass("icon-light-blue");
-});
+
$("body").delegate("#hotList ul li", "click", function () {
var select_city = $(this).find("a").attr("data-city");