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;