Commit 566847a0 by 陈超

T

parent a5884f0c
...@@ -129,6 +129,11 @@ div::-webkit-scrollbar { ...@@ -129,6 +129,11 @@ div::-webkit-scrollbar {
font-weight: 600; font-weight: 600;
} }
.text_26_600 {
font-size: 1.625rem;
font-weight: 600;
}
.divider { .divider {
height: 0.0625rem; height: 0.0625rem;
background: #E6E6E6; background: #E6E6E6;
...@@ -460,4 +465,16 @@ div::-webkit-scrollbar { ...@@ -460,4 +465,16 @@ div::-webkit-scrollbar {
.center_bottom_cell_text { .center_bottom_cell_text {
margin-left: 0.5rem; margin-left: 0.5rem;
}
/* 登录 */
.login_title {
margin-top: 0.625rem;
margin-left: 2.1875rem;
margin-bottom: 1.5625rem;
}
.login_input_frame {
} }
\ No newline at end of file
<include file="__THEME__/_header_w3g" /> <include file="__THEME__/_header_w3g" />
<!--container--> <!--container-->
<!-- <div class="loginbox"> <!-- <div class="loginbox">
<a class="icon-colse" href="/"></a> <a class="icon-colse" href="/"></a>
<if condition="$site.logo_head_h5 neq ''"><img src="{$site.logo_head_h5}" class="login-logo"> <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> <else /><img src="{$site.logo_head_w3g|default=$site['logo_head']}" class="login-logo"></if>
<div class="login-hd"> <div class="login-hd">
<li class="on"><a href="javascript:;">登录</a></li> <li class="on"><a href="javascript:;">登录</a></li>
<li>|</li> <li>|</li>
<li> <li>
<php>if($this_mhm_id) {</php> <php>if($this_mhm_id) {</php>
<a href="{:U('basic/Passport/reg',array('this_mhm_id'=> $this_mhm_id))}">注册</a> <a href="{:U('basic/Passport/reg',array('this_mhm_id'=> $this_mhm_id))}">注册</a>
<php>}else{</php> <php>}else{</php>
<a href="{:U('basic/Passport/reg')}">注册</a> <a href="{:U('basic/Passport/reg')}">注册</a>
<php>}</php> <php>}</php>
</li> </li>
</div> </div>
<div class="login-bd"> <div class="login-bd">
<form id="ajax_login_form" method="POST" id="account_input" name="login_email" action="{:U('basic/Passport/doLogin')}"> <form id="ajax_login_form" method="POST" id="account_input" name="login_email" action="{:U('basic/Passport/doLogin')}">
<div class="item"> <div class="item">
<span class="item-title">账号</span> <span class="item-title">账号</span>
<input type="text" name="login_email" placeholder="请输入用户名/手机号/邮箱"> <input type="text" name="login_email" placeholder="请输入用户名/手机号/邮箱">
</div> </div>
<div class="item"> <div class="item">
<span class="item-title">密码</span> <span class="item-title">密码</span>
<php>if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false):</php> <php>if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false):</php>
<input id="pwd_input" name="login_password" type="text" class="inp" autocomplete="off" placeholder="请输入登录密码"/> <input id="pwd_input" name="login_password" type="text" class="inp" autocomplete="off" placeholder="请输入登录密码"/>
<php>else:</php> <php>else:</php>
<input id="pwd_input" name="login_password" type="password" class="inp" autocomplete="off" placeholder="请输入登录密码" /> <input id="pwd_input" name="login_password" type="password" class="inp" autocomplete="off" placeholder="请输入登录密码" />
<php>endif;</php> <php>endif;</php>
</div> </div>
</form> </form>
</div> </div>
<a class="login_btn" href="javascript:;" >登录</a> <a class="login_btn" href="javascript:;" >登录</a>
<eq name="face_login" value="1"> <eq name="face_login" value="1">
<a href="{:U('basic/Passport/faceLogin')}" style="background: url('__THEME__/images/face_scanning.png') no-repeat;" class="face_icon"></a> <a href="{:U('basic/Passport/faceLogin')}" style="background: url('__THEME__/images/face_scanning.png') no-repeat;" class="face_icon"></a>
</eq> </eq>
<if condition="$child_host eq 0"> <if condition="$child_host eq 0">
<php>if(Eduline\Addons::requireHooks('login_input_footer') && Eduline\Addons::hook('login_input_footer')):</php> <php>if(Eduline\Addons::requireHooks('login_input_footer') && Eduline\Addons::hook('login_input_footer')):</php>
{:Eduline\\Addons::hook('login_input_footer')} {:Eduline\\Addons::hook('login_input_footer')}
<php>endif;</php> <php>endif;</php>
</if> </if>
<a class="fr" href="{:U('home/Repwd/index')}">忘记密码</a> <a class="fr" href="{:U('home/Repwd/index')}">忘记密码</a>
</div> --> </div> -->
<div id="app"> <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();
});
let CLICK_PHONE="{:U('basic/Passport/clickPhone')}"; <div class="layout_v">
let GET_PHONEVERIFY="{:U('basic/Passport/getVerify')}";
<span class="text_26_600 color_333333 login_title">账号登录</span>
<div class="login_input_frame">
<van-field value="请输入手机号" readonly />
<van-field value="请输入8~16位密码" readonly />
</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();
});
String.prototype.isMobile = function() { String.prototype.isMobile = function() {
return (/^1[3|4|5|6|7|8|9]\d{9}$/.test(this)); 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() { String.prototype.isPwd = function() {
return this.length >= 6 && this.length <= 16 return this.length >= 8 && this.length <= 16
} }
new Vue({ new Vue({
el: '#app', el: '#app',
data: function() { data: function() {
return { return {
counting: false, phone: '',
count: 60, password: ''
phone: "",
code: "",
password: ""
} }
}, },
computed: { computed: {
valid: function() {
return !this.counting
},
codeText: function() {
return this.counting ? (this.count + 's') : '发验证码'
},
isOk: function() { isOk: function() {
return this.phone.isMobile() && this.code.isCode() && this.password.isPwd() return this.phone.isMobile() && this.password.isPwd()
} }
}, },
methods: { methods: {
onConfirm: function() {
let user = this.phone//获取用户邮箱地址
let verify = this.code//获取验证码
let uname = "用户" + parseInt(Math.random() * 1000)//获取用户昵称
let password = this.password//获取密码
let mhm_id = ''//机构
let invite_code = ''//邀请码
$.ajax({
async:false,
type: "POST",
url:REG_ADDRESS,
data:"phone="+user+"&uname="+uname+"&password="+password+"&type=2&verify="+verify+"&mhm_id="+mhm_id+"&invite_code="+invite_code,
dataType:"json",
success:function(data){
if( data.status == '0'){
ui.error(data.info)
return
}else{
ui.success("注册成功")
location = data.data
}
}
})
},
onSendCode: function() {
this.checkPhone(this.readyToSend)
},
readyToSend: function() {
let that = this
if(!this.counting) {
let phone = that.phone
$.ajax({
type: "POST",
url:GET_PHONEVERIFY,
data:"phone="+phone,
dataType:"json",
success:function(data){
if(data.status=='0'){
ui.error(data.info)
return
}else{
that.counting = true
that.onTick()
return
}
}
})
}
},
checkPhone: function(call) {
let phone = this.phone
//验证此手机是否已被注册
$.ajax({
type: "POST",
url:CLICK_PHONE,
data:"phone="+phone,
dataType:"text",
success:function(data){
if(data==0){
ui.error('此手机已被注册,请更换');
return;
}else{
call && call()
}
}
});
},
onTick: function() {
if(this.count > 0) {
this.count -= 1
setTimeout(this.onTick, 1000)
} else {
this.count = 60
this.counting = false
}
}
} }
}) })
</script> </script>
...@@ -100,7 +100,23 @@ ...@@ -100,7 +100,23 @@
</div> </div>
</if> </if>
</div> </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> <script>
$(function(){ $(function(){
...@@ -364,4 +380,124 @@ function phoneNext(){ ...@@ -364,4 +380,124 @@ function phoneNext(){
} }
}); });
} }
// let CLICK_PHONE="{:U('basic/Passport/clickPhone')}";
// let GET_PHONEVERIFY="{:U('basic/Passport/getVerify')}";
// 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() {
// let user = this.phone//获取用户邮箱地址
// let verify = this.code//获取验证码
// let uname = "用户" + parseInt(Math.random() * 1000)//获取用户昵称
// let password = this.password//获取密码
// let mhm_id = ''//机构
// let invite_code = ''//邀请码
// $.ajax({
// async:false,
// type: "POST",
// url:REG_ADDRESS,
// data:"phone="+user+"&uname="+uname+"&password="+password+"&type=2&verify="+verify+"&mhm_id="+mhm_id+"&invite_code="+invite_code,
// dataType:"json",
// success:function(data){
// if( data.status == '0'){
// ui.error(data.info)
// return
// }else{
// ui.success("注册成功")
// location = data.data
// }
// }
// })
// },
// onSendCode: function() {
// this.checkPhone(this.readyToSend)
// },
// readyToSend: function() {
// let that = this
// if(!this.counting) {
// let phone = that.phone
// $.ajax({
// type: "POST",
// url:GET_PHONEVERIFY,
// data:"phone="+phone,
// dataType:"json",
// success:function(data){
// if(data.status=='0'){
// ui.error(data.info)
// return
// }else{
// that.counting = true
// that.onTick()
// return
// }
// }
// })
// }
// },
// checkPhone: function(call) {
// let phone = this.phone
// //验证此手机是否已被注册
// $.ajax({
// type: "POST",
// url:CLICK_PHONE,
// data:"phone="+phone,
// dataType:"text",
// success:function(data){
// if(data==0){
// ui.error('此手机已被注册,请更换');
// return;
// }else{
// call && call()
// }
// }
// });
// },
// onTick: function() {
// if(this.count > 0) {
// this.count -= 1
// setTimeout(this.onTick, 1000)
// } else {
// this.count = 60
// this.counting = false
// }
// }
// }
// })
</script> </script>
...@@ -114,13 +114,16 @@ ...@@ -114,13 +114,16 @@
<van-tabbar-item> <van-tabbar-item>
<span class="text_10_400">会员中心</span> <span class="text_10_400">会员中心</span>
<template #icon="props"> <template #icon="props">
<if condition="$_SESSION['mid']"> <a href="{:U('basic/Passport/login')}">
<img :src="props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'" />
</a>
<!-- <if condition="$_SESSION['mid']">
<a href="{:U('home/User/index')}"> <a href="{:U('home/User/index')}">
<else/> <else/>
<a href="{:U('basic/Passport/login')}"> <a href="{:U('basic/Passport/login')}">
</if> </if>
<img :src="props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'" /> <img :src="props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'" />
</a> </a> -->
</template> </template>
</van-tabbar-item> </van-tabbar-item>
</van-tabbar> </van-tabbar>
......
<include file="__THEME__/public_header_w3g" /> <include file="__THEME__/public_header_w3g" />
<!-- <link href="__APP__/css/index_3g.css" rel="stylesheet" type="text/css">
<style>
.myIndexBanner .min-myIndexBanner .myIndex-top .myIndexInfo i.autograph{position: absolute; top: 0;left: 0;height: 100%;width: 20px;background-image:url(__APP__/icon/autograph.png);background-size: 0 100%;background-size: 10px;background-position: center;}
</style> -->
<body> <body>
<div id="app"> <div id="app">
<div class="layout_v tab_container center_top" style="background: url('__THEME__/img/bg@3x.png') no-repeat;"> <div class="layout_v tab_container center_top" style="background: url('__THEME__/img/bg@3x.png') no-repeat;">
......
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