[
{
"id": "b0148394198baf9a",
"type": "inject",
"z": "86c2461ad0402ae4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "10800",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 100,
"y": 80,
"wires": [
[
"0f2e8176b64f0862",
"331066fefd5f2ae2"
]
]
},
{
"id": "0f2e8176b64f0862",
"type": "function",
"z": "86c2461ad0402ae4",
"name": "组装参数",
"func": "msg['nickName']="-";\nmsg['acceptKey'] = "";\nmsg['unionid'] = "-";\nmsg["userno"] = "";\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 260,
"y": 80,
"wires": [
[
"6e95fe0ffa7ca71d"
]
]
},
{
"id": "926774b5cb3fc605",
"type": "http request",
"z": "86c2461ad0402ae4",
"name": "广州燃气获取Token",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://wxxcx.gzgas.com/ydeq/min/login/getToken.action",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 790,
"y": 80,
"wires": [
[
"9e7c65682a440c1c"
]
]
},
{
"id": "c0331f6ba4e5bf00",
"type": "function",
"z": "86c2461ad0402ae4",
"name": "组装token参数",
"func": "msg.payload={\n\t"nickName": flow.get("nickName"),\n\t"acceptKey": flow.get("acceptKey")\n};\nmsg.headers={\n\t"Host": "wxxcx.gzgas.com",\n\t"xweb_xhr": "1",\n\t"unionid": flow.get("unionid"),\n\t"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/6.8.0(0x16080000) NetType/WIFI MiniProgramEnv/Mac MacWechat/WMPF MacWechat/3.8.4(0x13080410)XWEB/31009",\n\t"Accept": "*/*",\n\t"Sec-Fetch-Site": "cross-site",\n\t"Sec-Fetch-Mode": "cors",\n\t"Sec-Fetch-Dest": "empty",\n\t"Referer": "https://servicewechat.com/wx6a4fd0ebb4a12c11/247/page-frame.html",\n\t"Accept-Language": "zh-CN,zh;q=0.9",\n\t"Content-Type": "application/x-www-form-urlencoded"\n};\nnode.log("info"+JSON.stringify(msg.payload));\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 80,
"wires": [
[
"926774b5cb3fc605"
]
]
},
{
"id": "6e95fe0ffa7ca71d",
"type": "function",
"z": "86c2461ad0402ae4",
"name": "初始化数据",
"func": "function getVal(key,msg){\n \n if(msg[key] !=null ){\n return msg[key];\n \n }\n if(env.get(key)!=null ){\n return env.get(key);\n }\n}\nfunction initParm(key,msg){\n\n flow.set(key,getVal(key,msg));\n\n}\ninitParm('nickName',msg);\ninitParm('acceptKey',msg);\ninitParm('unionid',msg);\ninitParm('userno',msg);\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 80,
"wires": [
[
"c0331f6ba4e5bf00"
]
]
},
{
"id": "331066fefd5f2ae2",
"type": "link out",
"z": "86c2461ad0402ae4",
"name": "link out 9",
"mode": "link",
"links": [
"f2f02aafe9b4dada"
],
"x": 205,
"y": 60,
"wires": []
}
]