Commit a11cd458 authored by anxixi's avatar anxixi

登录相关功能

parent 2ae9a6b6
......@@ -6502,6 +6502,9 @@
.el-loading-mask.is-fullscreen {
position: fixed
}
.el-loading-parent--hidden{
overflow: auto!important;
}
.el-loading-mask.is-fullscreen .el-loading-spinner {
margin-top: -25px
......
......@@ -156,6 +156,13 @@
</el-drawer>
</div>
<el-dialog :visible.sync="expertVisible" width="500px" :append-to-body="true" :close-on-click-modal="false">
<div v-if="expertVisible" class="loginform" style="width: 320px;margin: 0 auto;text-align: center;">
<loginbar :tocurrent="true"></loginbar>
</div>
</el-dialog>
<wxexpertVisible ref="wxlogin" @dataEvent="successlogin"></wxexpertVisible>
</div>
</template>
......@@ -165,6 +172,7 @@
import api from "../../views/loginregister/api/api";
import $ from 'jquery';
import wxexpertVisible from "../../views/index/pages/wxlogin";
import loginbar from '../../views/loginregister/pages/mobileLoginCmpt'
//非必要
export default {
name: "PageTopindex",
......@@ -199,13 +207,14 @@
direction: 'rtl',
positions:false,
keyword_search:false,
expertVisible:false,
hrefweb:"https://open.weixin.qq.com/connect/qrconnect?appid=wxf7c7984d24495e1d&redirect_uri="+encodeURIComponent(this.publicFun.getCurrentHrefEnv()+'#/pcauth')+"&response_type=code&scope=snsapi_login&state=#wechat_redirect",
}
},
props:[
'tabpath'
],
components: {wxexpertVisible},
components: {wxexpertVisible,loginbar},
methods: {
//微信授权
wxopenlogin(){
......@@ -261,14 +270,16 @@
},
//登录
handleLogin(){
if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileLoginCmpt");
else this.$router.push('/emailLoginCmpt');
this.expertVisible = true;
// if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileLoginCmpt");
// else this.$router.push('/emailLoginCmpt');
},
//注册
handleRegister(){
if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileRegisterCmpt");
else this.$router.push('/emailRegisterCmpt');
this.expertVisible = true;
// if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileRegisterCmpt");
// else this.$router.push('/emailRegisterCmpt');
},
//抽屉 去哪里
handleTo(type){
......
......@@ -79,6 +79,7 @@
outSideParams:window.location.href.split("?")?window.location.href.split("?")[1]:null
}
},
props:['tocurrent'],
methods:{
timeOutReturn(){
......@@ -148,10 +149,14 @@
if(!res.result){
this.$router.push("/setPassword");
}else{
if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user");
else {
if(this.publicFun.isgetUserRoleFunc(8)||this.publicFun.isgetUserRoleFunc(4)||this.publicFun.isgetUserRoleFunc(7)) this.$router.push({path:"/seeprojectlist",query:{remind:true}});
else this.$router.push("/seeprojectlist");
if(this.tocurrent){
globalMsg.$emit('islogin');
}else{
if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user");
else {
if(this.publicFun.isgetUserRoleFunc(8)||this.publicFun.isgetUserRoleFunc(4)||this.publicFun.isgetUserRoleFunc(7)) this.$router.push({path:"/seeprojectlist",query:{remind:true}});
else this.$router.push("/seeprojectlist");
}
}
this.timeOutReturn();
}
......
......@@ -51,6 +51,7 @@
outSideParams:window.location.href.split("?")?window.location.href.split("?")[1]:null
}
},
props:['tocurrent'],
methods:{
timeOutReturn(){
......@@ -165,13 +166,16 @@
}
this.publicFun.setUserInfoCookieType(that.Base64.encode(JSON.stringify(data)));
this.hasSetPassword();
if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user");
else {
if(this.publicFun.isgetUserRoleFunc(8)||this.publicFun.isgetUserRoleFunc(4)||this.publicFun.isgetUserRoleFunc(7)) this.$router.push({path:"/seeprojectlist",query:{remind:true}});
else this.$router.push("/seeprojectlist");
}
that.timeOutReturn()
if(this.tocurrent){
globalMsg.$emit('islogin');
}else{
if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user");
else {
if(this.publicFun.isgetUserRoleFunc(8)||this.publicFun.isgetUserRoleFunc(4)||this.publicFun.isgetUserRoleFunc(7)) this.$router.push({path:"/seeprojectlist",query:{remind:true}});
else this.$router.push("/seeprojectlist");
}
}
},
hasSetPassword(){
......
......@@ -88,7 +88,7 @@
if(row.baseLive.liveState != 0){
if(this.userInfo&&this.userInfo.empId==row.createdBy){
if(row.baseLive.liveState == 1||row.baseLive.liveBack == 0){
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive");
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive?url="+liveUrl);
}
}else{
if(row.baseLive.liveState == 2&&row.baseLive.liveBack == 0){
......@@ -96,7 +96,7 @@
this.$refs.login.isexpertVisible();
return
}
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive");
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive?url="+liveUrl);
}else{
if(row.baseLive.livePowers == 0&&row.activityState == 2&&row.isJoin == 2){
if(!this.publicFun.getUserInfoCookieType()){
......@@ -114,7 +114,7 @@
this.$refs.login.isexpertVisible();
return
}
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive");
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive?url="+liveUrl);
}
}
}
......
......@@ -3,12 +3,16 @@
<p>{{$t("login.title")}}</p>
<el-tabs v-model="activeName">
<el-tab-pane :label="$t('login.phonePwdLogin')" name="first">
<mbByPwdCmpt></mbByPwdCmpt>
<mbByPwdCmpt :tocurrent="tocurrent"></mbByPwdCmpt>
</el-tab-pane>
<el-tab-pane :label="$t('login.phoneCodeLogin')" name="second">
<mbByCodeCmpt></mbByCodeCmpt>
<mbByCodeCmpt :tocurrent="tocurrent"></mbByCodeCmpt>
</el-tab-pane>
</el-tabs>
<div v-if="$i18n.locale=='zh-CN'&&tocurrent" style="margin-top: -20px;text-align: center;">
<el-divider>其他登录方式</el-divider>
<p><a :href="hrefweb"><i style="color: #00C800;font-size: 28px;" class="iconfont icon-gongzhonghao"></i></a></p>
</div>
</div>
</template>
......@@ -21,9 +25,11 @@
mbByPwdCmpt,
mbByCodeCmpt
},
props:['tocurrent'],
data() {
return {
activeName: "first",
hrefweb:"https://open.weixin.qq.com/connect/qrconnect?appid=wxf7c7984d24495e1d&redirect_uri="+encodeURIComponent(this.publicFun.getCurrentHrefEnv()+'#/pcauth')+"&response_type=code&scope=snsapi_login&state=#wechat_redirect",
}
},
methods: {
......
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