Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
activities
/
web-questionnaire
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f611e1a3
authored
Dec 23, 2024
by
陆志强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:提示更改&跳转限制开发
parent
d2197c5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
store/questionnaire.js
+16
-20
No files found.
store/questionnaire.js
View file @
f611e1a3
...
@@ -49,24 +49,21 @@ export const actions = {
...
@@ -49,24 +49,21 @@ export const actions = {
const
{
title
,
intro
,
question
,
isJoined
,
status
,
referUrl
}
=
data
const
{
title
,
intro
,
question
,
isJoined
,
status
,
referUrl
}
=
data
// 设置网页标题
// 设置网页标题
document
.
title
=
title
||
'调查问卷'
document
.
title
=
title
||
'调查问卷'
// 如果不是iframe内嵌模式则弹窗
// 鉴权成功则转跳接口返回的对应网址
if
(
!
isIframe
)
{
if
(
referUrl
&&
+
status
===
ACTIVITY_STATE
.
end
)
{
// 鉴权成功则转跳接口返回的对应网址
Dialog
.
alert
({
if
(
referUrl
&&
+
status
===
ACTIVITY_STATE
.
end
)
{
message
:
'活动已结束,点击“确认”可以直接返回'
,
Dialog
.
alert
({
}).
then
(()
=>
{
message
:
'活动已结束,点击“确认”可以直接观看直播'
,
window
.
location
.
href
=
referUrl
}).
then
(()
=>
{
})
window
.
location
.
href
=
referUrl
}
})
// 鉴权成功则转跳接口返回的对应网址
}
if
(
referUrl
&&
!!
isJoined
&&
+
status
===
ACTIVITY_STATE
.
start
)
{
// 鉴权成功则转跳接口返回的对应网址
Dialog
.
alert
({
if
(
referUrl
&&
!!
isJoined
&&
+
status
===
ACTIVITY_STATE
.
start
)
{
message
:
'您已提交过问卷,点击“确认”可以直接返回'
,
Dialog
.
alert
({
}).
then
(()
=>
{
message
:
'您已提交过问卷,点击“确认”可以直接观看直播'
,
window
.
location
.
href
=
referUrl
}).
then
(()
=>
{
})
window
.
location
.
href
=
referUrl
})
}
}
}
commit
(
'SET_QUESTIONNAIREINFO'
,
data
)
commit
(
'SET_QUESTIONNAIREINFO'
,
data
)
const
formatQuestion
=
question
.
map
((
item
)
=>
{
const
formatQuestion
=
question
.
map
((
item
)
=>
{
...
@@ -142,8 +139,7 @@ export const actions = {
...
@@ -142,8 +139,7 @@ export const actions = {
setQuestionnaire
(
params
).
then
((
res
)
=>
{
setQuestionnaire
(
params
).
then
((
res
)
=>
{
const
{
code
,
errorCode
,
errorMessage
}
=
res
const
{
code
,
errorCode
,
errorMessage
}
=
res
if
(
code
===
200
&&
errorCode
===
0
)
{
if
(
code
===
200
&&
errorCode
===
0
)
{
// 如果不是iframe内嵌模式则转跳
if
(
referUrl
)
{
if
(
referUrl
&&
!
isIframe
)
{
Toast
.
success
({
Toast
.
success
({
message
:
'提交成功,正在跳转'
,
message
:
'提交成功,正在跳转'
,
onClose
:
()
=>
{
onClose
:
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment