Home > php教程 > PHP开发 > WeChat Mini Program – Custom Creation

WeChat Mini Program – Custom Creation

高洛峰
Release: 2016-11-23 09:37:41
Original
2076 people have browsed it

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

WeChat Mini Program – Custom Creation

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

WeChat Mini Program – Custom Creation

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. Without further ado, let’s add some fuel

1. Switch to the editing window

WeChat Mini Program – Custom Creation

Enter the name of the file, app.json. 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 another error occurs. Calm down again

WeChat Mini Program – Custom Creation

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

WeChat Mini Program – Custom Creation

It turns out to be pages, then fill in

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

WeChat Mini Program – Custom Creation

Click restart or compile, the program runs perfectly

Note: To create a wxml file, you must create the corresponding js file. And use the Page function to generate page instances


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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template