From 6213d20ef9b171f7e54575009fba29c4834540c7 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 19 May 2021 14:57:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BA=97=E9=93=BA=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=B8=B8=E6=88=8F=E6=97=B6=E7=9A=84=E4=B8=80=E4=BA=9B?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/game/game_setting.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/game/game_setting.vue b/src/views/game/game_setting.vue index 73c66eb..8cdf50b 100644 --- a/src/views/game/game_setting.vue +++ b/src/views/game/game_setting.vue @@ -94,7 +94,7 @@ import { Component, Vue, Watch } from 'vue-property-decorator' import { getGames, IGameData, IGameVersion } from '@/api/game' import Sticky from '@/components/Sticky/index.vue' -import ElImageViewer from 'element-ui/packages/image/src/image-viewer' +import ElImageViewer from 'element-ui/packages/image/src/image-viewer.vue' import { getShopGameInfo, @@ -175,8 +175,7 @@ export default class extends Vue { const game = this.list[i] for (const v of game.versions) { if (v.type === 1) { - const url = await this.getGameQr(this.shop, this.gameid, this.versionid) - v.qr = [url] + v.qr = await this.getGameQr(this.shop, game._id!, v._id!) } } Vue.set(this.list, i, game) @@ -277,8 +276,8 @@ export default class extends Vue { } private showPreview(data: IGameVersion) { - if (data.type === 1) { - this.qrUrl = data.qr + if (data.type === 1 && data.qr) { + this.qrUrl = data.qr! this.showViewer = true } else if (data.url) { window.open(data.url, '_blank')