家政小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334
  1. const $ = global;
  2. new $.Page({
  3. onLoad() {
  4. },
  5. toPay() {
  6. $.request('reward', 'POST', {}).then((res) => {
  7. const {
  8. timestamp,
  9. paySign,
  10. nonceStr
  11. } = res.msg;
  12. const pck = res.msg.package;
  13. wx.requestPayment({
  14. timeStamp: timestamp + '',
  15. nonceStr,
  16. package: pck,
  17. signType: 'MD5',
  18. paySign,
  19. success(res) {
  20. $.wx.showToast({
  21. title: '多谢打赏!'
  22. });
  23. },
  24. fail() {
  25. $.wx.showToast({
  26. title: '支付失败'
  27. });
  28. }
  29. });
  30. });
  31. }
  32. });