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

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

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