diff --git a/src/app.wpy b/src/app.wpy
index d44e58a..43cb89f 100644
--- a/src/app.wpy
+++ b/src/app.wpy
@@ -193,5 +193,8 @@ export default class extends wepy.app {
updateVip(vip) {
this.globalData.vip = vip;
}
+ getShareCount(cb) {
+ sdkManage.getAchievInviteeNum(cb);
+ }
}
diff --git a/src/jcfw/SDKManage.js b/src/jcfw/SDKManage.js
index 7137150..a888e1c 100755
--- a/src/jcfw/SDKManage.js
+++ b/src/jcfw/SDKManage.js
@@ -151,7 +151,7 @@ var SDKManage = function() {
}
}
if (cb) {
- cb();
+ cb(invitee_nums);
}
};
jcshare.getAchievInviteeNum(callback);
@@ -167,7 +167,7 @@ var SDKManage = function() {
this.logincbarr = [
this.gamelogin.bind(this),
// this.wxGetUseInfo.bind(this),
- // this.checkSharedata.bind(this),
+ this.checkSharedata.bind(this),
// redis 配置
this.getGameConfig.bind(this)
// 获取分享配置
diff --git a/src/pages/gameInfo.wpy b/src/pages/gameInfo.wpy
index 1613759..1f87e33 100644
--- a/src/pages/gameInfo.wpy
+++ b/src/pages/gameInfo.wpy
@@ -127,7 +127,7 @@
},
actionSheetGold() {
if (this.score < this.record.score) {
- this.requestAd('金币不足, ')
+ this.requestAd('金币不足')
} else {
this.buyGame();
}
diff --git a/src/pages/index.wpy b/src/pages/index.wpy
index 2919d6e..e7d5619 100644
--- a/src/pages/index.wpy
+++ b/src/pages/index.wpy
@@ -290,5 +290,29 @@
this.noData = false;
this.noMore = true;
}
+ onShareAppMessage() {
+ let self = this;
+ let account = wepy.getStorageSync('account');
+ return {
+ title: '来玩啊',
+ path: `/pages/index?isShare=1&inviter_id=${account.account_id}`,
+ imageUrl: 'https://resource.kingsome.cn/dalmatian/wapp/share.jpg',
+ success: function (res) {
+ wepy.getShareInfo({
+ shareTicket: res.shareTickets[0]
+ })
+ .then(res => {
+ console.log(res);
+ })
+ .catch(err => {
+ console.log(err)
+ })
+ },
+ fail: function (res) {
+ // 分享失败
+ console.log(res)
+ }
+ }
+ }
}
diff --git a/src/pages/jumppage.wpy b/src/pages/jumppage.wpy
index 4563e14..1e1dd3d 100644
--- a/src/pages/jumppage.wpy
+++ b/src/pages/jumppage.wpy
@@ -28,10 +28,11 @@
padding: 10px;
font-size:18px;
color:#777;
-
+ flex-flow:column;
+ line-height:32px;
}
.msg-action-bar {
- height: 80rpx;
+ height: 100rpx;
overflow: hidden;
display: flex;
border-top: 1rpx solid #e5e5e5;
@@ -57,7 +58,8 @@
- {{text}}是否跳转到爆冰达人,领取3金币?
+ {{text}}
+ 是否跳转到爆冰达人,领取3金币?
取消
@@ -66,7 +68,7 @@
target="miniProgram"
open-type="navigate"
app-id="wxc02bad35ad26165e"
- path="?aid={{aid}}&version=product&share_count=0"
+ path="?aid={{aid}}&version=product&share_count={{shareCount}}"
extra-data=""
version="release"
>
@@ -87,7 +89,8 @@
components = {};
data = {
text: '',
- aid: '11'
+ aid: '11',
+ shareCount: 0
};
methods = {
cancel: function() {
@@ -99,6 +102,10 @@
this.text = decodeURIComponent(params.text);
this.aid = decodeURIComponent(params.aid);
console.log(`aid : ${this.aid}`);
+ let self = this;
+ this.$parent.getShareCount(count => {
+ self.shareCount = count;
+ });
this.$apply();
}