JVS low code: how to trigger logic and obtain external API data, access Baidu weather query

Friends who know JVS low-code should know that it can realize data warehousing through API, but you may not know how to operate it specifically, so today I will focus on introducing the specific implementation process.

Let's take querying Baidu's weather query interface and inserting the corresponding data into the system data model as an example.

Let's take a look at the effect of the final configuration:

Next, let's look at how to configure it.

Step 1, configure the list page

Configure the list page for online query of Baidu weather, as shown in the figure below, create the list page fields that need to be displayed

Then enter the button configuration interface to set the button, as shown in the figure below:

①: Click to enter the button configuration interface, where you can increase or decrease the configuration of buttons.

②: Click the Add button, and the system will automatically create a row of buttons

③: Customize the button name, you can name it according to the specific button function

④: The button position can be selected from the top button (table-level button) or in-row (row-level button). The top button generally operates on the table, such as adding new data, batch operations, etc., and the row-level button operates on the data in the row, such as Modify and delete

⑤: Set the trigger function of the button, here it is set to trigger the form, which means that clicking this button will pop up a form

⑥: Click Design to enter the function design corresponding to the trigger, here you will enter the form designer

Step 2, configure the form

Enter the form configuration interface, as shown in the figure below

①: Drag 4 single-line text components into the form canvas

②: Bind the data model fields of the 4 components respectively

③: Set the administrative area code as a query pop-up window, associate the relevant administrative area coding model, and return the administrative area code

④: Set the code of the administrative area, and dynamically display the city, city, and province through data linkage

⑤: Enter the button setting interface

Enter the form button setting interface as shown in the figure:

①: Create a custom button

②: Set the name of the button to "Save"

③: Click Configuration to enter the logic configuration interface, which means that this logic is triggered when the Save button is clicked.

Step 3: Set the logic triggered by the save button and obtain external API data through the logic

Enter the logic configuration interface of the save button, as shown in the following figure:

①: Enter the logic design interface

②: Drag the network request component into the canvas and set the properties of the network request

③: Analyze the data returned by the network request

④: Secondary analysis of the results of the previous node

⑤: Insert the analysis result into the data model

⑥: Click Save to complete the logic configuration

And you can debug on the interface, as shown in the figure below:

①: When you click Execute, you can simulate execution

②: After execution, the execution results of each link can be displayed on the interface.

③: When the mouse hovers over the sign of the execution result, you can preview the process data of this link

④: You can view the results of historical execution

Online demo: https://frame.bctools.cn/

Open source address of JVS basic framework: https://gitee.com/software-minister/jvs

Review of past dry goods

A collection of low-code, logic, rules, data analysis, and collaborative tools to solve the different needs of enterprises

Low-code core tools, the background and core role of jvs-logic logic engine

Important tools for low-code development: JVS low-code 2.1.8 new version feature list

Guess you like

Origin blog.csdn.net/jonyleek/article/details/132404868