当前位置:网站首页>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
边栏推荐
- Xlua task list youyou
- Redis data structure
- Unity4.3.1 engine source code compilation process
- Simply start with the essence and principle of SOM neural network
- Editor Extensions
- Advanced OSG collision detection
- Dealing with duplicate data in Excel with xlwings
- Golang 中string和int类型相互转换
- Youyou1 of xlua knapsack system
- ArrayList
猜你喜欢

Haproxy+kept build 01

Some understandings of 3dfiles

Xlua task list youyou

matlab神經網絡所有傳遞函數(激活函數)公式詳解

Kwai 20200412 recruitment
![P1596 [USACO10OCT]Lake Counting S](/img/a7/07a84c93ee476788d9443c0add808b.png)
P1596 [USACO10OCT]Lake Counting S

Basic operation and process control

图像处理8-CNN图像分类
![[global product discovery 2] the first pure cloud augmented reality (AR) platform - Israel](/img/51/04f5a9dbd03438fbdf25545a81b7ba.jpg)
[global product discovery 2] the first pure cloud augmented reality (AR) platform - Israel

Unity change default editor
随机推荐
About the problem that the editor and the white screen of the login interface cannot be found after the location of unityhub is changed
Explain sizeof, strlen, pointer, array and other combination questions in detail
JSON与Object之间转换
Installation of PHP FPM software +openresty cache construction
Go resolve ID card
796 · unlock
Pulitzer Prize in the field of information graphics - malofiej Award
C course design employee information management system
【K&R】中文第二版 个人题解 Chapter1
Multi traveling salesman problem -- overview of formula and solution process
Mysql容器化(1)Docker安装MySQL
C language - Introduction - essence Edition - take you into programming (I)
Huawei interview summary during the epidemic
Simply start with the essence and principle of SOM neural network
Conversion between string and int types in golang
String class
Storage of data
Oracle insert single quotation mark
Chocolate installation
C#课程设计之员工信息管理系统