Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-old
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-old
Commits
bbf645c4
提交
bbf645c4
authored
4月 09, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加支付
上级
37bb14f5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
71 行增加
和
51 行删除
+71
-51
.config.dev.js
.config.dev.js
+1
-1
ArticleAction.js
src/action/ArticleAction.js
+1
-0
article_api.js
src/api/article_api.js
+3
-1
header.vue
src/components/layout/header.vue
+7
-5
form.vue
src/pages/train/form.vue
+59
-44
没有找到文件。
.config.dev.js
浏览文件 @
bbf645c4
module
.
exports
=
{
domain
:
'dev.ezijing.com'
,
url
:
'https://project-api.ezijing.com'
,
url
:
'https://project-api
2
.ezijing.com'
,
isEnableToIphoneDebugger
:
false
,
apiBaseURL
:
'/api'
,
webpack
:
{
...
...
src/action/ArticleAction.js
浏览文件 @
bbf645c4
...
...
@@ -10,4 +10,5 @@ export default class ArticleAction {
register
(
obj
)
{
return
articleApi
.
register
(
obj
).
then
(
res
=>
res
)
}
register2
(
obj
)
{
return
articleApi
.
register2
(
obj
).
then
(
res
=>
res
)
}
getUserInfo
(
obj
)
{
return
articleApi
.
getUserInfo
(
obj
).
then
(
res
=>
res
)
}
getFormDetail
()
{
return
articleApi
.
getFormDetail
().
then
(
res
=>
res
)
}
}
src/api/article_api.js
浏览文件 @
bbf645c4
...
...
@@ -8,7 +8,7 @@ export default class ScoreAPI extends BaseAPI {
// 获取文章详情
getArticleDetail
=
(
id
)
=>
this
.
get
(
`/api/microservices/api/article/
${
id
}
/info`
)
// formCommit = (data) => this.post('/api/microservices/api/form/commit', data)
formCommit
=
(
data
)
=>
this
.
post
(
'/api/microservices/api/apply/teacher-form'
,
data
)
formCommit
=
(
data
)
=>
this
.
post
(
'/api/microservices/api/
v3/
apply/teacher-form'
,
data
)
// 获取轮播
getBanner
=
(
obj
=
{})
=>
this
.
get
(
'/api/microservices/api/carousel/list'
,
obj
,
{})
// 发送验证码
...
...
@@ -19,4 +19,6 @@ export default class ScoreAPI extends BaseAPI {
register2
=
(
obj
=
{})
=>
this
.
post
(
'/api/usercenter/user/register-and-login-by-mobile'
,
obj
)
// 获取用户信息
getUserInfo
=
()
=>
this
.
get
(
'/api/passport/account/get-user-info'
)
// 表单回显
getFormDetail
=
()
=>
this
.
get
(
'/api/microservices/api/v3/apply/teacher-form-detail'
)
}
src/components/layout/header.vue
浏览文件 @
bbf645c4
...
...
@@ -35,7 +35,7 @@
</template>
</ul>
<div
class=
"login"
>
<
template
v-if=
"
isLogin
"
>
<
template
v-if=
"
Object.values(user).length
"
>
<div
class=
"login-name"
>
<span
class=
"name"
>
{{
user
.
realname
||
user
.
username
}}
</span>
<span
@
click=
"handleLogout"
>
退出
</span>
...
...
@@ -149,7 +149,7 @@ export default {
}
],
isLogin
:
false
,
user
:
null
,
user
:
{}
,
options
:
{
baseUrl
:
webConf
.
url
,
register
:
{
...
...
@@ -196,7 +196,8 @@ export default {
}
},
mounted
()
{
// this.loginSuccess()
// this.loginSuccess()
console
.
log
(
JSON
.
parse
(
window
.
sessionStorage
.
userInfo
))
this
.
user
=
JSON
.
parse
(
window
.
sessionStorage
.
userInfo
)
},
methods
:
{
...
...
@@ -227,7 +228,7 @@ export default {
this
.
passport
.
logout
()
this
.
isLogin
=
false
window
.
G
.
UserInfo
=
{}
window
.
sessionStorage
.
userInfo
=
JSON
.
stringify
({})
//
window.sessionStorage.userInfo = JSON.stringify({})
this
.
$router
.
go
(
0
)
// window.location.href = window.location.href
// this.$router.push('/')
...
...
@@ -236,12 +237,13 @@ export default {
// this.isLogin = isLogin
this
.
user
=
user
window
.
G
.
UserInfo
=
user
window
.
sessionStorage
.
userInfo
=
JSON
.
stringify
(
user
)
},
loginSuccess
(
data
)
{
this
.
passport
.
checkLoginStatus
((
isLogin
,
user
=
{})
=>
{
window
.
sessionStorage
.
userInfo
=
JSON
.
stringify
(
user
)
this
.
isLogin
=
isLogin
this
.
user
=
user
this
.
user
=
user
// window.G.UserInfo = user
// this.$router.go(0)
this
.
$router
.
push
(
'/my'
)
...
...
src/pages/train/form.vue
浏览文件 @
bbf645c4
...
...
@@ -101,7 +101,14 @@
</el-upload>
</el-form-item>
-->
<el-form-item
label-width=
"110px"
>
<el-button
style=
"width: 200px; margin-left: 44px"
type=
"primary"
@
click=
"onSubmit"
>
提 交
</el-button>
<template
v-if=
"isLogin"
>
<el-button
style=
"width: 100px; margin-left: 10px"
type=
"primary"
@
click=
"onSubmit"
>
修 改
</el-button>
<el-button
style=
"width: 100px; margin-left: 10px"
type=
"primary"
@
click=
"isPayPopShow = true"
>
去付款
</el-button>
</
template
>
<
template
v-else
>
<el-button
style=
"width: 200px; margin-left: 44px"
type=
"primary"
@
click=
"onSubmit"
>
提 交
</el-button>
</
template
>
<!-- <el-button style="width: 200px; margin-left: 44px" type="primary" @click="onSubmit">去付款</el-button> -->
<!-- <el-button @click="back">返回</el-button> -->
</el-form-item>
</el-form>
...
...
@@ -159,15 +166,18 @@ export default {
created
()
{
action
.
articleAction
.
getUserInfo
().
then
(
res
=>
{
if
(
res
&&
res
.
code
===
0
)
{
window
.
sessionStorage
.
userInfo
=
JSON
.
stringify
(
res
.
data
)
this
.
isLogin
=
true
}
})
},
mounted
()
{
if
(
this
.
isLogin
)
{
this
.
form
.
mobile
=
'13111111111'
this
.
form
.
checked_code
=
'1234'
}
// 登录状态不需要手机号验证码
action
.
articleAction
.
getFormDetail
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
form
=
res
.
data
.
detail
}
})
// $('#name label').html('姓 名')
$
(
'#sex label'
).
html
(
'性 别'
)
$
(
'#mz label'
).
html
(
'民 族'
)
...
...
@@ -177,6 +187,7 @@ export default {
// $('#sh label').html('税 号')
},
methods
:
{
// 关闭支付弹窗
closePayPop
()
{
this
.
isPayPopShow
=
false
},
...
...
@@ -210,10 +221,15 @@ export default {
}
}, */
onSubmit
()
{
if
(
this
.
isLogin
)
{
this
.
form
.
mobile
=
'13111111111'
this
.
form
.
checked_code
=
'1234'
}
let
flag
=
true
// console.log(this.form)
Object
.
keys
(
this
.
form
).
map
(
item
=>
{
if
(
this
.
form
[
item
]
===
''
)
{
console
.
log
(
item
)
flag
=
false
}
})
...
...
@@ -258,52 +274,51 @@ export default {
})
.catch(err => {
}) */
// 登录了走报名表单 没有登录走注册登录后再走报名表单
// 登录了
直接
走报名表单 没有登录走注册登录后再走报名表单
if
(
this
.
isLogin
)
{
this
.
sendEnrollInfo
()
.
then
(
res
=>
{
this
.
message
(
'报名信息修改成功!'
,
'success'
,
6000
)
// setTimeout(() => {
// this.message('手机号注册成功!','success', 6000)
// }, 300)
})
.
catch
(
error
=>
{
if
(
error
&&
error
.
type
===
'register'
)
{
// this.message('报名信息提交成功!','success', 6000)
.
then
(
res
=>
{
this
.
message
(
'报名信息修改成功!'
,
'success'
,
6000
)
// setTimeout(() => {
// this.message('
注册失败,' + error.msg + ',请重新注册','error
', 6000)
// this.message('
手机号注册成功!','success
', 6000)
// }, 300)
}
else
{
let
errorMsg
=
error
.
msg
||
''
this
.
message
(
'报名信息提交失败!'
+
errorMsg
,
'error'
,
6000
)
}
})
})
.
catch
(
error
=>
{
if
(
error
&&
error
.
type
===
'register'
)
{
// this.message('报名信息提交成功!','success', 6000)
// setTimeout(() => {
// this.message('注册失败,' + error.msg + ',请重新注册','error', 6000)
// }, 300)
}
else
{
let
errorMsg
=
error
.
msg
||
''
this
.
message
(
'报名信息提交失败!'
+
errorMsg
,
'error'
,
6000
)
}
})
}
else
{
this
.
defaultRegister
().
then
(
res
=>
{
this
.
message
(
'报名信息提交成功!'
,
'success'
,
6000
)
setTimeout
(()
=>
{
this
.
$router
.
go
(
0
)
},
1000
)
this
.
sendEnrollInfo
()
.
then
(
res
=>
{
this
.
message
(
'报名信息提交成功!'
,
'success'
,
6000
)
// this.message('报名信息修改成功!','success', 6000)
// setTimeout(() => {
// this.message('手机号注册成功!','success', 6000)
// }, 300)
setTimeout
(()
=>
{
this
.
$router
.
go
(
0
)
},
1000
)
})
.
catch
(
error
=>
{
if
(
error
&&
error
.
type
===
'register'
)
{
// this.message('报名信息提交成功!','success', 6000)
// setTimeout(() => {
// this.message('注册失败,' + error.msg + ',请重新注册','error', 6000)
// }, 300)
}
else
{
let
errorMsg
=
error
.
msg
||
''
this
.
message
(
'报名信息提交失败!'
+
errorMsg
,
'error'
,
6000
)
}
})
})
// this.sendEnrollInfo()
// .then(res => this.defaultRegister())
// .then(res => {
// this.message('报名信息提交成功!','success', 6000)
// setTimeout(() => {
// this.message('手机号注册成功!','success', 6000)
// }, 300)
// })
// .catch(error => {
// if (error && error.type === 'register') {
// this.message('报名信息提交成功!','success', 6000)
// setTimeout(() => {
// this.message('注册失败,' + error.msg + ',请重新注册','error', 6000)
// }, 300)
// } else {
// let errorMsg = error.msg || ''
// this.message('报名信息提交失败!' + errorMsg,'error', 6000)
// }
// })
}
}
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论