当前位置:网站首页>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
边栏推荐
猜你喜欢

Minimap plug-in

Abstract classes and interfaces

ArrayList

Haproxy+kept build 01

A tunnel to all ports of the server
![[cloud native] introduction and use of feign of microservices](/img/39/05cf7673155954c90e75a8a2eecd96.jpg)
[cloud native] introduction and use of feign of microservices

C语言-入门-精华版-带你走进编程(一)

Zohocrm deluge function application time verification

十六进制编码简介

C course design employee information management system
随机推荐
Map的实现类的顺序性
Golang time format sorting
[set theory] order relation (the relation between elements of partial order set | comparable | strictly less than | covering | Haas diagram)
Storage of data
Lua framwrok framework starts
Haproxy+kept build 01
数据库应用技术课程设计之商城管理系统
Pulitzer Prize in the field of information graphics - malofiej Award
Oracle insert single quotation mark
[set theory] order relation (hastu example | divisive relation hastu | inclusive relation hastu | refinement relation hastu)
Delete the last character of the string in golang
Three characteristics
Jupyter remote server configuration and server startup
Ue5 opencv plug-in use
Youyou1 of xlua knapsack system
One dimensional array two dimensional array (sort Max insert sort)
Multi traveling salesman problem -- overview of formula and solution process
【音视频】ijkplayer错误码
the installer has encountered an unexpected error installing this package
Golang 时间格式整理