12345678910111213141516171819202122232425262728293031323334 |
- const $ = global;
-
- new $.Page({
- onLoad() {
-
- },
- toPay() {
- $.request('reward', 'POST', {}).then((res) => {
- const {
- timestamp,
- paySign,
- nonceStr
- } = res.msg;
- const pck = res.msg.package;
- wx.requestPayment({
- timeStamp: timestamp + '',
- nonceStr,
- package: pck,
- signType: 'MD5',
- paySign,
- success(res) {
- $.wx.showToast({
- title: '多谢打赏!'
- });
- },
- fail() {
- $.wx.showToast({
- title: '打赏失败'
- });
- }
- });
- });
- }
- });
|