facereconize.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. const Parser = require("../xml/xmldom/dom-parser");
  2. var app = getApp();
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. imgUrl:app.imgUrl
  9. },
  10. /**
  11. * 生命周期函数--监听页面初次渲染完成
  12. */
  13. onReady: function () {},
  14. /**
  15. * 生命周期函数--监听页面显示
  16. */
  17. onShow: function () {
  18. var method = "Insertfdc_pm_meter";
  19. var wsdlurl = app.webUrl;
  20. var targetNamespace = "http://tempuri.org/";
  21. var datacory =
  22. '<?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>';
  23. // wx.request({
  24. // url: wsdlurl,
  25. // data: datacory,
  26. // method: 'POST',
  27. // header: {
  28. // 'Content-Type':'text/xml; charset=utf-8',
  29. // 'SOAPAction':targetNamespace+method,
  30. // },
  31. // success:function(res){
  32. // console.log(res.data);
  33. // }
  34. // })
  35. },
  36. /**
  37. * 生命周期函数--监听页面隐藏
  38. */
  39. onHide: function () {},
  40. /**
  41. * 生命周期函数--监听页面卸载
  42. */
  43. onUnload: function () {},
  44. });