12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- const Parser = require("../xml/xmldom/dom-parser");
- var app = getApp();
- Page({
- /**
- * 页面的初始数据
- */
- data: {},
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- 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 () {},
- });
|