Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-pc
Commits
6850f3bc
提交
6850f3bc
authored
7月 07, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 新增留位费
上级
4fe632f7
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
514 行增加
和
61 行删除
+514
-61
byzs.js
modules/my/interview/form/byzs.js
+49
-15
form.js
modules/my/interview/form/form.js
+2
-8
grcs.js
modules/my/interview/form/grcs.js
+39
-0
index.js
modules/my/interview/form/index.js
+6
-4
tjx.js
modules/my/interview/form/tjx.js
+26
-16
ywcjd.js
modules/my/interview/form/ywcjd.js
+50
-0
index.vue
modules/my/interview/index.vue
+2
-8
layout.vue
modules/my/layout.vue
+1
-1
h5Pay.vue
modules/my/review/components/h5Pay.vue
+74
-0
qrcodePay.vue
modules/my/review/components/qrcodePay.vue
+112
-0
index.js
modules/my/review/form/index.js
+1
-1
index.vue
modules/my/review/index.vue
+7
-8
pay.vue
modules/my/review/pay.vue
+145
-0
没有找到文件。
modules/my/interview/form/byzs.js
浏览文件 @
6850f3bc
import
{
STAGE_LIST
}
from
'../../index'
export
default
function
(
_this
)
{
return
{
required
:
true
,
id
:
'interview_byzs'
,
title
:
'毕业证书或在读证明'
,
get
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/
${
process
.
env
.
projectId
}
`
,
callback
(
data
)
{
const
{
attachments
=
[],
submission_stage
:
submissionStage
=
'FILLING'
}
=
data
.
data
.
material
const
{
basic_info
:
basicInfo
=
{},
attachments
=
[],
submission_stage
:
submissionStage
=
'FILLING'
}
=
data
.
data
.
material
this
.
form
.
options
.
disabled
=
STAGE_LIST
.
findIndex
(
item
=>
item
===
submissionStage
)
>
2
return
attachments
.
reduce
(
this
.
form
.
options
.
disabled
=
STAGE_LIST
.
findIndex
(
item
=>
item
===
submissionStage
)
>
=
2
const
attachment
=
attachments
.
reduce
(
(
result
,
item
)
=>
{
if
(
item
.
file_type_id
===
'DIPLOMA_CN'
)
{
result
.
DIPLOMA_CN
.
push
(
item
)
...
...
@@ -25,17 +24,43 @@ export default function(_this) {
},
{
DIPLOMA_CN
:
[],
DEGREE_CERT_CN
:
[],
PROOF_READING
:
[]
}
)
return
Object
.
assign
({
learn_status
:
basicInfo
.
learn_status
},
attachment
)
}
},
update
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/
${
process
.
env
.
projectId
}
/put`
,
beforeRequest
(
data
)
{
const
basicInfo
=
[
'learn_status'
].
reduce
((
result
,
key
)
=>
{
result
[
key
]
=
data
[
key
]
return
result
},
{})
return
{
basic_info
:
basicInfo
}
}
// callback() {
// _this.changeSubmissionStage(() => {
// this.form.options.disabled = true
// // _this.$router.push('/my/interview')
// })
// }
},
form
:
{
next
:
{
to
:
{
query
:
{
active
:
'interview_ywjl'
}
}
},
prev
:
{
to
:
{
query
:
{
active
:
'interview_grcs'
}
},
isSubmit
:
true
},
next
:
{
to
:
{
query
:
{
active
:
'interview_form'
}
},
isSubmit
:
true
},
submitText
:
'提交申请'
,
hasButton
:
false
,
options
:
{
'label-position'
:
'top'
},
hint
:
`
提示:<br />
1、请同时上传毕业证书及学位证书<br />
2、如尚未毕业,请上传在读证明`
,
items
:
[
{
type
:
'v-select'
,
values
:
[{
value
:
'已毕业'
},
{
value
:
'未毕业'
}],
label
:
'您当前的学习状态'
,
model
:
'learn_status'
,
rules
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
append
:
`
提示:<br />
1、请同时上传毕业证书及学位证书(中英文)<br />
2、如尚未毕业,请上传在读证明(中英文)`
},
{
required
:
true
,
label
:
'毕业证书'
,
...
...
@@ -46,8 +71,11 @@ export default function(_this) {
deleteAction
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/delete`
,
data
:
{
file_type
:
'DIPLOMA_CN'
}
},
append
:
'申请者需要将本科或以上毕业证书原件扫描或者拍照后提交。<br> 可上传多个文件,请确保证书号码清晰可辨。<br> 上传文件仅限“jpg,jpeg,png”格式,文件小于10MB。'
rules
:
{
required
:
true
,
message
:
'请上传毕业证书'
},
append
:
'申请者需要将本科或以上毕业证书原件扫描或者拍照后提交。<br> 可上传多个文件,请确保证书号码清晰可辨。<br> 上传文件仅限“jpg,jpeg,png”格式,文件小于10MB。'
,
isShow
(
ruleForm
)
{
return
ruleForm
.
learn_status
===
'已毕业'
}
},
{
required
:
true
,
...
...
@@ -59,8 +87,11 @@ export default function(_this) {
deleteAction
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/delete`
,
data
:
{
file_type
:
'DEGREE_CERT_CN'
}
},
append
:
'已毕业学员请提交学位证书<br />申请者需要将本科或以上的学位证书原件扫描或拍照后提交<br />可上传多个文件,请确保公章清晰可辨。'
rules
:
{
required
:
true
,
message
:
'请上传学位证书'
},
append
:
'已毕业学员请提交学位证书<br />申请者需要将本科或以上的学位证书原件扫描或拍照后提交<br />可上传多个文件,请确保公章清晰可辨。'
,
isShow
(
ruleForm
)
{
return
ruleForm
.
learn_status
===
'已毕业'
}
},
{
required
:
true
,
...
...
@@ -72,8 +103,11 @@ export default function(_this) {
deleteAction
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/delete`
,
data
:
{
file_type
:
'PROOF_READING'
}
},
append
:
'未毕业学员提交加盖公章的在读证明<br/>申请者需要将本科或以上在读证明原件扫描或拍照后提交。<br> 可上传多个文件,请确保公章清晰可辨。'
rules
:
{
required
:
true
,
message
:
'请上传在读证明'
},
append
:
'未毕业学员提交加盖公章的在读证明<br/>申请者需要将本科或以上在读证明原件扫描或拍照后提交。<br> 可上传多个文件,请确保公章清晰可辨。'
,
isShow
(
ruleForm
)
{
return
ruleForm
.
learn_status
===
'未毕业'
}
}
]
}
...
...
modules/my/interview/form/form.js
浏览文件 @
6850f3bc
import
{
STAGE_LIST
}
from
'../../index'
export
default
function
(
_this
)
{
return
{
required
:
true
,
id
:
'interview_form'
,
title
:
'申请表格'
,
get
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/
${
process
.
env
.
projectId
}
`
,
callback
(
data
)
{
const
{
basic_info
:
basicInfo
=
{},
attachments
=
[],
submission_stage
:
submissionStage
=
'FILLING'
}
=
data
.
data
.
material
const
{
basic_info
:
basicInfo
=
{},
attachments
=
[],
submission_stage
:
submissionStage
=
'FILLING'
}
=
data
.
data
.
material
this
.
form
.
options
.
disabled
=
STAGE_LIST
.
findIndex
(
item
=>
item
===
submissionStage
)
>
2
const
attachment
=
attachments
.
reduce
(
(
result
,
item
)
=>
{
...
...
@@ -41,7 +35,7 @@ export default function(_this) {
}
},
form
:
{
prev
:
{
to
:
{
query
:
{
active
:
'interview_
yynl
'
}
}
},
prev
:
{
to
:
{
query
:
{
active
:
'interview_
byzs
'
}
}
},
submitText
:
'申请面试'
,
model
:
{
submission_stage
:
'INTERVIEW_APPLICATION'
},
options
:
{
'label-position'
:
'top'
},
...
...
modules/my/interview/form/grcs.js
0 → 100644
浏览文件 @
6850f3bc
import
{
STAGE_LIST
}
from
'../../index'
export
default
function
(
_this
)
{
return
{
id
:
'interview_grcs'
,
title
:
'个人陈述'
,
get
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/
${
process
.
env
.
projectId
}
`
,
callback
(
data
)
{
const
{
attachments
=
[],
submission_stage
:
submissionStage
=
'FILLING'
}
=
data
.
data
.
material
this
.
form
.
options
.
disabled
=
STAGE_LIST
.
findIndex
(
item
=>
item
===
submissionStage
)
>=
2
const
PERSONAL_STATEMENT
=
attachments
.
filter
(
item
=>
{
return
item
.
file_type_id
===
'PERSONAL_STATEMENT'
})
return
{
PERSONAL_STATEMENT
}
}
},
form
:
{
prev
:
{
to
:
{
query
:
{
active
:
'interview_tjx'
}
}
},
next
:
{
to
:
{
query
:
{
active
:
'interview_byzs'
}
}
},
hasButton
:
false
,
options
:
{
'label-position'
:
'top'
},
items
:
[
{
type
:
'v-upload'
,
required
:
true
,
model
:
'PERSONAL_STATEMENT'
,
attrs
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/put`
,
deleteAction
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/delete`
,
data
:
{
file_type
:
'PERSONAL_STATEMENT'
},
limit
:
1
},
append
:
'请上传您的个人陈述(英文)'
}
]
}
}
}
modules/my/interview/form/index.js
浏览文件 @
6850f3bc
// import byzs from './byzs'
import
cjd
from
'./cjd'
import
yynl
from
'./yynl'
// import xwzs from './xwzs'
import
ywjl
from
'./ywjl'
// import zp from './zp'
// import tjx from './tjx'
// import form from './form'
import
ywcjd
from
'./ywcjd'
import
tjx
from
'./tjx'
import
grcs
from
'./grcs'
import
byzs
from
'./byzs'
import
form
from
'./form'
export
default
function
(
_this
)
{
return
{
id
:
'interview'
,
title
:
'申请面试'
,
children
:
[
ywjl
(
_this
),
cjd
(
_this
),
yynl
(
_this
)]
children
:
[
ywjl
(
_this
),
cjd
(
_this
),
yynl
(
_this
)
,
ywcjd
(
_this
),
tjx
(
_this
),
grcs
(
_this
),
byzs
(
_this
),
form
(
_this
)
]
}
}
modules/my/interview/form/tjx.js
浏览文件 @
6850f3bc
import
{
STAGE_LIST
}
from
'../../index'
export
default
function
(
_this
)
{
return
{
required
:
true
,
id
:
'interview_tjx'
,
title
:
'推荐信'
,
get
:
{
...
...
@@ -9,19 +8,19 @@ export default function(_this) {
callback
(
data
)
{
const
{
attachments
=
[],
submission_stage
:
submissionStage
=
'FILLING'
}
=
data
.
data
.
material
this
.
form
.
options
.
disabled
=
STAGE_LIST
.
findIndex
(
item
=>
item
===
submissionStage
)
>
2
this
.
form
.
options
.
disabled
=
STAGE_LIST
.
findIndex
(
item
=>
item
===
submissionStage
)
>
=
2
return
attachments
.
reduce
(
(
result
,
item
)
=>
{
const
types
=
[
'RECOMMENDATION_LETTER'
,
'RECOMMENDATION_LETTER_2'
]
types
.
forEach
(
type
=>
{
item
.
disabled
=
item
.
upload_operator_user_id
!==
_this
.
user
?.
id
if
(
item
.
file_type_id
===
type
)
{
result
.
RECOMMENDATION_LETTER
.
push
(
item
)
}
}
)
item
.
disabled
=
item
.
upload_operator_user_id
!==
_this
.
user
?.
id
if
(
item
.
file_type_id
===
'RECOMMENDATION_LETTER'
)
{
result
.
RECOMMENDATION_LETTER
.
push
(
item
)
}
if
(
item
.
file_type_id
===
'RECOMMENDATION_LETTER_2'
)
{
result
.
RECOMMENDATION_LETTER_2
.
push
(
item
)
}
return
result
},
{
RECOMMENDATION_LETTER
:
[]
}
{
RECOMMENDATION_LETTER
:
[]
,
RECOMMENDATION_LETTER_2
:
[]
}
)
}
},
...
...
@@ -40,12 +39,13 @@ export default function(_this) {
// }
// },
form
:
{
prev
:
{
to
:
{
query
:
{
active
:
'interview_yw
jl
'
}
}
},
next
:
{
to
:
{
query
:
{
active
:
'interview_
cjd
'
}
}
},
prev
:
{
to
:
{
query
:
{
active
:
'interview_yw
cjd
'
}
}
},
next
:
{
to
:
{
query
:
{
active
:
'interview_
grcs
'
}
}
},
hasButton
:
false
,
// submitText: '申请面试',
// model: { submission_stage: 'INTERVIEW_APPLICATION' },
options
:
{},
hint
:
'请上传两封推荐人署名的推荐信原件照片或扫描件(英文)'
,
items
:
[
{
type
:
'v-upload'
,
...
...
@@ -54,10 +54,20 @@ export default function(_this) {
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/put`
,
deleteAction
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/delete`
,
data
:
{
file_type
:
'RECOMMENDATION_LETTER'
},
accept
:
'image/*'
},
append
:
'请上传推荐人署名的推荐信原件照片或扫描件 '
,
class
:
'upload-letter'
accept
:
'image/*'
,
limit
:
1
}
},
{
type
:
'v-upload'
,
model
:
'RECOMMENDATION_LETTER_2'
,
attrs
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/put`
,
deleteAction
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/delete`
,
data
:
{
file_type
:
'RECOMMENDATION_LETTER_2'
},
accept
:
'image/*'
,
limit
:
1
}
}
]
}
...
...
modules/my/interview/form/ywcjd.js
0 → 100644
浏览文件 @
6850f3bc
import
{
STAGE_LIST
}
from
'../../index'
export
default
function
(
_this
)
{
return
{
id
:
'interview_ywcjd'
,
title
:
'英文成绩单'
,
get
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/
${
process
.
env
.
projectId
}
`
,
callback
(
data
)
{
const
{
attachments
=
[],
submission_stage
:
submissionStage
=
'FILLING'
}
=
data
.
data
.
material
this
.
form
.
options
.
disabled
=
STAGE_LIST
.
findIndex
(
item
=>
item
===
submissionStage
)
>=
2
return
attachments
.
reduce
(
(
result
,
item
)
=>
{
if
(
item
.
file_type_id
===
'REPORT_CARD_CN'
)
{
result
.
REPORT_CARD_CN
.
push
(
item
)
}
if
(
item
.
file_type_id
===
'REPORT_CARD_EN'
)
{
result
.
REPORT_CARD_EN
.
push
(
item
)
}
return
result
},
{
REPORT_CARD_CN
:
[],
REPORT_CARD_EN
:
[]
}
)
}
},
form
:
{
next
:
{
to
:
{
query
:
{
active
:
'interview_tjx'
}
}
},
hasButton
:
false
,
options
:
{
'label-position'
:
'top'
},
hint
:
`
<p>已毕业学生需提交完整成绩单,未毕业学生提交现有成绩单,成绩单需要加盖学校公章</p>
<p>请将英文成绩单原件扫描或者拍照后提交。</p>
<p>获取途径:联系大学时就读学校相关部门(档案馆/教务处)获取成绩单。</p>
`
,
items
:
[
{
required
:
true
,
type
:
'v-upload'
,
label
:
'英文成绩单'
,
model
:
'REPORT_CARD_EN'
,
attrs
:
{
action
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/put`
,
deleteAction
:
`
${
process
.
env
.
baseURL
}
/api/enrollment/v1.0/application-materials/attachments/
${
process
.
env
.
projectId
}
/delete`
,
data
:
{
file_type
:
'REPORT_CARD_EN'
}
}
}
]
}
}
}
modules/my/interview/index.vue
浏览文件 @
6850f3bc
...
...
@@ -16,13 +16,7 @@
</
template
>
</vue-form>
<app-complete
:type=
"1"
v-model=
"completeVisible"
></app-complete>
<el-dialog
title=
"您的申请资料已提交成功"
:visible
.
sync=
"dialogVisible"
:center=
"true"
:close-on-click-modal=
"false"
width=
"348px"
>
<el-dialog
title=
"您的申请资料已提交成功"
:visible
.
sync=
"dialogVisible"
:center=
"true"
:close-on-click-modal=
"false"
width=
"348px"
>
<div
class=
"dialog-tips"
>
<div
class=
"icon"
><img
src=
"https://webapp-pub.ezijing.com/project/application/images/icon_success.png"
/></div>
</div>
...
...
@@ -72,7 +66,7 @@ export default {
return
false
},
showSubmittedDialog
()
{
return
this
.
isSubmitted
&&
this
.
currentActive
===
'interview_yynl'
return
this
.
isSubmitted
&&
(
this
.
currentActive
===
'interview_yynl'
||
this
.
currentActive
===
'interview_form'
)
},
user
()
{
return
this
.
$store
.
state
.
user
...
...
modules/my/layout.vue
浏览文件 @
6850f3bc
...
...
@@ -41,7 +41,7 @@ export default {
}
::v-deep
.v-layout-aside
{
position
:
relative
;
min-height
:
4
1
0px
;
min-height
:
4
4
0px
;
align-self
:
flex-start
;
.aside-logout
{
span
{
...
...
modules/my/review/components/h5Pay.vue
0 → 100644
浏览文件 @
6850f3bc
<
template
>
<div
class=
"h5pay"
>
<el-button
type=
"primary"
@
click=
"handlePay"
>
去支付
</el-button>
</div>
</
template
>
<
script
>
import
*
as
api
from
'@/api/my'
export
default
{
data
()
{
return
{
openId
:
window
.
localStorage
.
getItem
(
'open_id'
)
}
},
computed
:
{
pageUrl
()
{
return
window
.
location
.
origin
+
this
.
$route
.
path
+
'?active=application_pay'
}
},
methods
:
{
// 获取订单
getOrder
(
callback
)
{
api
.
getOrder
({
wx_open_id
:
this
.
openId
,
payment_method
:
'WX_PAY'
}).
then
(
response
=>
{
const
{
data
,
error
,
message
}
=
response
if
(
error
.
toString
()
===
'0'
)
{
this
.
order
=
data
this
.
$emit
(
'update'
,
this
.
order
)
callback
&&
callback
(
this
.
order
)
}
else
{
this
.
$message
.
error
(
message
)
}
})
},
// 获取微信code
getCode
()
{
const
redirectURI
=
`https://pages.ezijing.com/given/auth.html?redirect_uri=
${
encodeURIComponent
(
this
.
pageUrl
)}
`
window
.
location
.
href
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx451c01d40d090d7a&redirect_uri=
${
redirectURI
}
&response_type=code&scope=snsapi_base#wechat_redirect`
},
// 获取微信openid
getOpenId
(
code
)
{
api
.
getOpenId
({
code
,
identity
:
'ezijing'
}).
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
this
.
openId
=
response
.
openid
window
.
localStorage
.
setItem
(
'open_id'
,
this
.
openId
)
this
.
getOrder
()
}
else
{
this
.
getCode
()
}
})
},
// 去支付
handlePay
()
{
this
.
getOrder
(()
=>
{
window
.
location
.
href
=
`https://web-pay.ezijing.com/wxpay/h5?prepay_id=
${
this
.
order
.
wx_prepay_id
}
&open_id=
${
this
.
openId
}
&redirect_uri=
${
encodeURIComponent
(
this
.
pageUrl
)}
`
})
}
},
beforeMount
()
{
if
(
!
this
.
openId
)
{
const
{
code
}
=
this
.
$route
.
query
code
?
this
.
getOpenId
(
code
)
:
this
.
getCode
()
}
}
}
</
script
>
<
style
scoped
>
.h5pay
{
padding
:
40px
;
text-align
:
center
;
}
</
style
>
modules/my/review/components/qrcodePay.vue
0 → 100644
浏览文件 @
6850f3bc
<
template
>
<div
class=
"qrpay"
>
<div
class=
"qrpay-hd"
>
<div
class=
"pic"
>
<img
src=
"https://webapp-pub.ezijing.com/project/application/images/my_pay_01.png"
/>
</div>
<h1>
欢迎您
</h1>
<p
class=
"t1"
>
申请斯蒂文斯理工学院工程管理硕士保研项目,需缴纳留位费
<span>
2000
</span>
元,请扫描二维码以完成缴费。
</p>
</div>
<div
class=
"qrcode-error"
v-if=
"qrcodeError"
>
生成二维码失败请刷新
<i
class=
"el-icon-refresh-left"
@
click=
"getOrder"
title=
"刷新"
></i></div>
<div
class=
"qrcode"
v-else
>
<qrcode-vue
:value=
"qrcodeValue"
size=
"100"
></qrcode-vue>
<span
@
click=
"getOrder"
><i
class=
"el-icon-refresh"
style=
"font-size:20px"
title=
"刷新"
></i></span>
</div>
</div>
</
template
>
<
script
>
import
QrcodeVue
from
'qrcode.vue'
import
*
as
api
from
'@/api/my'
export
default
{
components
:
{
QrcodeVue
},
data
()
{
return
{
order
:
{
id
:
''
,
payment_url
:
''
},
qrcodeError
:
false
}
},
computed
:
{
// 二维码地址
qrcodeValue
()
{
return
this
.
order
.
payment_url
}
},
methods
:
{
// 获取订单
getOrder
()
{
api
.
getOrder
({
payment_method
:
'WX_PAY_QR'
}).
then
(
response
=>
{
const
{
data
,
error
,
message
}
=
response
this
.
qrcodeError
=
error
.
toString
()
===
'1'
if
(
error
.
toString
()
===
'0'
)
{
this
.
order
=
data
this
.
$emit
(
'update'
,
this
.
order
)
}
else
{
this
.
$message
.
error
(
message
)
}
})
}
},
beforeMount
()
{
this
.
getOrder
()
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.qrpay-hd
{
.pic
{
text-align
:
center
;
}
h1
{
padding
:
10px
0
;
font-size
:
24px
;
font-weight
:
500
;
color
:
#222
;
line-height
:
1
;
text-align
:
center
;
}
}
.qrcode
{
padding
:
20px
0
;
text-align
:
center
;
span
{
margin-top
:
10px
;
font-size
:
12px
;
color
:
#999
;
cursor
:
pointer
;
}
}
.qrcode-error
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
width
:
100px
;
height
:
100px
;
padding
:
10px
;
margin
:
20px
auto
;
color
:
var
(
--
main-color
);
border-style
:
dashed
;
border-width
:
1px
;
border-color
:
var
(
--
main-color
);
box-sizing
:
border-box
;
text-align
:
center
;
i
{
margin-top
:
10px
;
cursor
:
pointer
;
}
}
.t1
{
font-size
:
14px
;
color
:
#303030
;
line-height
:
20px
;
text-align
:
center
;
span
{
color
:
#ffa448
;
}
}
</
style
>
modules/my/review/form/index.js
浏览文件 @
6850f3bc
...
...
@@ -12,6 +12,6 @@ export default function(_this) {
return
{
id
:
'admission'
,
title
:
'综合评审'
,
children
:
[
cjd
(
_this
),
tjx
(
_this
),
grcs
(
_this
),
byzs
(
_this
),
form
(
_this
)]
children
:
[
{
required
:
true
,
id
:
'application_pay'
,
title
:
'缴留位费'
},
cjd
(
_this
),
tjx
(
_this
),
grcs
(
_this
),
byzs
(
_this
),
form
(
_this
)]
}
}
modules/my/review/index.vue
浏览文件 @
6850f3bc
...
...
@@ -16,18 +16,16 @@
<div
class=
"aside-payment"
><a
href=
"https://accounts.ezijing.com/payment"
target=
"_blank"
>
查看缴费记录
</a></div>
<div
class=
"aside-logout"
@
click=
"$store.dispatch('logout')"
><span>
退出登录
</span></div>
</
template
>
<!-- 报名缴费 -->
<
template
#
content
v-if=
"currentActive === 'application_pay'"
>
<app-pay
/>
</
template
>
<!-- 入学协议 -->
<!-- <template #content v-if="currentActive === 'admission_xy'">
<app-xy />
</template> -->
</vue-form>
<el-dialog
title=
"综合评审资料提交成功"
:visible
.
sync=
"dialogVisible"
:center=
"true"
:close-on-click-modal=
"false"
width=
"348px"
>
<el-dialog
title=
"综合评审资料提交成功"
:visible
.
sync=
"dialogVisible"
:center=
"true"
:close-on-click-modal=
"false"
width=
"348px"
>
<div
class=
"dialog-tips"
>
<!-- <p>请确认是否已缴费,如未缴费点击下方缴费按钮 <br />(已缴费,请忽略)</p> -->
<div
class=
"icon"
><img
src=
"https://webapp-pub.ezijing.com/project/application/images/icon_success.png"
/></div>
...
...
@@ -47,9 +45,10 @@ import getMenu from './form'
import
*
as
api
from
'@/api/my'
import
AppXy
from
'./xy'
import
AppComplete
from
'../application/complete.vue'
import
AppPay
from
'./pay.vue'
export
default
{
components
:
{
AppLayout
,
AppXy
,
AppComplete
},
components
:
{
AppLayout
,
AppXy
,
AppComplete
,
AppPay
},
data
()
{
const
menus
=
getMenu
(
this
)
return
{
...
...
modules/my/review/pay.vue
0 → 100644
浏览文件 @
6850f3bc
<
template
>
<div
class=
"pay"
>
<h5-pay
@
update=
"handleUpdateOrder"
v-if=
"isWechat"
></h5-pay>
<qrcode-pay
@
update=
"handleUpdateOrder"
v-else
></qrcode-pay>
<el-dialog
title=
"缴费成功"
:visible
.
sync=
"dialogVisible"
:center=
"true"
:close-on-click-modal=
"false"
width=
"348px"
>
<div
class=
"dialog-pay"
>
<div
class=
"icon"
><img
src=
"https://webapp-pub.ezijing.com/project/application/images/icon_success.png"
/></div>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
import
*
as
api
from
'@/api/my'
import
qrcodePay
from
'./components/qrcodePay'
import
h5Pay
from
'./components/h5Pay'
export
default
{
name
:
'AppPay'
,
components
:
{
qrcodePay
,
h5Pay
},
data
()
{
const
UA
=
window
.
navigator
.
userAgent
const
isMobile
=
/android|iphone|ipad|ipod/i
.
test
(
UA
)
return
{
isWechat
:
isMobile
&&
/micromessenger/i
.
test
(
UA
),
order
:
{
id
:
''
,
payment_url
:
''
},
dialogVisible
:
false
,
timer
:
null
,
paymentRecords
:
[]
// 所有订单
}
},
computed
:
{
user
()
{
return
this
.
$store
.
state
.
user
},
// 二维码地址
qrcodeValue
()
{
return
this
.
order
.
payment_url
},
// 支付成功
paySuccess
()
{
return
this
.
order
.
payment_status
===
'SUCCESS'
},
// 待支付订单
orderList
()
{
// 筛选待支付订单
const
list
=
this
.
paymentRecords
.
filter
(
item
=>
{
return
item
.
bill_type
===
'APPLICATION_FEE'
&&
item
.
payment_status
===
'WAITING_FOR_PAY'
})
// 待支付订单是否有当前订单
const
found
=
list
.
find
(
item
=>
item
.
id
===
this
.
order
.
id
)
return
found
?
list
:
[...
list
,
this
.
order
]
}
},
methods
:
{
// 获取报名信息
async
getApplication
()
{
await
api
.
getApplication
().
then
(
response
=>
{
const
{
payment_records
:
paymentRecords
=
[]
}
=
response
.
data
.
material
// 获取支付订单
this
.
paymentRecords
=
paymentRecords
if
(
paymentRecords
&&
paymentRecords
.
length
)
{
// 获取支付成功的订单
const
orderPaySuccess
=
paymentRecords
.
find
(
item
=>
{
return
item
.
bill_type
===
'APPLICATION_FEE'
&&
item
.
payment_status
===
'SUCCESS'
})
if
(
orderPaySuccess
)
{
this
.
order
=
orderPaySuccess
this
.
dialogVisible
=
true
return
}
// 获取最后一个订单
const
[
lastPayment
]
=
paymentRecords
.
reverse
()
this
.
order
=
lastPayment
}
})
},
// 检查支付状态
checkPay
(
order
)
{
if
(
!
order
||
!
order
.
id
)
{
return
}
const
userId
=
this
.
user
.
id
api
.
checkPay
(
order
.
id
,
{
user_id
:
userId
}).
then
(
response
=>
{
if
(
response
.
data
.
payment_status
===
'SUCCESS'
)
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
this
.
dialogVisible
=
true
}
})
},
// 检测支付状态定时器
setCheckPayTimer
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
paySuccess
)
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
return
}
this
.
orderList
.
forEach
(
order
=>
this
.
checkPay
(
order
))
},
3000
)
},
handleUpdateOrder
(
order
)
{
this
.
order
=
order
}
},
async
mounted
()
{
await
this
.
getApplication
()
this
.
setCheckPayTimer
()
},
destroyed
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pay
{
max-width
:
562px
;
margin
:
0
auto
;
padding
:
40px
0
;
}
.t1
{
font-size
:
14px
;
color
:
#303030
;
line-height
:
20px
;
text-align
:
center
;
span
{
color
:
#ffa448
;
}
}
.t2
{
font-size
:
12px
;
color
:
#999
;
line-height
:
20px
;
}
.dialog-pay
{
text-align
:
center
;
p
{
color
:
#262626
;
line-height
:
20px
;
}
.icon
{
text-align
:
center
;
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论