index.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. // pages/meeting/appointmentDetail/index.js
  2. import {closeContinueMeeting} from '../../../utils/api/meeting'
  3. const app = getApp();
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. StatusBar: app.globalData.StatusBar, //胶囊按钮位置
  10. CustomBar: app.globalData.CustomBar,
  11. type: '',
  12. item: {},
  13. },
  14. // 跳转
  15. gotoFun(e) {
  16. let {
  17. item,
  18. type
  19. } = this.data
  20. let url;
  21. let id = e.currentTarget.dataset.id
  22. if (id == 3) {
  23. wx.navigateBack({
  24. delta: 1,
  25. })
  26. } else {
  27. switch (id) {
  28. case '1':
  29. url = '/pages/audit/deteil/index?item=' + JSON.stringify(item) + '&type=' + type
  30. break;
  31. case '2':
  32. url = '/pages/audit/index/index?item=' + JSON.stringify(item) + '&type=' + type
  33. break;
  34. default:
  35. break;
  36. }
  37. wx.navigateTo({
  38. url
  39. })
  40. }
  41. },
  42. // 取消
  43. cancel() {
  44. wx.showModal({
  45. title: '提示',
  46. content: '确定要取消吗',
  47. complete: (res) => {
  48. if (res.confirm) {
  49. closeContinueMeeting({
  50. meetingContinueRecordId: this.data.item.meetingContinueRecordId
  51. }).then(res => {
  52. wx.showToast({
  53. title: '操作成功',
  54. icon: 'none',
  55. duration: 2000,
  56. //显示透明蒙层,防止触摸穿透
  57. mask: true,
  58. success: function () {
  59. setTimeout(function () {
  60. wx.navigateTo({
  61. url: '/pages/myRenewalContract/index/index',
  62. })
  63. }, 1500)
  64. }
  65. })
  66. })
  67. }
  68. }
  69. })
  70. },
  71. /**
  72. * 生命周期函数--监听页面加载
  73. */
  74. onLoad(options) {
  75. if (options.item) {
  76. this.setData({
  77. type: options.type,
  78. item: JSON.parse(options.item)
  79. })
  80. }
  81. },
  82. /**
  83. * 生命周期函数--监听页面初次渲染完成
  84. */
  85. onReady() {
  86. },
  87. /**
  88. * 生命周期函数--监听页面显示
  89. */
  90. onShow() {
  91. },
  92. /**
  93. * 生命周期函数--监听页面隐藏
  94. */
  95. onHide() {
  96. },
  97. /**
  98. * 生命周期函数--监听页面卸载
  99. */
  100. onUnload() {
  101. },
  102. /**
  103. * 页面相关事件处理函数--监听用户下拉动作
  104. */
  105. onPullDownRefresh() {
  106. },
  107. /**
  108. * 页面上拉触底事件的处理函数
  109. */
  110. onReachBottom() {
  111. },
  112. /**
  113. * 用户点击右上角分享
  114. */
  115. onShareAppMessage() {
  116. }
  117. })