Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.1
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
//var BASE_PATH = "http://192.168.10.47:8086";
|
//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.161:8084";
|
||||||
//var BASE_PATH = "http://192.168.10.47:8086";
|
//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.161:8084";
|
||||||
var BASE_PATH = "http://192.168.10.53:8084";
|
//var BASE_PATH = "http://192.168.10.53:8084";
|
||||||
//var BASE_PATH = "http://192.168.10.171:8084";
|
//var BASE_PATH = "http://192.168.10.171:8084";
|
||||||
/**是否显示过启动页面**/
|
/**是否显示过启动页面**/
|
||||||
var lauchFlag = false;
|
var lauchFlag = false;
|
||||||
@@ -4,7 +4,7 @@ axios.defaults.headers.post['Content-Type'] = 'application/json';
|
|||||||
// 添加请求拦截器
|
// 添加请求拦截器
|
||||||
axios.interceptors.request.use(function (config) {
|
axios.interceptors.request.use(function (config) {
|
||||||
var token = localStorage.getItem("user_token");
|
var token = localStorage.getItem("user_token");
|
||||||
config.headers.Authorization = token
|
config.headers.Authorization = token;
|
||||||
return config;
|
return config;
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap,
|
|||||||
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
||||||
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
||||||
}
|
}
|
||||||
html += "<li><a href='#' class='item-content'>";
|
html += '<li onclick="gotoHouseDetail(\''+result.id+'\')"><a href="#" class="item-content">';
|
||||||
html += "<div class='item-inner'><div class='item-title-row'>";
|
html += "<div class='item-inner'><div class='item-title-row'>";
|
||||||
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'><small>"+result.liveStatus+"</small></span></div>";
|
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'><small>"+result.liveStatus+"</small></span></div>";
|
||||||
html += "</div><div class='item-subtitle'>";
|
html += "</div><div class='item-subtitle'>";
|
||||||
|
|||||||
@@ -63,5 +63,4 @@ Vue.component('my_focus',{
|
|||||||
},mounted:function(){
|
},mounted:function(){
|
||||||
this.loadMyFocus();
|
this.loadMyFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -489,19 +489,6 @@ $.config = {router: false}
|
|||||||
<script>
|
<script>
|
||||||
document.addEventListener('plusready', onPlusReady, false);
|
document.addEventListener('plusready', onPlusReady, false);
|
||||||
function onPlusReady(){
|
function onPlusReady(){
|
||||||
var city = "";
|
|
||||||
plus.geolocation.getCurrentPosition(function(p){
|
|
||||||
//province = p.address.province;
|
|
||||||
city = p.address.city;
|
|
||||||
//region = p.address.district;
|
|
||||||
}, function(e){
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider:'baidu',
|
|
||||||
enableHighAccuracy:true,
|
|
||||||
coordsType:'bd09ll'
|
|
||||||
}
|
|
||||||
);
|
|
||||||
var myFocus = new Vue({
|
var myFocus = new Vue({
|
||||||
el:"#myFocus"
|
el:"#myFocus"
|
||||||
})
|
})
|
||||||
@@ -514,9 +501,24 @@ $.config = {router: false}
|
|||||||
var cityChoose = new Vue({
|
var cityChoose = new Vue({
|
||||||
el:"#cityChoose",
|
el:"#cityChoose",
|
||||||
data:{
|
data:{
|
||||||
city:city
|
city:''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
plus.geolocation.getCurrentPosition(function(p){
|
||||||
|
//province = p.address.province;
|
||||||
|
var cityStr = p.address.city;
|
||||||
|
if(cityStr){
|
||||||
|
cityChoose.city = cityStr.endsWith("市")?cityStr.substring(0,cityStr.length-1):cityStr;
|
||||||
|
}
|
||||||
|
//region = p.address.district;
|
||||||
|
}, function(e){
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provider:'baidu',
|
||||||
|
enableHighAccuracy:true,
|
||||||
|
coordsType:'bd09ll'
|
||||||
|
}
|
||||||
|
);
|
||||||
/* 关注&已关注切换 */
|
/* 关注&已关注切换 */
|
||||||
$(".collection01").on("click", function () {
|
$(".collection01").on("click", function () {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
@@ -565,6 +567,7 @@ $.config = {router: false}
|
|||||||
$("#input_city").val($(this).find("p").text());
|
$("#input_city").val($(this).find("p").text());
|
||||||
$(".cityChoice a").text($(this).find("p").text());
|
$(".cityChoice a").text($(this).find("p").text());
|
||||||
$(".popup-about01 p").removeClass("active");
|
$(".popup-about01 p").removeClass("active");
|
||||||
|
addFocus($(this).find("p").text())
|
||||||
});
|
});
|
||||||
$(".popup-about01 p").on("click", function () {
|
$(".popup-about01 p").on("click", function () {
|
||||||
$("#input_city").val($(this).text());
|
$("#input_city").val($(this).text());
|
||||||
@@ -704,7 +707,6 @@ function markFocus(){
|
|||||||
|
|
||||||
function addFocus(city){
|
function addFocus(city){
|
||||||
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
|
||||||
//reloadMyFocus()
|
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -93,6 +93,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="page-group" style="display: none;" id="page-group-login-temp">
|
||||||
|
<div class="page page-current">
|
||||||
|
<!-- 加载loading页 -->
|
||||||
|
<div class="loadingBg">
|
||||||
|
<div class="infinite-scroll-preloader">
|
||||||
|
<div class="preloader"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-block media-list">
|
||||||
|
<!-- 动态封装部分 begin -->
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<!-- 动态封装部分 end -->
|
||||||
|
</div>
|
||||||
|
<div class="content-block" style="display: none;">
|
||||||
|
<p><a onclick="openaddWindow()" class="button button-big button-fill theme">立即评估</a></p>
|
||||||
|
</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://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
@@ -168,7 +192,6 @@ $(document).on('infinite', '.infinite-scroll-bottom', function() {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//我的收藏查询请求
|
//我的收藏查询请求
|
||||||
function selectHouseInfoList(){
|
function selectHouseInfoList(){
|
||||||
axios.get(BASE_PATH + "/rest/index/ourHouseInfoList",
|
axios.get(BASE_PATH + "/rest/index/ourHouseInfoList",
|
||||||
@@ -186,7 +209,7 @@ function selectHouseInfoList(){
|
|||||||
// 上次加载的序号
|
// 上次加载的序号
|
||||||
lastIndex = $('.list-container li').length;
|
lastIndex = $('.list-container li').length;
|
||||||
//登录状态,但没有数据
|
//登录状态,但没有数据
|
||||||
if(lastIndex == 0 && resultList.length ==0){
|
if(lastIndex == 0 && (resultList != null && resultList.length == 0)){
|
||||||
//控制显示
|
//控制显示
|
||||||
$('#page-group-nologin').show();
|
$('#page-group-nologin').show();
|
||||||
$('#page-group-login').hide();
|
$('#page-group-login').hide();
|
||||||
@@ -238,12 +261,24 @@ function checkIsLogin(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//跳转添加房产
|
||||||
function gotoAddHouse(){
|
function gotoAddHouse(){
|
||||||
clicked('/views/house/add.html',true,false,{},{type:0},function(){
|
clicked('/views/house/add.html',true,false,{},{type:0},function(){
|
||||||
checkIsLogin();
|
checkIsLogin();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//跳转房产详情
|
||||||
|
function gotoHouseDetail(id){
|
||||||
|
clicked('/views/house/detail.html',true,false,{},{houseId:id},function(){
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//跳转房产申请贷款
|
||||||
|
function gotoLoanApply(houseId, city){
|
||||||
|
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: ""},function(){})
|
||||||
|
}
|
||||||
|
|
||||||
//界面加载
|
//界面加载
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
checkIsLogin();
|
checkIsLogin();
|
||||||
@@ -285,7 +320,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
|||||||
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
||||||
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
||||||
}
|
}
|
||||||
html += "<li><a href='#' class='item-content'>";
|
html += '<li onclick="gotoHouseDetail(\''+result.id+'\')"><a href="#" class="item-content">';
|
||||||
html += "<div class='item-inner'><div class='item-title-row'>";
|
html += "<div class='item-inner'><div class='item-title-row'>";
|
||||||
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'><small>"+result.liveStatus+"</small></span></div>";
|
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'><small>"+result.liveStatus+"</small></span></div>";
|
||||||
html += "</div><div class='item-subtitle'>";
|
html += "</div><div class='item-subtitle'>";
|
||||||
@@ -332,7 +367,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
|||||||
}else{
|
}else{
|
||||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其他</a>";
|
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其他</a>";
|
||||||
}
|
}
|
||||||
html += "<a class='button theme add add01 add01a' href='#'>立即申请</a></li>";
|
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
|
||||||
}
|
}
|
||||||
$('.infinite-scroll-bottom .list-container').append(html);
|
$('.infinite-scroll-bottom .list-container').append(html);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<h1 class="title">管理设置</h1>
|
<h1 class="title">管理设置</h1>
|
||||||
</header>
|
</header>
|
||||||
<div class="content">
|
<div class="content" id="app">
|
||||||
<div class="list-block media-list">
|
<div class="list-block media-list">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -43,10 +43,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content-block">
|
<div class="content-block">
|
||||||
<p>微信交流群</p>
|
<p>微信交流群</p>
|
||||||
<img src="images/wx.png" style="width:180px;margin:0 auto;">
|
<img id="img" style="width:180px;margin:0 auto;">
|
||||||
<p style="text-align:center;">扫码加入</p>
|
<p style="text-align:center;">扫码加入</p>
|
||||||
<p>商务合作QQ:275525147</p>
|
<p>商务合作QQ:275525147</p>
|
||||||
<p style="margin-top:2rem;"><a href="01_index.html" class="button button-big button-fill theme">退出登录</a></p>
|
<p style="margin-top:2rem;">
|
||||||
|
<a v-show="showLogout" onclick="logout()" class="button button-big button-fill theme">退出登录</a>
|
||||||
|
<!--<a v-show="showLogin" onclick="clicked('../user/codeSms.html',true)" class="button button-big button-fill theme">马上登录</a>-->
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,20 +65,40 @@ Zepto = $
|
|||||||
$.config = {router: false}
|
$.config = {router: false}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></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/cn.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="../../js/common.js"></script>
|
<script type="text/javascript" src="../../js/common.js"></script>
|
||||||
<script type="text/javascript" src="../../js/mui.min.js"></script>
|
<script type="text/javascript" src="../../js/mui.min.js"></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/vue.js" ></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
data: {
|
||||||
|
showLogin:false,
|
||||||
|
showLogout:false
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
|
||||||
|
this.showLogin = true;
|
||||||
|
} else {
|
||||||
|
this.showLogout = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
mui.init({
|
mui.init({
|
||||||
gestureConfig: {
|
gestureConfig: {
|
||||||
longtap: true
|
longtap: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function logout() {
|
||||||
|
localStorage.removeItem("user_token");
|
||||||
|
localStorage.removeItem("user_token_add_time");
|
||||||
|
back();
|
||||||
|
}
|
||||||
function download(imgUrl) {
|
function download(imgUrl) {
|
||||||
var suffix = '/qun.png';
|
var suffix = '/qun.png';
|
||||||
var downLoader = plus.downloader.createDownload(imgUrl, {
|
var downLoader = plus.downloader.createDownload(imgUrl, {
|
||||||
@@ -90,11 +113,21 @@ function download(imgUrl) {
|
|||||||
downLoader.start();
|
downLoader.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*mui.plusReady(function() {
|
|
||||||
document.getElementById("img").addEventListener("longtap", function(event) {
|
mui.plusReady(function() {
|
||||||
download("${basePath}/img/${advertisement.imgId?c}");
|
axios.get("/rest/ad/position",{params:{position : 7}}).then(function (response) {
|
||||||
})
|
var data = response.data.data;
|
||||||
});*/
|
if (data) {
|
||||||
|
document.getElementById("img").setAttribute("src", BASE_PATH+"/img/"+data.imgId);
|
||||||
|
document.getElementById("img").addEventListener("longtap", function(event) {
|
||||||
|
download(BASE_PATH+"/img/"+data.imgId);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<button class="button button-link button-nav pull-left" style="display: none;" onclick="back(),plus.nativeUI.closeWaiting();">
|
<button class="button button-link button-nav pull-left" style="display: none;" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||||
<span class="icon icon-left"></span>
|
<span class="icon icon-left"></span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button button-link button-nav pull-right" onclick="clicked('../setting/setting.html', true)">
|
<button class="button button-link button-nav pull-right" onclick="openSettingPage()">
|
||||||
<span class="icon icon-set"></span>
|
<span class="icon icon-set"></span>
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
<button class="button button-link button-nav pull-left" style="display: none;" onclick="back(),plus.nativeUI.closeWaiting();">
|
<button class="button button-link button-nav pull-left" style="display: none;" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||||
<span class="icon icon-left"></span>
|
<span class="icon icon-left"></span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button button-link button-nav pull-right" onclick="clicked('../setting/setting.html', true)">
|
<button class="button button-link button-nav pull-right" onclick="openSettingPage()">
|
||||||
<span class="icon icon-set"></span>
|
<span class="icon icon-set"></span>
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
@@ -275,6 +275,9 @@ function checkIsLogin(){
|
|||||||
$('#page-group-login').hide();
|
$('#page-group-login').hide();
|
||||||
$('#page-group-nologin').show();
|
$('#page-group-nologin').show();
|
||||||
}else{
|
}else{
|
||||||
|
//控制显示
|
||||||
|
$('#page-group-nologin').hide();
|
||||||
|
$('#page-group-login').show();
|
||||||
//加载个人信息
|
//加载个人信息
|
||||||
selectUserInfo();
|
selectUserInfo();
|
||||||
//加载我的关注
|
//加载我的关注
|
||||||
@@ -283,9 +286,6 @@ function checkIsLogin(){
|
|||||||
selectHouseInfoList();
|
selectHouseInfoList();
|
||||||
//加载我的收藏
|
//加载我的收藏
|
||||||
selectNewsCollectList();
|
selectNewsCollectList();
|
||||||
//控制显示
|
|
||||||
$('#page-group-nologin').hide();
|
|
||||||
$('#page-group-login').show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,11 +301,17 @@ function gotoUpdatePass(){
|
|||||||
clicked('/views/user/updatePass.html',true,false,{},{},function(){})
|
clicked('/views/user/updatePass.html',true,false,{},{},function(){})
|
||||||
}
|
}
|
||||||
|
|
||||||
//调整房产申请贷款
|
//跳转房产申请贷款
|
||||||
function gotoLoanApply(houseId, city){
|
function gotoLoanApply(houseId, city){
|
||||||
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: _mobile},function(){})
|
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: _mobile},function(){})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//跳转房产详情
|
||||||
|
function gotoHouseDetail(id){
|
||||||
|
clicked('/views/house/detail.html',true,false,{},{houseId:id},function(){
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//注册'infinite'事件处理函数
|
//注册'infinite'事件处理函数
|
||||||
$(document).on('infinite', '.infinite-scroll',function() {
|
$(document).on('infinite', '.infinite-scroll',function() {
|
||||||
if($("#tabList1").hasClass("active")){
|
if($("#tabList1").hasClass("active")){
|
||||||
@@ -401,6 +407,11 @@ function selectUserInfo(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openSettingPage() {
|
||||||
|
clicked('../setting/setting.html',true,false,{},{},function(){
|
||||||
|
checkIsLogin();
|
||||||
|
})
|
||||||
|
}
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
checkIsLogin();
|
checkIsLogin();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user