Directory Structure
The mini program contains an app that describes the overall program and multiple pages that describe their respective pages.
file | have to | effect |
---|---|---|
app.js | Yes | Applet logic |
app.json | Yes | Mini Program Common Configuration |
app.wxss | no | Mini Program Common Style Sheet |
A small program page is composed of four files, namely:
file type | have to | effect |
---|---|---|
js | Yes | Page logic |
wxml | Yes | Page structure |
json | no | Page configuration |
wxss | no | Page style sheet |
Introduction to the app.json file
app.js file
globalData: {
url: "http://127.0.0.1/",
},