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

Haproxy+kept build 01

Kunlunbase meetup is waiting for you!

Oracle insert single quotation mark
![[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December](/img/51/81ceaf8746ec7455ea8abf9f038e81.jpg)
[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December

unity2019_ Input management

C language - Introduction - essence Edition - take you into programming (I)

A tunnel to all ports of the server

数据的存储

Thymeleaf 404 reports an error: there was unexpected error (type=not found, status=404)

Multi traveling salesman problem -- overview of formula and solution process
随机推荐
Unity change default editor
unity2019_ Input management
Conversion between JSON and object
About the problem that the editor and the white screen of the login interface cannot be found after the location of unityhub is changed
MySQL containerization (1) docker installation MySQL
Zohocrm deluge function application time verification
Lua hot update basic grammar
数据的存储
php-fpm软件的安装+openresty高速缓存搭建
Use filechannel to copy files
[set theory] order relation (hastu example | divisive relation hastu | inclusive relation hastu | refinement relation hastu)
[usaco12mar]cows in a skyscraper g (state compression DP)
Ilruntime learning - start from scratch
Unity4.3.1 engine source code compilation process
Delete the last character of the string in golang
Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products
Unity2019_ Natural ambient light_ Sky box
Osgearth starry background
Golang time format sorting
Three characteristics