job.js 1.5 KB

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