After Width: | Height: | Size: 259 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 773 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 397 B |
After Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 174 KiB |
After Width: | Height: | Size: 141 KiB |
After Width: | Height: | Size: 625 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 239 B |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 419 B |
@ -0,0 +1,405 @@ |
|||||||
|
<template> |
||||||
|
<div class="wrap index"> |
||||||
|
<div class="banner"> |
||||||
|
<img class="text" src="@/assets/img/about/banner-text.png" alt=""> |
||||||
|
</div> |
||||||
|
<div class="intro"> |
||||||
|
<div class="inner"> |
||||||
|
<div class="pics"> |
||||||
|
<div class="text"> |
||||||
|
<div class="title-wrap"> |
||||||
|
<p class="title">或然科技有限公司</p> |
||||||
|
<p class="brief">始于2019年</p> |
||||||
|
<p class="en">HUORAN TECH</p> |
||||||
|
</div> |
||||||
|
<p class="desc wow fadeInLeft" data-wow-delay="0.7s">公司致力于采用业界领先的信息化技术和过硬的软件研发能力服务于各大高校、金融机构等行业,利用我司技术优势将区块链、云计算、大数据、人工智能等行业前沿技术与金融、教育等行业进行深度融合,为客户提供功能先进、运行高效且便于使用的产业信息化综合解决方案。</p> |
||||||
|
<p class="desc wow fadeInLeft" data-wow-delay="0.7s">公司自组建以来已成功研发并交付多款信息化产品的定制项目。截至目前,或然累计服务包括河海大学、电科科技大学、四川大学、闽江学院、巢湖学院、山东财经大学等高校。</p> |
||||||
|
</div> |
||||||
|
<img class="bg" src="@/assets/img/about/about1.png" alt=""> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="service"> |
||||||
|
<div class="inner"> |
||||||
|
<h6>随时、随地、贴心为您提供全方位服务</h6> |
||||||
|
<p class="text">At anytime,anywhere,intimate to provide you with a full range of services</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="culture"> |
||||||
|
<div class="inner"> |
||||||
|
<h6 class="i-title">企业文化</h6> |
||||||
|
<p class="en">CORPORATE CULTURE</p> |
||||||
|
<ul class="list"> |
||||||
|
<li class="wow fadeInDown" data-wow-delay="0.5s"> |
||||||
|
<img src="@/assets/img/about/about4.png" alt=""> |
||||||
|
<h6>使命</h6> |
||||||
|
<p class="text">成为教育产业数字化的推动者</p> |
||||||
|
</li> |
||||||
|
<li class="wow fadeInRight" data-wow-delay="0.8s"> |
||||||
|
<img src="@/assets/img/about/about5.png" alt=""> |
||||||
|
<h6>愿景</h6> |
||||||
|
<p class="text">成就百万教育产业数字化的创业者</p> |
||||||
|
</li> |
||||||
|
<li class="wow fadeInUp" data-wow-delay="1.1s"> |
||||||
|
<img src="@/assets/img/about/about6.png" alt=""> |
||||||
|
<h6>核心价值观</h6> |
||||||
|
<p class="text">公正、诚信、创新、实干</p> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="progress"> |
||||||
|
<div class="inner"> |
||||||
|
<h6 class="i-title">发展历程</h6> |
||||||
|
<p class="en">MILESTONE</p> |
||||||
|
<ul class="list"> |
||||||
|
<li> |
||||||
|
<img class="arrow" src="@/assets/img/about/arrow.png" alt=""> |
||||||
|
<h6>2018.12</h6> |
||||||
|
<p class="text">或然科技筹备成立</p> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<h6>2019.12</h6> |
||||||
|
<p class="text">核心团队组建完成</p> |
||||||
|
<img class="arrow" src="@/assets/img/about/arrow.png" alt=""> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<img class="arrow" src="@/assets/img/about/arrow.png" alt=""> |
||||||
|
<h6>2020.10</h6> |
||||||
|
<p class="text">或然技术中台V1.0发布</p> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<h6>2021.03</h6> |
||||||
|
<p class="text">职站平台V1.0发布</p> |
||||||
|
<img class="arrow" src="@/assets/img/about/arrow.png" alt=""> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<img class="arrow" src="@/assets/img/about/arrow.png" alt=""> |
||||||
|
<h6>2021.07</h6> |
||||||
|
<p class="text">助力第一个城市合伙人完成了第一个项目落地</p> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<h6>2022.05</h6> |
||||||
|
<p class="text">Dataforward平台V1.0发布</p> |
||||||
|
<img class="arrow" src="@/assets/img/about/arrow.png" alt=""> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="contact"> |
||||||
|
<div class="inner"> |
||||||
|
<div class="title"> |
||||||
|
<h6>联系我们</h6> |
||||||
|
<p class="text">CONTACT US</p> |
||||||
|
</div> |
||||||
|
<div class="region"> |
||||||
|
<img class="dot" src="@/assets/img/about/dot.png" alt=""> |
||||||
|
<p class="name">深圳</p> |
||||||
|
</div> |
||||||
|
<div class="info"> |
||||||
|
<img class="logo" src="@/assets/img/about/logo.png" alt=""> |
||||||
|
<div class="texts"> |
||||||
|
<div class="item"> |
||||||
|
<div class="line"> |
||||||
|
<img class="icon" src="@/assets/img/about/address.png" alt=""> |
||||||
|
公司电话:0755-28109829 |
||||||
|
</div> |
||||||
|
<div class="line"> |
||||||
|
<img class="icon" src="@/assets/img/about/tel.png" alt=""> |
||||||
|
地址:深圳市宝安区创业二路华联城市全景1栋G座403室 |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="item"> |
||||||
|
<div class="line"> |
||||||
|
<img class="icon" src="@/assets/img/about/phone.png" alt=""> |
||||||
|
合作咨询:林经理 18818574533 |
||||||
|
</div> |
||||||
|
<div class="line"> |
||||||
|
<img class="icon" src="@/assets/img/about/mail.png" alt=""> |
||||||
|
客户建议:service@huorantech.cn |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="qrcode"> |
||||||
|
<img src="@/assets/img/about/qrcode.png" alt=""> |
||||||
|
<p class="text">扫一扫,关注公众号</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import Setting from '@/setting' |
||||||
|
import util from '@/libs/util' |
||||||
|
export default { |
||||||
|
name: 'about', |
||||||
|
data() { |
||||||
|
return { |
||||||
|
|
||||||
|
} |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
methods: {} |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss" scoped> |
||||||
|
.wrap { |
||||||
|
position: relative; |
||||||
|
background-color: #F9F9F9; |
||||||
|
.banner { |
||||||
|
position: relative; |
||||||
|
height: 480px; |
||||||
|
background: url(../../../assets/img/about/banner1.png) 0 0/auto no-repeat, |
||||||
|
url(../../../assets/img/about/banner2.png) (90% 37px)/auto no-repeat; |
||||||
|
background-color: #0F5BED; |
||||||
|
.text { |
||||||
|
position: absolute; |
||||||
|
top: 167px; |
||||||
|
left: 165px; |
||||||
|
} |
||||||
|
} |
||||||
|
.i-title { |
||||||
|
z-index: 1; |
||||||
|
position: relative; |
||||||
|
margin-bottom: 37px; |
||||||
|
font-size: 30px; |
||||||
|
text-align: center; |
||||||
|
color: #0B1D30; |
||||||
|
&:after{ |
||||||
|
content: ''; |
||||||
|
position: absolute; |
||||||
|
bottom: -10px; |
||||||
|
left: 50%; |
||||||
|
width: 30px; |
||||||
|
height: 4px; |
||||||
|
transform: translate(-50%); |
||||||
|
background-color: #006EFF; |
||||||
|
} |
||||||
|
} |
||||||
|
.inner { |
||||||
|
position: relative; |
||||||
|
width: 1200px; |
||||||
|
padding: 67px 0; |
||||||
|
margin: 0 auto; |
||||||
|
} |
||||||
|
.en { |
||||||
|
position: absolute; |
||||||
|
top: 40px; |
||||||
|
left: 50%; |
||||||
|
width: 100%; |
||||||
|
text-align: center; |
||||||
|
font-size: 46px; |
||||||
|
font-family: PingFangSC-Semibold, PingFang SC; |
||||||
|
color: #D4DAEA; |
||||||
|
transform: translate(-50%); |
||||||
|
} |
||||||
|
.pics { |
||||||
|
display: flex; |
||||||
|
justify-content: space-between; |
||||||
|
.text { |
||||||
|
width: 470px; |
||||||
|
} |
||||||
|
.title-wrap { |
||||||
|
position: relative; |
||||||
|
} |
||||||
|
.title { |
||||||
|
z-index: 2; |
||||||
|
position: relative; |
||||||
|
font-size: 30px; |
||||||
|
color: #0B1D30; |
||||||
|
} |
||||||
|
.brief { |
||||||
|
margin: 20px 0 30px; |
||||||
|
font-size: 24px; |
||||||
|
color: #0B1D30; |
||||||
|
} |
||||||
|
.en { |
||||||
|
top: -30px; |
||||||
|
text-align: left; |
||||||
|
color: #E5E5E5; |
||||||
|
} |
||||||
|
.desc{ |
||||||
|
margin-bottom: 20px; |
||||||
|
font-size: 14px; |
||||||
|
color: #535C6E; |
||||||
|
line-height: 25px; |
||||||
|
} |
||||||
|
} |
||||||
|
.service { |
||||||
|
display: flex; |
||||||
|
justify-content: center; |
||||||
|
flex-direction: column; |
||||||
|
height: 153px; |
||||||
|
color: #fff; |
||||||
|
background: url(../../../assets/img/about/about2.png) 0 0/cover no-repeat; |
||||||
|
.inner { |
||||||
|
padding: 0; |
||||||
|
} |
||||||
|
h6 { |
||||||
|
margin-bottom: 15px; |
||||||
|
font-size: 26px; |
||||||
|
} |
||||||
|
.text { |
||||||
|
font-size: 16px; |
||||||
|
} |
||||||
|
} |
||||||
|
.culture{ |
||||||
|
position: relative; |
||||||
|
background: #fff url(../../../assets/img/about/about3.png) 0 0/100% 100% no-repeat; |
||||||
|
.inner { |
||||||
|
padding-bottom: 112px; |
||||||
|
} |
||||||
|
.list{ |
||||||
|
display: flex; |
||||||
|
li{ |
||||||
|
width: 33.33%; |
||||||
|
padding: 50px 35px 74px; |
||||||
|
margin-right: 57px; |
||||||
|
text-align: center; |
||||||
|
box-shadow: 0px 6px 11px 0px rgba(193,202,217,0.3800); |
||||||
|
border-radius: 8px; |
||||||
|
background-color: #F9FAFF; |
||||||
|
border: 2px solid #FFFFFF; |
||||||
|
&:last-child{ |
||||||
|
margin-right: 0; |
||||||
|
} |
||||||
|
&:hover { |
||||||
|
img { |
||||||
|
transform: rotateY(180deg) |
||||||
|
} |
||||||
|
h6 { |
||||||
|
margin-top: 40px; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
img{ |
||||||
|
width: 64px; |
||||||
|
transition: .6s; |
||||||
|
} |
||||||
|
h6{ |
||||||
|
margin: 10px 0 16px; |
||||||
|
font-size: 26px; |
||||||
|
line-height: 28px; |
||||||
|
color: #0B1D30; |
||||||
|
transition: .3s; |
||||||
|
} |
||||||
|
.text{ |
||||||
|
font-size: 14px; |
||||||
|
color: #637493; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.progress { |
||||||
|
.list { |
||||||
|
display: flex; |
||||||
|
margin-top: 200px; |
||||||
|
} |
||||||
|
li { |
||||||
|
position: relative; |
||||||
|
margin-right: 80px; |
||||||
|
text-align: center; |
||||||
|
h6 { |
||||||
|
margin: 20px 0 10px; |
||||||
|
font-size: 40px; |
||||||
|
color: #2D67F6; |
||||||
|
} |
||||||
|
.text { |
||||||
|
font-size: 15px; |
||||||
|
color: #565656; |
||||||
|
} |
||||||
|
&:after { |
||||||
|
content: ''; |
||||||
|
position: absolute; |
||||||
|
top: 15px; |
||||||
|
left: 98px; |
||||||
|
width: 168px; |
||||||
|
height: 1px; |
||||||
|
border: 3px solid; |
||||||
|
border-image: linear-gradient(209deg, rgba(32, 101, 255, 0.01), rgba(32, 101, 255, 1), rgba(32, 101, 255, 0)) 3 3; |
||||||
|
} |
||||||
|
&:nth-child(even) { |
||||||
|
margin-top: -117px; |
||||||
|
.arrow { |
||||||
|
transform: rotateX(180deg); |
||||||
|
} |
||||||
|
.text { |
||||||
|
margin: 10px 0 20px; |
||||||
|
} |
||||||
|
&:after { |
||||||
|
top: 133px; |
||||||
|
} |
||||||
|
} |
||||||
|
&:last-child:after { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.contact { |
||||||
|
position: relative; |
||||||
|
padding: 0 0 106px 0; |
||||||
|
background: url(../../../assets/img/about/map.png) 0 0/cover no-repeat; |
||||||
|
.inner { |
||||||
|
padding: 0; |
||||||
|
} |
||||||
|
.title { |
||||||
|
width: 419px; |
||||||
|
height: 258px; |
||||||
|
padding: 113px 0 0 43px; |
||||||
|
background-color: #0854FE; |
||||||
|
h6 { |
||||||
|
margin-bottom: 20px; |
||||||
|
font-size: 46px; |
||||||
|
color: #fff; |
||||||
|
} |
||||||
|
.text { |
||||||
|
font-size: 28px; |
||||||
|
color: #fff; |
||||||
|
} |
||||||
|
} |
||||||
|
.region { |
||||||
|
position: absolute; |
||||||
|
top: 152px; |
||||||
|
left: 70%; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
font-size: 20px; |
||||||
|
color: #fff; |
||||||
|
img { |
||||||
|
margin-right: 20px; |
||||||
|
} |
||||||
|
} |
||||||
|
.info { |
||||||
|
margin: 86px 0 0 44px; |
||||||
|
.texts { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
margin-top: 24px; |
||||||
|
} |
||||||
|
.item { |
||||||
|
margin-right: 75px; |
||||||
|
} |
||||||
|
.line { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
margin-bottom: 20px; |
||||||
|
font-size: 16px; |
||||||
|
color: #fff; |
||||||
|
img { |
||||||
|
margin-right: 8px; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.qrcode { |
||||||
|
text-align: center; |
||||||
|
.text { |
||||||
|
margin-top: 10px; |
||||||
|
font-size: 12px; |
||||||
|
color: #fff; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
@ -1,804 +0,0 @@ |
|||||||
<template> |
|
||||||
<div class="wrap"> |
|
||||||
<div class="login"> |
|
||||||
<div class="form"> |
|
||||||
<h6 class="title">欢迎使用请登录</h6> |
|
||||||
<ul class="tab"> |
|
||||||
<li v-for="(item,index) in tabList" :key="index" :class="{active: form.distinguish == item.id}" @click="typeClick(item)">{{item.label}}</li> |
|
||||||
</ul> |
|
||||||
<el-form :model="form" :rules="rules" ref="form" style="margin-top: 20px"> |
|
||||||
<!-- 学号工号 --> |
|
||||||
<div v-show="!form.distinguish"> |
|
||||||
<el-form-item class="school-select" prop="schoolId"> |
|
||||||
<label class="label school"></label> |
|
||||||
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校"> |
|
||||||
<el-option v-for="(item, i) in schoolList" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<div class="items"> |
|
||||||
<el-form-item prop="type" style="width: 35%;margin-right: 15px"> |
|
||||||
<label class="label workNumber"></label> |
|
||||||
<el-select v-model="form.type" placeholder="请选择类型" @change="typeChange"> |
|
||||||
<el-option label="学生学号" :value="1"></el-option> |
|
||||||
<el-option label="老师工号" :value="0"></el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item class="flex-1" prop="workNumber"> |
|
||||||
<label class="label account"></label> |
|
||||||
<el-input v-model.trim="form.workNumber" :placeholder="'请输入' + (form.type ? '学生学号' : '老师工号')" @keyup.enter.native="submit"></el-input> |
|
||||||
</el-form-item> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<!-- 手机号登录 --> |
|
||||||
<el-form-item v-show="form.distinguish === 1" prop="account"> |
|
||||||
<label class="label account"></label> |
|
||||||
<el-input v-model.trim="form.account" placeholder="请输入账号" @keyup.enter.native="submit"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<template v-if="form.distinguish === 2"> |
|
||||||
<el-form-item prop="account"> |
|
||||||
<label class="label account"></label> |
|
||||||
<el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱" @keyup.enter.native="submit"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="code"> |
|
||||||
<label class="label code"></label> |
|
||||||
<div class="ver-code"> |
|
||||||
<el-input v-model="form.code" placeholder="请输入验证码" maxlength="6" @keyup.enter.native="submit"></el-input> |
|
||||||
<el-button type="text" @click="sendPhoneCodeLogin" :disabled="phoneDisabledLogin">{{ phoneBtnTextLogin }} |
|
||||||
</el-button> |
|
||||||
</div> |
|
||||||
</el-form-item> |
|
||||||
</template> |
|
||||||
<template v-if="form.distinguish !== 2"> |
|
||||||
<el-form-item prop="password"> |
|
||||||
<label class="password label"></label> |
|
||||||
<el-input |
|
||||||
type="password" |
|
||||||
placeholder="请输入密码" |
|
||||||
v-model.trim="form.password" |
|
||||||
@keyup.enter.native="submit" |
|
||||||
> |
|
||||||
</el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="code"> |
|
||||||
<label class="label code"></label> |
|
||||||
<el-input |
|
||||||
placeholder="请输入验证码" |
|
||||||
v-model.trim="form.code" |
|
||||||
@keyup.enter.native="submit" |
|
||||||
> |
|
||||||
</el-input> |
|
||||||
<img @click="getVerImg" :src="verificationIMG" class="ver-img" alt=""> |
|
||||||
</el-form-item> |
|
||||||
</template> |
|
||||||
<div class="bottom"> |
|
||||||
<!-- <el-link :underline="false" type="primary" @click="toTrial">申请试用</el-link> --> |
|
||||||
<el-checkbox v-show="!form.distinguish" v-model="setDefault">设置为默认学校</el-checkbox> |
|
||||||
</div> |
|
||||||
<el-button class="submit" type="primary" @click="submit">登录</el-button> |
|
||||||
</el-form> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%"> |
|
||||||
<div style='padding: 0 13px 20px 13px;'> |
|
||||||
依据国家政策法规,需绑定手机号进行实网络实名才可登录使用本平台 |
|
||||||
</div> |
|
||||||
<el-form label-width="60px"> |
|
||||||
<el-form-item label="手机号"> |
|
||||||
<el-input style="width: 100%;" placeholder="请输入手机号" v-model="phone" maxlength="11" @change="phoneChange"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="验证码"> |
|
||||||
<div class="ver-code"> |
|
||||||
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> |
|
||||||
<el-button style="top: 1px" type="text" @click="sendPhoneCode(1)" :disabled="binding === '' || phoneDisabled">{{ phoneBtnText }} |
|
||||||
</el-button> |
|
||||||
</div> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<span slot="footer" class="dialog-footer"> |
|
||||||
<el-button size="small" @click="phoneVisible = false">取 消</el-button> |
|
||||||
<el-button size="small" type="primary" @click="phoneSubmit">确 定</el-button> |
|
||||||
</span> |
|
||||||
</el-dialog> |
|
||||||
<el-dialog title="请选择" :visible.sync="selectVisible" :close-on-click-modal="false" custom-class="select-dia" width="643px"> |
|
||||||
<ul class="port"> |
|
||||||
<li :class="{active: selectedRole === 1}" @click="selectRole(1)"> |
|
||||||
<img src="@/assets/img/login/male.png" alt=""> |
|
||||||
<p>学生端</p> |
|
||||||
</li> |
|
||||||
<li :class="{active: selectedRole === 2}" @click="selectRole(2)"> |
|
||||||
<img src="@/assets/img/login/female.png" alt=""> |
|
||||||
<p>教师管理端</p> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
</el-dialog> |
|
||||||
<el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia" width="500px"> |
|
||||||
<p class="tips">该手机号已绑定以下用户信息</p> |
|
||||||
<ul class="users"> |
|
||||||
<li :class="{isEnable: !user.isEnable}" v-for="(user, i) in users" :key="i" @click="chooseUser(user)"> |
|
||||||
<span>{{ user.schoolName }},{{ user.userName }},{{ user.workNumber }}{{ user.isEnable ? '' : '(已禁用)'}}</span> |
|
||||||
<i class="el-icon-right"></i> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
</el-dialog> |
|
||||||
<el-dialog :visible.sync="infoVisible" :close-on-click-modal="false" custom-class="info-dia" :show-close="false" width="400px"> |
|
||||||
<div class="info-header"> |
|
||||||
<i class="el-icon-warning"></i> |
|
||||||
提示 |
|
||||||
</div> |
|
||||||
<div class="info-wrap"> |
|
||||||
<p class="tips">该手机号已与以下用户绑定</p> |
|
||||||
<ul class="users"> |
|
||||||
<li v-for="(user, i) in infos" :key="i"> |
|
||||||
<span>{{ user.userName }}({{ user.schoolName }})</span> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
<div class="info-footer"> |
|
||||||
<el-button size="small" type="primary" @click="bindPhone">是本人,继续绑定</el-button> |
|
||||||
<el-button class="unbind" size="small" @click="unbindPhone">不是本人,解绑以上用户并绑定新用户</el-button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
<v-footer ref="footer"></v-footer> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script> |
|
||||||
import vFooter from "@/layouts/footer"; |
|
||||||
import { mapState, mapMutations, mapActions } from "vuex"; |
|
||||||
import util from "@/libs/util"; |
|
||||||
import Setting from "@/setting"; |
|
||||||
import axios from "axios" |
|
||||||
import { Loading } from 'element-ui' |
|
||||||
export default { |
|
||||||
data: function() { |
|
||||||
return { |
|
||||||
tabList: [ |
|
||||||
{ |
|
||||||
id: 0, |
|
||||||
label: '学号/工号登录' |
|
||||||
}, { |
|
||||||
id: 1, |
|
||||||
label: '学校管理员登录' |
|
||||||
}, { |
|
||||||
id: 2, |
|
||||||
label: '手机号/邮箱' |
|
||||||
} |
|
||||||
], |
|
||||||
setDefault: !!util.local.get('schoolId'), // 本地缓存里有学校id,则默认勾选 |
|
||||||
verificationIMG: '', |
|
||||||
schoolList: [], |
|
||||||
form: { |
|
||||||
schoolId: '', |
|
||||||
workNumber: '', |
|
||||||
account: '', |
|
||||||
password: '', |
|
||||||
code: '', // 验证码 |
|
||||||
random: '', // 随机数 |
|
||||||
distinguish: 0, // 区分手机号账号登录,1为账号登录,2为手机号或邮箱登录 |
|
||||||
type: 1, // 平台端区分:0->教师端 1->学生端 2->无端 |
|
||||||
platform: Setting.platformId |
|
||||||
}, |
|
||||||
rules: { |
|
||||||
schoolId: [{ required: true, message: "请选择学校", trigger: "change" }], |
|
||||||
workNumber: [{ required: true, message: "请输入学生学号", trigger: "blur" }], |
|
||||||
account: [{ required: false, message: "请输入账号", trigger: "blur" }], |
|
||||||
password: [{ required: true, message: "请输入密码", trigger: "blur" }], |
|
||||||
code: [{ required: true, message: "请输入验证码", trigger: "blur" }] |
|
||||||
}, |
|
||||||
phoneDisabledLogin: false, |
|
||||||
phoneTimerLogin: null, |
|
||||||
phoneBtnTextLogin: '发送验证码', |
|
||||||
|
|
||||||
phoneVisible: false, |
|
||||||
phone: '', |
|
||||||
phoneCode: '', |
|
||||||
phoneDisabled: false, |
|
||||||
phoneTimer: null, |
|
||||||
phoneOpener: '', |
|
||||||
phoneBtnText: '发送验证码', |
|
||||||
selectVisible: false, |
|
||||||
selectedRole: '', |
|
||||||
token: '', |
|
||||||
userVisible: false, |
|
||||||
users: [], |
|
||||||
accountIds: [], |
|
||||||
binding: '', |
|
||||||
infoVisible: false, |
|
||||||
infos: [] |
|
||||||
}; |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
...mapState('match', [ |
|
||||||
'toMatch' |
|
||||||
]) |
|
||||||
}, |
|
||||||
components: { |
|
||||||
vFooter |
|
||||||
}, |
|
||||||
mounted() { |
|
||||||
this.getVerImg() |
|
||||||
this.getSchool() |
|
||||||
// 页面离开的时候销毁手机和邮箱验证码定时器 |
|
||||||
this.$once("hook:beforeDestroy", function() { |
|
||||||
clearInterval(this.phoneTimer) |
|
||||||
clearInterval(this.phoneTimerLogin) |
|
||||||
this.phoneTimer = null |
|
||||||
this.phoneTimerLogin = null |
|
||||||
}); |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
...mapMutations("user", [ |
|
||||||
'SET_CUSTOMERNAME' |
|
||||||
]), |
|
||||||
...mapActions("user", [ |
|
||||||
"setInfo" |
|
||||||
]), |
|
||||||
// 赋值学校列表及id |
|
||||||
setSchool(list) { |
|
||||||
this.schoolList = list |
|
||||||
// 取本地缓存里的学校id |
|
||||||
const schoolId = util.local.get('schoolId') |
|
||||||
if (schoolId) this.form.schoolId = schoolId |
|
||||||
}, |
|
||||||
// 获取学校列表 |
|
||||||
getSchool() { |
|
||||||
this.$get(this.api.querySchool, { |
|
||||||
provinceId: '', |
|
||||||
cityId: '' |
|
||||||
}).then(({ list }) => { |
|
||||||
this.setSchool(list) |
|
||||||
}).catch(res => {}) |
|
||||||
}, |
|
||||||
getVerImg() { // 获取验证码图片 |
|
||||||
this.form.random = Math.floor(Math.random() * 999999999); |
|
||||||
this.verificationIMG = this.api.verification + "?random=" + `${this.form.random}`; |
|
||||||
}, |
|
||||||
// 切换标签 |
|
||||||
typeClick(tab) { |
|
||||||
const { id } = tab |
|
||||||
const form = this.form |
|
||||||
// 切换了后,全部字段重置 |
|
||||||
this.form = { |
|
||||||
schoolId: form.schoolId, |
|
||||||
workNumber: '', |
|
||||||
account: '', |
|
||||||
password: '', |
|
||||||
code: '', |
|
||||||
random: form.random, |
|
||||||
distinguish: id, |
|
||||||
type: 1, |
|
||||||
platform: form.platform |
|
||||||
} |
|
||||||
this.$refs.form.clearValidate() |
|
||||||
// 切换了登录方式后,校验规则要变化 |
|
||||||
const rules = this.rules |
|
||||||
rules.schoolId[0].required = id === 0 |
|
||||||
rules.workNumber[0].required = id === 0 |
|
||||||
rules.account[0].required = !!id |
|
||||||
this.rules.account[0].message = id === 1 ? |
|
||||||
'请输入账号' : |
|
||||||
'请输入手机号/邮箱' |
|
||||||
}, |
|
||||||
// 学号工号切换 |
|
||||||
typeChange(id) { |
|
||||||
this.rules.workNumber[0].message = id === 1 ? |
|
||||||
'请输入学生学号' : |
|
||||||
'请输入老师工号' |
|
||||||
}, |
|
||||||
// 申请试用 |
|
||||||
toTrial() { |
|
||||||
// window.open('https://www.wjx.cn/vm/wB0RcMm.aspx') |
|
||||||
}, |
|
||||||
// 刷新官网 |
|
||||||
reloadIndex() { |
|
||||||
try { |
|
||||||
window.opener && window.opener.location.reload() |
|
||||||
} catch(e) {} |
|
||||||
}, |
|
||||||
// 选择用户回调 |
|
||||||
chooseUser(user) { |
|
||||||
user.isEnable && this.$post(`${this.api.getToken}?id=${user.id}`).then(({ data }) => { |
|
||||||
this.queryClient(data.token) |
|
||||||
}).catch(res => {}) |
|
||||||
}, |
|
||||||
// 查询是否是客户,如果是客户,则弹出选择端的页面去选择跳转到哪个端 |
|
||||||
queryClient(token) { |
|
||||||
this.token = token |
|
||||||
axios.get(this.api.isClient, { |
|
||||||
headers: { |
|
||||||
token |
|
||||||
} |
|
||||||
}).then(({ data }) => { |
|
||||||
// 如果是客户 |
|
||||||
if (data.customer) { |
|
||||||
this.SET_CUSTOMERNAME(data.customerName) |
|
||||||
this.selectVisible = true |
|
||||||
} else { |
|
||||||
this.form.type ? this.setLogin() : this.toMang() |
|
||||||
} |
|
||||||
}).catch(res => {}) |
|
||||||
}, |
|
||||||
// 处理登录成功 |
|
||||||
setLogin() { |
|
||||||
util.local.set(Setting.tokenKey, this.token, Setting.tokenExpires) |
|
||||||
util.cookies.remove('serverLogin') |
|
||||||
this.reloadIndex() |
|
||||||
util.successMsg('登录成功') |
|
||||||
this.$router.replace(this.toMatch ? `/touristMatch` : '/station') |
|
||||||
}, |
|
||||||
// 提交登录 |
|
||||||
submit() { |
|
||||||
this.$refs.form.validate(valid => { |
|
||||||
if (valid) { |
|
||||||
const form = JSON.parse(JSON.stringify(this.form)) |
|
||||||
const { distinguish } = form |
|
||||||
if (!form.distinguish && this.setDefault) util.local.set('schoolId', form.schoolId) // 选的是学号工号登录,并且勾选了默认,则存入缓存 |
|
||||||
if (util.local.get('schoolId') && !this.setDefault) util.local.remove('schoolId') // 本地缓存了学校id,并且没有勾选默认,则删除缓存 |
|
||||||
if (distinguish) form.schoolId = '' |
|
||||||
if (!distinguish) form.distinguish = 1 |
|
||||||
this.$post(this.api.logins, form).then(({ status, data, message }) => { |
|
||||||
// 未绑定手机号,则弹框去绑定 |
|
||||||
if (status == 30001) { |
|
||||||
this.phoneVisible = true |
|
||||||
this.getVerImg() |
|
||||||
form.code = '' |
|
||||||
} else if (status == 200) { |
|
||||||
const accounts = data.userAccounts |
|
||||||
// 如果返回的是数组,则弹框给用户选择登录哪个用户,否则,直接登录 |
|
||||||
if (accounts instanceof Array) { |
|
||||||
// 如果只查询到一个用户,则直接登录,否则,弹框让用户选择 |
|
||||||
if (accounts.length === 1) { |
|
||||||
this.chooseUser(accounts[0]) |
|
||||||
} else { |
|
||||||
this.users = accounts |
|
||||||
this.userVisible = true |
|
||||||
} |
|
||||||
} else { |
|
||||||
this.queryClient(data.token) |
|
||||||
} |
|
||||||
} else { |
|
||||||
util.errorMsg(message) |
|
||||||
} |
|
||||||
}).catch(res => { |
|
||||||
this.getVerImg() |
|
||||||
form.code = '' |
|
||||||
}) |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
// 跳转到教师端 |
|
||||||
toMang() { |
|
||||||
util.local.set(Setting.tokenKey, this.token, Setting.tokenExpires) |
|
||||||
// 从学生端登录到教师端的标识,教师端需要使用 |
|
||||||
util.cookies.set('serverLogin', true, { |
|
||||||
expires: new Date(Date.now() + 15 * 60 * 1000) // 15分钟后过期 |
|
||||||
}) |
|
||||||
this.reloadIndex() |
|
||||||
// 跳转到教师端的重定向页面 |
|
||||||
location.href = Setting.isDev ? |
|
||||||
`http://${location.hostname}:8081/#/redirect?auth=${btoa(this.token)}` : |
|
||||||
`${location.origin}/admin/#/redirect?auth=${window.btoa(this.token)}` |
|
||||||
}, |
|
||||||
// 选择端 |
|
||||||
selectRole(val) { |
|
||||||
this.selectedRole = val |
|
||||||
if (val === 1) { |
|
||||||
this.setLogin() |
|
||||||
} else { |
|
||||||
this.toMang() |
|
||||||
} |
|
||||||
}, |
|
||||||
// 验证手机号 |
|
||||||
verifyPhone(phone) { |
|
||||||
if (!phone) { |
|
||||||
this.$message.error("请输入手机号") |
|
||||||
return false |
|
||||||
} |
|
||||||
if (!/^1[3456789]\d{9}$/.test(phone) && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(phone)) { |
|
||||||
this.$message.error("请输入正确的手机号/邮箱") |
|
||||||
return false |
|
||||||
} |
|
||||||
return true |
|
||||||
}, |
|
||||||
|
|
||||||
// 验证码倒计时 |
|
||||||
phoneCountdownLogin() { |
|
||||||
let count = 60 |
|
||||||
if (!this.phoneTimerLogin) { |
|
||||||
this.phoneDisabledLogin = true |
|
||||||
this.phoneTimerLogin = setInterval(() => { |
|
||||||
if (count > 0) { |
|
||||||
count-- |
|
||||||
this.phoneBtnTextLogin = `${count}秒后重试` |
|
||||||
} else { |
|
||||||
this.phoneDisabledLogin = false |
|
||||||
clearInterval(this.phoneTimerLogin) |
|
||||||
this.phoneTimerLogin = null |
|
||||||
this.phoneBtnTextLogin = `发送验证码` |
|
||||||
} |
|
||||||
}, 1000) |
|
||||||
} |
|
||||||
}, |
|
||||||
// 发送验证码 |
|
||||||
sendPhoneCodeLogin() { |
|
||||||
const phone = this.form.account |
|
||||||
if (!this.verifyPhone(phone)) return false |
|
||||||
this.$post(`${this.api.sendPhoneVerificationCode}?phoneOrEmail=${phone}&loginOrBind=0&platform=${Setting.platformId}`).then(({ message }) => { |
|
||||||
util.successMsg(message) |
|
||||||
this.phoneCountdownLogin() |
|
||||||
}).catch(res => {}) |
|
||||||
}, |
|
||||||
// 继续绑定 |
|
||||||
bindPhone() { |
|
||||||
this.infoVisible = false |
|
||||||
this.binding = true |
|
||||||
this.sendPhoneCode(1) |
|
||||||
}, |
|
||||||
// 解除绑定 |
|
||||||
unbindPhone() { |
|
||||||
this.infoVisible = false |
|
||||||
this.binding = false |
|
||||||
this.sendPhoneCode(0) |
|
||||||
}, |
|
||||||
// 手机号失去焦点回调 |
|
||||||
phoneChange() { |
|
||||||
this.$post(`${this.api.getOtherAccountByPhone}?phone=${this.phone}&platform=${Setting.platformId}`).then(({ userAccounts }) => { |
|
||||||
const list = userAccounts |
|
||||||
if (list) { |
|
||||||
list.map(e => { |
|
||||||
const { userName } = e |
|
||||||
if (userName.length > 1) e.userName = userName[0] + '*' + userName.substring(2) |
|
||||||
}) |
|
||||||
this.infos = list |
|
||||||
this.accountIds = list.map(e => e.id) |
|
||||||
this.infoVisible = true |
|
||||||
} else { |
|
||||||
this.binding = true |
|
||||||
} |
|
||||||
}).catch(res => {}) |
|
||||||
}, |
|
||||||
// 验证码倒计时 |
|
||||||
phoneCountdown() { |
|
||||||
let count = 60 |
|
||||||
if (!this.phoneTimer) { |
|
||||||
this.phoneDisabled = true |
|
||||||
this.phoneTimer = setInterval(() => { |
|
||||||
if (count > 0) { |
|
||||||
count-- |
|
||||||
this.phoneBtnText = `${count}秒后重试` |
|
||||||
} else { |
|
||||||
this.phoneDisabled = false |
|
||||||
clearInterval(this.phoneTimer) |
|
||||||
this.phoneTimer = null |
|
||||||
this.phoneBtnText = `发送验证码` |
|
||||||
} |
|
||||||
}, 1000) |
|
||||||
} |
|
||||||
}, |
|
||||||
// 发送验证码 |
|
||||||
sendPhoneCode(bind) { |
|
||||||
const { phone } = this |
|
||||||
if (!this.verifyPhone(phone)) return false |
|
||||||
// 不解绑发送验证码 |
|
||||||
if (bind) { |
|
||||||
this.$post(this.api.sendPhoneOrEmailCode, { |
|
||||||
platform: Setting.platformId, |
|
||||||
phone, |
|
||||||
types: 2 |
|
||||||
}).then(({ message }) => { |
|
||||||
if (message.opener) { |
|
||||||
this.phoneCountdown() |
|
||||||
this.phoneOpener = message.opener |
|
||||||
} else { |
|
||||||
util.errorMsg(message) |
|
||||||
} |
|
||||||
}).catch(res => {}) |
|
||||||
} else { |
|
||||||
this.$post(`${this.api.sendPhoneVerificationCode}?phoneOrEmail=${phone}&loginOrBind=1&platform=${Setting.platformId}`).then(({ message }) => { |
|
||||||
util.successMsg(message) |
|
||||||
this.phoneCountdown() |
|
||||||
}).catch(res => {}) |
|
||||||
} |
|
||||||
}, |
|
||||||
// 解绑 |
|
||||||
unbind() { |
|
||||||
const { password, platform, schoolId, type, workNumber } = this.form |
|
||||||
this.$post(this.api.unbindAccounts, { |
|
||||||
accountIds: this.accountIds, |
|
||||||
code: this.phoneCode, |
|
||||||
password, |
|
||||||
phone: this.phone, |
|
||||||
platform, |
|
||||||
schoolId, |
|
||||||
type, |
|
||||||
workNumber, |
|
||||||
}).then(({ data }) => { |
|
||||||
this.token = data.token |
|
||||||
this.setLogin() |
|
||||||
}).catch(res => {}) |
|
||||||
}, |
|
||||||
// 绑定手机号 |
|
||||||
phoneSubmit() { |
|
||||||
const { phone, phoneCode } = this |
|
||||||
if (!this.verifyPhone(phone)) return false |
|
||||||
if (!phoneCode) return util.warningMsg('请输入验证码') |
|
||||||
const { workNumber, schoolId } = this.form |
|
||||||
if (this.binding) { |
|
||||||
this.$post(this.api.bindPhoneOrEmail, { |
|
||||||
mark: this.form.type, |
|
||||||
phone, |
|
||||||
types: 2, |
|
||||||
code: phoneCode, |
|
||||||
opener: this.phoneOpener, |
|
||||||
platform: Setting.platformId, |
|
||||||
account: workNumber, |
|
||||||
schoolId |
|
||||||
}).then(({ token }) => { |
|
||||||
this.token = token |
|
||||||
this.setLogin() |
|
||||||
}).catch(res => {}) |
|
||||||
} else { |
|
||||||
this.unbind() |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}; |
|
||||||
</script> |
|
||||||
|
|
||||||
<style scoped lang="scss"> |
|
||||||
.wrap { |
|
||||||
min-height: 100%; |
|
||||||
background-color: #F3F6FA; |
|
||||||
} |
|
||||||
.ver-code { |
|
||||||
position: relative; |
|
||||||
.el-button { |
|
||||||
position: absolute; |
|
||||||
top: 10px; |
|
||||||
right: 10px; |
|
||||||
} |
|
||||||
} |
|
||||||
.login{ |
|
||||||
min-height: calc(100vh - 43px); |
|
||||||
padding-top: calc((100vh - 584px) / 2); |
|
||||||
background: url(../../../assets/img/shapes/shape1.png) (0 123px)/auto no-repeat, |
|
||||||
url(../../../assets/img/shapes/shape2.png) (35px 238px)/auto no-repeat, |
|
||||||
url(../../../assets/img/shapes/shape3.png) (0 485px)/auto no-repeat, |
|
||||||
url(../../../assets/img/shapes/shape4.png) (right 50%)/auto no-repeat, |
|
||||||
url(../../../assets/img/shapes/shape5.png) (right 80%)/auto no-repeat, |
|
||||||
url(../../../assets/img/shapes/shape6.png) (right bottom)/auto no-repeat; |
|
||||||
.tab{ |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
margin-bottom: 24px; |
|
||||||
border-bottom: 2px solid #E1E6F2; |
|
||||||
li{ |
|
||||||
padding: 18px 0; |
|
||||||
margin-bottom: -1px; |
|
||||||
font-size: 16px; |
|
||||||
color: #555; |
|
||||||
cursor: pointer; |
|
||||||
border-bottom: 4px solid transparent; |
|
||||||
&:last-child{ |
|
||||||
margin-right: 0; |
|
||||||
} |
|
||||||
&.active{ |
|
||||||
color: $main-color;; |
|
||||||
border-bottom-color: $main-color; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.items { |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.form{ |
|
||||||
width: 436px; |
|
||||||
padding: 38px 38px 60px; |
|
||||||
margin: 0 auto 0; |
|
||||||
border-radius: 6px; |
|
||||||
background-color: #fff; |
|
||||||
.title{ |
|
||||||
margin-bottom: 25px; |
|
||||||
font-size: 26px; |
|
||||||
color: #0B1D30; |
|
||||||
letter-spacing: 4px; |
|
||||||
} |
|
||||||
} |
|
||||||
/deep/.el-form-item{ |
|
||||||
margin-bottom: 20px; |
|
||||||
} |
|
||||||
/deep/.el-input__inner{ |
|
||||||
position: relative; |
|
||||||
height: 52px; |
|
||||||
padding: 0 20px 0 34px; |
|
||||||
line-height: 50px; |
|
||||||
background-color: #FBFBFB; |
|
||||||
border: 1px solid #E1E6F2; |
|
||||||
border-radius: 4px !important; |
|
||||||
} |
|
||||||
.bottom { |
|
||||||
display: flex; |
|
||||||
// justify-content: space-between; |
|
||||||
justify-content: flex-end; |
|
||||||
} |
|
||||||
.el-select { |
|
||||||
width: 100%; |
|
||||||
} |
|
||||||
.label { |
|
||||||
z-index: 1; |
|
||||||
position: absolute; |
|
||||||
top: 17px; |
|
||||||
left: 11px; |
|
||||||
width: 18px; |
|
||||||
height: 18px; |
|
||||||
background: url(../../../assets/img/login/account.png) 0 0/100% 100% no-repeat; |
|
||||||
} |
|
||||||
.school{ |
|
||||||
background-image: url(../../../assets/img/login/school.png); |
|
||||||
} |
|
||||||
.workNumber{ |
|
||||||
width: 17px; |
|
||||||
background-image: url(../../../assets/img/login/workNumber.png); |
|
||||||
} |
|
||||||
.password{ |
|
||||||
top: 18px; |
|
||||||
background-image: url(../../../assets/img/login/password.png); |
|
||||||
} |
|
||||||
.code{ |
|
||||||
top: 18px; |
|
||||||
background-image: url(../../../assets/img/login/code.png); |
|
||||||
} |
|
||||||
.ver-img{ |
|
||||||
position: absolute; |
|
||||||
top: 1px; |
|
||||||
right: 1px; |
|
||||||
} |
|
||||||
/deep/.el-form-item__error{ |
|
||||||
top: 105%; |
|
||||||
left: auto; |
|
||||||
right: 0; |
|
||||||
color: #FFA94E; |
|
||||||
} |
|
||||||
.submit{ |
|
||||||
width: 100%; |
|
||||||
height: 48px; |
|
||||||
margin-top: 30px; |
|
||||||
line-height: 48px; |
|
||||||
padding: 0; |
|
||||||
font-size: 20px; |
|
||||||
background-color: $main-color; |
|
||||||
border-radius: 4px; |
|
||||||
border: 0; |
|
||||||
} |
|
||||||
} |
|
||||||
.copyright{ |
|
||||||
padding: 18px 0; |
|
||||||
font-size: 12px; |
|
||||||
text-align: center; |
|
||||||
background-color: #F3F6FA; |
|
||||||
a{ |
|
||||||
color:#B1B4B8; |
|
||||||
font-size: 12px; |
|
||||||
&:hover{ |
|
||||||
opacity: .8; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
.port { |
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
padding: 60px 0; |
|
||||||
li { |
|
||||||
text-align: center; |
|
||||||
cursor: pointer; |
|
||||||
&:first-child { |
|
||||||
margin-right: 86px; |
|
||||||
} |
|
||||||
&:hover img { |
|
||||||
opacity: .9; |
|
||||||
} |
|
||||||
&.active p, &:hover p { |
|
||||||
background-color: #9278ff; |
|
||||||
} |
|
||||||
} |
|
||||||
img { |
|
||||||
width: 122px; |
|
||||||
margin-bottom: 20px; |
|
||||||
} |
|
||||||
p { |
|
||||||
width: 88px; |
|
||||||
margin: 0 auto; |
|
||||||
line-height: 21px; |
|
||||||
color: #fff; |
|
||||||
background-color: #e8e3ff; |
|
||||||
border-radius: 4px; |
|
||||||
} |
|
||||||
} |
|
||||||
/deep/.select-dia { |
|
||||||
margin-top: calc((100vh - 383px) / 2) !important; |
|
||||||
} |
|
||||||
/deep/.user-dia { |
|
||||||
.tips { |
|
||||||
margin-bottom: 20px; |
|
||||||
text-align: center; |
|
||||||
color: #666; |
|
||||||
} |
|
||||||
.users { |
|
||||||
li { |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: center; |
|
||||||
padding: 0 15px; |
|
||||||
margin-bottom: 10px; |
|
||||||
line-height: 40px; |
|
||||||
font-size: 14px; |
|
||||||
background-color: #ebeef5; |
|
||||||
cursor: pointer; |
|
||||||
&.isEnable { |
|
||||||
color: #c0c4cc; |
|
||||||
background-color: #f5f7fa; |
|
||||||
cursor: not-allowed; |
|
||||||
} |
|
||||||
&:last-child { |
|
||||||
margin-bottom: 0; |
|
||||||
} |
|
||||||
&:hover { |
|
||||||
background-color: #d3e0ff; |
|
||||||
} |
|
||||||
i { |
|
||||||
font-size: 16px; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
/deep/.info-dia { |
|
||||||
.el-dialog__header { |
|
||||||
border-bottom: 0; |
|
||||||
} |
|
||||||
.info-header { |
|
||||||
position: absolute; |
|
||||||
top: 20px; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
font-size: 16px; |
|
||||||
color: #333; |
|
||||||
} |
|
||||||
.el-icon-warning { |
|
||||||
margin-right: 10px; |
|
||||||
color: #e6a23c; |
|
||||||
font-size: 24px; |
|
||||||
} |
|
||||||
.info-wrap { |
|
||||||
padding: 10px 33px; |
|
||||||
} |
|
||||||
.users { |
|
||||||
max-height: 125px; |
|
||||||
margin-top: 20px; |
|
||||||
overflow: auto; |
|
||||||
li { |
|
||||||
margin: 5px; |
|
||||||
font-size: 14px; |
|
||||||
color: #333; |
|
||||||
} |
|
||||||
} |
|
||||||
.info-footer { |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
margin-top: 20px; |
|
||||||
} |
|
||||||
.el-button { |
|
||||||
width: 142px; |
|
||||||
} |
|
||||||
.unbind { |
|
||||||
white-space: normal; |
|
||||||
line-height: 1.6; |
|
||||||
} |
|
||||||
} |
|
||||||
@media (max-height: 680px) { |
|
||||||
.wrap .login { |
|
||||||
padding: 40px 0; |
|
||||||
} |
|
||||||
} |
|
||||||
</style> |
|
@ -1,253 +0,0 @@ |
|||||||
<template> |
|
||||||
<div> |
|
||||||
<!-- <h2><div class="back" @click="toLogin"><i class="el-icon-arrow-left">返回</i></div> 学生注册</h2> --> |
|
||||||
<h2>账号注册</h2> |
|
||||||
|
|
||||||
<el-form class="register" :model="regForm" :rules="regRules" ref="reg" label-width="0px"> |
|
||||||
<div class="line"> |
|
||||||
<el-form-item prop="userName"> |
|
||||||
<p class="label">*学生姓名</p> |
|
||||||
<el-input v-model="regForm.userName" placeholder="姓名"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="workNumber" style="margin-right: 5%"> |
|
||||||
<p class="label">学生学号</p> |
|
||||||
<el-input v-model="regForm.workNumber" placeholder="学生学号" @change="worknumberChange"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="phone"> |
|
||||||
<p class="label">*手机号</p> |
|
||||||
<el-input v-model="regForm.phone" placeholder="手机号" maxlength="11" @change="phoneChange"></el-input> |
|
||||||
</el-form-item> |
|
||||||
</div> |
|
||||||
|
|
||||||
<p class="label">*学校</p> |
|
||||||
<div class="line"> |
|
||||||
<el-form-item prop="provinceId"> |
|
||||||
<p class="prop">省份</p> |
|
||||||
<el-select v-model="regForm.provinceId" placeholder="省份" @change="getCity"> |
|
||||||
<el-option |
|
||||||
v-for="item in provinceList" |
|
||||||
:key="item.value" |
|
||||||
:label="item.provinceName" |
|
||||||
:value="item.provinceId" |
|
||||||
></el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="cityId" style="margin-right: 5%"> |
|
||||||
<p class="prop">城市</p> |
|
||||||
<el-select v-model="regForm.cityId" placeholder="城市" @change="getSchoolData"> |
|
||||||
<el-option |
|
||||||
v-for="item in cityList" |
|
||||||
:key="item.value" |
|
||||||
:label="item.cityName" |
|
||||||
:value="item.cityId" |
|
||||||
></el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="schoolAppellationId"> |
|
||||||
<p class="prop">学校</p> |
|
||||||
<el-select v-model="regForm.schoolAppellationId" placeholder="学校名称"> |
|
||||||
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" |
|
||||||
:value="item.schoolId"></el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
</div> |
|
||||||
<!-- <div class="line"> |
|
||||||
<el-form-item prop="phone"> |
|
||||||
<p class="label">手机号</p> |
|
||||||
<el-input v-model="regForm.phone" placeholder="请输入手机号"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item style="margin-right: 5%"> |
|
||||||
<button type="button" class="code-btn">发送验证码</button> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="code"> |
|
||||||
<el-input v-model="regForm.code" placeholder="输入验证码"></el-input> |
|
||||||
</el-form-item> |
|
||||||
</div> --> |
|
||||||
<div class="line"> |
|
||||||
<el-form-item prop="password"> |
|
||||||
<p class="label">*密码设置</p> |
|
||||||
<el-input type="password" v-model="regForm.password" placeholder="请输入密码"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="rePassword"> |
|
||||||
<el-input type="password" v-model="regForm.rePassword" placeholder="请再次输入密码" |
|
||||||
@keyup.enter.native="registerForm"></el-input> |
|
||||||
</el-form-item> |
|
||||||
</div> |
|
||||||
|
|
||||||
<el-button class="submit" type="primary" @click="registerForm">注册</el-button> |
|
||||||
</el-form> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script> |
|
||||||
export default { |
|
||||||
data: function() { |
|
||||||
return { |
|
||||||
regForm: { |
|
||||||
userName: "", |
|
||||||
workNumber: "", |
|
||||||
provinceId: "", |
|
||||||
cityId: "", |
|
||||||
schoolAppellationId: "", |
|
||||||
phone: "", |
|
||||||
password: "", |
|
||||||
rePassword: "", |
|
||||||
roleId: 4, |
|
||||||
schoolId: this.$config.schoolId |
|
||||||
}, |
|
||||||
regRules: { |
|
||||||
userName: [{ required: true, message: "请输入学生姓名", trigger: "blur" }], |
|
||||||
workNumber: [{ required: true, message: "请输入学生学号", trigger: "blur" }], |
|
||||||
provinceId: [{ required: true, message: "请选择省份", trigger: "change" }], |
|
||||||
cityId: [{ required: true, message: "请选择城市", trigger: "change" }], |
|
||||||
schoolAppellationId: [{ required: true, message: "请选择学校", trigger: "change" }], |
|
||||||
phone: [ |
|
||||||
{ required: true, message: "请输入手机号", trigger: "blur" }, |
|
||||||
{ pattern: /^1[3456789]\d{9}$/, message: "请输入正确的手机号", trigger: "blur" } |
|
||||||
], |
|
||||||
password: [ |
|
||||||
{ required: true, message: "请输入密码", trigger: "blur" }, |
|
||||||
{ pattern: /^.{6,}$/, message: "请输入6位数以上的密码", trigger: "blur" } |
|
||||||
], |
|
||||||
rePassword: [ |
|
||||||
{ required: true, message: "请再次输入密码", trigger: "blur" }, |
|
||||||
{ pattern: /^.{6,}$/, message: "请输入6位数以上的密码", trigger: "blur" } |
|
||||||
] |
|
||||||
}, |
|
||||||
provinceList: this.$store.state.provinceList, //省份 |
|
||||||
cityList: [], //城市 |
|
||||||
schoolList: [], |
|
||||||
phoneRepeat: false, |
|
||||||
workNumberReapeat: false |
|
||||||
}; |
|
||||||
}, |
|
||||||
mounted() { |
|
||||||
this.getProvince(); |
|
||||||
this.getSchoolData(); |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
getProvince() { |
|
||||||
this.$get(this.api.queryProvince).then(res => { |
|
||||||
this.provinceList = res.message; |
|
||||||
this.$store.commit("provinceData", { provinceList: this.provinceList }); |
|
||||||
}).catch(res => { |
|
||||||
}); |
|
||||||
}, |
|
||||||
// 获取城市 |
|
||||||
getCity() { |
|
||||||
this.regForm.cityId = ""; |
|
||||||
this.$get(this.api.queryCity, { provinceId: this.regForm.provinceId }).then(res => { |
|
||||||
this.cityList = res.message; |
|
||||||
this.getSchoolData(); |
|
||||||
}).catch(res => { |
|
||||||
}); |
|
||||||
}, |
|
||||||
// 获取学校名称 |
|
||||||
getSchoolData() { |
|
||||||
this.regForm.schoolAppellationId = ""; |
|
||||||
this.$get(this.api.querySchoolData, { |
|
||||||
provinceId: this.regForm.provinceId, |
|
||||||
cityId: this.regForm.cityId, |
|
||||||
schoolName: "" |
|
||||||
}).then(res => { |
|
||||||
this.schoolList = res.message; |
|
||||||
}).catch(res => { |
|
||||||
}); |
|
||||||
}, |
|
||||||
registerForm() { |
|
||||||
this.$refs.reg.validate(valid => { |
|
||||||
if (valid) { |
|
||||||
if (this.phoneRepeat) return util.warningMsg("该手机号已存在"); |
|
||||||
if (this.workNumberReapeat) return util.warningMsg("该学生学号已存在"); |
|
||||||
if (this.regForm.password !== this.regForm.rePassword) return util.warningMsg("两次输入的密码不一致,请重新输入"); |
|
||||||
|
|
||||||
let data = this.regForm; |
|
||||||
data.account = data.phone; |
|
||||||
data.uniqueIdentificationAccount = new Date().getTime(); |
|
||||||
this.$post(`${this.api.save}?workNumber=${this.regForm.workNumber}`, data).then(res => { |
|
||||||
util.successMsg("注册成功"); |
|
||||||
this.$emit("update:isReg", false); |
|
||||||
this.$emit("updateInfo", { username: this.regForm.phone, password: this.regForm.password }); |
|
||||||
this.$refs.reg.resetFields(); |
|
||||||
}).catch(res => { |
|
||||||
}); |
|
||||||
} else { |
|
||||||
// util.errorMsg('请输入账号和密码'); |
|
||||||
return false; |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
async phoneChange() { |
|
||||||
let res = await this.$get(this.api.queryPhone, { phone: this.regForm.phone }); |
|
||||||
if (res.message.length != 0) { |
|
||||||
util.warningMsg("该手机号已存在"); |
|
||||||
this.phoneRepeat = true; |
|
||||||
} else { |
|
||||||
this.phoneRepeat = false; |
|
||||||
} |
|
||||||
}, |
|
||||||
async worknumberChange() { |
|
||||||
let res = await this.$get(this.api.queryWorkNumberIsExist, { |
|
||||||
workNumber: this.regForm.workNumber, |
|
||||||
roleId: 4, |
|
||||||
schoolAppellationId: this.regForm.schoolAppellationId |
|
||||||
}); |
|
||||||
if (JSON.stringify(res.message) != "{}") { |
|
||||||
util.warningMsg("该学生学号已存在"); |
|
||||||
this.workNumberReapeat = true; |
|
||||||
} else { |
|
||||||
this.workNumberReapeat = false; |
|
||||||
} |
|
||||||
}, |
|
||||||
toLogin() { |
|
||||||
this.$emit("update:isReg", false); |
|
||||||
} |
|
||||||
} |
|
||||||
}; |
|
||||||
</script> |
|
||||||
|
|
||||||
<style scoped lang="scss"> |
|
||||||
.wrap { |
|
||||||
.form { |
|
||||||
.register { |
|
||||||
width: 90% !important; |
|
||||||
|
|
||||||
.line { |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
align-items: flex-end; |
|
||||||
} |
|
||||||
|
|
||||||
.el-form-item { |
|
||||||
&:first-child { |
|
||||||
margin-right: 5%; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.label { |
|
||||||
margin-bottom: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.prop { |
|
||||||
color: #929292; |
|
||||||
} |
|
||||||
|
|
||||||
.code-btn { |
|
||||||
min-width: 120px; |
|
||||||
height: 46px; |
|
||||||
padding: 0 10px; |
|
||||||
line-height: 46px; |
|
||||||
color: #fff; |
|
||||||
font-size: 14px; |
|
||||||
border-radius: 23px; |
|
||||||
border: 0; |
|
||||||
background-color: #105cb2; |
|
||||||
} |
|
||||||
|
|
||||||
.submit { |
|
||||||
margin-bottom: 20px; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
</style> |
|
@ -0,0 +1,14 @@ |
|||||||
|
import BasicLayout from '@/layouts/home'; |
||||||
|
|
||||||
|
export default { |
||||||
|
path: '/about', |
||||||
|
component: BasicLayout, |
||||||
|
children: [ |
||||||
|
{ |
||||||
|
name: `about`, |
||||||
|
path: `/about`, |
||||||
|
component: () => import('@/pages/about/list'), |
||||||
|
meta: { title: '关于我们' } |
||||||
|
}, |
||||||
|
] |
||||||
|
}; |