In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of WeChat Mini Programs how to configure the form and content of the file, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how WeChat Mini Programs configures the form and content of the file. Let's take a look.
Form
From the extension json of the configuration file, we can know that the format of the configuration file is JSON (JavaScriptObjectNotation,JavaScrit object representation), which can be simply understood as: it is a data format to solve the problem that XML is too tedious and tedious.
JSON can express three types of values: simple values, objects, and arrays.
Simple value
It's simple data, such as: 5, "Hello world!" Wait books do not represent numeric values and strings. Where the string accepts only double quotation marks.
Object
Take a person as an example to illustrate the form of expression of the object.
{
"name": "Xiao Chen"
"age": 20
}
The outermost layer is the curly braces and the inside is the enumeration of attributes. The representation of an attribute is "attribute name": attribute value. Note that the attribute name must be enclosed in double quotation marks.
Of course, the property value itself can also be an object, such as the "weight" property in the following example.
{
"name": "Xiao Chen"
"age": 20
"weight": {
"unit": "kg"
"value": 70
}
}
Array
An array is a collection of values in the form of
[
Element 1
Element 2
. . .
]
The element can be a simple value, an object, or another array.
Content
Two configuration files appear in HelloWorld, and we look at them one by one.
Configuration files for all Mini Program
{
"pages": [
"pages/index/index"
"pages/logs/logs"
]
"window": {
"backgroundTextStyle": "light"
"navigationBarBackgroundColor": "# fff"
"navigationBarTitleText": "WeChat"
"navigationBarTextStyle": "black"
}
}
All files are one object, and it has two properties: "pages" and "window".
Where the attribute value of "pages" is an array pointing to directories index and logs, respectively.
The property value of "window" is an object, specifying "backgroundTextStyle", "navigationBarBackgroundColor", "navigationBarTitleText" and "navigationBarTextStyle" respectively.
Configuration file for the log pa
{
"navigationBarTitleText": "View startup log"
}
Quite simply, it is an object that specifies the "navigationBarTitleText" property.
This is the end of the article on "how WeChat Mini Programs configures the form and content of the file". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how WeChat Mini Programs configures the form and content of the document". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.