Commit a11cd458 authored by anxixi's avatar anxixi

登录相关功能

parent 2ae9a6b6
...@@ -6502,6 +6502,9 @@ ...@@ -6502,6 +6502,9 @@
.el-loading-mask.is-fullscreen { .el-loading-mask.is-fullscreen {
position: fixed position: fixed
} }
.el-loading-parent--hidden{
overflow: auto!important;
}
.el-loading-mask.is-fullscreen .el-loading-spinner { .el-loading-mask.is-fullscreen .el-loading-spinner {
margin-top: -25px margin-top: -25px
......
...@@ -156,6 +156,13 @@ ...@@ -156,6 +156,13 @@
</el-drawer> </el-drawer>
</div> </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> <wxexpertVisible ref="wxlogin" @dataEvent="successlogin"></wxexpertVisible>
</div> </div>
</template> </template>
...@@ -165,6 +172,7 @@ ...@@ -165,6 +172,7 @@
import api from "../../views/loginregister/api/api"; import api from "../../views/loginregister/api/api";
import $ from 'jquery'; import $ from 'jquery';
import wxexpertVisible from "../../views/index/pages/wxlogin"; import wxexpertVisible from "../../views/index/pages/wxlogin";
import loginbar from '../../views/loginregister/pages/mobileLoginCmpt'
//非必要 //非必要
export default { export default {
name: "PageTopindex", name: "PageTopindex",
...@@ -199,13 +207,14 @@ ...@@ -199,13 +207,14 @@
direction: 'rtl', direction: 'rtl',
positions:false, positions:false,
keyword_search: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", 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:[ props:[
'tabpath' 'tabpath'
], ],
components: {wxexpertVisible}, components: {wxexpertVisible,loginbar},
methods: { methods: {
//微信授权 //微信授权
wxopenlogin(){ wxopenlogin(){
...@@ -261,14 +270,16 @@ ...@@ -261,14 +270,16 @@
}, },
//登录 //登录
handleLogin(){ handleLogin(){
if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileLoginCmpt"); this.expertVisible = true;
else this.$router.push('/emailLoginCmpt'); // if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileLoginCmpt");
// else this.$router.push('/emailLoginCmpt');
}, },
//注册 //注册
handleRegister(){ handleRegister(){
if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileRegisterCmpt"); this.expertVisible = true;
else this.$router.push('/emailRegisterCmpt'); // if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileRegisterCmpt");
// else this.$router.push('/emailRegisterCmpt');
}, },
//抽屉 去哪里 //抽屉 去哪里
handleTo(type){ handleTo(type){
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
outSideParams:window.location.href.split("?")?window.location.href.split("?")[1]:null outSideParams:window.location.href.split("?")?window.location.href.split("?")[1]:null
} }
}, },
props:['tocurrent'],
methods:{ methods:{
timeOutReturn(){ timeOutReturn(){
...@@ -147,12 +148,16 @@ ...@@ -147,12 +148,16 @@
if(res.code==0){ if(res.code==0){
if(!res.result){ if(!res.result){
this.$router.push("/setPassword"); this.$router.push("/setPassword");
}else{
if(this.tocurrent){
globalMsg.$emit('islogin');
}else{ }else{
if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user"); if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user");
else { else {
if(this.publicFun.isgetUserRoleFunc(8)||this.publicFun.isgetUserRoleFunc(4)||this.publicFun.isgetUserRoleFunc(7)) this.$router.push({path:"/seeprojectlist",query:{remind:true}}); 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"); else this.$router.push("/seeprojectlist");
} }
}
this.timeOutReturn(); this.timeOutReturn();
} }
}else{ }else{
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
outSideParams:window.location.href.split("?")?window.location.href.split("?")[1]:null outSideParams:window.location.href.split("?")?window.location.href.split("?")[1]:null
} }
}, },
props:['tocurrent'],
methods:{ methods:{
timeOutReturn(){ timeOutReturn(){
...@@ -165,13 +166,16 @@ ...@@ -165,13 +166,16 @@
} }
this.publicFun.setUserInfoCookieType(that.Base64.encode(JSON.stringify(data))); this.publicFun.setUserInfoCookieType(that.Base64.encode(JSON.stringify(data)));
this.hasSetPassword(); this.hasSetPassword();
that.timeOutReturn()
if(this.tocurrent){
globalMsg.$emit('islogin');
}else{
if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user"); if(this.publicFun.isgetUserRoleFunc(1)) this.$router.push("/sys.user");
else { else {
if(this.publicFun.isgetUserRoleFunc(8)||this.publicFun.isgetUserRoleFunc(4)||this.publicFun.isgetUserRoleFunc(7)) this.$router.push({path:"/seeprojectlist",query:{remind:true}}); 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"); else this.$router.push("/seeprojectlist");
} }
that.timeOutReturn() }
}, },
hasSetPassword(){ hasSetPassword(){
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
if(row.baseLive.liveState != 0){ if(row.baseLive.liveState != 0){
if(this.userInfo&&this.userInfo.empId==row.createdBy){ if(this.userInfo&&this.userInfo.empId==row.createdBy){
if(row.baseLive.liveState == 1||row.baseLive.liveBack == 0){ if(row.baseLive.liveState == 1||row.baseLive.liveBack == 0){
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive"); window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive?url="+liveUrl);
} }
}else{ }else{
if(row.baseLive.liveState == 2&&row.baseLive.liveBack == 0){ if(row.baseLive.liveState == 2&&row.baseLive.liveBack == 0){
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
this.$refs.login.isexpertVisible(); this.$refs.login.isexpertVisible();
return return
} }
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive"); window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive?url="+liveUrl);
}else{ }else{
if(row.baseLive.livePowers == 0&&row.activityState == 2&&row.isJoin == 2){ if(row.baseLive.livePowers == 0&&row.activityState == 2&&row.isJoin == 2){
if(!this.publicFun.getUserInfoCookieType()){ if(!this.publicFun.getUserInfoCookieType()){
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
this.$refs.login.isexpertVisible(); this.$refs.login.isexpertVisible();
return return
} }
window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive"); window.open(this.publicFun.getCurrentHrefEnv()+"#/eventlive?url="+liveUrl);
} }
} }
} }
......
...@@ -3,12 +3,16 @@ ...@@ -3,12 +3,16 @@
<p>{{$t("login.title")}}</p> <p>{{$t("login.title")}}</p>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane :label="$t('login.phonePwdLogin')" name="first"> <el-tab-pane :label="$t('login.phonePwdLogin')" name="first">
<mbByPwdCmpt></mbByPwdCmpt> <mbByPwdCmpt :tocurrent="tocurrent"></mbByPwdCmpt>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('login.phoneCodeLogin')" name="second"> <el-tab-pane :label="$t('login.phoneCodeLogin')" name="second">
<mbByCodeCmpt></mbByCodeCmpt> <mbByCodeCmpt :tocurrent="tocurrent"></mbByCodeCmpt>
</el-tab-pane> </el-tab-pane>
</el-tabs> </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> </div>
</template> </template>
...@@ -21,9 +25,11 @@ ...@@ -21,9 +25,11 @@
mbByPwdCmpt, mbByPwdCmpt,
mbByCodeCmpt mbByCodeCmpt
}, },
props:['tocurrent'],
data() { data() {
return { return {
activeName: "first", 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: { 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