sldjxxcx.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. // pages/minePages/sldjxxcx/sldjxxcx.js
  2. import {
  3. xcxGetCompanyList,
  4. } from "../../../apis/index"
  5. import {
  6. enterpriseInformationQuery,
  7. } from "../../../apis/smzc"
  8. Page({
  9. /**
  10. * 页面的初始数据
  11. */
  12. data: {
  13. enterpriceTypeShow: false,
  14. enterPriceList: [],
  15. enterPrice: {},
  16. resultInfos: {}
  17. },
  18. /**
  19. * 生命周期函数--监听页面加载
  20. */
  21. onLoad(options) {
  22. },
  23. selectEnterprice() {
  24. let that = this
  25. wx.showLoading({
  26. title: '正在获取企业信息',
  27. })
  28. that.setData({
  29. enterpriceTypeShow: true
  30. })
  31. xcxGetCompanyList({
  32. xm: wx.getStorageSync('USERINFO').name,
  33. sfzjhm: wx.getStorageSync('USERINFO').idcard
  34. }).then(res => {
  35. wx.hideLoading()
  36. if (res.code == 200) {
  37. that.setData({
  38. enterPriceList: res.list
  39. })
  40. } else {
  41. wx.showToast({
  42. title: res.msg || res.message,
  43. icon: "none",
  44. duration: 5000
  45. })
  46. }
  47. })
  48. },
  49. selectedEnterprice(e) {
  50. let that = this
  51. let item = e.currentTarget.dataset.item
  52. that.setData({
  53. enterpriceTypeShow: false,
  54. enterPrice: item
  55. })
  56. that.cx()
  57. },
  58. close() {
  59. let that = this
  60. that.setData({
  61. enterpriceTypeShow: false
  62. })
  63. },
  64. cx() {
  65. let that = this
  66. wx.showLoading({
  67. title: '正在查询...',
  68. })
  69. let form = {
  70. djxh: that.data.enterPrice.djxh,
  71. nsrsbh: that.data.enterPrice.nsrsbh,
  72. headVo: {
  73. jqbh: null,
  74. sjjg: "16109970500",
  75. sjry: "96109970015",
  76. }
  77. }
  78. enterpriseInformationQuery(form).then(res => {
  79. wx.hideLoading()
  80. if (res.code == 200) {
  81. that.setData({
  82. resultInfos: res.data.nsrxxGridlb[0]
  83. })
  84. } else {
  85. wx.showToast({
  86. title: res.msg || res.message,
  87. icon: "none",
  88. duration: 3000
  89. })
  90. }
  91. })
  92. },
  93. /**
  94. * 生命周期函数--监听页面初次渲染完成
  95. */
  96. onReady() {
  97. },
  98. /**
  99. * 生命周期函数--监听页面显示
  100. */
  101. onShow() {
  102. },
  103. /**
  104. * 生命周期函数--监听页面隐藏
  105. */
  106. onHide() {
  107. },
  108. /**
  109. * 生命周期函数--监听页面卸载
  110. */
  111. onUnload() {
  112. },
  113. /**
  114. * 页面相关事件处理函数--监听用户下拉动作
  115. */
  116. onPullDownRefresh() {
  117. },
  118. /**
  119. * 页面上拉触底事件的处理函数
  120. */
  121. onReachBottom() {
  122. },
  123. /**
  124. * 用户点击右上角分享
  125. */
  126. onShareAppMessage() {
  127. }
  128. })