Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
login
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
login
Commits
535d4188
提交
535d4188
authored
10月 15, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加登录成功回调地址
上级
55213ad4
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
71 行增加
和
60 行删除
+71
-60
.config.dev.js
.config.dev.js
+11
-8
.config.pro.js
.config.pro.js
+11
-8
.config.test.js
.config.test.js
+11
-8
package-lock.json
package-lock.json
+0
-0
loginAccount.vue
src/components/loginAccount.vue
+8
-14
loginCode.vue
src/components/loginCode.vue
+8
-16
login.vue
src/pages/ciis/login.vue
+10
-2
layout.vue
src/pages/sofia/components/layout.vue
+1
-1
login.vue
src/pages/sofia/login.vue
+11
-3
没有找到文件。
.config.dev.js
浏览文件 @
535d4188
...
...
@@ -5,10 +5,10 @@ module.exports = {
// apiBaseURL: '//demo-login.ezijing.com/',
webpack
:
{
externals
:
{
'CKEDITOR'
:
'window.CKEDITOR'
,
'Base64'
:
'window.Base64'
,
'md5'
:
'window.md5'
,
'regeneratorRuntime'
:
'window.regeneratorRuntime'
CKEDITOR
:
'window.CKEDITOR'
,
Base64
:
'window.Base64'
,
md5
:
'window.md5'
,
regeneratorRuntime
:
'window.regeneratorRuntime'
},
devServer
:
{
proxy
:
{
...
...
@@ -31,10 +31,13 @@ module.exports = {
}
}
},
ProvidePlugin
:
{
},
ProvidePlugin
:
{},
others
:
{
sofia
:
{
url
:
'http://sofia-learning2.ezijing.com'
},
ciis
:
{
url
:
'http://ciis-learning2.ezijing.com'
}
}
}
.config.pro.js
浏览文件 @
535d4188
...
...
@@ -6,16 +6,19 @@ module.exports = {
isEnableToIphoneDebugger
:
false
,
webpack
:
{
externals
:
{
'CKEDITOR'
:
'window.CKEDITOR'
,
'Base64'
:
'window.Base64'
,
'md5'
:
'window.md5'
,
'regeneratorRuntime'
:
'window.regeneratorRuntime'
CKEDITOR
:
'window.CKEDITOR'
,
Base64
:
'window.Base64'
,
md5
:
'window.md5'
,
regeneratorRuntime
:
'window.regeneratorRuntime'
}
},
ProvidePlugin
:
{
},
ProvidePlugin
:
{},
others
:
{
sofia
:
{
url
:
'http://sofia-learning.ezijing.com'
},
ciis
:
{
url
:
'http://ciis-learning.ezijing.com'
}
}
}
.config.test.js
浏览文件 @
535d4188
...
...
@@ -7,16 +7,19 @@ module.exports = {
isEnableToIphoneDebugger
:
true
,
webpack
:
{
externals
:
{
'CKEDITOR'
:
'window.CKEDITOR'
,
'Base64'
:
'window.Base64'
,
'md5'
:
'window.md5'
,
'regeneratorRuntime'
:
'window.regeneratorRuntime'
CKEDITOR
:
'window.CKEDITOR'
,
Base64
:
'window.Base64'
,
md5
:
'window.md5'
,
regeneratorRuntime
:
'window.regeneratorRuntime'
}
},
ProvidePlugin
:
{
},
ProvidePlugin
:
{},
others
:
{
sofia
:
{
url
:
'http://sofia-learning2.ezijing.com'
},
ciis
:
{
url
:
'http://ciis-learning2.ezijing.com'
}
}
}
package-lock.json
浏览文件 @
535d4188
差异被折叠。
点击展开。
src/components/loginAccount.vue
浏览文件 @
535d4188
...
...
@@ -2,11 +2,7 @@
<div>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"form"
@
submit
.
native
.
prevent
>
<el-form-item
prop=
"account"
>
<el-input
v-model=
"ruleForm.account"
placeholder=
"邮箱/手机号"
@
keyup
.
enter
.
native=
"handleSubmit"
>
<el-input
v-model=
"ruleForm.account"
placeholder=
"邮箱/手机号"
@
keyup
.
enter
.
native=
"handleSubmit"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-user"
></i>
</el-input>
</el-form-item>
...
...
@@ -20,7 +16,7 @@
<i
slot=
"prefix"
class=
"el-input__icon el-icon-lock"
></i>
</el-input>
</el-form-item>
<el-checkbox
v-model=
"ruleForm.RememberMe"
style=
"margin-bottom:
10px;
"
>
记住我
</el-checkbox>
<el-checkbox
v-model=
"ruleForm.RememberMe"
style=
"margin-bottom:
10px
"
>
记住我
</el-checkbox>
<el-button
type=
"primary"
class=
"submit-button"
:loading=
"loading"
@
click=
"handleSubmit"
>
登录
</el-button>
</el-form>
<div
class=
"login-footer"
>
...
...
@@ -47,9 +43,9 @@ export default {
},
computed
:
{
// 重定向地址
redirectURI
()
{
nextUrl
()
{
const
{
query
}
=
this
.
$route
return
query
.
redirect_uri
?
decodeURIComponent
(
query
.
redirect_uri
)
:
''
return
query
.
next_url
?
decodeURIComponent
(
query
.
next_url
)
:
''
}
},
methods
:
{
...
...
@@ -68,13 +64,11 @@ export default {
// 登录成功
handleSuccess
(
response
)
{
this
.
$message
({
type
:
'success'
,
message
:
'登录成功'
})
if
(
document
.
referrer
)
{
window
.
location
.
href
=
document
.
referrer
if
(
this
.
nextUrl
)
{
window
.
location
.
href
=
this
.
nextUrl
}
else
{
this
.
$emit
(
'success'
,
response
)
}
// if (this.redirectURI) {
// } else {
// this.$router.replace('/')
// }
}
}
}
...
...
src/components/loginCode.vue
浏览文件 @
535d4188
...
...
@@ -7,11 +7,7 @@
</el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
v-model=
"ruleForm.password"
placeholder=
"请输入登录验证码"
@
keyup
.
enter
.
native=
"handleSubmit"
>
<el-input
v-model=
"ruleForm.password"
placeholder=
"请输入登录验证码"
@
keyup
.
enter
.
native=
"handleSubmit"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-unlock"
></i>
<countdown
slot=
"suffix"
...
...
@@ -22,7 +18,7 @@
></countdown>
</el-input>
</el-form-item>
<el-checkbox
v-model=
"ruleForm.RememberMe"
style=
"margin-bottom:
10px;
"
>
记住我
</el-checkbox>
<el-checkbox
v-model=
"ruleForm.RememberMe"
style=
"margin-bottom:
10px
"
>
记住我
</el-checkbox>
<el-button
type=
"primary"
class=
"submit-button"
@
click=
"handleSubmit"
>
登录
</el-button>
</el-form>
<div
class=
"login-footer"
>
...
...
@@ -51,9 +47,9 @@ export default {
},
computed
:
{
// 重定向地址
redirectURI
()
{
nextUrl
()
{
const
{
query
}
=
this
.
$route
return
query
.
redirect_uri
?
decodeURIComponent
(
query
.
redirect_uri
)
:
''
return
query
.
next_url
?
decodeURIComponent
(
query
.
next_url
)
:
''
},
disabledSend
()
{
return
!
/^1
[
3-9
]\d{9}
$/
.
test
(
this
.
ruleForm
.
account
)
...
...
@@ -75,15 +71,11 @@ export default {
// 登录成功
handleSuccess
(
response
)
{
this
.
$message
({
type
:
'success'
,
message
:
'登录成功'
})
if
(
document
.
referrer
)
{
window
.
location
.
href
=
document
.
referrer
if
(
this
.
nextUrl
)
{
window
.
location
.
href
=
this
.
nextUrl
}
else
{
this
.
$emit
(
'success'
,
response
)
}
// if (this.redirectURI) {
// this.$message({ type: 'success', message: '登录成功' })
// window.location.href = this.redirectURI
// } else {
// this.$router.replace('/')
// }
},
// 验证码
sendCodeRequest
()
{
...
...
src/pages/ciis/login.vue
浏览文件 @
535d4188
<
template
>
<router-view></router-view>
<router-view
@
success=
"handleSuccess"
></router-view>
</
template
>
<
script
>
export
default
{
name
:
'CiisLogin'
}
export
default
{
name
:
'CiisLogin'
,
methods
:
{
handleSuccess
(
response
)
{
const
{
url
}
=
webConf
.
others
.
ciis
window
.
location
.
href
=
url
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/sofia/components/layout.vue
浏览文件 @
535d4188
...
...
@@ -4,7 +4,7 @@
<div
class=
"header-logo"
>
<img
src=
"../assets/logo.png"
/>
</div>
<div
class=
"header-title"
>
在线学习系统
11
</div>
<div
class=
"header-title"
>
在线学习系统
</div>
</header>
<section
class=
"main"
>
<router-view></router-view>
...
...
src/pages/sofia/login.vue
浏览文件 @
535d4188
<
template
>
<div
class=
"login"
>
<el-row
type=
"flex"
justify=
"space-between"
align=
"middle"
style=
"width:100%"
>
<el-row
type=
"flex"
justify=
"space-between"
align=
"middle"
style=
"width:
100%"
>
<el-col
:span=
"12"
class=
"hidden-xs-only"
>
<div
class=
"login-logo"
>
<img
src=
"./assets/login_logo.png"
/>
...
...
@@ -8,7 +8,7 @@
</el-col>
<el-col
:span=
"12"
:xs=
"24"
>
<div
class=
"login-box"
>
<router-view></router-view>
<router-view
@
success=
"handleSuccess"
></router-view>
</div>
</el-col>
</el-row>
...
...
@@ -16,7 +16,15 @@
</
template
>
<
script
>
export
default
{
name
:
'SofiaLogin'
}
export
default
{
name
:
'SofiaLogin'
,
methods
:
{
handleSuccess
(
response
)
{
const
{
url
}
=
webConf
.
others
.
sofia
window
.
location
.
href
=
url
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论