当前位置:网站首页>Wechat applet
Wechat applet
2022-07-19 03:14:00 【Smelly soul】
Wechat applet
One 、 Introduce
Today, , Wechat apps are becoming more and more popular , It realizes the application without downloading , Anytime, anywhere , No need for tradition APP Download and install process for .
Wechat applet , Short for applet , English name Mini Program.
Because the development of small programs has a complete set of extremely detailed development documents , I won't introduce it here .
Click wechat applet development document to start learning !
Click wechat developer tool installation package to get , Extraction code hhhh
Two 、 The framework of the applet
Let's briefly talk about the framework of some small programs .
mpvue: Small program development framework produced by meituan review team :mpvue, Is based on Vue The framework of , Quite so Vue Increased the ability to develop wechat applet .
wepy:wepy It draws lessons from the code development style Vue, Itself and the Vue It doesn't matter .
2.1、mpvue
2.1.1、mpvue Introduction to :
mp:mini program
Vue: Namely vue 了
Mpvue Just use vue The technical system of development applet framework .
2.1.2、mpvue Advantages of frameworks :
· complete Vue.js Development experience ( Meeting vue Is no problem )
· convenient Vuex Data management solutions : Easy to build complex applications
· shortcut webpack Build mechanism : Custom build strategy 、 The development phase hotReload
· Support use npm External dependence
· Use Vue.js Command line tools vue-cli Quick initialization project
· H5 The ability of code conversion to compile into the object code of an applet
2.1.3、 Environment construction and the first program :
1、 install nodejs,vue-cli
2、 establish mpvue Project :
vue init mpvue/mpvue-quickstart Project name
3、 Enter project directory , Installation dependency :
npm i
4、Npm run dev after , Enter development mode , The directory will be automatically generated dist.Dist The directory is the code of the compiled applet . Write vue Code , The code of the applet will be generated automatically .
Npm run dev
5、 Run applet .
You need to open wechat developer tool , To run the .
(1) In wechat developer tools , Import the project :
(2) Project directory points to mpvueprj
(3) fill appId
(4) Click on “ Import ” Button
(5) Try to modify vue Components , Automatic compilation , The applet results are immediately presented
Vue Components (index/index.vue) increase “hello” written words
After automatic compilation , In the wechat developer tool, the results of the applet are immediately presented
2.2、wepy
2.2.1、WePY Introduce
WePY yes tencent Refer to the Vue The framework for re encapsulation of native applets , It's closer to MVVM Architecture mode , And support ES6/7 Some new features of .
Be careful :WePY 2 It is a component-based development based on the native components of small programs . therefore WePY 2 The minimum supported version of applet base library is 1.6.3.
Official website :https://wepyjs.github.io/wepy-docs/2.x/#/
WePY edition
WePY 2 Not based on WePY 1 Upgraded version , It's a completely new version of redevelopment
2.2.2、WePY Install and create the project
WePY The installation or update of is through npm Conduct .
Global installation WePY CLI Tools
npm install @wepy/cli -g Use standard Template initialization project :
wepy init standard Project nameToggle directory
cd myprojinitialization
npm installnpm run dev Listen and compile the project , Wechat developer tool import project ( Project root ), You can preview the effect
npm run dev
边栏推荐
- Multi table query - case exercise
- While loop
- [template record] string hash to judge palindrome string
- [MCU simulation] (IV) addressing mode register addressing and direct addressing
- Comparison between redis and other databases
- 无法访问此网站无法找到DNS地址DNS_PROBE_STARTED怎么办?
- zsh: command not found: mysql
- 需要慢一点点
- 显而易见的事情
- Built in keyboard continuous 444
猜你喜欢

MySQL multi table query

【人脸识别】基于直方图Histogram实现人脸识别附matlab代码

Ubuntu clear CUDA cache

About XML file (VI) - the difference between JSON and XML file

Yolov5 ncnn reasoning

Automatic assembly & set injection

Comparison between redis and other databases

乐视还有400多位员工?过着没有老板的神仙日子 官方出来回应了...

Polynomial interpolation fitting (II)

MySQL interview questions (2022)
随机推荐
Examine your investment path
ncnn Mat矩阵类
【单片机仿真】(十四)指令系统位操作类指令 — 位数据传送指令MOV、位变量修改指令
Flutter开发:运行flutter upgrade命令报错Exception:Flutter failed to create a directory at…解决方法
Yolov6 learning first chapter
Fiddler抓包
After 4 years of developing two-sided meituan, we finally lost: the interview question of volatile keyword function and principle
JDBC connection to MySQL database
Fiddler grabbing
Tools and methods - Excel plug-in xltools
MySQL interview questions (2022)
Pytorch best practices and code templates
OpenVINO中的FCOS人脸检测模型代码演示
【回归预测】基于粒子滤波实现锂离子电池寿命预测附matlab代码
乐视还有400多位员工?过着没有老板的神仙日子 官方出来回应了...
【单片机仿真】(十三)指令系统逻辑运算指令 — 移位指令
[regression prediction] lithium ion battery life prediction based on particle filter with matlab code
Ncnn mat matrix class
In depth understanding of machine learning - unbalanced learning: sample sampling technology - [smote sampling method and borderline smote sampling method of manual sampling technology]
【单片机仿真】(十八)控制转移类指令 — 空操作指令