Introduction to custom creation examples of WeChat mini programs

高洛峰
Release: 2017-03-15 16:18:02
Original
1984 people have browsed it

This article mainly introduces relevant information about the detailed introduction of the custom creation of WeChat mini programs. Friends who need it can refer to

Custom creation of WeChat mini programs. Recently, I have been tinkering with WeChat mini programs. Here A simple data collection on custom creation may help everyone.

WeChat Mini Program Custom creation

Custom creation is exactly the same as the default creation, just don’t check quick start

Introduction to custom creation examples of WeChat mini programs

Calm down (don’t get nervous when you see an error report, be sure to calm down)

Introduction to custom creation examples of WeChat mini programs

Look at what it says, no such file or directory (no file or directory), there is no file, oh, it turns out to be app.json. Remember what a .json file is? Yes, it is a global configuration file. No configuration file is like a Bugatti without gasoline, it runs weird. Not much to say, add some fuel

1. Switch to the editing window

Introduction to custom creation examples of WeChat mini programs

Introduction to custom creation examples of WeChat mini programs

Enter the name of the file, app.json. There is no need to enter the suffix (I don’t know why, sometimes I have to enter the full name, I guess the tool has a BUG)

2. Click restart, and an error occurs again. Calm down again

Introduction to custom creation examples of WeChat mini programs

It turns out that app.json is empty, so an error is reported. See what you need

Introduction to custom creation examples of WeChat mini programs

It turns out to be pages, then fill in

{
 "pages":[ // 所有页面必须在pages中配置
  "pages/index/index" // 建立对应的 .wxml 文件
 ]
} // 直接拷贝quick start中的即可
Copy after login

Introduction to custom creation examples of WeChat mini programs

Click restart or compile, the program runs perfectly

Note: To create a wxml file, you must create the corresponding js file and use the PagefunctionGenerate page example

Thank you for reading, I hope it can help everyone, thank you for your support of this site!

The above is the detailed content of Introduction to custom creation examples of WeChat mini programs. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template