支付宝近期又开启了赏金红包活动,而且红包的额度还挺大,基本上都在二块钱到三块钱范围,有的甚至领取到了好几十块钱的红包。
可是这样推广可不是办法,又要复制又要打开支付宝又要点领取,太麻烦了。
于是,就有了一个想法是否有方法可以通过外链的形式直接打开支付宝app然后领取红包了??(就像下面这样)
体验链接:点链接,领取支付宝赏金
实现方法
基本思路就是: 1.点击一个url。2:然后立即跳转到支付宝app。3:最后秒领红包。
完整代码如下:
<html><head> <title>拼手气红包,支付宝官方活动!</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style type="text/css"> *{ margin:0; padding:0; } /*body{ background: url(./bg.png); }*/ #bg{ width: 100%; height: 100%; position: fixed; top: 0; } #bg img{ width: 100%; height: 100%; } </style></head><body> <div id="bg"> <a href="https://ulink.alipay.com/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FsaId%3D10000007%26clientVersion%3D3.7.0.0718%26qrcode%3Dhttps%253A%252F%252Frender.alipay.com%252Fp%252Fc%252Falipay-red-qrcode%252Fshared.html%253Fchannel%253Dsearch_pwd%2526shareId%253D2088612919476191%2526token%253DeNW519615722hxvtohmu1hvno2fbiD%2526campStr%253DkPPFvOxaCL3f85TiKss2wsBZgIjulHjG%2526sign%253DqsiVOoa7TuphryWxyBdONXsMTnE3jiIBvWeUs3yV1sw%253D%2526chInfo%253DDingtalk%2526c_stype%253Dsearch_pwd"><img src="https://lwsaascos-1311562825.cos.ap-nanjing.myqcloud.com/2022/0.gif" /></a> </div></body><script type="text/javascript">window.onload=function(){ window.location = 'https://ulink.alipay.com/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FsaId%3D10000007%26clientVersion%3D3.7.0.0718%26qrcode%3Dhttps%253A%252F%252Frender.alipay.com%252Fp%252Fc%252Falipay-red-qrcode%252Fshared.html%253Fchannel%253Dsearch_pwd%2526shareId%253D2088612919476191%2526token%253DeNW519615722hxvtohmu1hvno2fbiD%2526campStr%253DkPPFvOxaCL3f85TiKss2wsBZgIjulHjG%2526sign%253DqsiVOoa7TuphryWxyBdONXsMTnE3jiIBvWeUs3yV1sw%253D%2526chInfo%253DDingtalk%2526c_stype%253Dsearch_pwd';}</script></html>1234567891011121314151617181920212223242526272829303132333435363712345678910111213141516171819202122232425262728293031323334353637
代码修改:
https://ulink.alipay.com/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FsaId%3D10000007%26clientVersion%3D3.7.0.0718%26qrcode%3Dhttps%253A%252F%252Frender.alipay.com%252Fp%252Fc%252Falipay-red-qrcode%252Fshared.html%253Fchannel%253Dsearch_pwd%2526shareId%253D2088612919476191%2526token%253DeNW519615722hxvtohmu1hvno2fbiD%2526campStr%253DkPPFvOxaCL3f85TiKss2wsBZgIjulHjG%2526sign%253DqsiVOoa7TuphryWxyBdONXsMTnE3jiIBvWeUs3yV1sw%253D%2526chInfo%253DDingtalk%2526c_stype%253Dsearch_pwd11
只需要修改当前url中,shareId 和 token 的值即可
shareId的获取方法(需要登陆电脑端支付宝):
登录个人中心:支付宝后台
个人中心页面点击鼠标右键,查看网页源代码
ctrl+F查找关键字2088(阿里的用户id都是2088开头,其他的都是错误)的
token的获取方法
在赚钱红包页面保存二维码,然后使用wx扫一扫,直接出来的就是token
将二个值替换以后,将HTML文件上传到自己的服务器就可以用了。