|
@@ -51,12 +51,11 @@ $(".shareHongbao").click(function () {
|
51
|
51
|
if(navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger"){
|
52
|
52
|
//微信
|
53
|
53
|
$(".shareWechat").css('display','block')
|
54
|
|
- shareFriend ();
|
|
54
|
+ shareRedPacket ();
|
55
|
55
|
}else{
|
56
|
56
|
//app端
|
57
|
57
|
$(".shareMask").css('display','block')
|
58
|
58
|
}
|
59
|
|
- collarRed();
|
60
|
59
|
share();
|
61
|
60
|
})
|
62
|
61
|
//带你几取消分享
|
|
@@ -76,8 +75,9 @@ function share() {
|
76
|
75
|
type:1,
|
77
|
76
|
count: num
|
78
|
77
|
},
|
|
78
|
+ dataType:'json',
|
79
|
79
|
success: function (res) {
|
80
|
|
- var data =JSON.parse(res)
|
|
80
|
+ var data =res;
|
81
|
81
|
num = data.res.count;
|
82
|
82
|
}
|
83
|
83
|
})
|
|
@@ -145,20 +145,18 @@ function showMsg(msg) {
|
145
|
145
|
}, 3000);
|
146
|
146
|
}
|
147
|
147
|
|
148
|
|
-$('.shareCopy').click(function () {
|
149
|
|
- copyPassword()
|
150
|
|
-})
|
151
|
|
-
|
152
|
|
-//记录用户 领红包
|
153
|
|
-function collarRed() {
|
|
148
|
+//分享用户授权
|
|
149
|
+function shareRedPacket () {
|
154
|
150
|
$.ajax({
|
155
|
151
|
type:"post",
|
156
|
|
- url:"/api/V2/receiveRedPacket",
|
|
152
|
+ url:"/api/V2/shareRedPacket",
|
157
|
153
|
dataType:"json",
|
158
|
|
- data:{
|
159
|
|
- user_id:userId
|
160
|
|
- },
|
161
|
|
- success: function (res) {
|
|
154
|
+ success: function () {
|
|
155
|
+ shareFriend ();
|
162
|
156
|
}
|
163
|
157
|
})
|
164
|
|
-}
|
|
158
|
+}
|
|
159
|
+
|
|
160
|
+$('.shareCopy').click(function () {
|
|
161
|
+ copyPassword()
|
|
162
|
+})
|