Merge branch 'YOUFANGAPP1.1' of http://192.168.0.27/dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -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;
|
||||
@@ -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;}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,16 +1,87 @@
|
||||
export default {
|
||||
methods: {
|
||||
checkPhoneNum (phone) {
|
||||
alert("1111111111111")
|
||||
}
|
||||
}
|
||||
}
|
||||
var sendPhoneCode = new Vue({
|
||||
el:'#sendPhoneCode',
|
||||
methods:{
|
||||
sendCode:function(){
|
||||
alert("222222222")
|
||||
checkPhoneNum("1352222222")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
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);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
@@ -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 "";
|
||||
}
|
||||
@@ -65,7 +65,7 @@
|
||||
<label>近30天涨跌幅</label>
|
||||
</span>
|
||||
<span>
|
||||
<em>{{compare_word}} <strong>{{compare_money}}</strong> 元</em>
|
||||
<em>{{compare_word}} <strong>{{compare_money}}</strong> {{words}}</em>
|
||||
<label>相比{{city}}均价</label>
|
||||
</span>
|
||||
</div>
|
||||
@@ -77,7 +77,7 @@
|
||||
<label>{{evaluate_words}}</label>
|
||||
</span>
|
||||
<span>
|
||||
<label style="color:#666;">{{evaluate_msg}}</label>
|
||||
<label style="color:#666;">{{msg}}</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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)
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@@ -245,95 +296,221 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
<script>
|
||||
|
||||
/* 均价走势 */
|
||||
function yearAvgPrice(){
|
||||
var categories = new Array();
|
||||
var series = new Array();
|
||||
var o = new Object();
|
||||
o.name = '龙盛佳苑';
|
||||
|
||||
var odata = new Array();
|
||||
o.data = odata
|
||||
series.push(o);
|
||||
|
||||
var o2 = new Object();
|
||||
o2.name = '上海';
|
||||
var o2data = new Array();
|
||||
|
||||
var o3 = new Object();
|
||||
o3.name = '静安';
|
||||
var o3data = new Array();
|
||||
odata.push(46000)
|
||||
o2data.push(50400)
|
||||
o3data.push(52800)
|
||||
categories.push('2017-02')
|
||||
odata.push(47000)
|
||||
o2data.push(50600)
|
||||
o3data.push(52900)
|
||||
categories.push('2017-03')
|
||||
odata.push(47400)
|
||||
o2data.push(50300)
|
||||
o3data.push(52700)
|
||||
categories.push('2017-04')
|
||||
odata.push(49000)
|
||||
o2data.push(50200)
|
||||
o3data.push(55200)
|
||||
categories.push('2017-05')
|
||||
odata.push(49400)
|
||||
o2data.push(50800)
|
||||
o3data.push(56100)
|
||||
categories.push('2017-06')
|
||||
odata.push(49600)
|
||||
o2data.push(51900)
|
||||
o3data.push(56900)
|
||||
categories.push('2017-07')
|
||||
odata.push(48400)
|
||||
o2data.push(53100)
|
||||
o3data.push(59400)
|
||||
categories.push('2017-08')
|
||||
odata.push(52200)
|
||||
o2data.push(51200)
|
||||
o3data.push(62400)
|
||||
categories.push('2017-09')
|
||||
odata.push(54900)
|
||||
o2data.push(56200)
|
||||
o3data.push(65600)
|
||||
categories.push('2017-10')
|
||||
odata.push(57400)
|
||||
o2data.push(57000)
|
||||
o3data.push(66800)
|
||||
categories.push('2017-11')
|
||||
odata.push(54800)
|
||||
o2data.push(56700)
|
||||
o3data.push(66200)
|
||||
categories.push('2017-12')
|
||||
odata.push(55000)
|
||||
o2data.push(58300)
|
||||
o3data.push(66000)
|
||||
categories.push('2018-01')
|
||||
|
||||
o3.data = o3data
|
||||
series.push(o3);
|
||||
|
||||
o2.data = o2data
|
||||
series.push(o2);
|
||||
|
||||
charts = Highcharts.chart('chart', {
|
||||
//function yearAvgPrice(){
|
||||
// var categories = new Array();
|
||||
// var series = new Array();
|
||||
// var o = new Object();
|
||||
// o.name = '龙盛佳苑';
|
||||
//
|
||||
// var odata = new Array();
|
||||
// o.data = odata
|
||||
// series.push(o);
|
||||
//
|
||||
// var o2 = new Object();
|
||||
// o2.name = '上海';
|
||||
// var o2data = new Array();
|
||||
//
|
||||
// var o3 = new Object();
|
||||
// o3.name = '静安';
|
||||
// var o3data = new Array();
|
||||
// odata.push(46000)
|
||||
// o2data.push(50400)
|
||||
// o3data.push(52800)
|
||||
// categories.push('2017-02')
|
||||
// odata.push(47000)
|
||||
// o2data.push(50600)
|
||||
// o3data.push(52900)
|
||||
// categories.push('2017-03')
|
||||
// odata.push(47400)
|
||||
// o2data.push(50300)
|
||||
// o3data.push(52700)
|
||||
// categories.push('2017-04')
|
||||
// odata.push(49000)
|
||||
// o2data.push(50200)
|
||||
// o3data.push(55200)
|
||||
// categories.push('2017-05')
|
||||
// odata.push(49400)
|
||||
// o2data.push(50800)
|
||||
// o3data.push(56100)
|
||||
// categories.push('2017-06')
|
||||
// odata.push(49600)
|
||||
// o2data.push(51900)
|
||||
// o3data.push(56900)
|
||||
// categories.push('2017-07')
|
||||
// odata.push(48400)
|
||||
// o2data.push(53100)
|
||||
// o3data.push(59400)
|
||||
// categories.push('2017-08')
|
||||
// odata.push(52200)
|
||||
// o2data.push(51200)
|
||||
// o3data.push(62400)
|
||||
// categories.push('2017-09')
|
||||
// odata.push(54900)
|
||||
// o2data.push(56200)
|
||||
// o3data.push(65600)
|
||||
// categories.push('2017-10')
|
||||
// odata.push(57400)
|
||||
// o2data.push(57000)
|
||||
// o3data.push(66800)
|
||||
// categories.push('2017-11')
|
||||
// odata.push(54800)
|
||||
// o2data.push(56700)
|
||||
// o3data.push(66200)
|
||||
// categories.push('2017-12')
|
||||
// odata.push(55000)
|
||||
// o2data.push(58300)
|
||||
// o3data.push(66000)
|
||||
// categories.push('2018-01')
|
||||
//
|
||||
// o3.data = o3data
|
||||
// series.push(o3);
|
||||
//
|
||||
// o2.data = o2data
|
||||
// series.push(o2);
|
||||
//
|
||||
// charts = Highcharts.chart('chart', {
|
||||
// title: {
|
||||
// text: ''
|
||||
// },
|
||||
// subtitle: {
|
||||
// text: '',
|
||||
// x: -20
|
||||
// },
|
||||
// colors: ['#F88C9F', '#AAD672', '#AE94E9'],
|
||||
// xAxis: {
|
||||
// categories: categories,
|
||||
// boundaryGap: false,
|
||||
// tickInterval: 2,
|
||||
// tickLength: 6,
|
||||
// labels: {
|
||||
// style: {
|
||||
// fontSize: 12
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// yAxis: {
|
||||
// allowDecimals: false,
|
||||
// title: {
|
||||
// text: ''
|
||||
// },
|
||||
// plotLines: [{
|
||||
// value: 0,
|
||||
// width: 1,
|
||||
// color: 'red'
|
||||
// }]
|
||||
// },
|
||||
// tooltip: {
|
||||
// valueSuffix: '元/㎡'
|
||||
// },
|
||||
// legend: {
|
||||
// layout: 'horizontal',
|
||||
// align: 'center',
|
||||
// verticalAlign: 'bottom',
|
||||
// y: 0,
|
||||
// borderWidth: 0
|
||||
// },
|
||||
// plotOptions: {
|
||||
// line: {
|
||||
// connectNulls: true //该设置会连接空值点
|
||||
// },
|
||||
// series: {
|
||||
// events: {
|
||||
// legendItemClick: function(e) {
|
||||
// return false;
|
||||
// }
|
||||
// },
|
||||
// marker: {
|
||||
// radius: 3, //曲线点半径,默认是4
|
||||
// symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// series: series,
|
||||
// credits: {
|
||||
// enabled: false
|
||||
// }
|
||||
// })
|
||||
//}
|
||||
//yearAvgPrice();
|
||||
function loadingChart(hid, city, region, name, type, cat){
|
||||
$.ajax({
|
||||
type : "GET",
|
||||
url : "../youfang/getDistrictPriceZouShi?id="+hid+"&type="+type+"&cat="+cat+"&city="+city+"®ion="+region+"&name="+name,
|
||||
dataType:"json",
|
||||
data : {},
|
||||
async:false,
|
||||
success : function(re) {
|
||||
var categories = new Array();
|
||||
var series = new Array();
|
||||
var cityObj = new Object();
|
||||
var regionObj = new Object();
|
||||
var districtObj = new Object();
|
||||
|
||||
districtObj.name = '<#if showObject??>${showObject.name!}</#if>';
|
||||
regionObj.name = '<#if showObject??>${showObject.region!}</#if>';
|
||||
cityObj.name = '<#if showObject??>${showObject.city!}</#if>';
|
||||
|
||||
series.push(districtObj);
|
||||
series.push(regionObj);
|
||||
series.push(cityObj);
|
||||
|
||||
var cityDatas = new Array();
|
||||
var regionDatas = new Array();
|
||||
var districtDatas = new Array();
|
||||
var m = re.timeKeys;
|
||||
if(m){
|
||||
for(var i=0;i<m.length;i++){
|
||||
var date = new Date(Number(m[i]))
|
||||
categories.push(date.format("yyyy-MM"));
|
||||
if(re.cityAvgZouShi[m[i]] == undefined){
|
||||
cityDatas.push(null);
|
||||
} else {
|
||||
cityDatas.push(re.cityAvgZouShi[m[i]]);
|
||||
}
|
||||
if (re.regionAvgZouShi[m[i]] == undefined) {
|
||||
regionDatas.push(null);
|
||||
} else {
|
||||
regionDatas.push(re.regionAvgZouShi[m[i]]);
|
||||
}
|
||||
|
||||
if (re.districtAvgZouShi[m[i]] == undefined){
|
||||
districtDatas.push(null);
|
||||
} else {
|
||||
districtDatas.push(re.districtAvgZouShi[m[i]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cityObj.data = cityDatas;
|
||||
regionObj.data = regionDatas;
|
||||
districtObj.data = districtDatas;
|
||||
|
||||
showChat(categories, series);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* 均价走势 */
|
||||
function showChat(categories, series) {
|
||||
charts =Highcharts.chart('chart02', {
|
||||
title: {
|
||||
text: ''
|
||||
text: '',
|
||||
x: -20 //center
|
||||
},
|
||||
subtitle: {
|
||||
text: '',
|
||||
x: -20
|
||||
},
|
||||
colors: ['#F88C9F', '#AAD672', '#AE94E9'],
|
||||
colors: ['#50a5fc', '#666', '#ff560c'],
|
||||
xAxis: {
|
||||
categories: categories,
|
||||
boundaryGap: false,
|
||||
tickInterval: 2,
|
||||
tickLength: 6,
|
||||
tickInterval: 3,
|
||||
tickLength: 8,
|
||||
labels: {
|
||||
style: {
|
||||
fontSize: 12
|
||||
'font-size': '12px'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -345,43 +522,41 @@ function yearAvgPrice(){
|
||||
plotLines: [{
|
||||
value: 0,
|
||||
width: 1,
|
||||
color: 'red'
|
||||
color: '#808080'
|
||||
}]
|
||||
},
|
||||
tooltip: {
|
||||
valueSuffix: '元/㎡'
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
connectNulls:true//该设置会连接空值点
|
||||
},
|
||||
series: {
|
||||
events: {
|
||||
legendItemClick: function(event) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
radius: 3, //曲线点半径,默认是4
|
||||
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
layout: 'horizontal',
|
||||
align: 'center',
|
||||
verticalAlign: 'bottom',
|
||||
y: 0,
|
||||
y: -15,
|
||||
borderWidth: 0
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
connectNulls: true //该设置会连接空值点
|
||||
},
|
||||
series: {
|
||||
events: {
|
||||
legendItemClick: function(e) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
radius: 3, //曲线点半径,默认是4
|
||||
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
}
|
||||
}
|
||||
},
|
||||
series: series,
|
||||
credits: {
|
||||
credits: {
|
||||
enabled: false
|
||||
}
|
||||
})
|
||||
}
|
||||
yearAvgPrice();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
<style>
|
||||
.list-block .item-text{-webkit-line-clamp:unset;}
|
||||
.content-padded img {width: auto;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -41,7 +42,7 @@
|
||||
<div id="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="newCss">
|
||||
<ul>
|
||||
<li><span>房贷</span></li>
|
||||
@@ -49,6 +50,7 @@
|
||||
<li><span>首套房</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
<div class="adBoxApp">
|
||||
<img src="../../images/wx_app.png">
|
||||
<p><label>有房 有家 有爱</label><br><small>更多房产资讯上有房APP</small></p>
|
||||
@@ -73,15 +75,22 @@
|
||||
<label class="icon icon-comments" for="search"></label>
|
||||
<input type="text" placeholder="我也说两句">
|
||||
</div>
|
||||
<span class="col-33">
|
||||
<!--<span class="col-33">
|
||||
<a class="praise"><i class="icon icon-praise-grey02"></i><font id="newsPraise">{{ newsDzCount }}</font></a>
|
||||
<a class="collection collection01"><i class="icon icon-collection01"></i></a>
|
||||
</span>
|
||||
</span>-->
|
||||
|
||||
<span class="praise col-15">
|
||||
<i class="icon icon-praise-grey02"></i><font id="newsPraise">{{ newsDzCount }}</font>
|
||||
</span>
|
||||
<span class="collection collection01 col-15">
|
||||
<i class="icon icon-collection01"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="searchbar row commentReleaseBox dn">
|
||||
<div class="search-input col-85">
|
||||
<input type="text" maxlength="250">
|
||||
<input type="text" maxlength="250" id="commentInput">
|
||||
</div>
|
||||
<a class="col-15" id="publishBtn">发布</a>
|
||||
</div>
|
||||
@@ -116,7 +125,7 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||
<script>
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
var id//= "183627425584775168";
|
||||
var id;//= "186182250936643584";
|
||||
var shareUrl = BASE_PATH+"/news/newDetail?newsId=";
|
||||
var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花";
|
||||
var sharehrefDes = "客观里面请!";
|
||||
@@ -472,10 +481,21 @@ $(".praise").on("click", function () {
|
||||
|
||||
//收藏
|
||||
$(".collection").on("click", function () {
|
||||
//doCollect();
|
||||
collect();
|
||||
});
|
||||
|
||||
function doCollect() {
|
||||
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
|
||||
clicked('../user/codeSms.html',true,false,{},{},function(){
|
||||
doCollect();
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
collect();
|
||||
}
|
||||
}
|
||||
function collect(){
|
||||
|
||||
axios.post("/rest/news/collect",{newsId : id}).then(function (response) {
|
||||
|
||||
var msg = response.data.message
|
||||
@@ -525,6 +545,7 @@ $(".commentReleaseBox a").on("click", function () {
|
||||
|
||||
function addComment(){
|
||||
var content = $(".commentReleaseBox input").val();
|
||||
content = utf16toEntities(content);
|
||||
axios.post("/rest/comment/add",{commentObjId : id, content:content, commentUserProvince:province, commentUserCity:city}).then(function (response) {
|
||||
var msg = response.data.message
|
||||
if(msg){
|
||||
@@ -538,17 +559,40 @@ function addComment(){
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
mui.init({
|
||||
beforeback: function() {
|
||||
//获得父页面的webview
|
||||
var list = plus.webview.getWebviewById('yfindex.html');
|
||||
//触发父页面的自定义事件(refresh),从而进行刷新
|
||||
mui.fire(list, 'refresh');
|
||||
//返回true,继续页面关闭逻辑
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
function utf16toEntities(str) {
|
||||
var patt = /[\ud800-\udbff][\udc00-\udfff]/g; // 检测utf16字符正则
|
||||
str = str.replace(patt, function(char) {
|
||||
var H, L, code;
|
||||
if (char.length === 2) {
|
||||
H = char.charCodeAt(0);
|
||||
// 取出高位
|
||||
L = char.charCodeAt(1);
|
||||
// 取出低位
|
||||
code = (H - 0xD800) * 0x400 + 0x10000 + L - 0xDC00;
|
||||
//转换算法
|
||||
return "&#" + code + ";";
|
||||
} else {
|
||||
return char;
|
||||
}
|
||||
});
|
||||
return str;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#commentInput').on('click', function () {
|
||||
var target = this;
|
||||
// 使用定时器是为了让输入框上滑时更加自然
|
||||
/*setTimeout(function(){
|
||||
target.scrollIntoView(true);
|
||||
},100);*/
|
||||
setTimeout(function(){
|
||||
document.body.scrollTop = document.body.scrollHeight;
|
||||
target.scrollIntoView(true);
|
||||
},100);
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -84,6 +84,7 @@ $.config = {router: false}
|
||||
<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/plus.info.js" ></script>
|
||||
<script>
|
||||
|
||||
timer = {
|
||||
@@ -147,12 +148,40 @@ new Vue({
|
||||
$(".waiting").show();
|
||||
$(".sendCode").hide();
|
||||
timer.start();
|
||||
axios.post("/rest/user/sendMobileCode", {
|
||||
mobile:this.mobile, type:'binding'
|
||||
})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
$.toast(resData.message);
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
timer.cancel()
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
// 绑定手机
|
||||
binding: function() {
|
||||
if (this.checkMobile() && this.checkSmsCode()) {
|
||||
|
||||
axios.post("/rest/user/bindMobile", {
|
||||
mobile:this.mobile, smsCode:this.smsCode, province:province, city:city, region:region, pushClientId:getPushInfo()
|
||||
})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
$.toast(resData.message);
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<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/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav">
|
||||
<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">快捷登录</h1>
|
||||
@@ -37,7 +37,7 @@
|
||||
<input type="number" id="input_phoneNumber" class="textAlignLeft" placeholder="请输入手机号码">
|
||||
<label>
|
||||
<span id="sendPhoneCode" class="sendCode theme" @click="sendCode()">获取验证码</span>
|
||||
<span class="waiting theme dn">48 s</span>
|
||||
<span id="getTime" class="waiting theme dn">60 s</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,17 +63,17 @@
|
||||
我已阅读并接受<a href="05_mine05_set03_agreement.html">《服务协议》</a>
|
||||
</p>
|
||||
<div class="content-block loginBox">
|
||||
<p><a href="05_mine01_index.html" class="button button-big button-fill theme" id="login_btn">登录</a></p>
|
||||
<p><a href="05_mine00_login02_password.html">账号密码登录</a></p>
|
||||
<p><a class="button button-big button-fill theme" id="login_btn">登录</a></p>
|
||||
<p><a href="passLogin.html">账号密码登录</a></p>
|
||||
</div>
|
||||
<div class="content-block loginMode">
|
||||
<p class="line">
|
||||
<span>第三方登录</span>
|
||||
</p>
|
||||
<p>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode01"></a>
|
||||
<a class="icon icon-loginMode01" id="wxLogin" onclick="webChatLogin()"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode02"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode03"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode03" id="qqLogin"></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,15 +92,16 @@ $.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/mui.min.js" charset="utf-8"></script>
|
||||
<script 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/login/codeSms.js" ></script>
|
||||
<script type="text/javascript" src="../../js/login/wxLogin.js" ></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
|
||||
<script>
|
||||
|
||||
/* 获取验证码等待状态 */
|
||||
$(".sendCode").click(function(){
|
||||
$(".waiting").show();
|
||||
$(".sendCode").hide();
|
||||
});
|
||||
|
||||
/* 勾选-已阅读 */
|
||||
$(".check").on("click", function () {
|
||||
@@ -112,19 +113,7 @@ $(".check").on("click", function () {
|
||||
}
|
||||
});
|
||||
|
||||
/* 错误提示-快捷登录 */
|
||||
$("#login_btn").on("click", function () {
|
||||
var a = $("#input_phoneNumber").val();
|
||||
var b = $("#input_codeSms").val();
|
||||
if(a == ""){
|
||||
$.toast("请输入手机号码");
|
||||
return false;
|
||||
}
|
||||
else if(b == ""){
|
||||
$.toast("请输入验证码");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<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">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="../../css/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group" id="app">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">账号密码登录</h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
<div class="list-block media-list">
|
||||
<ul>
|
||||
<li>
|
||||
<a class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><i class="icon icon-login01"></i></div>
|
||||
<div class="item-after">
|
||||
<input type="number" v-model="mobile" id="input_phoneNumber" class="textAlignLeft" placeholder="请输入手机号码">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><i class="icon icon-login03"></i></div>
|
||||
<div class="item-after">
|
||||
<input type="password" v-model="pass" id="input_password" class="textAlignLeft" placeholder="请输入密码">
|
||||
<i class="icon icon-eye-grey" @click="show"></i>
|
||||
<i class="icon icon-eye-orange dn" @click="hide"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content-block loginBox">
|
||||
<p><a class="button button-big button-fill theme" id="login_btn" @click="passLogin">登录</a></p>
|
||||
<p><a href="codeSms.html">快捷登录</a></p>
|
||||
</div>
|
||||
<div class="content-block loginMode">
|
||||
<p class="line">
|
||||
<span>第三方登录</span>
|
||||
</p>
|
||||
<p>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode01"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode02"></a>
|
||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode03"></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
|
||||
|
||||
<script>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
Zepto = $
|
||||
$.config = {router: false}
|
||||
|
||||
</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/vue.js" ></script>
|
||||
<script type="text/javascript" src="../../js/zepto.md5.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/plus.info.js" ></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
|
||||
<script>
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
mobile: '',
|
||||
pass: ''
|
||||
},
|
||||
methods: {
|
||||
// 手机号码检查
|
||||
checkMobile: function() {
|
||||
if(this.mobile == ""){
|
||||
$.toast("请输入手机号码");
|
||||
return false;
|
||||
}
|
||||
var mobile_reg = /^1\d{10}$/
|
||||
if (!mobile_reg.test(this.mobile)) {
|
||||
$.toast("手机号码格式错误");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
// 密码登录
|
||||
passLogin: function() {
|
||||
if (this.checkMobile()) {
|
||||
if (this.pass == '') {
|
||||
$.toast("请输入密码");
|
||||
return;
|
||||
}
|
||||
axios.post("/rest/user/passLogin", {mobile:this.mobile, pass: $.md5(this.pass), pushClientId:getPushInfo()})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
// 用户登录成功的TOKEN
|
||||
var token = resData.data;
|
||||
localStorage.setItem("user_token", token);
|
||||
$.toast(resData.message);
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
/* 密码显示&隐藏 */
|
||||
show: function() {
|
||||
$(".list-block .item-after .icon-eye-grey").hide();
|
||||
$(".list-block .item-after .icon-eye-orange").show();
|
||||
$("#input_password").attr("type","text");
|
||||
},
|
||||
hide: function() {
|
||||
$(".list-block .item-after .icon-eye-orange").hide();
|
||||
$(".list-block .item-after .icon-eye-grey").show();
|
||||
$("#input_password").attr("type","password");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+51
-22
@@ -60,7 +60,7 @@
|
||||
<i class="icon icon-address04"></i>
|
||||
<input type="hidden" id="region_copy" v-model="region" readonly="readonly">
|
||||
<a id="region">{{region}}</a>
|
||||
<i class="icon icon-down"></i>
|
||||
<i class="icon icon-down" id="regionIcon"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
@@ -1253,7 +1253,6 @@ function getPosition(){
|
||||
$("#input_city").text("北京");
|
||||
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
|
||||
|
||||
|
||||
initBaseInfo(city,region,address,lat,lng);
|
||||
if(city!="上海"){
|
||||
initRegionSelect(city);
|
||||
@@ -1269,7 +1268,9 @@ function getPosition(){
|
||||
initRegionSelect(city);
|
||||
localStorage.setItem("init_city", city);
|
||||
addLocation(lat,lng);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
$("#ShangHaiDiv").show();
|
||||
$("#otherCityDiv").hide();
|
||||
},
|
||||
{
|
||||
provider:'baidu',
|
||||
@@ -1436,6 +1437,27 @@ function loadRegion(){
|
||||
regionChangeCount = 0;
|
||||
}
|
||||
});
|
||||
$("#regionIcon").picker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01c">\
|
||||
<button class="button button-link pull-right close-picker" id="regionStatusButton">确定</button>\
|
||||
<h1 class="title">选择区域</h1>\
|
||||
</header>',
|
||||
cols: [
|
||||
{
|
||||
textAlign: "center",
|
||||
values: regionList
|
||||
}
|
||||
],onOpen:function(p){
|
||||
p.cols[0].replaceValues(regionList);
|
||||
},onClose:function(p){
|
||||
regionPicker = p.value[0];
|
||||
if(!regionChangeRegion && regionChangeCount==1){
|
||||
document.getElementById("regionStatusButton").click();
|
||||
}
|
||||
regionChangeRegion = true;
|
||||
regionChangeCount = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
$("body").delegate("#regionStatusButton", "click", function (){
|
||||
regionChangeRegion = false;
|
||||
@@ -1703,7 +1725,7 @@ function addItems(number, lastIndex) {
|
||||
'<div class="card-footer">'+
|
||||
'<span>'+
|
||||
'<i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+dataObj[i].visitCount+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条</label>'+
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
@@ -1803,7 +1825,7 @@ function addItems(number, lastIndex) {
|
||||
dataObj[i].title+'</div></div>'+
|
||||
'<div class="item-subtitle"><font>'+dataObj[i].introduction+'</font></div>'+
|
||||
'<div class="item-subtitle"><span><i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+dataObj[i].visitCount+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条</span></div></div>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条</label></span></div></div>'+
|
||||
'<div class="item-media"><img src='+dataObj[i].coverImg+'></div>'+
|
||||
'</li></ul></div></div></div>';
|
||||
}
|
||||
@@ -2250,7 +2272,7 @@ $("body").delegate("#select_region .button", "click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2325,7 +2347,7 @@ $(".confirm_btn").on("click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2378,7 +2400,7 @@ $("#select_order li").on("click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2448,7 +2470,7 @@ function getCityPriceLevel(cityParam){
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2523,21 +2545,28 @@ function getDistrictList(cityParam,latParam,lngParam,regionParam,order,minPrice,
|
||||
|
||||
mui.init();
|
||||
function openNewsView(newId) {
|
||||
mui.openWindow({
|
||||
url: 'views/news/newsDetail.html',
|
||||
id:'newsDetail.html',
|
||||
extras:{
|
||||
newsId:newId //扩展参数
|
||||
}
|
||||
});
|
||||
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
||||
$("#visitCount_"+newId).text(count+'人');
|
||||
//mui.openWindow({
|
||||
// url: 'views/news/newsDetail.html',
|
||||
// id:'newsDetail.html',
|
||||
// extras:{
|
||||
// newsId:newId //扩展参数
|
||||
// }
|
||||
// });
|
||||
clicked('views/news/newsDetail.html',true,false,{},{newsId:newId},function(newId){
|
||||
axios.post("/rest/comment/getCommentCount",{commentObjId : newId}).then(function (response) {
|
||||
var msg = response.data.message
|
||||
if(response.data.status){
|
||||
$("#visitComment_"+newId).text(response.data.data+"条");
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},newId);
|
||||
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
||||
$("#visitCount_"+newId).text(count+'人');
|
||||
}
|
||||
|
||||
window.addEventListener('refresh', function(e){//执行刷新
|
||||
alert("aa");
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
/* 获取附近小区名称字数,截取附近小区名称前5字,并添加... */
|
||||
|
||||
Reference in New Issue
Block a user