Commit 09bd6aec by 陈超

T

parent 99178d1b
<include file="__THEME__/_header_w3g" />
<style media="screen">
.fl{float: left;margin: 5px 0px 0 10px;width: 30px;height: 30px;}
.fr{display: block;margin-top: 5px;}
.icon-weixin:before{
content: ""!important;
}
.loginbox .logo-title{font-size:14px;color:#FFFFFF;font-weight:bold;margin-bottom:30px;}
.login-bd input:-webkit-autofill { box-shadow: 0 0 0px 1000px white inset;}
</style>
<!--container-->
<div class="loginbox">
<!-- <div class="loginbox">
<a class="icon-colse" href="/"></a>
<if condition="$site.logo_head_h5 neq ''"><img src="{$site.logo_head_h5}" class="login-logo">
<else /><img src="{$site.logo_head_w3g|default=$site['logo_head']}" class="login-logo"></if>
......@@ -53,36 +43,109 @@
<php>endif;</php>
</if>
<a class="fr" href="{:U('home/Repwd/index')}">忘记密码</a>
</div> -->
<div id="app">
<div class="layout_v" style="margin-top: 0.625rem;">
<van-field v-model="phone" label="手机号" type="number" placeholder="请输入手机号"></van-field>
<van-field v-model="code" label="验证码" type="digit" maxlength="6" placeholder="请输入验证码">
<template #button>
<div @click="onSendCode" class="layout_center" :class="valid ? 'button_green' : 'button_disable'">
<span class="self_center">{{codeText}}</span>
</div>
</template>
</van-field>
<van-field v-model="password" label="密码" type="password" maxlength="16" placeholder="请输入8~16位密码"></van-field>
<div :class="isOk ? 'confirm_button' : 'confirm_button_disable'" style="margin-top: 6.625rem;">
<span>注册并登录</span>
</div>
</div>
</div>
<script>
$(function(){
$('.loginbox').height($('.loginbox')[0].clientHeight);
$('.login_btn').click(function(){
if($('#account_input').val() == ''){
ui.error('登录名或登录账号不能为空');
return;
}
if($('#pwd_input').val() == ''){
ui.error('登录密码不能为空');
return;
}
$.post(U('basic/Passport/doLogin'),$('#ajax_login_form').serialize(),function(data){
if(data.status == 1){
ui.success('登录成功');
var reurl = "{$reurl}";
if(reurl) {
window.location.href = reurl;
} else {
window.location.href = data.data;;
}
} else {
ui.error(data.info);
return false;
}
},'json');
});
$("#preloader").hide();
});
// $(function(){
// $('.loginbox').height($('.loginbox')[0].clientHeight);
// $('.login_btn').click(function(){
// if($('#account_input').val() == ''){
// ui.error('登录名或登录账号不能为空');
// return;
// }
// if($('#pwd_input').val() == ''){
// ui.error('登录密码不能为空');
// return;
// }
// $.post(U('basic/Passport/doLogin'),$('#ajax_login_form').serialize(),function(data){
// if(data.status == 1){
// ui.success('登录成功');
// var reurl = "{$reurl}";
// if(reurl) {
// window.location.href = reurl;
// } else {
// window.location.href = data.data;;
// }
// } else {
// ui.error(data.info);
// return false;
// }
// },'json');
// });
// $("#preloader").hide();
// });
String.prototype.isMobile = function() {
return (/^1[3|4|5|6|7|8|9]\d{9}$/.test(this));
}
String.prototype.isCode = function() {
return this.length == 4 || this.length == 6
}
String.prototype.isPwd = function() {
return this.length >= 6 && this.length <= 16
}
new Vue({
el: '#app',
data: function() {
return {
counting: false,
count: 60,
phone: "",
code: "",
password: ""
}
},
computed: {
valid: function() {
return !this.counting
},
codeText: function() {
return this.counting ? (this.count + 's') : '发验证码'
},
isOk: function() {
return this.phone.isMobile() && this.code.isCode() && this.password.isPwd()
}
},
methods: {
onConfirm: function() {
},
onSendCode: function() {
if(!this.counting) {
this.counting = true
this.onTick()
}
},
onTick: function() {
if(this.count > 0) {
this.count -= 1
setTimeout(this.onTick, 1000)
} else {
this.count = 60
this.counting = false
}
}
}
})
</script>
......@@ -80,7 +80,7 @@
</eq>
</volist>
</div>
<div id="nav">
<div>
<van-tabbar
v-model="active"
@change="onChange"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment