From 55138a0ac0245cac59bd579acc32740354ebdb24 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Jan 2021 17:59:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Introduce/IntentionModel.vue | 15 ++++++++++++++- src/views/NewPlatform/components/NewModel.vue | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/components/Introduce/IntentionModel.vue b/src/components/Introduce/IntentionModel.vue index 775d42e..cadaa04 100644 --- a/src/components/Introduce/IntentionModel.vue +++ b/src/components/Introduce/IntentionModel.vue @@ -102,11 +102,24 @@ export default { }; }, computed: mapState('user', ['picCode']), - created() { + async created() { this.sendPicCode(); + await this.getUserSer(); + if (this.userSer) { + if (this.userSer.name) { + this.platform.manName = this.userSer.name; + } + if (this.userSer.phone) { + this.platform.tel = this.userSer.phone; + } + if (this.userSer.companyName) { + this.platform.companyName = this.userSer.companyName; + } + } }, methods: { ...mapActions('user', ['sendCode', 'sendPicCode']), + ...mapActions('home', ['getUserSer']), // 显示表单输入框 showModal() { this.visible = true; diff --git a/src/views/NewPlatform/components/NewModel.vue b/src/views/NewPlatform/components/NewModel.vue index 513b92f..b848e37 100644 --- a/src/views/NewPlatform/components/NewModel.vue +++ b/src/views/NewPlatform/components/NewModel.vue @@ -83,11 +83,24 @@ export default { }; }, computed: mapState('user', ['picCode']), - created() { + async created() { this.sendPicCode(); + await this.getUserSer(); + if (this.userSer) { + if (this.userSer.name) { + this.platform.manName = this.userSer.name; + } + if (this.userSer.phone) { + this.platform.tel = this.userSer.phone; + } + if (this.userSer.companyName) { + this.platform.companyName = this.userSer.companyName; + } + } }, methods: { ...mapActions('user', ['sendCode', 'sendPicCode']), + ...mapActions('home', ['getUserSer']), // 显示表单输入框 showModal() { this.visible = true;