completeInfo.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. signKeepSecretState:'', //保密协议
  14. ofJz:293,//不是293鲸致,隐藏新农保
  15. },
  16. /**
  17. * 生命周期函数--监听页面加载
  18. */
  19.   onLoad: function (options) {
  20.     //  this.getStatus();
  21.     let userInfo= wx.getStorageSync('userInfo');
  22.     console.log(userInfo);
  23.     if(userInfo&&userInfo!=null){
  24.       this.setData({
  25.         ofJz: userInfo.ofJz
  26.       })
  27.     }
  28. },
  29. getStatus(){
  30. util.request(api.getNewFarmerStatus, {
  31. }, 'GET').then(res=> {
  32. if (res.errno === 0) {
  33. this.setData({
  34. status:res.data.status
  35. });
  36. }
  37. }).catch(err=>{
  38. });
  39. },
  40. getStateInfo(){
  41. let userInfo = wx.getStorageSync('userInfo');
  42. util.request(api.getStateInfo, {
  43. workerNo:userInfo.workerNo
  44. }, 'GET').then(res=> {
  45. if (res.errno === 0) {
  46. this.setData({
  47. NewFarmerStatus:res.data.NewFarmerStatus,
  48. // backInvestigateState:res.data.backInvestigateState,
  49. // faceCheckState:res.data.faceCheckState,
  50. healthState:res.data.healthState,
  51. signContractState:res.data.signContractState,
  52. onlineInvestigateState:res.data.onlineInvestigateState,
  53. signKeepSecretState:res.data.signKeepSecretState
  54. });
  55. }
  56. }).catch(err=>{
  57. });
  58. },
  59. getPerfect(){
  60. wx.navigateTo({
  61. url: '/pages/servant/perfect/perfectWorkerInfo'
  62. })
  63. },
  64. goDetail(){
  65. wx.navigateTo({
  66. url: '/pages/upgrade/xnbInfo/xnbInfo',
  67. });
  68. },
  69. goHealth(){
  70. wx.navigateTo({
  71. url: '/pages/upgrade/addHealth/addHealth',
  72. });
  73. },
  74. goXnb(){
  75. // if(this.data.status=='生效中'||this.data.status=='审核中'){
  76. // wx.navigateTo({
  77. // url: '/pages/upgrade/editXnb/editXnb',
  78. // });
  79. // }else{
  80. // wx.navigateTo({
  81. // url: '/pages/upgrade/addXnb/addXnb',
  82. // });
  83. // }
  84. wx.navigateTo({
  85. url: '/pages/upgrade/editXnb/editXnb',
  86. });
  87. },
  88. goSign(){
  89. wx.navigateTo({
  90. url: '/pages/upgrade/signInfo/signInfo',
  91. });
  92. },
  93. goFacecheck(){
  94. app.globalData.isFirstFace=false;
  95. wx.navigateTo({
  96. url: '/pages/upgrade/facecheckInfo/facecheckInfo',
  97. });
  98. },
  99. goEntryAuth(){
  100. wx.navigateTo({
  101. url: '/pages/upgrade/entryAuth/entryAuth',
  102. });
  103. },
  104. goVestigation(){
  105. wx.navigateTo({
  106. url: '/pages/upgrade/investigationInfo/investigationInfo',
  107. });
  108. },
  109. goSign2(){
  110. wx.navigateTo({
  111. url: '/pages/upgrade/baomiSignInfo/baomiSignInfo',
  112. });
  113. },
  114. onReachBottom() {
  115. },
  116. /**
  117. * 生命周期函数--监听页面初次渲染完成
  118. */
  119. onReady: function () {
  120. },
  121. /**
  122. * 生命周期函数--监听页面显示
  123. */
  124. onShow: function () {
  125. // this.getStatus();
  126. this.getStateInfo();
  127. },
  128. onHide: function () {
  129. },
  130. onUnload: function () {
  131. },
  132. /**
  133. * 页面相关事件处理函数--监听用户下拉动作
  134. */
  135. onPullDownRefresh: function () {
  136. },
  137. /**
  138. * 页面上拉触底事件的处理函数
  139. */
  140. onReachBottom: function () {
  141. },
  142. /**
  143. * 用户点击右上角分享
  144. */
  145. onShareAppMessage: function () {
  146. },
  147. })