提交 fb3a1896 authored 作者: 王鹏飞's avatar 王鹏飞

优化欢迎界面逻辑,移除不必要的条件判断并更新处理函数

上级 9233806d
......@@ -95,9 +95,12 @@ export default {
const { material, progress } = data
this.material = material
this.progress = progress
const welcomeShowed = window.localStorage.getItem(this.user.id) === 'true'
material.attachments = material.attachments || []
if (!material.attachments.length && !welcomeShowed) {
// const welcomeShowed = window.localStorage.getItem(this.user.id) === 'true'
// material.attachments = material.attachments || []
// if (!material.attachments.length && !welcomeShowed) {
// this.welcomeShow = true
// }
if (!material.basic_info?.admission_date) {
this.welcomeShow = true
}
} else {
......@@ -131,9 +134,16 @@ export default {
}
this.$router.push('/my/admission')
},
handleStart() {
handleStart(date) {
api.updateApplication({ basic_info: { admission_date: date } }).then(response => {
const { data, error, message } = response
if (error.toString() === '0') {
this.welcomeShow = false
this.createDriver()
} else {
this.$message.error(message)
}
})
},
handleClose() {
this.welcomeShow = false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论