Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
# Conflicts: # fangija-zsyf/config.js
This commit is contained in:
@@ -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;}
|
||||
|
||||
@@ -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 "";
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
<style>
|
||||
.list-block .item-text{-webkit-line-clamp:unset;}
|
||||
.content-padded img {width: auto;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -73,15 +74,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 +124,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 +480,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 +544,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 +558,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