Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iot_test
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wubi
iot_test
Commits
b3d77a6d
Commit
b3d77a6d
authored
May 16, 2025
by
wubi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成和平台接口对接
parent
d669b2c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
red.min.js
...ode_modules/@node-red/editor-client/public/red/red.min.js
+12
-7
No files found.
node-red/packages/node_modules/@node-red/editor-client/public/red/red.min.js
View file @
b3d77a6d
...
...
@@ -105,7 +105,7 @@ jQuery.propHooks.disabled = {
* limitations under the License.
**/
const HOST_IP = "http://192.168.0.
82
:8082";
const HOST_IP = "http://192.168.0.
168
:8082";
var RED = (function() {
...
...
@@ -430,11 +430,13 @@ var RED = (function() {
}
function loadFlows(done) {
async function loadFlows(done) {
loader.reportProgress(RED._("event.loadFlows"),80 )
let load_url = "flows";
let request_type = "GET";
const flowId = getId();
if(flowId!=null){
//load_url = `http://192.168.0.113:1909/getflows?id=${getId()}`
load_url = `${HOST_IP}/admin/wlp/testTemplate/findTemplateType`
...
...
@@ -443,9 +445,11 @@ var RED = (function() {
loadFlowsDeploy(done)
return;
}
let token = await window.iotAPI.getToken();
console.log("getToken:",token);
$.ajax({
headers: {
'Authorization':
sessionStorage.getItem("token")
,
'Authorization':
token
,
"Content-Type":"application/json",
},
type: request_type,
...
...
@@ -75556,14 +75560,15 @@ const getId=()=>{
return flowId
}
const saveNode=()=>
{
console.log("save")
async function saveNode()
{
console.log("save")
;
const nns = RED.nodes.createCompleteNodeSet();
const data = { id:nns[0].id,label:nns[0].label,flows: nns };
//先查询是否存在
let token = await window.iotAPI.getToken();
$.ajax({
headers: {
'Authorization':
sessionStorage.getItem("token")
,
'Authorization':
token
,
"Content-Type":"application/json",
},
type: "POST",
...
...
@@ -75610,7 +75615,7 @@ const saveNode=()=>{
url: update_url,
type: "POST",
headers:{
'Authorization':
sessionStorage.getItem("token")
'Authorization':
token
},
dataType:"text",
data: JSON.stringify(update_obj),
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment