completeInfo.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. const app = getApp()
  2. const util = require("../../../utils/util");
  3. const api = require('../../../api/api.js');
  4. const user = require('../../../utils/user.js');
  5. Page({
  6. data: {
  7. NewFarmerStatus:'',//新农保
  8. backInvestigateState:'',//背调
  9. faceCheckState:'',//实名认证
  10. healthState:'',//健康证
  11. signContractState:'',//签约
  12. onlineInvestigateState:''
  13. },
  14. /**
  15. * 生命周期函数--监听页面加载
  16. */
  17. onLoad: function (options) {
  18. // this.getStatus();
  19. },
  20. getStatus(){
  21. util.request(api.getNewFarmerStatus, {
  22. }, 'GET').then(res=> {
  23. if (res.errno === 0) {
  24. this.setData({
  25. status:res.data.status
  26. });
  27. }
  28. }).catch(err=>{
  29. });
  30. },
  31. getStateInfo(){
  32. let userInfo = wx.getStorageSync('userInfo');
  33. util.request(api.getStateInfo, {
  34. workerNo:userInfo.workerNo
  35. }, 'GET').then(res=> {
  36. if (res.errno === 0) {
  37. this.setData({
  38. NewFarmerStatus:res.data.NewFarmerStatus,
  39. // backInvestigateState:res.data.backInvestigateState,
  40. // faceCheckState:res.data.faceCheckState,
  41. healthState:res.data.healthState,
  42. signContractState:res.data.signContractState,
  43. onlineInvestigateState:res.data.onlineInvestigateState
  44. });
  45. }
  46. }).catch(err=>{
  47. });
  48. },
  49. getPerfect(){
  50. wx.navigateTo({
  51. url: '/pages/servant/perfect/perfectWorkerInfo'
  52. })
  53. },
  54. goDetail(){
  55. wx.navigateTo({
  56. url: '/pages/upgrade/xnbInfo/xnbInfo',
  57. });
  58. },
  59. goHealth(){
  60. wx.navigateTo({
  61. url: '/pages/upgrade/addHealth/addHealth',
  62. });
  63. },
  64. goXnb(){
  65. // if(this.data.status=='生效中'||this.data.status=='审核中'){
  66. // wx.navigateTo({
  67. // url: '/pages/upgrade/editXnb/editXnb',
  68. // });
  69. // }else{
  70. // wx.navigateTo({
  71. // url: '/pages/upgrade/addXnb/addXnb',
  72. // });
  73. // }
  74. wx.navigateTo({
  75. url: '/pages/upgrade/editXnb/editXnb',
  76. });
  77. },
  78. goSign(){
  79. wx.navigateTo({
  80. url: '/pages/upgrade/signInfo/signInfo',
  81. });
  82. },
  83. goFacecheck(){
  84. app.globalData.isFirstFace=false;
  85. wx.navigateTo({
  86. url: '/pages/upgrade/facecheckInfo/facecheckInfo',
  87. });
  88. },
  89. goEntryAuth(){
  90. wx.navigateTo({
  91. url: '/pages/upgrade/entryAuth/entryAuth',
  92. });
  93. },
  94. goVestigation(){
  95. wx.navigateTo({
  96. url: '/pages/upgrade/investigationInfo/investigationInfo',
  97. });
  98. },
  99. onReachBottom() {
  100. },
  101. /**
  102. * 生命周期函数--监听页面初次渲染完成
  103. */
  104. onReady: function () {
  105. },
  106. /**
  107. * 生命周期函数--监听页面显示
  108. */
  109. onShow: function () {
  110. // this.getStatus();
  111. this.getStateInfo();
  112. },
  113. onHide: function () {
  114. },
  115. onUnload: function () {
  116. },
  117. /**
  118. * 页面相关事件处理函数--监听用户下拉动作
  119. */
  120. onPullDownRefresh: function () {
  121. },
  122. /**
  123. * 页面上拉触底事件的处理函数
  124. */
  125. onReachBottom: function () {
  126. },
  127. /**
  128. * 用户点击右上角分享
  129. */
  130. onShareAppMessage: function () {
  131. },
  132. })