import {
  areaInfo,
} from '../../../utils/api/api'
import {
  getWaterDrop
} from '../../../utils/index/index'
const app = getApp()

Page({
  data: {
    url: 'https://tx.hz-hanghui.com:8088/yx-fyzd/api/v1/fkj/area/info',
    list: [{
        name: '派出所',
        value: 'policeStationName'
      },
      {
        name: '派出所代码',
        value: 'policeStationCode'
      },
      {
        name: '联系人',
        value: 'name'
      },
      // {
      //   name: '联系电话',
      //   value: 'phone'
      // },
      {
        name: '使用单位',
        value: 'username'
      },
      {
        name: '使用场景',
        value: 'tagName'
      },
      {
        name: '门朝向',
        value: 'uuuuu'
      },
    ],
    form: {},
  },
  onLoad() {
    my.hideBackHome();
    this.getForm()
  },
  clickAudio(){
    getWaterDrop()
  },
  // 赋值
  async getForm(e) {
    my.showLoading()
    try {
      let dto = {
        sn: app.globalData.sn,
      }
      let res = await areaInfo(dto)
      this.setData({
        form: res.data
      })
    } catch (error) {} finally {
      my.hideLoading()
    }
  },
  sure() {},
});