注册页面
1. 路由配置
系统路由配置文件:resources\web.php
Route::get('/register', function () {
return view('register');
});
2. 模板规划
基础布局模板:resources\views\layout.blade.php
模板组件目录:resources\component
基础布局模板:resources\views\layout.blade.php
@yield('title')@yield('myjs')
注册模板文件:resources\views\register.blade.php
@extends('layout')
@section('title','注册')
@section('content')
手机注册
邮箱注册
$(function(){
$('input[name=type]').on('click',function(){
$('input[name=type]').attr('checked',false);
$(this).attr('checked',true);
if($(this).val()=='phone'){
$('input[name=phone]').parent().parent().show();
$('input[name=phone_vcode]').parent().parent().show();
$('input[name=email]').parent().parent().hide();
}
if($(this).val()=='email'){
$('input[name=email]').parent().parent().show();
$('input[name=phone]').parent().parent().hide();
$('input[name=phone_vcode]').parent().parent().hide();
}
});
})
@endsection