Prepare el código QR de Alipay y WeChat
Primero, debe generar un código QR para Alipay y WeChat
Configure la imagen en _config.yml
Las imágenes wechat.jpg, alipay.jpg se colocan en themes / next / source / images
reward:
enable: true
#打赏功能
comment: 原创技术分享,您的支持将鼓励我继续创作
wechatpay: /images/wechat.jpg
alipay: /images/alipay.jpg
Hasta ahora, se han implementado las funciones requeridas, como se muestra en la figura:
Pero hay un error intermitente, por lo que la siguiente solución
Fix flashing bug
Modifique next / source / css / _common / components / post / post-award.styl, comente la siguiente parte
/*注释此部分
#QR > div:hover p {
animation: roll 0.1s infinite linear;
-webkit-animation: roll 0.1s infinite linear;
-moz-animation: roll 0.1s infinite linear;
}*/
Bien, aquí has terminado, perfecto ~~
Por favor, consulte mi blog para ver el efecto: https://wugenqiang.gitee.io/articles/hexo-do-donate.html