|
|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
|
- <div class="x-container">
|
|
|
+ <div class="x-container y-container">
|
|
|
<!--登录窗口-->
|
|
|
<template v-if="!loginIsSuccess">
|
|
|
<div class="x-login-wrap">
|
|
|
<div class="login-tab" v-show="loginWay != 2">
|
|
|
<span @click="toggleTab(0)" v-bind:class="{'active': loginWay === 0 }">密码登录</span>
|
|
|
<span @click="toggleTab(3)" v-bind:class="{'active': loginWay === 3 }">短信登录</span>
|
|
|
- <span @click="ShowWechatCoe(1)" v-bind:class="{'active': loginWay === 1 }" id="weChatBtn">微信登录</span>
|
|
|
+ <!--<span @click="ShowWechatCoe(1)" v-bind:class="{'active': loginWay === 1 }" id="weChatBtn">微信登录</span>-->
|
|
|
</div>
|
|
|
<!--账号密码登录-->
|
|
|
<div class="x-login" v-show="loginWay === 0">
|
|
|
@@ -79,52 +79,52 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--微信扫码登录-->
|
|
|
- <div class="x-login scan-login" v-show="loginWay === 1">
|
|
|
- <div class="x-login-form">
|
|
|
- <div class="scan-body">
|
|
|
- <div class="img">
|
|
|
- <div id="login_container"></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="link-go" style="padding: 0 18px 12px 0; margin-top: 0;">
|
|
|
- <a :href="`/sassLogin/register${this.queryLink ? '?' + this.queryLink : ''}`" class="second">免费注册</a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <!--<div class="x-login scan-login" v-show="loginWay === 1">-->
|
|
|
+ <!--<div class="x-login-form">-->
|
|
|
+ <!--<div class="scan-body">-->
|
|
|
+ <!--<div class="img">-->
|
|
|
+ <!--<div id="login_container"></div>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<div class="link-go" style="padding: 0 18px 12px 0; margin-top: 0;">-->
|
|
|
+ <!--<a :href="`/sassLogin/register${this.queryLink ? '?' + this.queryLink : ''}`" class="second">免费注册</a>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</div>-->
|
|
|
<!--绑定账号-->
|
|
|
- <div class="x-login bind-login" v-show="loginWay === 2">
|
|
|
- <div class="x-login-form">
|
|
|
- <div class="bind-header">
|
|
|
- <span>绑定已有账号</span>
|
|
|
- <span @click="loginWay = 0">返回</span>
|
|
|
- </div>
|
|
|
- <div class="bind-body">
|
|
|
- <div class="img"><img :src="wxImg" alt=""/><div>{{wxName}}</div></div>
|
|
|
- <div>
|
|
|
- <el-form :model="bindAccount" :rules="rules4" ref="bindAccount" class="demo-ruleForm login-form">
|
|
|
- <el-form-item prop="username" style="margin: 0 auto 10px !important;">
|
|
|
- <el-input type="text"
|
|
|
- v-model="bindAccount.username"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="请输入用户名、手机号或邮箱"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="password" style="margin: 0 auto 10px !important;">
|
|
|
- <el-input type="password"
|
|
|
- v-model="bindAccount.password"
|
|
|
- auto-complete="new-password"
|
|
|
- placeholder="密码"
|
|
|
- @keyup.enter.native="wxBind"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item style="margin: 0 auto!important;">
|
|
|
- <a class="btn login"
|
|
|
- @click="wxBind">确定绑定已有账号</a>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <div class="set">还没有优软账号,直接 <a :href="`/sassLogin/register${this.$store.state.option.fullPath}&tk=${wxToken}`">创建新账号</a></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <!--<div class="x-login bind-login" v-show="loginWay === 2">-->
|
|
|
+ <!--<div class="x-login-form">-->
|
|
|
+ <!--<div class="bind-header">-->
|
|
|
+ <!--<span>绑定已有账号</span>-->
|
|
|
+ <!--<span @click="loginWay = 0">返回</span>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<div class="bind-body">-->
|
|
|
+ <!--<div class="img"><img :src="wxImg" alt=""/><div>{{wxName}}</div></div>-->
|
|
|
+ <!--<div>-->
|
|
|
+ <!--<el-form :model="bindAccount" :rules="rules4" ref="bindAccount" class="demo-ruleForm login-form">-->
|
|
|
+ <!--<el-form-item prop="username" style="margin: 0 auto 10px !important;">-->
|
|
|
+ <!--<el-input type="text"-->
|
|
|
+ <!--v-model="bindAccount.username"-->
|
|
|
+ <!--auto-complete="off"-->
|
|
|
+ <!--placeholder="请输入用户名、手机号或邮箱"></el-input>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
+ <!--<el-form-item prop="password" style="margin: 0 auto 10px !important;">-->
|
|
|
+ <!--<el-input type="password"-->
|
|
|
+ <!--v-model="bindAccount.password"-->
|
|
|
+ <!--auto-complete="new-password"-->
|
|
|
+ <!--placeholder="密码"-->
|
|
|
+ <!--@keyup.enter.native="wxBind"></el-input>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
+ <!--<el-form-item style="margin: 0 auto!important;">-->
|
|
|
+ <!--<a class="btn login"-->
|
|
|
+ <!--@click="wxBind">确定绑定已有账号</a>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
+ <!--</el-form>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<div class="set">还没有优软账号,直接 <a :href="`/sassLogin/register${this.$store.state.option.fullPath}&tk=${wxToken}`">创建新账号</a></div>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</div>-->
|
|
|
</div>
|
|
|
<!--选择企业弹框-->
|
|
|
<div>
|
|
|
@@ -477,24 +477,6 @@
|
|
|
let params = a.substr(0, a.length - 1)
|
|
|
this.isShowLoading = true
|
|
|
if (response.data.content.currentUrl) {
|
|
|
- let baseContent = response.data.content.currentUrl
|
|
|
- let flag = '?'
|
|
|
- if (baseContent.indexOf('?') !== -1) {
|
|
|
- flag = '&'
|
|
|
- }
|
|
|
- this.$jsonp(`${response.data.content.currentUrl}${flag}${params}`, {
|
|
|
- name: 'successCallback',
|
|
|
- timeout: 3000
|
|
|
- }, (err, data) => {
|
|
|
- if (err) {
|
|
|
- this.$message.error('登录超时,请重试')
|
|
|
- this.isShowLoading = false
|
|
|
- throw err
|
|
|
- } else {
|
|
|
- this.loginOther(response, params)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
this.loginOther(response, params, 3000)
|
|
|
}
|
|
|
}
|
|
|
@@ -548,7 +530,10 @@
|
|
|
this.isShowLoading = true
|
|
|
if (!this.fastLogin.mobile) {
|
|
|
this.isShowLoading = false
|
|
|
- this.$message.error('请填写手机号')
|
|
|
+ this.$message.error({
|
|
|
+ message: '请填写手机号',
|
|
|
+ showClose: true
|
|
|
+ })
|
|
|
} else {
|
|
|
let param = new FormData()
|
|
|
param.append('mobile', this.fastLogin.mobile)
|
|
|
@@ -579,20 +564,7 @@
|
|
|
let params = a.substr(0, a.length - 1)
|
|
|
this.isShowLoading = true
|
|
|
if (response.data.content.currentUrl) {
|
|
|
- this.$jsonp(`${response.data.content.currentUrl}?${params}`, {
|
|
|
- name: 'successCallback',
|
|
|
- timeout: 3000
|
|
|
- }, (err, data) => {
|
|
|
- if (err) {
|
|
|
- this.$message.error('登录超时,请重试')
|
|
|
- this.isShowLoading = false
|
|
|
- throw err
|
|
|
- } else {
|
|
|
- this.loginOther(response, params)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.loginOther(response, params, 3000)
|
|
|
+ this.loginOther(response, params, 1000)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -639,14 +611,31 @@
|
|
|
promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
Promise.all(promises).then(() => {
|
|
|
- this.loginIsSuccess = true
|
|
|
- this.isShowLoading = false
|
|
|
- // crossAfter(response.data.content.returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
+ this.loginCurrent(response, a)
|
|
|
}).catch(() => {
|
|
|
- this.loginIsSuccess = true
|
|
|
- this.isShowLoading = false
|
|
|
- // crossAfter(response.data.content.returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
+ this.loginCurrent(response, a)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ loginCurrent (response, a) {
|
|
|
+ let baseContent = response.data.content.currentUrl
|
|
|
+ let flag = '?'
|
|
|
+ if (baseContent.indexOf('?') !== -1) {
|
|
|
+ flag = '&'
|
|
|
+ }
|
|
|
+ this.$jsonp(`${response.data.content.currentUrl}${flag}${a}`, {
|
|
|
+ name: 'successCallback',
|
|
|
+ timeout: 3000
|
|
|
+ }, (err, data) => {
|
|
|
+ if (err) {
|
|
|
+ this.$message.error('登录超时,请重试')
|
|
|
+ this.isShowLoading = false
|
|
|
+ throw err
|
|
|
+ } else {
|
|
|
+ this.loginIsSuccess = true
|
|
|
+ this.isShowLoading = false
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
getCheckCode () {
|
|
|
@@ -749,8 +738,6 @@
|
|
|
this.loginOther(response, params)
|
|
|
}
|
|
|
})
|
|
|
- } else {
|
|
|
- this.loginOther(response, params, 3000)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -820,89 +807,106 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" type="text/scss">
|
|
|
- .x-container {
|
|
|
- width: 346px;
|
|
|
- margin: 0 auto;
|
|
|
- text-align: center;
|
|
|
- /*background: #FFFFFF;*/
|
|
|
- /*box-shadow: 0 22px 24px 0 rgba(0,0,0,0.08);*/
|
|
|
- /*border-radius: 3px;*/
|
|
|
- .login-tab {
|
|
|
- margin-bottom: 30px;
|
|
|
- width: 100%;
|
|
|
- height: 50px;
|
|
|
- line-height: 50px;
|
|
|
- border-bottom: 1px solid #dcdcdc;
|
|
|
- span{
|
|
|
- display: inline-block;
|
|
|
- width: 30%;
|
|
|
- font-size: 16px;
|
|
|
- color: #999;
|
|
|
- cursor: pointer;
|
|
|
- &.active{
|
|
|
- color: #333;
|
|
|
- border-bottom: 2px solid #282828;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .x-login {
|
|
|
- width: 100%;
|
|
|
- .x-login-form {
|
|
|
- .btn.login{
|
|
|
- width: 306px;
|
|
|
- height: 34px;
|
|
|
- background: #5078cb;
|
|
|
- color: #fff;
|
|
|
- font-weight: 700;
|
|
|
- letter-spacing: 4px;
|
|
|
- border-radius: 0;
|
|
|
- }
|
|
|
- .text-position{
|
|
|
- .el-form-item__content .el-checkbox{
|
|
|
- margin-left: 0!important;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .link-go {
|
|
|
- position: relative;
|
|
|
- text-align: right;
|
|
|
- margin-top: 35px;
|
|
|
- padding: 0 21px 20px 0;
|
|
|
- a{
|
|
|
- margin-left: 20px;
|
|
|
- font-size: 14px;
|
|
|
- color: #999;
|
|
|
- background: 0 0;
|
|
|
- text-decoration: none;
|
|
|
- outline: 0;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- span{
|
|
|
- position: absolute;
|
|
|
- top: 1px;
|
|
|
- display: inline-block;
|
|
|
- margin: 0 10px;
|
|
|
- width: 2px;
|
|
|
- height: 15px;
|
|
|
- background-color: #ddd;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .login-success {
|
|
|
- padding-top: 95px;
|
|
|
- width: 100%;
|
|
|
- height: 400px;
|
|
|
- margin: 0 auto;
|
|
|
- text-align: center;
|
|
|
- i{
|
|
|
- font-size: 125px;
|
|
|
- color: #22ac38;
|
|
|
- }
|
|
|
- p{
|
|
|
- margin-top: 20px;
|
|
|
- font-size: 28px;
|
|
|
- color: #333;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .y-container {
|
|
|
+ position: relative;
|
|
|
+ bottom: -30px;
|
|
|
+ width: 346px !important ;
|
|
|
+ margin: 0 auto;
|
|
|
+ text-align: center;
|
|
|
+ /*background: #FFFFFF;*/
|
|
|
+ /*box-shadow: 0 22px 24px 0 rgba(0,0,0,0.08);*/
|
|
|
+ /*border-radius: 3px;*/
|
|
|
+ .x-login-wrap{
|
|
|
+ margin: 20px 0 0!important ;
|
|
|
+ height: auto;
|
|
|
+ .scan-body{
|
|
|
+ .img{
|
|
|
+ height: 200px!important ;
|
|
|
+ .login_container{
|
|
|
+ height: 200px!important ;
|
|
|
+ iframe {
|
|
|
+ height: 200px!important ;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .login-tab {
|
|
|
+ margin-bottom: 30px;
|
|
|
+ width: 100%;
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ border-bottom: 1px solid #dcdcdc;
|
|
|
+ span{
|
|
|
+ display: inline-block;
|
|
|
+ width: 45%;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #999;
|
|
|
+ cursor: pointer;
|
|
|
+ &.active{
|
|
|
+ color: #333;
|
|
|
+ border-bottom: 2px solid #282828;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .x-login {
|
|
|
+ width: 100%;
|
|
|
+ .x-login-form {
|
|
|
+ .btn.login{
|
|
|
+ width: 306px;
|
|
|
+ height: 34px;
|
|
|
+ background: #5078cb;
|
|
|
+ color: #fff;
|
|
|
+ font-weight: 700;
|
|
|
+ letter-spacing: 4px;
|
|
|
+ border-radius: 0;
|
|
|
+ }
|
|
|
+ .text-position{
|
|
|
+ .el-form-item__content .el-checkbox{
|
|
|
+ margin-left: 0!important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .link-go {
|
|
|
+ position: relative;
|
|
|
+ text-align: right;
|
|
|
+ margin-top: 35px;
|
|
|
+ padding: 0 21px 20px 0;
|
|
|
+ a{
|
|
|
+ margin-left: 20px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999;
|
|
|
+ background: 0 0;
|
|
|
+ text-decoration: none;
|
|
|
+ outline: 0;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ span{
|
|
|
+ position: absolute;
|
|
|
+ top: 1px;
|
|
|
+ display: inline-block;
|
|
|
+ margin: 0 10px;
|
|
|
+ width: 2px;
|
|
|
+ height: 15px;
|
|
|
+ background-color: #ddd;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .login-success {
|
|
|
+ padding-top: 95px;
|
|
|
+ width: 100%;
|
|
|
+ height: 400px;
|
|
|
+ margin: 0 auto;
|
|
|
+ text-align: center;
|
|
|
+ i{
|
|
|
+ font-size: 125px;
|
|
|
+ color: #22ac38;
|
|
|
+ }
|
|
|
+ p{
|
|
|
+ margin-top: 20px;
|
|
|
+ font-size: 28px;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|