修正店铺编辑游戏时的一些bug
This commit is contained in:
parent
faa9394f87
commit
6213d20ef9
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user