From 09c29f6edff3be46dca072f3f4fcba7dcb10bf56 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 8 Mar 2019 15:18:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=B8=B8=E6=88=8F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=A0=87=E9=A2=98=E6=98=BE=E7=A4=BA=E4=B8=BAmultiplay?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/game.wpy | 8 +++++--- src/pages/index.wpy | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/game.wpy b/src/pages/game.wpy index ec725fe..2ab5e38 100644 --- a/src/pages/game.wpy +++ b/src/pages/game.wpy @@ -45,9 +45,11 @@ this.link = `${this.link}&version=${env}&account_id=${encodeURIComponent(account.account_id)}&session_id=${encodeURIComponent(account.session_id)}`; console.log('load page: ' + this.link); this.name = decodeURIComponent(params.name); - wepy.setNavigationBarTitle({ - title: this.name - }); + if (this.name) { + wepy.setNavigationBarTitle({ + title: this.name + }); + } this.share_image = decodeURIComponent(params.share_image); this.$apply(); } diff --git a/src/pages/index.wpy b/src/pages/index.wpy index 149fe4d..4a3b10f 100644 --- a/src/pages/index.wpy +++ b/src/pages/index.wpy @@ -179,7 +179,7 @@ let gid = options.gid; let link = `${fcUrl}?id=${gid}&roomId=${roomId}`; wepy.navigateTo({ - url: '/pages/game?link=' + encodeURIComponent(link) + '&gid=' + gid + url: '/pages/game?link=' + encodeURIComponent(link) + '&gid=' + gid +'&name=multiplayer' }); } }