From 43bd024ac052dd0b168f019fc06c6bf5fdf9cb0d Mon Sep 17 00:00:00 2001 From: song Date: Tue, 7 Dec 2021 18:21:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BC=93=E5=AD=98=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/components/Info/Info.vue | 7 +++++++ src/pagesYanyuan/add-info/add-info.vue | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ed7930..3f62a07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,6 +144,7 @@ - | 下拉加载定期任务传参,时间格式化修改 | [0b95a0e](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/0b95a0e) - | 任务开始时间延迟插件 | [992a313](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/992a313) - | 修改main | [749ae9a](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/749ae9a) + - | 修改props默认值 | [11b2c24](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/11b2c24) - | 修改定期任务状态0和4时不加载圆圈 | [30e352f](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/30e352f) - | 修改小红点传参 | [87b20fd](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/87b20fd) - | 修改报错 | [531c14d](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/531c14d) diff --git a/src/components/Info/Info.vue b/src/components/Info/Info.vue index d5463d1..598f18a 100644 --- a/src/components/Info/Info.vue +++ b/src/components/Info/Info.vue @@ -364,6 +364,11 @@ export default { if (this.personalInfo && this.personalInfo.userName) { this.setDate(this.personalInfo); this.isEdit = true; + } else { + const info = JSON.parse(this.$t.storage.getStorageSync('infoList')); + if (info) { + this.infoList = JSON.parse(info); + } } }, @@ -450,6 +455,8 @@ export default { break; } } + + this.$t.storage.setStorageSync('infoList', this.infoList); if (!this.isEdit) { this.$emit('saveInfo', info); } else { diff --git a/src/pagesYanyuan/add-info/add-info.vue b/src/pagesYanyuan/add-info/add-info.vue index 791513f..e130372 100644 --- a/src/pagesYanyuan/add-info/add-info.vue +++ b/src/pagesYanyuan/add-info/add-info.vue @@ -32,7 +32,6 @@ export default { this.params.isStrongFlavour = 0; this.params.isMoreOil = 0; - console.log('info: ', info); // 赋值 this.params[info.label] = info.value; @@ -98,7 +97,6 @@ export default { async submit() { try { const params = this.params; - console.log('params: ', params); if (!this.validationRequired(params)) return; await this.$u.api.addTrainee(params); if (this.isApplying) { @@ -117,6 +115,7 @@ export default { setTimeout(() => { uni.redirectTo({ url: '/pages/index/index' }); this.setEmptyInfo(); + this.$t.storage.setStorageSync('infoList', null); }, 2000); } } catch (error) {