diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js
index 375fa77..a126994 100644
--- a/fangija-zsyf/config.js
+++ b/fangija-zsyf/config.js
@@ -1,8 +1,8 @@
/**服务端地址**/
//var BASE_PATH = "http://192.168.10.128:8084";
//var BASE_PATH = "http://192.168.10.47:8086";
-var BASE_PATH = "http://192.168.10.161: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.170:8084";
+//var BASE_PATH = "http://192.168.10.170:8084";
/**是否显示过启动页面**/
var lauchFlag = false;
\ No newline at end of file
diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css
index 1b238fe..32b9f3f 100644
--- a/fangija-zsyf/css/main.css
+++ b/fangija-zsyf/css/main.css
@@ -175,32 +175,7 @@ em.down{color:#88D053;}
.bar-tab:before{background-color:#DCDCDC;transform:scaleY(1);}
.bar-tab .tab-item .icon ~ .tab-label{top:0.05rem;}
-/* 登录 */
-.icon-login01{width:14px;height:20px;background:url(../images/icon-login01.png) no-repeat center center;background-size:100%;vertical-align:text-bottom;}
-.icon-login02{width:15px;height:19px;background:url(../images/icon-login02.png) no-repeat center center;background-size:100%;vertical-align:text-bottom;}
-.icon-login03{width:15px;height:18px;background:url(../images/icon-login03.png) no-repeat center center;background-size:100%;vertical-align:text-bottom;}
-.icon-loginMode01{width:30px;height:24px;background:url(../images/icon-loginMode01.png) no-repeat center center;background-size:100%;}
-.icon-loginMode02{width:30px;height:24px;background:url(../images/icon-loginMode02.png) no-repeat center center;background-size:100%;}
-.icon-loginMode03{width:22px;height:24px;background:url(../images/icon-loginMode03.png) no-repeat center center;background-size:100%;}
-#input_phoneNumber,#input_codeSms,#input_password{left:24px;width:80%;}
-#input_phoneNumber{width:50%;}
-#input_feedback{width:100%;height:100px;}
-.list-block .item-after .icon-eye-grey{width:0.9rem;height:0.65rem;margin-right:0;margin-top:0.25rem;}
-.list-block .item-after .icon-eye-orange{width:0.9rem;height:0.65rem;margin-right:0;margin-top:0.25rem;}
-.sendCode{padding:0 8px;height:27px;background:#fff;border:solid 1px #2db0fc;border-radius:3px;color:#2db0fc;text-align:center;line-height:26px;font-size:0.7rem;float:right;margin-top:-2px;}
-.waiting{padding:0 8px;height:27px;background:#0a8ddf;border:solid 1px #0a8ddf;border-radius:3px;color:#fff;text-align:center;line-height:26px;font-size:0.7rem;float:right;margin-top:-2px;}
-.agreement{font-size:0.65rem;color:#666;margin-left:0.75rem;}
-.agreement a{font-size:0.65rem;}
-.check{width:18px;height:18px;border:solid 1px #D7D7D7;border-radius:0.05rem;display:inline-block;vertical-align:middle;margin-right:0.2rem;position:relative;}
-.checkImg{width:10px;height:7px;position:absolute;top:5px;left:3px;}
-.loginBox p{text-align:center;margin:0;}
-.loginBox p .button{margin-top:2rem;margin-bottom:0.5rem;}
-.loginBox p a{font-size:0.65rem;color:#AA907A;}
-.loginMode{width:100%;position:absolute;bottom:4.5rem;}
-.loginMode p{font-size:0.65rem;color:#999;text-align:center;}
-.loginMode p a:nth-child(2){margin:0 2rem;}
-.line{width:100%;height:1px;background:#e5e5e5;margin-bottom:1.5rem;position:relative;}
-.line span{position:absolute;top:-10px;left:50%;margin-left:-57.5px;display:block;background:#fff;padding:0 25px;font-size:0.65rem;color:#999;}
+
/* 首页 */
.totalValue{padding:1rem 0;overflow:hidden;}
.totalValue div:first-child{float:left;margin-left:0.75rem;}
@@ -504,7 +479,7 @@ input::-webkit-input-placeholder{
.tag small:nth-child(5){background:#F5EFFF;color:#A585D6;}
*/
-.cardInfo01b .card-footer span{font-size:0.7rem;color:#999;}
+.cardInfo01b .card-footer span{font-size:0.7rem;color:#999;display:inline-block;width:100%;word-wrap:break-word;white-space:normal;}
.cardInfo02{padding:0.25rem 0;}
.cardInfo02 img{width:6.5rem;height:5.2rem;}
@@ -567,9 +542,9 @@ input::-webkit-input-placeholder{
.commentBox .searchbar .search-input{line-height:36px;}
.commentBox .searchbar .search-input input{height:36px;background:#EFEFEF;}
.commentBox .searchbar.commentInputBox .search-input input{padding-left:1.8rem;}
-.commentBox .searchbar span{text-align:center;}
-.commentBox .searchbar span a font{font-size:0.65rem;color:#666;line-height:36px;}
-.commentBox .searchbar span .collection{margin-left:0.75rem;position:static;}
+.commentBox .searchbar span{text-align:center;line-height:36px;}
+.commentBox .searchbar span font{font-size:0.65rem;color:#666;}
+.commentBox .searchbar span.collection{margin-left:0.75rem;position:static;}
.commentBox .searchbar > a{line-height:36px;}
.icon-comments{width:17px;height:16px;background:url(../images/icon-comments.png) no-repeat center center;background-size:100%;margin-left:0.3rem;vertical-align:baseline;}
diff --git a/fangija-zsyf/js/axiosPlugin.js b/fangija-zsyf/js/axiosPlugin.js
index bfa7c47..8bfca8b 100644
--- a/fangija-zsyf/js/axiosPlugin.js
+++ b/fangija-zsyf/js/axiosPlugin.js
@@ -3,7 +3,8 @@ axios.defaults.headers.post['Content-Type'] = 'application/json';
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
- config.headers.Authorization = '111111111'
+ var token = localStorage.getItem("user_token");
+ config.headers.Authorization = token
return config;
}, function (error) {
return Promise.reject(error);
diff --git a/fangija-zsyf/js/common.js b/fangija-zsyf/js/common.js
index 6f08bb6..1bf58bb 100644
--- a/fangija-zsyf/js/common.js
+++ b/fangija-zsyf/js/common.js
@@ -61,7 +61,7 @@ var openw=null,waiting=null;
* @param {boolean} ns : 是否不自动显示
* @param {JSON} ws : Webview窗口属性
*/
-w.clicked=function(id,wa,ns,ws){
+w.clicked=function(id,wa,ns,ws, params,callback,callbackParams){
if(openw){//避免多次打开同一个页面
return null;
}
@@ -71,7 +71,7 @@ w.clicked=function(id,wa,ns,ws){
ws.scrollIndicator||(ws.scrollIndicator='none');
ws.scalable||(ws.scalable=false);
var pre='';//'http://192.168.1.178:8080/h5/';
- openw=plus.webview.create(pre+id,id,ws);
+ openw=plus.webview.create(pre+id,id,ws,params);
ns||openw.addEventListener('loaded',function(){//页面加载完成后才显示
// setTimeout(function(){//延后显示可避免低端机上动画时白屏
openw.show(as);
@@ -79,6 +79,10 @@ w.clicked=function(id,wa,ns,ws){
// },200);
},false);
openw.addEventListener('close',function(){//页面关闭后可再次打开
+ //可以设置页面关闭时回调的方法,可以对数据进行重新加载操作
+ if(callback){
+ callback(callbackParams);
+ }
openw=null;
},false);
return openw;
diff --git a/fangija-zsyf/js/login/codeSms.js b/fangija-zsyf/js/login/codeSms.js
index 2d3743a..7fccf62 100644
--- a/fangija-zsyf/js/login/codeSms.js
+++ b/fangija-zsyf/js/login/codeSms.js
@@ -1,16 +1,87 @@
-export default {
- methods: {
- checkPhoneNum (phone) {
- alert("1111111111111")
- }
- }
-}
var sendPhoneCode = new Vue({
el:'#sendPhoneCode',
methods:{
- sendCode:function(){
- alert("222222222")
- checkPhoneNum("1352222222")
- }
}
-})
\ No newline at end of file
+})
+
+function sendCode(){
+ var mobile = $("#input_phoneNumber").val();
+ if(checkPhoneNum(mobile)){
+ timer.start();
+ axios.post("/rest/user/sendMobileCode", {mobile: mobile})
+ .then(function (response) {
+ var data = response.data
+ if(data.code==200){
+ $.toast("短信验证码发送成功,请注意查收!")
+ }else{
+ $.toast("验证码发送失败")
+ timer.cancel()
+ }
+ })
+ }
+}
+function checkPhoneNum(phone){
+ var reg=11&& /^((13|14|15|17|18)[0-9]{1}\d{8})$/;
+ if(phone==''){
+ $.toast("请输入手机号码");
+ return false;
+ }else if(!reg.test(phone)){
+ $.toast("手机格式不正确");
+ return false;
+ }else{
+ return true;
+ }
+}
+//验证码倒计时
+timer = {
+ countdown:60,
+ start:function(){
+ countdown = 60
+ $(".sendCode").hide()
+ $(".waiting").empty().append(countdown + " s").show()
+ timer.down()
+ },
+ down:function(){
+ countdown --
+ $(".waiting").empty().append(countdown + " s")
+ if(countdown <= 0){
+ $(".sendCode").show()
+ $(".waiting").hide()
+ }else{
+ setTimeout(timer.down, 1000)
+ }
+ },
+ cancel:function(){
+ countdown = 0
+ }
+ }
+
+/* 错误提示-快捷登录 */
+$("#login_btn").on("click", function () {
+ var phoneNum = $("#input_phoneNumber").val();
+ var code = $("#input_codeSms").val();
+ var protocal = $(".check").find(".checkImg").css("display");
+ if(checkPhoneNum(phoneNum)){
+ if(code == ""){
+ $.toast("请输入验证码");
+ return false;
+ }
+ if(protocal != "block"){
+ $.toast("请同意服务协议");
+ return false;
+ }
+ axios.post("/rest/user/smsLogin", {mobile: phoneNum,smsCode:code})
+ .then(function (response) {
+ var resData = response.data;
+ if (resData.status) {
+ // 用户登录成功的TOKEN
+ var token = resData.data;
+ localStorage.setItem("user_token", token);
+ $.toast(resData.message);
+ back();
+ } else {
+ $.toast(resData.message);
+ }
+ })
+ }
+});
diff --git a/fangija-zsyf/js/login/wxLogin.js b/fangija-zsyf/js/login/wxLogin.js
new file mode 100644
index 0000000..1b144a1
--- /dev/null
+++ b/fangija-zsyf/js/login/wxLogin.js
@@ -0,0 +1,39 @@
+var auths = {}
+function plusReady() {
+ plus.oauth.getServices(function(services) {
+ alert("111111111111111111111111")
+ auths = services;
+ }, function(e) {
+ alert("获取登录服务列表失败:" + e.message + " - " + e.code);
+ });
+}
+document.addEventListener('plusready',plusReady,false);
+// 登录认证
+function webChatLogin(){
+ var auth=auths['weixin'];
+ if(auth){
+ var w=null;
+ if(plus.os.name=="Android"){
+ w=plus.nativeUI.showWaiting();
+ }
+ document.addEventListener("pause",function(){
+ setTimeout(function(){
+ w&&w.close();w=null;
+ },2000);
+ }, false );
+ auth.login(function(){
+ w&&w.close();w=null;
+ userinfo(auth);
+ },function(e){
+ w&&w.close();w=null;
+ $.toast("登录认证失败:["+e.code+"]:"+e.message);
+ });
+ }else{
+ $.toast("无效的登录认证通道!");
+ $.toast("无效的登录认证通道!",null,"登录");
+ }
+}
+
+function authLogin(type) {
+ console.log("hhhhhhhhhhhhhhhhhhh")
+}
diff --git a/fangija-zsyf/js/plus.info.js b/fangija-zsyf/js/plus.info.js
new file mode 100644
index 0000000..27dcd88
--- /dev/null
+++ b/fangija-zsyf/js/plus.info.js
@@ -0,0 +1,41 @@
+/**
+ * 获取手机上的信息,比如位置,手机ID
+ * @author yinjihuan
+ */
+//扩展API加载完毕后调用onPlusReady回调函数
+document.addEventListener('plusready', onPlusReady, false);
+//扩展API加载完毕,现在可以正常调用扩展API
+function onPlusReady(){
+ getPosition();
+}
+// 获取当前用户位置
+function getPosition(){
+ 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'
+ }
+ );
+}
+
+function getPushInfo(){
+ try {
+ var info = plus.push.getClientInfo();
+ return info.clientid;
+ }catch(error) {
+ console.log( error);
+ }
+// console.log( "获取客户端推送标识信息:" );
+// console.log( "token: "+info.token );
+// alert( "clientid: "+info.clientid );
+// console.log( "appid: "+info.appid );
+// console.log( "appkey: "+info.appkey );
+ return "";
+}
\ No newline at end of file
diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html
index d526626..8307d46 100644
--- a/fangija-zsyf/views/evaluate/evaluateReport.html
+++ b/fangija-zsyf/views/evaluate/evaluateReport.html
@@ -65,7 +65,7 @@
- {{compare_word}} {{compare_money}} 元
+ {{compare_word}} {{compare_money}} {{words}}
@@ -77,7 +77,7 @@
-
+
@@ -144,33 +144,35 @@ $.config = {router: false}
var house_info = new Vue({
el:'#house_info',
data:{
- name:"龙盛佳苑",
- city_region:"上海-静安",
- house_type:"2室1厅 60m 1/6层"
+ name:"",
+ city_region:"",
+ house_type:""
}
})
var house_price = new Vue({
el:"#house_price",
data:{
- total_price:"391",
- avg_price:"65241",
- percentage_30:3.37,
- arrow:"icon icon-arrow-green",
- city:"上海",
- compare_word:"低",
- compare_money:"2888"
+ total_price:"",
+ avg_price:"",
+ percentage_30:"",
+ arrow:"",
+ city:"",
+ compare_word:"",
+ compare_money:"",
+ words:""
}
})
var evaluate_msg = new Vue({
el:"#evaluate_msg",
data:{
- evaluate_percent:12,
- evaluate_words:"下跌概率",
- arrow:"icon icon-arrow-green",
- evaluate_msg:"本小区2月活跃度为20;价格近3个月处于下跌趋势,小区物业一般,交通不便利,所属板块为不活跃。"
+ evaluate_percent:"",
+ evaluate_words:"",
+ arrow:"",
+ msg:""
}
})
- var hid = 1111111111111;
+ var hid = '104631167348637696';
+
var price_feedback = new Vue({
el:"#price_feedback",
data:{
@@ -191,6 +193,55 @@ $.config = {router: false}
}
}
})
+
+ axios.get("/rest/evaluate/queryHouseInfo",{
+ params:{id : hid}
+ }).then(function(response){
+ if(response.data.status){
+ h = response.data.data
+ house_info.name = h.name
+ house_info.city_region = h.city+"-"+h.region
+ house_info.house_type = (h.roomCount==0?"":h.roomCount+"室")+(h.hallCount==0?"":h.hallCount+"厅 ")+(h.area==0?"":h.area+"m ")+((h.floor==0||h.height==0)?"":h.floor+"/"+h.height+"层")
+ house_price.total_price = h.totalPrice==0?"暂无":(h.totalPrice/10000).toFixed(0)
+ house_price.avg_price = h.avgPrice==0?"暂无":h.avgPrice
+ house_price.percentage_30=h.oneMonthUpDownRange==0?"暂无":h.oneMonthUpDownRange
+ if(h.oneMonthUpDownRange<0){
+ house_price.arrow="icon icon-arrow-green"
+ house_price.percentage_30=-h.oneMonthUpDownRange
+ }else if(h.oneMonthUpDownRange>0){
+ house_price.arrow="icon icon-arrow-red"
+ house_price.percentage_30=h.oneMonthUpDownRange
+ }else{
+ house_price.percentage_30="暂无"
+ }
+ house_price.city=h.city
+ if(h.compareMoney<0){
+ house_price.compare_word="低"
+ house_price.words="元"
+ house_price.compare_money=-h.compareMoney
+ }else if(h.compareMoney>0){
+ house_price.compare_word="高"
+ house_price.words="元"
+ house_price.compare_money=h.compareMoney
+ }else{
+ house_price.compare_money="相等"
+ }
+ if(h.evaluatePercent<0){
+ evaluate_msg.evaluate_words="下跌概率"
+ evaluate_msg.arrow="icon icon-arrow-green"
+ evaluate_msg.evaluate_percent=-h.evaluatePercent
+ }else if(h.evaluatePercent>0){
+ evaluate_msg.evaluate_words="上涨概率"
+ evaluate_msg.arrow="icon icon-arrow-red"
+ evaluate_msg.evaluate_percent=h.evaluatePercent
+ }else{
+ evaluate_msg.evaluate_words="暂无"
+ }
+ evaluate_msg.msg=h.evaluateMsg
+ }
+ }).catch(function(error){
+ console.log(error)
+ })