index.js 2.9 KB

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