unchecked.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // pages/mine/wxml/unchecked/unchecked.js
  2. const app = getApp();
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. },
  9. //删除
  10. deletes: function(e) {
  11. var _this = this;
  12. //console.log(e.target.dataset.kid)
  13. wx.showModal({
  14. title: '提示',
  15. content: '确定删除吗?',
  16. success: function(res) {
  17. if (res.confirm) {
  18. //console.log('用户点击确定')
  19. wx.request({
  20. url: app.globalData.prodUrl + 'web-pm/wx/pm/del_live_room',
  21. header: {
  22. 'ydw-token': wx.getStorageSync('key').ydw_token
  23. },
  24. data: {
  25. live_room_id: e.target.dataset.kid
  26. },
  27. success: function(data) {
  28. //console.log(data)
  29. wx.navigateBack({
  30. delta: 1,
  31. success: function () {
  32. var pages = getCurrentPages();
  33. var page = getCurrentPages().pop();
  34. //console.log(pages)
  35. if (page == undefined || page == null) return;
  36. pages[1].onLoad(pages[1].options);
  37. }
  38. })
  39. },
  40. });
  41. } else if (res.cancel) {
  42. //console.log('用户点击取消')
  43. }
  44. }
  45. })
  46. },
  47. /**
  48. * 生命周期函数--监听页面加载
  49. */
  50. onLoad: function(options) {
  51. //console.log(options)
  52. var _this = this
  53. wx.request({
  54. url: app.globalData.prodUrl + 'web-pm/wx/pm/list_verify_reject',
  55. data: {
  56. shop_id: options.shop_id
  57. },
  58. header: {
  59. 'ydw-token': wx.getStorageSync('key').ydw_token
  60. },
  61. success: function(data) {
  62. //console.log(data)
  63. _this.setData({
  64. array: data.data.data
  65. })
  66. },
  67. });
  68. },
  69. /**
  70. * 生命周期函数--监听页面初次渲染完成
  71. */
  72. onReady: function() {
  73. },
  74. /**
  75. * 生命周期函数--监听页面显示
  76. */
  77. onShow: function() {
  78. },
  79. /**
  80. * 生命周期函数--监听页面隐藏
  81. */
  82. onHide: function() {
  83. },
  84. /**
  85. * 生命周期函数--监听页面卸载
  86. */
  87. onUnload: function() {
  88. },
  89. /**
  90. * 页面相关事件处理函数--监听用户下拉动作
  91. */
  92. onPullDownRefresh: function() {
  93. },
  94. /**
  95. * 页面上拉触底事件的处理函数
  96. */
  97. onReachBottom: function() {
  98. }
  99. })