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

This commit is contained in:
尹吉欢
2018-04-12 12:00:55 +08:00
11 changed files with 101 additions and 66 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
//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";
//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.161:8084";
//var BASE_PATH = "http://192.168.10.53:8084";
//var BASE_PATH = "http://192.168.10.171:8084";
/**是否显示过启动页面**/
var lauchFlag = false;
+1 -1
View File
@@ -4,7 +4,7 @@ axios.defaults.headers.post['Content-Type'] = 'application/json';
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
var token = localStorage.getItem("user_token");
config.headers.Authorization = token
config.headers.Authorization = token;
return config;
}, function (error) {
return Promise.reject(error);
+32
View File
@@ -215,6 +215,38 @@ function loadNearDistrict(){
$(".button").click(function(){
console.log("type:"+$(this).text())
var type = (this).attr("v")
var city = (this).attr("city")
axios.get("/rest/quotations/loadCityPriceTrends", {
params: {
city: city,
type:type
}
}).then(function (response) {
var datas = trends.data.data
var prices = []
var counts = []
var times = datas.times
for(var i in times){
var time = times[i]
time = parseInt(time.replace("-",""))
var pm = datas.cityPriceMap;
var cm = datas.countMap;
if(pm){
prices.push(pm[time])
}
if(cm){
counts.push(cm[time]);
}
}
showChart(num+"_price_chart", obj.times, prices, counts)
}).catch(function (error) {
alert(error)
console.log(error);
});
})
+2 -1
View File
@@ -1492,7 +1492,8 @@
"start.html",
"views/user/userInfo.html",
"views/evaluate/evaluateList.html",
"views/house/houseManageList.html"
"views/house/houseManageList.html",
"views/house/houseDetail.html"
],
"priority": 0
},
@@ -63,5 +63,4 @@ Vue.component('my_focus',{
},mounted:function(){
this.loadMyFocus();
}
})
+6 -5
View File
@@ -289,7 +289,7 @@ $.config = {router: false}
<script>
//loadDistrictInfo();
/*document.addEventListener('plusready', onPlusReady, false);
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
city = self.city
@@ -300,11 +300,12 @@ function onPlusReady() {
new Vue({
el: '#baseInfo'
})
}*/
}
new Vue({
el: '#baseInfo'
})
//new Vue({
// el: '#baseInfo'
// })
// })
function openMapWindow(){
clicked('arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng});
+30 -27
View File
@@ -10,7 +10,6 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
<link rel="stylesheet" href="../../css/light7-swiper.min.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/city.css">
<link rel="stylesheet" href="../../css/theme-orange.css">
@@ -35,9 +34,14 @@
<h1 class="title">房产行情</h1>
</header>
<div class="content">
<div class="swiper-container" data-space-between="10">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="buttons-tab fixed-tab theme">
<a href="#tabQuotation1" class="tab-link active button">全国</a>
<a href="#tabQuotation2" class="tab-link button">上海</a>
<a href="#tabQuotation3" class="tab-link button">添加</a>
</div>
<div class="tabs">
<div id="tabQuotation1" class="tab active">
<div class="card cardPrice cardPrice01 cardCity" id="countryInfo">
<div class="card-header">
<label>全国</label>
@@ -447,9 +451,10 @@
</div>
</div>
</div>
</div>
<div class="swiper-pagination"></div>
</div>
</div>
</div>
</div>
</div>
@@ -472,7 +477,6 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/vue.js"></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/light7-swiper.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../../config.js"></script>
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
<script type="text/javascript" src="../../js/axios.min.js"></script>
@@ -485,19 +489,6 @@ $.config = {router: false}
<script>
document.addEventListener('plusready', onPlusReady, false);
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({
el:"#myFocus"
})
@@ -510,9 +501,24 @@ $.config = {router: false}
var cityChoose = new Vue({
el:"#cityChoose",
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 () {
$(this).hide();
@@ -561,6 +567,7 @@ $.config = {router: false}
$("#input_city").val($(this).find("p").text());
$(".cityChoice a").text($(this).find("p").text());
$(".popup-about01 p").removeClass("active");
addFocus($(this).find("p").text())
});
$(".popup-about01 p").on("click", function () {
$("#input_city").val($(this).text());
@@ -629,10 +636,7 @@ $.config = {router: false}
</script>
<script>
/* 页面滑动效果 */
$(function() {
$(".swiper-container").swiper();
});
/* 获取资讯正文字数,截取资讯正文前30字,并添加... */
$(document).ready(function () {
@@ -703,7 +707,6 @@ function markFocus(){
function addFocus(city){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
//reloadMyFocus()
}).catch(function(error){
console.log(error)
})
@@ -207,7 +207,6 @@ function onPlusReady(){
this.mapObj = new BMap.Map("map", {minZoom:this.datas.minZoom,maxZoom:this.datas.maxZoom})
}
this.mapObj.enableScrollWheelZoom();
alert(this.datas.center.lat);
this.mapObj.centerAndZoom(this.datas.center, this.datas.zoom);
var that = this;
+3 -3
View File
@@ -336,9 +336,9 @@
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势
<div class="content-block">
<div class="buttons-row theme">
<a class="tab-link button active">半年</a>
<a class="tab-link button">一年</a>
<a class="tab-link button">三年</a>
<a class="tab-link button active" v="2" v-bind:city="myCityMap.city">半年</a>
<a class="tab-link button" v="3" v-bind:city="myCityMap.city">一年</a>
<a class="tab-link button" v="5" v-bind:city="myCityMap.city">三年</a>
</div>
</div>
</div>
+24 -24
View File
@@ -184,31 +184,31 @@ $.config = {router: false}
<script type='text/javascript' src='../component/nearDist.js' charset='utf-8'></script>
<script type='text/javascript' src='../component/roomRent.js' charset='utf-8'></script>
<script>
//document.addEventListener('plusready', onPlusReady, false);
//function onPlusReady() {
// var self = plus.webview.currentWebview();
// city = self.city
// region = self.region
// name = self.name;
// // loadDistrictInfo();
//
//
// // 创建根实例
// new Vue({
// el: '#baseInfo'
// })
//
////new Vue({
//// el: '#nearDistDiv'
////})
////new Vue({
//// el: '#mapDiv'
////})
//}
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
city = self.city
region = self.region
name = self.name;
// loadDistrictInfo();
// 创建根实例
new Vue({
el: '#baseInfo'
})
//new Vue({
// el: '#nearDistDiv'
//})
//new Vue({
// el: '#mapDiv'
//})
}
new Vue({
el: '#baseInfo'
})
//new Vue({
// el: '#baseInfo'
//})
+1 -1
View File
@@ -1504,7 +1504,7 @@ function initNearDistricts(cityParam,latParam,lngParam,regionParam,order,minPric
textStr = textName.substr(0,5)+ "...";
}
html += '<div class="card cardNearby" onclick="openDistWindow('+response.data.data.dtos[i].city+','+response.data.data.dtos[i].district+','+response.data.data.dtos[i].name+')"><div class="card-header">'+
html += '<div class="card cardNearby" onclick="openDistWindow(\''+response.data.data.dtos[i].city+'\',\''+response.data.data.dtos[i].district+'\',\''+response.data.data.dtos[i].name+'\')"><div class="card-header">'+
textStr+
'</div><div class="card-content"><div class="card-content-inner">'+response.data.data.dtos[i].avgPrice+'元/㎡</div></div><div class="card-footer">'+
'距您'+response.data.data.dtos[i].distance+'m</div></div>';