companyInfo.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. const app = getApp();
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. companyInfo:{
  8. address:'',
  9. createTime:'',
  10. id:'',
  11. managerEmail:'',
  12. managerId:'',
  13. managerName:'',
  14. managerPhone:'',
  15. name:'',
  16. }
  17. },
  18. /**
  19. * 生命周期函数--监听页面加载
  20. */
  21. onLoad: function (options) {
  22. this.getCompanyInfo();
  23. },
  24. getCompanyInfo(){
  25. var that = this;
  26. app.requestP({
  27. url:'/company/companyInfo',
  28. method:'post',
  29. contentType:' application/json',
  30. }).then(res=>{
  31. that.setData({
  32. companyInfo:res.data.data
  33. })
  34. }).catch(err=>{
  35. app.showToptip(that,'error',err.data.msg);
  36. })
  37. },
  38. editComPanyInfo(){
  39. var that = this;
  40. const companyInfoJson = JSON.stringify(that.data.companyInfo)
  41. wx.navigateTo({
  42. url: '/pages/userAuth/adminInfo?info='+companyInfoJson,
  43. })
  44. },
  45. /**
  46. * 生命周期函数--监听页面初次渲染完成
  47. */
  48. onReady: function () {
  49. },
  50. /**
  51. * 生命周期函数--监听页面显示
  52. */
  53. onShow: function () {
  54. },
  55. /**
  56. * 生命周期函数--监听页面隐藏
  57. */
  58. onHide: function () {
  59. },
  60. /**
  61. * 生命周期函数--监听页面卸载
  62. */
  63. onUnload: function () {
  64. },
  65. /**
  66. * 页面相关事件处理函数--监听用户下拉动作
  67. */
  68. onPullDownRefresh: function () {
  69. },
  70. /**
  71. * 页面上拉触底事件的处理函数
  72. */
  73. onReachBottom: function () {
  74. },
  75. /**
  76. * 用户点击右上角分享
  77. */
  78. onShareAppMessage: function () {
  79. }
  80. })