博客园增加打赏功能

1.首先准备好自己微信和支付宝收款的二维码图片,注意,图片需要修改为bmp结尾的格式,如,alipay.bmp,wechat.bmp。

2.进入自己的博客园,然后进入  管理--->文件,在这里上传自己第1步中准备好的二维码图片。

3.复制下面的js代码

 1 <script>
 2         window.tctipConfig = {
 3         staticPrefix: "https://static.tctip.com",
 4         buttonImageId: 2,
 5         buttonTip:    "dashang",
 6         list:{
 7                 alipay: { qrimg: "https://files.cnblogs.com/files/clovershell/alipay.bmp"},
 8                 weixin: { qrimg: "https://files.cnblogs.com/files/clovershell/wechat.bmp"},
 9             }
10         };
11 </script>
12 <script src="https://static.tctip.com/js/tctip.min.js"></script>

4.修改js代码第7行和第8行,如下

 7             alipay: {qrimg: "http://files.cnblogs.com/files/自己的博客地址名/支付宝图片的名子.bmp"},
 8             weixin:{qrimg: "http://files.cnblogs.com/files/自己的博客地址名/微信图片的名字.bmp"},

5.最后一步,进入管理--设置,往下拉找到【页首Html代码】,把修改完的js代码粘贴到里面,保存就大功告成了。

说明:

buttonImageId: 2, //代表背景颜色:1是杏黄色;2是柳绿色,3是蓝色,4是灰色,5是嫣红色,6是漆黑色,7是宝蓝色,8是洋红色,9是群青色

【 颜色叫法参考 https://www.cnblogs.com/clovershell/p/10044882.html 】

原文地址:https://www.cnblogs.com/clovershell/p/10044406.html