|
@@ -1,4 +1,4 @@
|
1
|
|
-var userId = null;
|
|
1
|
+var userId = 0;
|
2
|
2
|
var str=location.href; //取得整个地址栏
|
3
|
3
|
var num=str.indexOf("?");
|
4
|
4
|
str=str.substr(num+1); //str得到?之后的字符串
|
|
@@ -22,7 +22,7 @@ $(".weixins").click(function(e){
|
22
|
22
|
var jsons = {
|
23
|
23
|
title:'@你,快来瓜分10000个红包!',
|
24
|
24
|
desc:'福利放送!淘宝无门槛购物红包天天领!来看看你的手气~',
|
25
|
|
- url: BASEURL + '/share/index.html?userId=' + userId
|
|
25
|
+ url: BASEURL + '/share/index.html?userId=0'
|
26
|
26
|
};
|
27
|
27
|
jsons = JSON.stringify(jsons);
|
28
|
28
|
function shareWeixin () {
|
|
@@ -48,10 +48,10 @@ function sharePengyouquan () {
|
48
|
48
|
}
|
49
|
49
|
//点击立即分享
|
50
|
50
|
$(".shareHongbao").click(function () {
|
|
51
|
+ shareRedPacket();
|
51
|
52
|
if(navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger"){
|
52
|
53
|
//微信
|
53
|
54
|
$(".shareWechat").css('display','block')
|
54
|
|
- shareRedPacket ();
|
55
|
55
|
}else{
|
56
|
56
|
//app端
|
57
|
57
|
$(".shareMask").css('display','block')
|
|
@@ -148,11 +148,14 @@ function showMsg(msg) {
|
148
|
148
|
//分享用户授权
|
149
|
149
|
function shareRedPacket () {
|
150
|
150
|
$.ajax({
|
151
|
|
- type:"post",
|
|
151
|
+ type:"get",
|
152
|
152
|
url:"/api/V2/shareRedPacket",
|
153
|
153
|
dataType:"json",
|
154
|
|
- success: function () {
|
155
|
|
- shareFriend ();
|
|
154
|
+ data:{
|
|
155
|
+ 'user_id':userId
|
|
156
|
+ },
|
|
157
|
+ success: function (res) {
|
|
158
|
+ console.log(res)
|
156
|
159
|
}
|
157
|
160
|
})
|
158
|
161
|
}
|