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

bug fixes

上级 a2df94dc
......@@ -29,25 +29,27 @@ export default {
data() {
const UA = window.navigator.userAgent
const isMobile = /android|iphone|ipad|ipod/i.test(UA)
const voteApply = window.localStorage.getItem('voteApply')
const defaultModel = {
vote_city: '',
vote_config_id: '',
name: '',
gender: '',
area: '',
class: '',
company: '',
job: '',
email: '',
phone: '',
address: '',
honor: '',
recommend: '',
photo: ''
}
return {
isMobile,
applyCityList: [],
formModel: {
vote_city: '',
vote_config_id: '',
name: '',
gender: '',
area: '',
class: '',
company: '',
job: '',
email: '',
phone: '',
address: '',
honor: '',
recommend: '',
photo: ''
}
formModel: Object.assign(defaultModel, JSON.parse(voteApply))
}
},
watch: {
......@@ -266,10 +268,6 @@ export default {
}
},
beforeMount() {
const voteApply = window.localStorage.getItem('voteApply')
if (voteApply) {
this.formModel = Object.assign(this.formModel, JSON.parse(voteApply))
}
this.getApplyCity()
},
beforeCreate() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论