|
@@ -18,6 +18,20 @@ export class WeChatPlatform extends BasePlatform {
|
|
|
private __rewardedSuccess: Function;
|
|
|
private __rewardedfailure: Function;
|
|
|
private __systemInfo: any;
|
|
|
+
|
|
|
+ //分享语录
|
|
|
+ private _shareTitles:string[]=[
|
|
|
+ '打僵尸,我是最强的,不服来战',
|
|
|
+ '你的空投到了!点击领取!',
|
|
|
+ '什么,这游戏还能这么玩?!',
|
|
|
+ '这一波我有点扛不住啊!',
|
|
|
+ '枪神?我预定了,不服来战!',
|
|
|
+ '我终于得到了“哒哒哒”冒蓝光的加特林',
|
|
|
+ '老同学,还记得当年一起打的僵尸吗',
|
|
|
+ '人类!就你这样的手速,最后将会沦为我的食物!',
|
|
|
+ '啊呜,啊呜,啊呜,虽然二哈叫声也这样,但我可是会吃人的!',
|
|
|
+ '当我扣下扳机的那一刻,请你从哪里来回哪去!'
|
|
|
+ ]
|
|
|
constructor() {
|
|
|
super()
|
|
|
this.__systemInfo = this.wx.getSystemInfoSync();
|
|
@@ -112,15 +126,17 @@ export class WeChatPlatform extends BasePlatform {
|
|
|
shareMessage(data: any, success?: Function, failure?: Function): void {
|
|
|
throw new Error('Method not implemented.');
|
|
|
}
|
|
|
+
|
|
|
onShareAppMessage():void{
|
|
|
try {
|
|
|
this.wx.showShareMenu({
|
|
|
withShareTicket: true
|
|
|
});
|
|
|
+ let shareTitle = this._shareTitles[Math.floor(Math.random()*this._shareTitles.length)]
|
|
|
this.wx.onShareAppMessage(()=>{
|
|
|
return {
|
|
|
- title: '打僵尸,我是最强的,不服来战',
|
|
|
- imageUrl: "https://www.maoxingame.com/QiangShenZhanJi/icons/10377_1.png"
|
|
|
+ title: shareTitle,
|
|
|
+ imageUrl: "https://www.maoxingame.com/QiangShenZhanJi/share/share1.jpg"
|
|
|
}
|
|
|
})
|
|
|
|