check_status.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // pages/check_status/check_status.js
  2. import { routers, viewImage, sharePage, isFn, getGlobalVal, formatDateTime, formateNumber } from '../../utils/util.js'
  3. import { CheckStatus} from '../../utils/api.js'
  4. const { navigateTo, redirectTo, navigateBack } = routers()
  5. const { globalData } = getApp()
  6. const { baseImgUrl, thumbnail } = globalData
  7. const app = getApp()
  8. Page({
  9. /**
  10. * 页面的初始数据
  11. */
  12. data: {
  13. isCheck:0,
  14. type:1
  15. },
  16. /**
  17. * 生命周期函数--监听页面加载
  18. */
  19. onLoad: function (options) {
  20. // console.log(options)
  21. this.setData(options)
  22. },
  23. /**
  24. * 生命周期函数--监听页面初次渲染完成
  25. */
  26. onReady: function () {
  27. const obj = { navigateTo, redirectTo, navigateBack, viewImage }
  28. for (const i in obj) {
  29. this[i] = obj[i]
  30. }
  31. },
  32. /**
  33. * 生命周期函数--监听页面显示
  34. */
  35. onShow: function () {
  36. this.checkStatus();
  37. },
  38. /**
  39. * 生命周期函数--监听页面隐藏
  40. */
  41. onHide: function () {
  42. },
  43. /**
  44. * 生命周期函数--监听页面卸载
  45. */
  46. onUnload: function () {
  47. },
  48. /**
  49. * 页面相关事件处理函数--监听用户下拉动作
  50. */
  51. onPullDownRefresh: function () {
  52. },
  53. /**
  54. * 页面上拉触底事件的处理函数
  55. */
  56. onReachBottom: function () {
  57. },
  58. /**
  59. * 用户点击右上角分享
  60. */
  61. onShareAppMessage: function () {
  62. if (app.sharePageDefaultCtl) {
  63. return app.sharePageDefaultCtl()
  64. }
  65. },
  66. /**
  67. * 审核结果
  68. * */
  69. checkStatus: function () {
  70. CheckStatus({ data: {} }).then(res => {
  71. const { curatorName, status, auditFailureReason,phone} = res.data
  72. if (status == 2) {
  73. this.setData({isCheck: 1,curatorName,phone})
  74. } else if (status == 3) {
  75. this.setData({ isCheck: 2, auditFailureReason, curatorName,phone})
  76. }
  77. })
  78. }
  79. })