diff --git a/homepage.html b/homepage.html index 250190a..15530dd 100644 --- a/homepage.html +++ b/homepage.html @@ -622,7 +622,13 @@ } else if (entity.channel === 1 && entity.receive_mode === 2) { window.location.replace("./zfb-redPackets.html"); } else { - window.location.replace("./redPackets.html"); + // 判断 在那个环境打开 如果是微信 获取openid + if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { + let auth_url = `https://openapi.1688sup.com/wechat/oauth?payment_subject=bale&jump=${location.origin}/redPackets.html` + window.location.replace(auth_url); + } else { + window.location.replace("./redPackets.html"); + } } } }, diff --git a/redPackets.html b/redPackets.html index 7249b08..41d761a 100644 --- a/redPackets.html +++ b/redPackets.html @@ -11,8 +11,9 @@ - + + + @@ -120,7 +122,7 @@