当前位置:网站首页>Notes on understanding applets 2022/7/3
Notes on understanding applets 2022/7/3
2022-07-03 08:24:00 【igloo 】
Understand the basic structure of the applet project
problem :
- What constitutes the page of a small program ?
- project.config.json What is the function of documents ?
- sitemap.json What is the function of documents ?
- pages: be-all ** Applet page ,** Each page is marked with Separate folders exist
- index:index Page folder , The folder contains 4 individual Basic page file , this Four documents together index page
- index.js:
.jsfile – Script file of the page , Store the data of the page 、 Event handler 、 Life cycle, etc - index.json:
.jsonfile – The configuration file of the current page , The appearance of the page 、 Performance, etc. - index.wxml:
.wxmlfile – The template structure file of the page - index.wxss:
.wxssfile – The style sheet file of the current page
- index.js:
- logs
- …
- index:index Page folder , The folder contains 4 individual Basic page file , this Four documents together index page
- utils: Tools folder
- utils.js
- app.js: Applet project Logical file , be used for Register applet instance , Bind lifecycle callback function 、 Error listening and page does not exist listening function etc. .(https://www.cnblogs.com/e0yu/p/8488133.html)
- app.json: Applet public configuration file , Determine the path of the page file 、 Window representation 、 Set network timeout 、 More settings tab etc. .
- app.wxss: Applet public style sheet
- project.config.json: It's a project configuration file , Used to record our personalized configuration of applet development tools
settingIt's preserved inCompile related configurationprojectnameWhat is preserved in isProject nameappidWhat is preserved in isThe account number of the applet ID
- sitemap.json: Configure whether the applet and its page can be indexed by wechat
- rules The configuration of the index rule list is saved in
- rules In the rules ,action Indicates whether the page can be indexed (allow,disallow),page Indicates the effective page
answer :
- What constitutes the page of a small program ?
- The page of the applet is created by 4 Files make up
- also this 4 File Should be put into pages Under folder In the same folder
- project.config.json What is the function of documents ?
- Project profile , Used to record our personalized configuration of applet development tools
- sitemap.json What is the function of documents ?
- Configure whether the applet and its page can be indexed by wechat
wxml VS html
problem :
- Can I
wxmlIn file , write indivlabel ? And say why !
What is?
WXMLWXML(WeiXin Markup Language) Is the framework design of a set of tag language ( Components ), The structure used to build applet pages , Its function is similar to that in web page developmentHTMLWXMLandHTMLThe difference betweenDifferent label names
- HTML(div, span, img, a)
- WXML(view, text, image, navigator)
Attribute nodes are different
- <a href=“#”> Hyperlinks </a>
- <navigator url=“/pages/home/home”> Jump to home page </navigator>
Provides template syntax for dynamically rendering data
Data binding
Conditions apply colours to a drawing
The list of rendering
answer :
- Can I
wxmlIn file , write indivlabel ? And say why !
- Can write
divlabel , however Don't Use .divThe tag will be parsed asclass viewLabel effectwxmlYou need to write Components provided by applet , If the written is Non applet components , It will be parsed asclass viewLabel effect
wxss VS css
problem
wxssWhat size units have been added ?wxssWhat selectors are recommended in ?
- What is?
WXSS- WXSS
(WeiXin Style Sheets) It's a style language , Used to describeWXML` Component style - Similar to... In web development
CSS WXSShaveCSSMost of the features
- WXSS
- Added dimension units – rpx, One
rpxIs the width of the page1 / 750 - Provides global and local styles .
- Global style : Write to Root directory
wxssStyle in - Local style : Write to ** Page
wxss** Style in
- Global style : Write to Root directory
- Besides
WXSSOnly partialCSSSelectors.class( Recommended ) and#idelement- Union selector and descendant selector
::afterand::beforeSuch as pseudo class selector
answer :
wxssWhat size units have been added ?
rpxUnit of measure , OnerpxIs the width of the page1 / 750wxssWhat selectors are recommended in ?
.classClass selectors
.json The configuration file
problem :
- In the applet .json What are the two main types of documents ?
- When the two configuration files have the same configuration , What will happen ?
Small program , There is an extra .json Configuration file for ,.json The document is mainly divided into two :
- In the root directory of the project .json file
- Modify the basic configuration of the project
- home page
- navigationBarBackgroundColor
- Modify the basic configuration of the project
- On the page .json file
- Modify the basic configuration of the page ( High priority )
- navigationBarBackgroundColor
- Modify the basic configuration of the page ( High priority )
answer :
- In the applet .json What are the two main types of documents ?
- In the root directory of the project .json file
- On the page .json file
- When the two configuration files have the same configuration , What will happen ?
- With Page .json file Mainly
The concept of host and the hosting environment of applet
problem :
- What is? Host environment ?
- Why can wechat applet project call Wechat payment function ?
- How to divide the running environment of small programs ?
- The host environment refers to The dependent environment necessary for program operation
- web The host environment of the front end is : browser
androidThe hosting environment of the software is :androidSystemIOSThe hosting environment of the software is :IOSSystem 1
- What is the hosting environment of the applet ?
- The hosting environment of the applet is : Mobile wechat
- therefore : Applet can call Mobile wechat Medium
- Sweep code
- payment
- Sign in
- Share
- And so on.
- therefore : Applet can call Mobile wechat Medium
- The hosting environment of the applet is : Mobile wechat
- Applet Running environment :

Divide into Render layer and Logic layer
- among
WXMLTemplates andWXSSStyle works in Render layer- Render layer Our interface uses
WebViewRendering - A small program exists Multiple interfaces , So render layers exist ** Multiple
WebView** Threads
- Render layer Our interface uses
- JS Script works in Logic layer .
- Logic layer use
JsCoreThread running JS Script
- Logic layer use
- among
this Communication between two threads Through Wechat client Make a transfer
- Logic layer send out Network request Also through
Native( Native system of mobile phone )forward
- Logic layer send out Network request Also through
answer :
- What is? Host environment ?
- The host environment refers to The dependent environment necessary for program operation
- Why can wechat applet project call Wechat payment function ?
- because Wechat applet The hosting environment of is Mobile wechat , and Mobile wechat It provides corresponding functions
- How to divide the running environment of small programs ?
- Divide into Render layer and Logic layer
Built in components of applet
Summary of this chapter
- Applet account & WeChat developer tools The concept of
- Basic page structure of applet project
- wxml The concept of
- wxss The concept of
- .json Role of profile
- The concept of hosting environment
- Some applet built-in components
边栏推荐
猜你喜欢

Student educational administration management system of C # curriculum design

【更新中】微信小程序学习笔记_3

Use of ue5 QRcode plug-in

Minimap plug-in

Storage of data

100 GIS practical application cases (78) - Multi compliance database design and data warehousing

Jupyter remote server configuration and server startup

Xlua task list youyou

Youyou1 of xlua knapsack system

Lua framwrok framework starts
随机推荐
Creation and content of mapnode -- osgearth rendering engine series (2)
Why can void * be a general pointer
Go resolve ID card
图像处理8-CNN图像分类
Sequence of map implementation classes
Maxcompute string splitting function -split_ PART
796 · unlock
P2704 [noi2001] artillery position (shape pressure DP)
matlab神经网络所有传递函数(激活函数)公式详解
Golang 时间格式整理
JSON与Object之间转换
C course design employee information management system
Mutual call between Lua and C #
Unity change default editor
Lua framwrok framework starts
Delete the last character of the string in golang
L'installateur a été installé avec une erreur inattendue
the installer has encountered an unexpected error installing this package
Compilation error: "not in executable format: file format not recognized"“
go 解析身份证