From 8b06c58cac14dec778685eba5547bc055232c1f5 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 9 Jun 2021 20:08:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B8=B8=E6=88=8F=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E7=BC=96=E8=BE=91=E6=97=A0=E6=B3=95=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/activity/edit.vue | 2 +- src/views/game/game_theme.vue | 34 +++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/views/activity/edit.vue b/src/views/activity/edit.vue index 0ff0390..7b28489 100644 --- a/src/views/activity/edit.vue +++ b/src/views/activity/edit.vue @@ -477,7 +477,7 @@ export default class extends Vue { private tempTagView?: ITagView private dialogType = 'new' - private record: IRewardData = {type: 0} + private record: IRewardData = { type: 0 } private dialogVisible = false private modalRules = { rank: [{ required: true, message: '请输入排名', trigger: 'blur' } diff --git a/src/views/game/game_theme.vue b/src/views/game/game_theme.vue index d53e920..c5e63fd 100644 --- a/src/views/game/game_theme.vue +++ b/src/views/game/game_theme.vue @@ -2,7 +2,7 @@
- + - + @@ -37,9 +37,9 @@ prop="game_multi_btn" > @@ -102,7 +102,7 @@ export default class extends Vue { } private shop = '' - private postForm: any = {} + private record: any = {} get userLevel() { return UserModule.level @@ -121,18 +121,18 @@ export default class extends Vue { } async created() { - this.postForm.shop = this.$route.params?.shop - this.postForm.game = this.$route.params?.game - this.postForm.version = this.$route.params?.version + this.record.shop = this.$route.params?.shop + this.record.game = this.$route.params?.game + this.record.version = this.$route.params?.version console.log(this.shop) await this.getRemoteData() } async getRemoteData() { - const { data } = await getGameTheme(this.postForm) - this.postForm = Object.assign(this.postForm, data) + const { data } = await getGameTheme(this.record) + this.record = Object.assign(this.record, data) this.$forceUpdate() - console.log(this.postForm) + console.log(this.record) } private async onCancel() { @@ -152,7 +152,7 @@ export default class extends Vue { private async saveVal() { try { await this.$refs.postForm.validate() - const { data } = await saveGameTheme(this.postForm) + const { data } = await saveGameTheme(this.record) this.$notify({ title: 'Success', message: '操作成功', @@ -163,6 +163,10 @@ export default class extends Vue { } } + + private inputBegin() { + this.$forceUpdate() + } }