Housekeeping service applet practical development tutorial 016-information function development

In addition to providing business functions in the Mini Program, we usually also provide professional knowledge sharing. Knowledge is to improve daily life, and on the other hand, it can also show that you are more professional in your industry.

The information function is divided into two parts, one part is the list function, and the other part is the detail function. According to our low-code development steps, we need to build data sources first, then build components, and finally link pages.

01 Build a data source

Log in to the console of Weizhu, click on the data model, click on the new data model

insert image description here
Enter the name, and the system will automatically generate the logo.
insert image description here
Click Edit to enter the edit view
insert image description here
. Click Add Field. We first need to add a title
insert image description here
and then add a text content field. Select the type of rich text
insert image description here
data source. After the data source is built, go back to the data model list and click Information More, click Manage Data
insert image description here
Click the New button to enter a few test data
insert image description here

02 List function development

With the data source in place, we can start developing the functionality. The rendering of functions depends on the page, and the page needs to be created first. Click the + sign next to the page component area and enter the name of the page.
insert image description here
insert image description here
To develop the list page, we can directly use the data list component. After adding the component, select the data source we just created
insert image description here
to bring the text content into the list by default. We need to change it to create Time, select this component, and bind the content to the creation time
insert image description here

03 Details page development

After the list page is developed, we need to develop the function of the details page. Similarly, click the + sign in the page component area to create a details page. The data details component needs to be
insert image description here
added to the details page. The data model selects the data source we created and
insert image description here
we only need to display it Header and body, delete unnecessary components first. Select the text component, bind the text content as the title
insert image description here
Add a rich text display component, bind the content as the body content
insert image description here
Select the page, we need to add a URL parameter
insert image description here
insert image description here
Select the data details and set a filter condition, so that our data ID is equal to our id
insert image description here
Back to the list page, we define a click event for the list, jump to the details page,
insert image description here
and the function is ready

Summarize

In this article, we explained the list information of a common function and the design of the details page. It is more convenient to use low-code development. If it is a simple scene, it will take a few minutes to configure and not involve development.

Guess you like

Origin blog.csdn.net/u012877217/article/details/129361725