const Parser = require('../xml/xmldom/dom-parser')
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    bodyTable:[
      {"id":1,"text":"公司介绍","img":"file.png"},
      {"id":2,"text":"社区信息","img":"1590388079(1).png"},
      {"id":3,"text":"联系我们","img":"tel.png"},
      {"id":4,"text":"招聘信息","img":"1590388154(1).png"},
    ],
    footerTable:[
      {"title":"拎包入住","text":"便捷置家","img":"1590389272(1).png"},
      {"title":"大众旅游","text":"限时优惠","img":"1590389286(1).png"}
    ]
},

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    var method='Insertfdc_pm_meter';
    var wsdlurl=app.webUrl;
    var targetNamespace='http://tempuri.org/';
    var datacory= '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header><MySoapHeader xmlns="http://tempuri.org/"><UserName>admin</UserName><PassWord>admin123</PassWord></MySoapHeader></soap:Header><soap:Body><Insertfdc_pm_meter xmlns="http://tempuri.org/"><Userid>1110</Userid><hcode>1000103#-B3SHJ</hcode><pk_meterid>1000103#-18016668</pk_meterid><ncur>4000.00</ncur><bdate>2020/05/29</bdate><edate>2020/2/18 0:00:00</edate></Insertfdc_pm_meter></soap:Body></soap:Envelope>';
    // wx.request({
    //   url: wsdlurl,
    //   data: datacory, 
    //   method: 'POST', 
    //   header: { 
    //     'Content-Type':'text/xml; charset=utf-8',
    //     'SOAPAction':targetNamespace+method,
    //   }, 
    //   success:function(res){
    //  console.log(res.data);
    //   }
    // })
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  jingQiQiDaiURL: function (e) {
    var index=e.currentTarget.dataset.index;
    console.info('jingQiQiDaiURL',index);
    if(index==0){
      wx.navigateTo({
        url: '../index/tointro',
      })
    }
    else if(index==1){
      wx.navigateTo({
        url: '/pages/index/index',
      })
    }
    else if(index==2){
      wx.navigateTo({
        url: '../index/facereconize',
      })
    }
    else if(index==3){
      wx.navigateTo({
        url: '../index/job',
      })
    }
   
  },
})