index.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import {
  2. areaInfo,
  3. } from '../../../utils/api/api'
  4. import {
  5. getWaterDrop
  6. } from '../../../utils/index/index'
  7. const app = getApp()
  8. Page({
  9. data: {
  10. url: 'https://tx.hz-hanghui.com:8088/yx-fyzd/api/v1/fkj/area/info',
  11. list: [{
  12. name: '派出所',
  13. value: 'policeStationName'
  14. },
  15. {
  16. name: '派出所代码',
  17. value: 'policeStationCode'
  18. },
  19. {
  20. name: '联系人',
  21. value: 'name'
  22. },
  23. // {
  24. // name: '联系电话',
  25. // value: 'phone'
  26. // },
  27. {
  28. name: '使用单位',
  29. value: 'username'
  30. },
  31. {
  32. name: '使用场景',
  33. value: 'tagName'
  34. },
  35. {
  36. name: '门朝向',
  37. value: 'uuuuu'
  38. },
  39. ],
  40. form: {},
  41. },
  42. onLoad() {
  43. my.hideBackHome();
  44. this.getForm()
  45. },
  46. clickAudio(){
  47. getWaterDrop()
  48. },
  49. // 赋值
  50. async getForm(e) {
  51. my.showLoading()
  52. try {
  53. let dto = {
  54. sn: app.globalData.sn,
  55. }
  56. let res = await areaInfo(dto)
  57. this.setData({
  58. form: res.data
  59. })
  60. } catch (error) {} finally {
  61. my.hideLoading()
  62. }
  63. },
  64. sure() {},
  65. });