zdxiangqing.js 702 B

123456789101112131415161718192021222324252627282930313233343536
  1. const app = getApp()
  2. Page({
  3. data: {
  4. billDetail: {}
  5. },
  6. onLoad: function(options) {
  7. // 从页面参数中获取账单数据
  8. if (options.billInfo) {
  9. try {
  10. const billDetail = JSON.parse(decodeURIComponent(options.billInfo));
  11. this.setData({
  12. billDetail: billDetail
  13. });
  14. } catch (e) {
  15. console.error('解析账单数据失败', e);
  16. wx.showToast({
  17. title: '加载账单数据失败',
  18. icon: 'none'
  19. });
  20. }
  21. }
  22. },
  23. goBack: function() {
  24. wx.navigateBack();
  25. },
  26. getInvoice: function() {
  27. wx.showToast({
  28. title: '开具发票功能开发中',
  29. icon: 'none'
  30. });
  31. }
  32. })