index.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. const _my = require("../../../__antmove/api/index.js")(my);
  2. const wx = _my; // pages/orderMeal/detail/index.js
  3. import { closeMeetingInService } from "../../../utils/api/meeting";
  4. const app = getApp()
  5. Page({
  6. /**
  7. * 页面的初始数据
  8. */
  9. data: {
  10. type: "",
  11. item: {}
  12. },
  13. auditFun() {
  14. let {
  15. item,
  16. type
  17. } = this.data;
  18. app.data.orderMealInfo = this.data.item
  19. wx.navigateTo({
  20. url: "/pages/audit/index/index?&type=" + type
  21. });
  22. },
  23. cancel(e) {
  24. wx.showModal({
  25. title: "提示",
  26. content: "确定要取消吗",
  27. complete: res => {
  28. if (res.confirm) {
  29. closeMeetingInService({
  30. meetingInServiceId: this.data.item.meetingInServiceId
  31. }).then(res => {
  32. wx.showToast({
  33. title: "操作成功",
  34. icon: "none",
  35. duration: 2000,
  36. //显示透明蒙层,防止触摸穿透
  37. mask: true,
  38. success: function () {
  39. setTimeout(function () {
  40. wx.navigateBack({
  41. delta: 1
  42. });
  43. }, 1500);
  44. }
  45. });
  46. });
  47. }
  48. }
  49. });
  50. },
  51. /**
  52. * 生命周期函数--监听页面加载 修改1
  53. */
  54. onLoad(options) {
  55. let item = JSON.parse(JSON.stringify(app.data.orderMealInfo));
  56. app.data.orderMealInfo = null;
  57. if (options.type) {
  58. this.setData({
  59. type: options.type,
  60. item: item
  61. });
  62. }
  63. },
  64. /**
  65. * 生命周期函数--监听页面初次渲染完成
  66. */
  67. onReady() { },
  68. /**
  69. * 生命周期函数--监听页面显示
  70. */
  71. onShow() { },
  72. /**
  73. * 生命周期函数--监听页面隐藏
  74. */
  75. onHide() { },
  76. /**
  77. * 生命周期函数--监听页面卸载
  78. */
  79. onUnload() { },
  80. /**
  81. * 页面相关事件处理函数--监听用户下拉动作
  82. */
  83. onPullDownRefresh() { },
  84. /**
  85. * 页面上拉触底事件的处理函数
  86. */
  87. onReachBottom() { },
  88. /**
  89. * 用户点击右上角分享
  90. */
  91. onShareAppMessage() { },
  92. antmoveAction: function () {
  93. //执行时动态赋值,请勿删除
  94. }
  95. });