Skip to content

Commit

Permalink
fix: 重命名填写页的文件名
Browse files Browse the repository at this point in the history
  • Loading branch information
skique committed Jun 7, 2024
1 parent 869356b commit 5814282
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion web/src/render/pages/RenderPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ const submitSurver = async () => {
console.log(params)
const res: any = await submitForm(params)
if (res.code === 200) {
// store.commit('setRouter', 'successPage')
router.push({ name: 'successPage' })
} else {
alert({
Expand Down
2 changes: 1 addition & 1 deletion web/src/render/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const routes: RouteRecordRaw[] = [
children: [
{
path: '',
name: 'indexPage',
name: 'renderPage',
component: () => import('../pages/RenderPage.vue')
},
{
Expand Down
6 changes: 1 addition & 5 deletions web/src/render/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default {
const { msgContent } = submitConf
const now = Date.now()
if (now < new Date(begTime).getTime()) {
// commit('setRouter', 'errorPage')
router.push({ name: 'errorPage' })
commit('setErrorInfo', {
errorType: 'overTime',
Expand All @@ -36,7 +35,6 @@ export default {
})
return
} else if (now > new Date(endTime).getTime()) {
// commit('setRouter', 'errorPage')
router.push({ name: 'errorPage' })
commit('setErrorInfo', {
errorType: 'overTime',
Expand All @@ -49,7 +47,6 @@ export default {
const momentStartTime = moment(`${todayStr} ${answerBegTime}`)
const momentEndTime = moment(`${todayStr} ${answerEndTime}`)
if (momentNow.isBefore(momentStartTime) || momentNow.isAfter(momentEndTime)) {
// commit('setRouter', 'errorPage')
router.push({ name: 'errorPage' })
commit('setErrorInfo', {
errorType: 'overTime',
Expand All @@ -59,9 +56,8 @@ export default {
return
}
}
// commit('setRouter', 'indexPage')
const surveyPath = state.surveyPath
router.push({ name: 'indexPage', params: { surveyId: surveyPath } })
router.push({ name: 'renderPage', params: { surveyId: surveyPath } })

// 根据初始的schema生成questionData, questionSeq, rules, formValues, 这四个字段
const { questionData, questionSeq, rules, formValues } = adapter.generateData({
Expand Down
3 changes: 0 additions & 3 deletions web/src/render/store/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ export default {
setQuestionData(state, data) {
state.questionData = data
},
setRouter(state, data) {
state.router = data
},
setErrorInfo(state, { errorType, errorMsg }) {
state.errorInfo = {
errorType,
Expand Down
1 change: 0 additions & 1 deletion web/src/render/store/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { isMobile } from '../utils/index'
export default {
surveyPath: '',
questionData: null,
router: '',
isMobile: isMobile(),
errorInfo: {
errorType: '',
Expand Down

0 comments on commit 5814282

Please sign in to comment.