index.js 2.7 KB

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