根据服务端配置,实时开启关闭分享
This commit is contained in:
parent
3ec9b592cd
commit
3ce0149580
@ -16,7 +16,8 @@
|
||||
link: '',
|
||||
roomId: '',
|
||||
gid: '',
|
||||
name: ''
|
||||
name: '',
|
||||
share_image: ''
|
||||
};
|
||||
methods = {
|
||||
webloaded: function(e) {
|
||||
@ -43,8 +44,15 @@
|
||||
wepy.setNavigationBarTitle({
|
||||
title: this.name
|
||||
});
|
||||
this.share_image = decodeURIComponent(params.share_image);
|
||||
this.$apply();
|
||||
}
|
||||
onShow() {
|
||||
let cfg = wepy.getStorageSync('cfg');
|
||||
if (!cfg._getrewardtype) {
|
||||
wepy.hideShareMenu();
|
||||
}
|
||||
}
|
||||
onShareAppMessage() {
|
||||
let self = this;
|
||||
let account = wepy.getStorageSync('account');
|
||||
@ -53,7 +61,7 @@
|
||||
return {
|
||||
title: shareStr,
|
||||
path: `/pages/index?isShare=1&inviter_id=${account.account_id}&roomId=${this.roomId}&gid=${this.gid}&togame=1&t=${Date.now()}`,
|
||||
imageUrl: 'https://resource.kingsome.cn/dalmatian/wapp/share.jpg',
|
||||
imageUrl: this.share_image,
|
||||
success: function (res) {
|
||||
wepy.getShareInfo({
|
||||
shareTicket: res.shareTickets[0]
|
||||
|
@ -178,6 +178,9 @@
|
||||
}
|
||||
onShow() {
|
||||
let cfg = wepy.getStorageSync('cfg');
|
||||
if (!cfg._getrewardtype) {
|
||||
wepy.hideShareMenu();
|
||||
}
|
||||
this.gbaUrl1 = cfg.gbaurl1;
|
||||
this.gbaUrl2 = cfg.gbaurl2;
|
||||
this.fcUrl = cfg.fcurl;
|
||||
@ -209,7 +212,9 @@
|
||||
}
|
||||
}
|
||||
wepy.navigateTo({
|
||||
url: '/pages/game?link=' + encodeURIComponent(url) + '&gid=' + this.id + '&name=' + encodeURIComponent(this.record.name)
|
||||
url: '/pages/game?link=' + encodeURIComponent(url) + '&gid=' + this.id
|
||||
+ '&name=' + encodeURIComponent(this.record.name)
|
||||
+ '&share_image=' + encodeURIComponent(this.record.icon)
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
|
@ -196,6 +196,9 @@
|
||||
}
|
||||
onShow() {
|
||||
let cfg = wepy.getStorageSync('cfg');
|
||||
if (!cfg._getrewardtype) {
|
||||
wepy.hideShareMenu();
|
||||
}
|
||||
this.showAll = !cfg ? false : !cfg.hide_main;
|
||||
let userInfo = this.$parent.getUserInfo();
|
||||
console.log(userInfo);
|
||||
|
@ -163,6 +163,9 @@
|
||||
}
|
||||
onShow() {
|
||||
let cfg = wepy.getStorageSync('cfg');
|
||||
if (!cfg._getrewardtype) {
|
||||
wepy.hideShareMenu();
|
||||
}
|
||||
this.showAll = !cfg ? false : !cfg.hide_main;
|
||||
}
|
||||
initPageParam() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user