You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
379 lines
13 KiB
379 lines
13 KiB
<template>
|
|
<div class="c-container">
|
|
<div class="c-header">
|
|
<div class="c-title">
|
|
<a href="./index.html"><h1>学职探索<span>自助仪</span></h1></a>
|
|
<div>
|
|
<div>服务热线</div>
|
|
<div>400-0400-662</div>
|
|
</div>
|
|
</div>
|
|
<div v-if="isCookie" class="login" @click="show()">登录</div>
|
|
<div class="loginout" v-else="">
|
|
<img src="images/tx.png" style="display:inline-block;width:3rem;vertical-align: middle"/>
|
|
<div style="display:inline-block;margin:0 1rem">{{userName}}</div>
|
|
<div style="display:inline-block;cursor: pointer" @click="doLogout">退出</div>
|
|
</div>
|
|
</div>
|
|
<div class="c-content">
|
|
</div>
|
|
<div class="menu">
|
|
<a @click="menuClick($event,1)">
|
|
<!--<router-link to="/views/zhuanye">-->
|
|
<div>
|
|
<img class="c-svg" src="images/zhuanyebk.svg" >
|
|
<div>专业百科</div>
|
|
</div>
|
|
|
|
<!--</router-link>-->
|
|
</a>
|
|
|
|
<!--<router-link to="/views/gaoxiao">-->
|
|
<a @click="menuClick($event,2)">
|
|
<div>
|
|
<img class="c-svg" src="images/gaoxiaots.svg">
|
|
<div>高校探索</div>
|
|
</div>
|
|
</a>
|
|
<!--</router-link>-->
|
|
<!--<router-link to="/views/zhiye">-->
|
|
<a @click="menuClick($event,3)">
|
|
<div>
|
|
<img class="c-svg" src="images/zhiyebk.svg">
|
|
<div>职业百科</div>
|
|
</div>
|
|
</a>
|
|
<!--</router-link>-->
|
|
<!--<router-link to="/views/shengya">-->
|
|
<a @click="menuClick($event,4)">
|
|
<div>
|
|
<img class="c-svg" src="images/shengyazy.svg">
|
|
<div>生涯资源</div>
|
|
</div>
|
|
</a>
|
|
<!--</router-link>-->
|
|
</div>
|
|
<div class="c-footer">
|
|
<div class="c-contact">
|
|
<div><span>生涯规划</span><span>自助查询一体机</span></div>
|
|
<div>服务热线400-0400-662</div>
|
|
</div>
|
|
</div>
|
|
<div class="model" v-show="isShow">
|
|
<div class="modelFixed" >
|
|
<div style="position: relative;height: 10vh">
|
|
<img @click="close()" style="position:absolute;top:0;right:-2vh;width: 1.5rem;cursor:pointer" src="images/gaoxiao/closeModal.png"/>
|
|
<div class="title">用户登录</div>
|
|
</div>
|
|
<div style="position: relative">
|
|
<input class="input-box" style="margin-bottom: 1rem" type="text" v-model="personName" @keyup="personNameChange" placeholder="请输入用户名" />
|
|
<img style="width: 1.5rem;position: absolute;left: 4.2rem;top: .6rem;" src="images/user.png"/>
|
|
</div>
|
|
<div style="position: relative">
|
|
<input class="input-box" type="password" v-model="password" @keyup="passwordChange" placeholder="请输入密码" />
|
|
<img style="width: 1.5rem;position: absolute;left: 4.2rem;top: .6rem;" src="images/lock.png"/>
|
|
</div>
|
|
<div style="font-size: 13px;margin-top:5px;color:red;">{{info}}</div>
|
|
<div style="display: flex;justify-content: center">
|
|
<div class="btn" @click="doLogin">登录</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<message type="warning" v-if="limit_isShow" v-model:info="limit_info" @ok="closeTip"/>
|
|
</div>
|
|
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
data: function () {
|
|
return {
|
|
isShow: false,
|
|
url:'',
|
|
info:'',
|
|
password:'',
|
|
personName:'',
|
|
limit_info:'',
|
|
limit:false,
|
|
limit_isShow:false,
|
|
isCookie:$.cookie("person_id")===undefined,
|
|
userName:$.cookie("person_name"),
|
|
}
|
|
},
|
|
mounted: function () {
|
|
|
|
},
|
|
methods:{
|
|
closeTip:function (status) {
|
|
this.limit_isShow= status;
|
|
},
|
|
show: function () {
|
|
this.isShow = true;
|
|
},
|
|
close: function () {
|
|
this.isShow = false;
|
|
},
|
|
personNameChange:function () {
|
|
if(this.personName!==''){
|
|
this.info=''
|
|
}
|
|
},
|
|
passwordChange:function () {
|
|
if(this.password!==''){
|
|
this.info=''
|
|
}
|
|
},
|
|
doLogin:function () {
|
|
if(this.personName.replace(/(^\s*)|(\s*$)/g, "")===''){//去除首尾两端空格
|
|
this.info='请输入用户名'
|
|
}else if(this.password.replace(/(^\s*)|(\s*$)/g, "")===''){
|
|
this.info='请输入密码'
|
|
}else {
|
|
var url = '/dsideal_yy/login/doLogin';
|
|
var uri = new URI();
|
|
uri.setQuery("login_type", 1);
|
|
uri.setQuery("user", this.personName);
|
|
uri.setQuery("pwd", this.password);
|
|
var parent = this;
|
|
$.post(url, uri.query(), function (response) {
|
|
if (response.success) {
|
|
localStorage.setItem("login_name_local", response.login_name);
|
|
localStorage.setItem("login_pwd_local", parent.password);
|
|
localStorage.setItem("person_id_local", response.person_id);
|
|
localStorage.setItem("identity_id_local", response.identity);
|
|
localStorage.setItem("person_name_local", response.person_name);
|
|
localStorage.setItem("bureau_name_local", response.bureau_name);
|
|
localStorage.setItem("class_id_local", response.class_id);
|
|
localStorage.setItem("token_local", response.token);
|
|
localStorage.setItem("bureau_id", response.bureau_id);
|
|
localStorage.setItem("class_id", response.class_id);
|
|
// localStorage.setItem("province_id", response.province_id);
|
|
// parent.getCrmInfoByPerson();
|
|
parent.isCookie=$.cookie("person_id")===undefined;
|
|
parent.userName=$.cookie("person_name");
|
|
parent.isShow=false;
|
|
// document.cookie("person_id", data.person_id, {path:"/"})
|
|
}else {
|
|
parent.info=response.info;
|
|
|
|
}
|
|
});
|
|
}
|
|
},
|
|
getCrmInfoByPerson:function (type) {
|
|
// this.limit_isShow=null;
|
|
var url = '/dsideal_yy/base/crm/getCrmInfoByPerson';
|
|
var uri = new URI();
|
|
uri.setQuery("person_id", $.cookie('person_id'));
|
|
uri.setQuery("identity_id", $.cookie('identity_id'));
|
|
uri.setQuery("user_type", 5);
|
|
uri.setQuery("code", 'xztszzy');
|
|
uri.setQuery("plat",1);
|
|
var parent = this;
|
|
$.post(url, uri.query(), function (response) {
|
|
console.log('response',JSON.parse(response).success)
|
|
if (JSON.parse(response).success) {
|
|
parent.limit=true;
|
|
parent.limit_info='';
|
|
parent.limit_isShow=false;
|
|
if(type===1){
|
|
parent.$router.push('/views/zhuanye')
|
|
}else if(type===2){
|
|
parent.$router.push('/views/gaoxiao')
|
|
}else if(type===3){
|
|
parent.$router.push('/views/zhiye')
|
|
}else {
|
|
parent.$router.push('/views/shengya')
|
|
}
|
|
}else {
|
|
parent.limit=false;
|
|
parent.limit_isShow=true;
|
|
parent.limit_info='对不起,您没有访问权限!';
|
|
// parent.$forceUpdate()
|
|
}
|
|
})
|
|
|
|
},
|
|
doLogout:function () {
|
|
var url = '/dsideal_yy/login/doLogout';
|
|
var uri = new URI();
|
|
uri.setQuery("type", 1);
|
|
var parent = this;
|
|
$.post(url, uri.query(), function (response) {
|
|
if (response.success) {
|
|
localStorage.clear();
|
|
parent.isCookie=$.cookie("person_id")===undefined;
|
|
|
|
}
|
|
})
|
|
},
|
|
closeModal:function () {
|
|
console.log(1111)
|
|
this.limit_isShow=false;
|
|
},
|
|
menuClick:function (event,type) {
|
|
if($.cookie('person_id')){
|
|
this.getCrmInfoByPerson(type);
|
|
}else {
|
|
this.isShow=true
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style>
|
|
#app {
|
|
background-image: url(images/bg.jpg);
|
|
background-repeat: no-repeat;
|
|
background-size: cover;
|
|
}
|
|
|
|
.c-header .login{
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
font-size: 1.2rem;
|
|
cursor: pointer;
|
|
color: #3499FB;
|
|
border: 2px solid #3499FB;
|
|
border-radius: 5px;
|
|
padding: .5rem 1.5rem;
|
|
}
|
|
.model {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: fixed;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
background: rgba(0, 0, 0, .3);
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 999;
|
|
}
|
|
.modelFixed {
|
|
padding: 20px 40px;
|
|
width: 28rem;
|
|
height: 22rem;
|
|
border-radius:10px;
|
|
overflow: auto;
|
|
background: #ffffff;
|
|
box-shadow: 3px 2px 5px #7777;
|
|
}
|
|
.title{
|
|
color:#3D8AF9;
|
|
height:3rem;
|
|
line-height:5rem;
|
|
font-size:2rem;
|
|
text-align:center;
|
|
}
|
|
.input-box{
|
|
width: 65%;
|
|
height: 2.7rem;
|
|
border: 1px solid #ccc;
|
|
border-radius: 2rem;
|
|
padding-left: 3rem;
|
|
font-size: 1.2rem;
|
|
/*margin: 2vh 0;*/
|
|
}
|
|
.input-box::placeholder{
|
|
color: #ccc;
|
|
}
|
|
.input-box:focus{
|
|
outline: none;
|
|
}
|
|
|
|
.btn{
|
|
background-image: linear-gradient(to right, #3194EF , #205AE0);
|
|
color: #fff;
|
|
width: calc(65% + 3rem);
|
|
height: 2.8rem;
|
|
border: 1px solid #ccc;
|
|
border-radius: 2rem;
|
|
font-size: 1.3rem;
|
|
margin-top: 3rem;
|
|
line-height: 2.8rem;
|
|
cursor: pointer;
|
|
}
|
|
.loginout{
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
font-size: 1rem;
|
|
/*color: #3499FB;*/
|
|
color: #fff;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.c-title h1 {
|
|
color: #fff;
|
|
}
|
|
|
|
.c-title div {
|
|
color: #fff;
|
|
}
|
|
|
|
.c-footer .c-contact div:first-child {
|
|
opacity: 0;
|
|
}
|
|
|
|
.c-content {
|
|
border: none;
|
|
background:none;
|
|
}
|
|
|
|
.menu {
|
|
position: absolute;
|
|
top: calc(50% - 27vh);
|
|
right: 28.8%;
|
|
width: 55vh;
|
|
height: 55vh;
|
|
transform: rotate(45deg);
|
|
text-align: center;
|
|
}
|
|
|
|
.menu > a {
|
|
display: block;
|
|
background-color: #026fe8;
|
|
width: 49%;
|
|
height: 49%;
|
|
position: absolute;
|
|
color: #fff;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.menu > a:nth-child(1), .menu > a:nth-child(2) {
|
|
top: 0;
|
|
}
|
|
|
|
.menu > a:nth-child(3), .menu > a:nth-child(4) {
|
|
bottom: 0;
|
|
}
|
|
|
|
.menu > a:nth-child(1),.menu > a:nth-child(3) {
|
|
left: 0;
|
|
}
|
|
|
|
.menu > a:nth-child(2),.menu > a:nth-child(4) {
|
|
right: 0;
|
|
}
|
|
|
|
.menu > a > div {
|
|
width: 100%;
|
|
height: 100%;
|
|
transform: rotate(-45deg);
|
|
font-size: 2vh;
|
|
box-sizing: border-box;
|
|
padding-top: 6vh;
|
|
}
|
|
|
|
.menu > a > div > div {
|
|
padding-top: 3vh;
|
|
}
|
|
.c-svg{
|
|
width:5.5vh;
|
|
height:5.5vh;
|
|
}
|
|
</style> |