index.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. const _my = require("../../../__antmove/api/index.js")(my);
  2. const wx = _my; // pages/meeting/appointmentDetail/index.js
  3. import { closeContinueMeeting } from "../../../utils/api/meeting";
  4. const app = getApp();
  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.renewalInfo = 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?item=" + JSON.stringify(item) + "&type=" + type;
  33. url = "/pages/audit/deteil/index?&type=" + type;
  34. break;
  35. case "2":
  36. // url = "/pages/audit/index/index?item=" + JSON.stringify(item) + "&type=" + type;
  37. url = "/pages/audit/index/index?&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. closeContinueMeeting({
  55. meetingContinueRecordId: this.data.item.meetingContinueRecordId
  56. }).then(res => {
  57. wx.showToast({
  58. title: "操作成功",
  59. icon: "none",
  60. duration: 2000,
  61. //显示透明蒙层,防止触摸穿透
  62. mask: true,
  63. success: function () {
  64. setTimeout(function () {
  65. wx.navigateTo({
  66. url: "/pages/myRenewalContract/index/index"
  67. });
  68. }, 1500);
  69. }
  70. });
  71. });
  72. }
  73. }
  74. });
  75. },
  76. /**
  77. * 生命周期函数--监听页面加载 修改1
  78. */
  79. onLoad(options) {
  80. if (app.data.renewalInfo) {
  81. let item = JSON.parse(JSON.stringify(app.data.renewalInfo));
  82. console.log(item);
  83. app.data.renewalInfo = null;
  84. this.setData({
  85. type: options.type,
  86. item: item
  87. // item: JSON.parse(options.item)
  88. });
  89. }
  90. },
  91. /**
  92. * 生命周期函数--监听页面初次渲染完成
  93. */
  94. onReady() { },
  95. /**
  96. * 生命周期函数--监听页面显示
  97. */
  98. onShow() { },
  99. /**
  100. * 生命周期函数--监听页面隐藏
  101. */
  102. onHide() { },
  103. /**
  104. * 生命周期函数--监听页面卸载
  105. */
  106. onUnload() { },
  107. /**
  108. * 页面相关事件处理函数--监听用户下拉动作
  109. */
  110. onPullDownRefresh() { },
  111. /**
  112. * 页面上拉触底事件的处理函数
  113. */
  114. onReachBottom() { },
  115. /**
  116. * 用户点击右上角分享
  117. */
  118. onShareAppMessage() { },
  119. antmoveAction: function () {
  120. //执行时动态赋值,请勿删除
  121. }
  122. });