加入游戏时,标题显示为multiplayer

This commit is contained in:
zhl 2019-03-08 15:18:05 +08:00
parent 7b3dad796a
commit 09c29f6edf
2 changed files with 6 additions and 4 deletions

View File

@ -45,9 +45,11 @@
this.link = `${this.link}&version=${env}&account_id=${encodeURIComponent(account.account_id)}&session_id=${encodeURIComponent(account.session_id)}`; this.link = `${this.link}&version=${env}&account_id=${encodeURIComponent(account.account_id)}&session_id=${encodeURIComponent(account.session_id)}`;
console.log('load page: ' + this.link); console.log('load page: ' + this.link);
this.name = decodeURIComponent(params.name); this.name = decodeURIComponent(params.name);
wepy.setNavigationBarTitle({ if (this.name) {
title: this.name wepy.setNavigationBarTitle({
}); title: this.name
});
}
this.share_image = decodeURIComponent(params.share_image); this.share_image = decodeURIComponent(params.share_image);
this.$apply(); this.$apply();
} }

View File

@ -179,7 +179,7 @@
let gid = options.gid; let gid = options.gid;
let link = `${fcUrl}?id=${gid}&roomId=${roomId}`; let link = `${fcUrl}?id=${gid}&roomId=${roomId}`;
wepy.navigateTo({ wepy.navigateTo({
url: '/pages/game?link=' + encodeURIComponent(link) + '&gid=' + gid url: '/pages/game?link=' + encodeURIComponent(link) + '&gid=' + gid +'&name=multiplayer'
}); });
} }
} }