微信小程序
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.

95 lines
1.6 KiB

  1. // pages/transaction/transactionDetail/transactionDetail.js
  2. import * as UTIL from '../../../utils/util.js';
  3. import * as API from '../../../utils/API.js';
  4. let EVN_CONFIG = require('../../../env/env');
  5. const app = getApp();
  6. Page({
  7. /**
  8. * 页面的初始数据
  9. */
  10. data: {
  11. isIPX: app.globalData.isIPX,
  12. form:{}
  13. },
  14. /**
  15. * 生命周期函数--监听页面加载
  16. */
  17. onLoad(options) {
  18. let id = options.id;
  19. console.log(id);
  20. var that = this;
  21. // 来往账标识字典查询
  22. UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'direction', {method:'GET'}, {
  23. success: (res2) => {
  24. that.setData({
  25. directionOptions:res2.data,
  26. })
  27. UTIL.httpRequest(API.URL_GET_GETRECORDDETAIL+id , {method:'GET'}, {
  28. success: (res) => {
  29. res.data.direction = UTIL.getTransform(res.data.direction,res2.data);
  30. that.setData({
  31. form:res.data,
  32. })
  33. }
  34. })
  35. }
  36. })
  37. },
  38. back:function(){
  39. wx.navigateBack({
  40. delta: 1
  41. })
  42. },
  43. /**
  44. * 生命周期函数--监听页面初次渲染完成
  45. */
  46. onReady() {
  47. },
  48. /**
  49. * 生命周期函数--监听页面显示
  50. */
  51. onShow() {
  52. },
  53. /**
  54. * 生命周期函数--监听页面隐藏
  55. */
  56. onHide() {
  57. },
  58. /**
  59. * 生命周期函数--监听页面卸载
  60. */
  61. onUnload() {
  62. },
  63. /**
  64. * 页面相关事件处理函数--监听用户下拉动作
  65. */
  66. onPullDownRefresh() {
  67. },
  68. /**
  69. * 页面上拉触底事件的处理函数
  70. */
  71. onReachBottom() {
  72. },
  73. /**
  74. * 用户点击右上角分享
  75. */
  76. onShareAppMessage() {
  77. }
  78. })