|
@@ -0,0 +1,201 @@
|
|
|
+<template>
|
|
|
+ <div class="login">
|
|
|
+ <div class="top">
|
|
|
+ <div class="img"><img src="../images/check.png" alt=""></div>
|
|
|
+ <h4>欢迎使用智能预问诊</h4>
|
|
|
+ </div>
|
|
|
+ <div class="main">
|
|
|
+ <div class="iptWrap choose">
|
|
|
+ <p @click="handleShow">{{name}} <img src="../images/down.png" /></p>
|
|
|
+ <div class="slideType" v-if="show">
|
|
|
+ <ul>
|
|
|
+ <li @click="handleType('手机号',1)">手机号</li>
|
|
|
+ <li @click="handleType('身份证号',2)">身份证号</li>
|
|
|
+ <li @click="handleType('病历号',3)">病历号</li>
|
|
|
+ <li @click="handleType('市民卡号',4)" style="border:0 none">市民卡号</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="iptWrap number">
|
|
|
+ <input @blur="blur" :maxlength="type==1?11:type==2?18:type==3?7:type==4?9:30" v-model="value" @input="changeVal" :type="type!=2?'tel':'text'" class="input" type="text" :placeholder="'请输入'+name" >
|
|
|
+ </div>
|
|
|
+ <div :class="['btn',value?'btnClick':'btnDis']" @click="handleDepart">进入预问诊</div>
|
|
|
+ </div>
|
|
|
+ <div class="tip">
|
|
|
+ 注:建议您可先输入病情情况,方便医生提前了解情况
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import {phoneTest,identify} from '@utils/tools.js';
|
|
|
+ export default {
|
|
|
+ name: "Login",
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ show:false,
|
|
|
+ type:'1',
|
|
|
+ name:'手机号',
|
|
|
+ value:''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ handleType(name,type){
|
|
|
+ let tmpType=this.type
|
|
|
+ if(tmpType != type){
|
|
|
+ this.name = name
|
|
|
+ this.type = type
|
|
|
+ this.value = ''
|
|
|
+ }
|
|
|
+ this.show = false
|
|
|
+ },
|
|
|
+ handleShow(){
|
|
|
+ const {show} = this
|
|
|
+ this.show = !show
|
|
|
+ },
|
|
|
+ blur(){
|
|
|
+ document.activeElement.scrollIntoViewIfNeeded(true);
|
|
|
+ setTimeout(()=>{
|
|
|
+ document.activeElement.scrollIntoViewIfNeeded(true);
|
|
|
+ },300)
|
|
|
+ },
|
|
|
+ changeVal(){
|
|
|
+ document.activeElement.scrollIntoViewIfNeeded(true);
|
|
|
+ if(this.type != 2){
|
|
|
+ this.value=this.value.replace(/[^\d]/g,'')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleDepart(){
|
|
|
+ const {type,value} = this
|
|
|
+ if(type == 1){
|
|
|
+ console.log(phoneTest.test(value))
|
|
|
+ if(!phoneTest.test(value)){//验证不通过
|
|
|
+
|
|
|
+ }
|
|
|
+ }else if(type == 2){
|
|
|
+
|
|
|
+ }else if(type == 3){
|
|
|
+
|
|
|
+ }else if(type == 4){
|
|
|
+
|
|
|
+ }
|
|
|
+ if(value){
|
|
|
+ this.$router.replace({path:'/department'})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+ .login {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ position: fixed;
|
|
|
+ background:linear-gradient(180deg,rgba(79,79,255,1) 0%,rgba(79,137,255,1) 100%);
|
|
|
+ padding: .3rem .6rem;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .top {
|
|
|
+ .img {
|
|
|
+ width: 1.6rem;
|
|
|
+ height: 1.6rem;
|
|
|
+ background-color: red;
|
|
|
+ margin: 1rem auto 0 auto;
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ h4 {
|
|
|
+ font-size: .42rem;
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: 0.5rem;
|
|
|
+ margin-bottom: .8rem;
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .main {
|
|
|
+ width:100%;
|
|
|
+ height:5.34rem;
|
|
|
+ background:#fff;
|
|
|
+ border-radius:.2rem;
|
|
|
+ padding: .8rem .6rem;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-size: .3rem;
|
|
|
+ .iptWrap {
|
|
|
+ width:100%;
|
|
|
+ height:.88rem;
|
|
|
+ background:rgba(242,242,245,1);
|
|
|
+ border-radius:.1rem;
|
|
|
+ padding: .23rem .3rem;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ .choose {
|
|
|
+ position: relative;
|
|
|
+ p {
|
|
|
+ width: 100%;
|
|
|
+ position: relative;
|
|
|
+ img {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ width: .4rem;
|
|
|
+ height: .4rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .slideType {
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 10;
|
|
|
+ width: 100%;
|
|
|
+ top: 0.88rem;
|
|
|
+ left: 0;
|
|
|
+ box-shadow:0px 4px 20px 0px rgba(102,102,102,0.18);
|
|
|
+ border-radius:.1rem;
|
|
|
+ background-color: #fff;
|
|
|
+ padding: .1rem .3rem 0 .3rem;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-size: .28rem;
|
|
|
+ li {
|
|
|
+ border-bottom: 1px solid #F5F5F5;
|
|
|
+ height: .6rem;
|
|
|
+ line-height: .6rem;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .number {
|
|
|
+ margin: .3rem 0 .8rem 0;
|
|
|
+ .input{
|
|
|
+ float: left;
|
|
|
+ color:rgba(51,51,51,1);
|
|
|
+ height:.42rem;
|
|
|
+ line-height:.42rem;
|
|
|
+ width: 100%;
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ width:100%;
|
|
|
+ height:.88rem;
|
|
|
+ line-height:.88rem;
|
|
|
+ text-align: center;
|
|
|
+ background:linear-gradient(270deg,rgba(79,139,255,1) 0%,rgba(79,79,255,1) 100%);
|
|
|
+ border-radius:.44rem;
|
|
|
+ color: #fff;
|
|
|
+ font-size: .32rem;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ .btnDis {
|
|
|
+ opacity: 0.3;
|
|
|
+ }
|
|
|
+ .btnClick {
|
|
|
+ opacity:1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tip {
|
|
|
+ color: #fff;
|
|
|
+ font-size: .24rem;
|
|
|
+ margin-top: .6rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|