当前位置:网站首页>Small program learning path 1 - getting to know small programs
Small program learning path 1 - getting to know small programs
2022-06-30 09:09:00 【Ancient dust left Taidao】
Registered account
1. Go first WeChat public platform Registered account
2. Download wechat developer tools
3. Open the wechat developer tool wechat scanning QR code to log in , Create a new item after login . I chose not to use cloud services , Cloud services are similar to providing you with servers for free , It's backstage . Then type in your appId.

Directory structure

A page , A folder , Just index Folder
- js The file deals with your logic
- wxml The file is similar to your html file
- wxcss The file is similar to your css file
- json Files are configuration files ( I haven't learned this yet )
Hello World
index.wxml Code
<!--index.wxml-->
<view class="container">
{
{ message }}
</view>
index.js Code
Page({
data: {
message: 'hello world1'
}
})
Such a Hello world It's coming out. 
List loop
index.js Code
Page({
data: {
books: ['java', 'python', 'javaScript']
}
})
index.wxml
<block wx:for="{
{books}}" wx:key="*this">
<view>{
{ item }}</view>
</block>
*this I mean this item term ,item It's every item in the array
result :

summary
Fortunately, I did vue, I feel confused when I start the applet directly .
- The list loop is also bound key Of .
- wx:for Namely vue Of v-for,*this Refer to item,item It's every item in the array
- block I understood as a vue Of template node , Because it does not generate additional nodes
边栏推荐
- icon资源
- CUDA realizes L2 European distance
- 启动jar包报错UnsupportedClassVersionError,如何修复
- [untitled]
- Opencv learning notes -day13 pixel value statistics calculation of maximum and minimum values, average values and standard deviations (use of minmaxloc() and meanstddev() functions)
- [shutter] solve failed assertion: line 5142 POS 12: '_ debugLocked‘: is not true.
- Talk about the job experience of kotlin cooperation process
- Opencv learning notes -day2 (implemented by the color space conversion function cvtcolar(), and imwrite image saving function imwrite())
- C#访问SQL Server数据库两种方式的比较(SqlDataReader vs SqlDataAdapter)
- Rew acoustic test (V): equipment required for test
猜你喜欢

快应用中实现自定义抽屉组件

Bottomsheetbehavior principle of realizing the home page effect of Gaode map

Summary of common pytoch APIs

Opencv learning notes -day 12 (ROI region extraction and inrange() function operation)

Flink Exception -- No ExecutorFactory found to execute the application

Find the number that appears only once in the array

Opencv learning notes -day10 logical operation of image pixels (usage of rectangle function and rect function and bit related operation in openCV)

Sort (simple description)

Talk about the kotlin cooperation process and the difference between job and supervisorjob

将线程绑定在某个具体的CPU逻辑内核上运行
随机推荐
List set export excel table
Detailed explanation of pipline of mmdetection
Esp32 (7): I2S and I2C drivers for function development
Esp32 (6): Bluetooth and WiFi functions for function development
mysql基础入门 day3 动力节点[老杜]课堂笔记
What kind of experience is it to develop a "grandson" who will call himself "Grandpa"?
Understanding society at the age of 14 - reading notes on "happiness at work"
[untitled]
How can I get the discount for opening a securities account? Is online account opening safe?
Introduction to MySQL foundation power node [Lao Du] class assignment
Detectron2 source code reading 3-- encapsulating dataset with mapper
Find the number that appears only once in the array
基于Svelte3.x桌面端UI组件库Svelte UI
Unsupportedclassversionerror is reported when starting jar package. How to repair it
Pytorch BERT
vite项目require语法兼容问题解决require is not defined
Codeworks 5 questions per day (1700 for each) - the third day
c#获取当前的时间戳
Use of Baidu face recognition API
Talk about writing