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

This commit is contained in:
raoyanhui
2018-05-07 12:59:23 +08:00
20 changed files with 214 additions and 55 deletions
+1 -6
View File
@@ -1,14 +1,9 @@
/**服务端地址**/
//var BASE_PATH = "http://youfang.fangjia.com";
//var BASE_PATH = "http://192.168.10.128:8084";
<<<<<<< HEAD
var BASE_PATH = "http://192.168.10.47:8086";
//var BASE_PATH = "http://192.168.10.161:8084";
=======
//var BASE_PATH = "http://192.168.10.47:8086";
>>>>>>> 9c25ef0b2e3f9e2a19df5038da587d6c53827469
//var BASE_PATH = "http://192.168.10.53:8084";
var BASE_PATH = "http://192.168.10.161:8084";
//var BASE_PATH = "http://192.168.10.161:8084";
//var BASE_PATH = "http://192.168.10.170:8084";
//var BASE_PATH = "http://192.168.10.171:8084";
//var BASE_PATH = "http://192.168.10.164:8084";
+2
View File
@@ -1429,9 +1429,11 @@ input[type=range]::-webkit-slider-thumb {
}
@media only screen and (-webkit-min-device-pixel-ratio:2){
.list-block .item-inner:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
.buttons-tab:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
}
@media only screen and (-webkit-min-device-pixel-ratio:3){
.list-block .item-inner:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
.buttons-tab:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
}
+5 -2
View File
@@ -542,8 +542,11 @@ function showRentChart2(categories, series, roomDatas){
fontSize: 12
},
formatter: function (params) {
var res = params[0].name + ' <br/>' + "租金:"+params[0].value + '元/月';
return res;
if(params[0].value){
var res = params[0].name + ' <br/>' + "租金:"+params[0].value + '元/月';
return res;
}
}
},
grid:{
+7
View File
@@ -189,6 +189,13 @@ var historyVue = new Vue({
histories: histories
},methods: {
openHistoryDetail:function(index) {
var eventType = "historyDistrictClick";
var dataMap = {};
dataMap["city"]=this.histories[index].city;
dataMap["region"]=this.histories[index].region;
dataMap["name"]=this.histories[index].name;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
if(cat == "rent"){
clicked('views/rent/rent.html',true,false,{},{city:this.histories[index].city,region:this.histories[index].region,name:this.histories[index].name})
}else{
+8 -5
View File
@@ -75,11 +75,14 @@ function messageGoto(_this,operation,operationPage,mid){
clicked('/views/message/detail.html',true,false,{},{mid:mid},function(){})
}
if(operation==1){
var pages = operationPage+'.html';
if(plus.webview.getWebviewById(pages)==null){
plus.webview.create(pages, pages, subpage_style);
}
plus.webview.show(pages);
// var pages = operationPage+'.html';
// if(plus.webview.getWebviewById(pages)==null){
// plus.webview.create(pages, pages, subpage_style);
// }
// plus.webview.show(pages);
mui.fire(plus.webview.getWebviewById('HBuilder'),'switchView',{
name:"views/house/houseDetail.html"
});
}
if(operation==2){
if (operationPage != null && operationPage != "") {
+40 -5
View File
@@ -35,17 +35,17 @@
<span class="mui-tab-label">首页</span>
</a>
<a class="mui-tab-item" href="views/house/houseDetail.html">
<a class="mui-tab-item" id="views/house/houseDetail.html" href="views/house/houseDetail.html">
<span class="mui-icon iconfont icon-tab02"></span>
<span class="mui-tab-label">行情</span>
</a>
<a class="mui-tab-item" href="views/house/houseManageList.html">
<a class="mui-tab-item" id="views/house/houseManageList.html" href="views/house/houseManageList.html">
<span class="mui-icon iconfont icon-tab03"></span>
<span class="mui-tab-label">评估</span>
</a>
<a class="mui-tab-item" id="selfInfo" href="views/user/userInfo.html">
<a class="mui-tab-item" id="views/user/userInfo.html" href="views/user/userInfo.html">
<span class="mui-icon iconfont icon-tab04"></span>
<span class="mui-tab-label">我的</span>
</a>
@@ -72,8 +72,6 @@
localStorage.removeItem("user_token");
localStorage.removeItem("user_token_add_time");
}
//document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index');
//document.getElementById("selfInfo").setAttribute("href", BASE_PATH + '/selfInfo/index');
//mui初始化
mui.init();
var subpages = ['yfindex.html', 'views/house/houseDetail.html', 'views/house/houseManageList.html', 'views/user/userInfo.html'];
@@ -217,6 +215,43 @@
}
})
}
// 推送消息跳转页面
window.addEventListener('switchView',function(event){
console.log(event.detail.name)
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
var targetTab = event.detail.name;
if (targetTab == activeTab) {
return;
}
//若为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动画,且保存变量
var temp = {};
temp[targetTab] = "true";
mui.extend(aniShow,temp);
plus.webview.show(targetTab,"fade-in",300);
}
//隐藏当前;
plus.webview.hide(activeTab);
//更改当前活跃的选项卡
activeTab = targetTab;
var defaultTab = document.getElementById(targetTab);
//模拟首页点击
mui.trigger(defaultTab, 'tap');
//切换选项卡高亮
var current = document.querySelector(".mui-bar-tab>.mui-tab-item.mui-active");
if (defaultTab !== current) {
current.classList.remove('mui-active');
defaultTab.classList.add('mui-active');
}
});
</script>
</body>
+3 -1
View File
@@ -1502,7 +1502,9 @@
"yfindex.html",
"views/house/houseDetail.html"
],
"refer": [],
"refer": [
"views/user/userInfo.html"
],
"priority": 0
},
"yfindex.html": {
+5 -1
View File
@@ -148,7 +148,11 @@ function run(){
}
return false;
}
time.innerHTML = time.innerHTML * 1 - 1;
var ntime = time.innerHTML * 1 - 1;
if(ntime <= 0) {
ntime = 0;
}
time.innerHTML = ntime;
}
</script>
+29 -3
View File
@@ -1353,9 +1353,21 @@ document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
hsId = self.hsId
houseId = self.houseId
if(hsId){
//如果是修改置换建议,则默认将值填入
axios.get(BASE_PATH + "/rest/changeHouse/loadHouseSubInfo",{
updateChangeSubtation(hsId);
}
if(houseId){
//小区报告页带入
fillHouseInfo(houseId);
}
}
//修改置换建议填充默认值
function updateChangeSubtation(hsId){
axios.get(BASE_PATH + "/rest/changeHouse/loadHouseSubInfo",{
params:{
hsId:hsId
}
@@ -1397,7 +1409,22 @@ function onPlusReady() {
}).catch(function (error) {
console.log(error);
});
}
}
function fillHouseInfo(houseId){
axios.get(BASE_PATH + "/rest/index/loadHouse",{
params:{
houseId:houseId
}
}).then(function (response) {
var data = response.data.data;
if(data){
addBaseHouseInfo(data);
baseInfo.houseId = hs.houseId
}
}).catch(function (error) {
console.log(error);
});
}
//填充房产价格信息
@@ -1818,7 +1845,6 @@ $("#citySearchInp").bind('keyup', function() {
});
function openAddHouse(){
alert("ssss")
clicked('/views/house/add.html',true,false,{},{});
}
+2 -2
View File
@@ -129,7 +129,7 @@
<div class="noData">
<img src="../../images/noData.png">
<p>抱歉,没有找到适合您的小区</p>
<a click="updateChangeHouse()">修改置换需求</a>
<a onclick="updateChangeHouse()">修改置换需求</a>
</div>
</div>
@@ -399,7 +399,7 @@ $(document).on('infinite', '.infinite-scroll-bottom', function() {
});
function updateChangeHouse(){
clicked('views/changeHouse/index.html',true,false,{},{hsId:hsId});
clicked('/views/changeHouse/index.html',true,false,{},{hsId:hsId});
}
</script>
@@ -303,5 +303,6 @@ function addSubstitution(sr, hs, house){
// <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);
$("#suggestDiv").show();
}
+1 -1
View File
@@ -63,7 +63,7 @@
<h1 class="title">{{name}}</h1>
</header>
<div class="content">
<div class="topBg topBg02" id="suggestDiv">
<div class="topBg topBg02 dn" id="suggestDiv">
<p>购买 龙盛佳苑 90-110㎡ 的房子,总价预计约为<em>587-717万</em>。<br><a href="">查看详情<i class="icon icon-right icon-right01"></i></a></p>
</div>
@@ -29,7 +29,7 @@
<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 open-popover" onclick="shareHref()">
<button class="button button-link button-nav pull-right open-popover" onclick="share()">
<span class="icon icon-share"></span>
</button>
<h1 class="title">评估报告</h1>
@@ -151,11 +151,11 @@ $.config = {router: false}
var sharehrefDes = "小区详情介绍!";
var shareId='';
var picUrl = '../../img/default_share.png';
var hid = "";
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){
var self = plus.webview.currentWebview();
var hid = self.hid;
hid = self.hid;
var houseStatus = ""
shareUrl = shareUrl+"hid="+hid;
@@ -202,6 +202,13 @@ $.config = {router: false}
},
methods:{
feedback:function(i,event){
var eventType = "priceFeedbackClick";
var dataMap = {};
dataMap["hid"]=hid
dataMap["reason"]=i
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
if($(event.target).hasClass("theme")){
return;
}
@@ -352,6 +359,12 @@ $.config = {router: false}
//添加管理AJAX请求
function addManagement(id, houseStatus, liveStatus){
var eventType = "addManageClick";
var dataMap = {};
dataMap["hid"]=id;
dataMap["liveStatus"]=liveStatus;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
axios.post(BASE_PATH + "/rest/evaluate/addManagement",
{
id: id,
@@ -542,6 +555,17 @@ function openaddWindow(){
clicked('/views/house/add.html',true,false,{},{type:1},function(){
})
}
function share(){
var eventType = "shareEvaluateClick";
var dataMap = {};
dataMap["hid"]=hid;
dataMap["type"]="evaluate";
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
shareHref();
}
</script>
</body>
+4 -1
View File
@@ -195,7 +195,7 @@
</ul>
</div>
<div class="content-block">
<p><button id="evaluation_btn" class="button button-big button-fill theme" id="evaluation_btn" style="width:100%">提交评估</button></p>
<p><button id="evaluation_btn" class="button button-big button-fill theme" style="width:100%">提交评估</button></p>
</div>
</div>
</div>
@@ -1891,6 +1891,9 @@ function addEvaluation(){
area:$("#input_area").val(),
houseStatus:1}
}
var eventType = "evaluateSubmitClick";
saveBehaviorLog(eventType,data); //保存用户点击事件
axios.get("/rest/index/checkEvalPrice", {
params: data
})
+28 -4
View File
@@ -34,7 +34,7 @@
<!--<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
<span class="icon icon-left"></span>
</button>-->
<button class="button button-link button-nav pull-right" id="shareButton" onclick="shareHref()">
<button class="button button-link button-nav pull-right" id="shareButton" onclick="share()">
<span class="icon icon-share"></span>
</button>
<h1 class="title">房产行情</h1>
@@ -1502,15 +1502,24 @@ $("a[href='#tabQuotation1'],a[href='#tabQuotation0']").click(function(){
$("#tabCityDiv a").removeClass("active");
$("#contentTabDiv > .tab").removeClass("active");
$("#cityInfo").hide()
var eventType = "changeHotCityClick";
var dataMap = {};
dataMap["city"]=$(this).text();
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
})
function clickCity(val){
var eventType = "changeHotCityClick";
var dataMap = {};
dataMap["city"]=val;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
shareUrl = BASE_PATH+"/house/cityShare?city="+val;
$("#shareButton").show();
city = val;
plus.nativeUI.showWaiting();
$("#cityInfo").show()
$("#tabCityDiv a").removeClass("active");
@@ -1532,7 +1541,7 @@ function clickCity(val){
$("#trendDiv a").removeClass("active")
$("#trendDiv a[v='2']").addClass("active")// 默认走势显示半年
$("#tabQuotation1").removeClass("active");
$("#tabQuotation0").removeClass("active");
plus.nativeUI.closeWaiting();
@@ -1610,6 +1619,11 @@ function addFocus(city){
}
})
}else{
var eventType = "addHotCityClick";
var dataMap = {};
dataMap["city"]=city;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
axios.get("/rest/quotations/collectCity",{params:{city:city,type:0}}).then(function(response){
if(response.data.status){
reloadMyFocus()
@@ -1636,11 +1650,21 @@ function addFocus(city){
}
function hotCity(city){
clicked('../house/cityDetail.html',true,false,{},{city:city},function(){
});
}
function share(){
var eventType = "shareHotCityClick";
var dataMap = {};
dataMap["city"]=$("#tabCityDiv .active").text();
dataMap["type"]="hotCity";
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
shareHref();
}
</script>
@@ -302,6 +302,10 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
//立即评估
function openaddWindow(){
var eventType = "evaluateClick";
var dataMap = {};
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
clicked('/views/house/add.html',true,false,{},{type:1},function(){
})
}
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title id="title"></title>
<title id="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">
+7
View File
@@ -16,6 +16,13 @@
<style>
.list-block .item-text{-webkit-line-clamp:unset;}
img{
width: 100%;
height: auto;
text-align: center;
display: table-cell;
vertical-align: middle;
}
</style>
</head>
+31 -20
View File
@@ -54,7 +54,7 @@
<img src="../../images/headPortrait.png">
<p><a class="button theme" href="#" onclick="gotoLogin()" >立即登录</a></p>
</div>
<div class="topic">
<div class="topic" style="display: none;">
<div class="topicContent homeBox" style="padding-left:0;padding-right:0;">
<div class="topicContent_center home homeWin">
<div>
@@ -127,7 +127,7 @@
<div class="topic">
<div class="topicContent homeBox" style="padding-left:0;padding-right:0;">
<div class="topicContent_center home homeWin" id="toolList">
<div>
<!--<div>
<i class="icon icon-personal01"></i>
<span>公积金查询</span>
</div>
@@ -142,9 +142,9 @@
<div>
<i class="icon icon-personal04"></i>
<span>算房贷</span>
</div>
</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)">
<img v-bind:src="t.iconUrl" style="width:45px;height:45px;margin:0 auto;" v-on:click="goto(t.url,userId)">
<span>{{t.toolName}}</span>
</div>
</div>
@@ -262,20 +262,7 @@ var tab = new Vue({
mm_num:"0"
}
})
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") == ""){
@@ -509,10 +496,34 @@ function openSettingPage() {
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){
var toolList = new Vue({
el:"#toolList",
data:{
merchantTools:[],
userId:""
},
methods:{
goto:function(url,userId){
var deviceId = plus.device.uuid;
if(url.indexOf("?")>0){
url+=("&uid="+userId+"&deviceId="+deviceId)
}else{
url+=("?uid="+userId+"&deviceId="+deviceId)
}
alert(url)
if (url != null && url != "") {
clicked('../webview_embed.html', true,false,{},{url:url})
}
}
}
});
axios.get(BASE_PATH + "/rest/usertool/merchantToolList",{params:{position:0}}).then(function(response){
toolList.merchantTools = response.data.data;
toolList.merchantTools = response.data.data.list;
toolList.userId = response.data.data.uid;
/* 获取homeWin div个数并计算homeWin宽度 */
$(".homeWin").css("width",(90*(4+response.data.data.length))+"px");
var original = 0;//公积金查询等个数
$(".homeWin").css("width",(90*(original+response.data.data.list.length))+"px");
// var html = "";
// for(var i=0;i<toolList.length;i++){
// html += (i%4==0?'':'<div class="swiper-slide">')+
+8
View File
@@ -2817,6 +2817,14 @@ $("body").delegate("#hotList ul li", "click", function () {
var select_region = $(this).find("a").attr("data-region");
var select_name = $(this).find("a").attr("data-name");
saveHistory({district:select_region,name:select_name,city:select_city})
var eventType = "hotDistrictClick";
var dataMap = {};
dataMap["city"]=select_city;
dataMap["region"]=select_region;
dataMap["name"]=select_name;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
//clicked(BASE_PATH+'/district/details?city='+select_city+'&region='+select_region+'&name='+select_name,true);
if(cat == "rent"){
clicked('views/rent/rent.html',true,false,{},{city:select_city,region:select_region,name:select_name})