gitmyhub

miniprogram-demo

JavaScript ★ 7.2k updated 2mo ago

微信小程序组件 / API / 云开发示例

The official WeChat Mini Program demo collects working code examples for all built-in components, platform APIs, and cloud features, it is the go-to reference for anyone building lightweight apps that run inside WeChat.

JavaScriptWeChat Mini Programnpmsetup: moderatecomplexity 2/5

This repository is the official demo project for WeChat Mini Programs, published by the WeChat Mini Program team at Tencent. WeChat Mini Programs are lightweight apps that run inside the WeChat messaging app, without requiring a separate installation from an app store. They are widely used across China and support a broad range of use cases, from payments and e-commerce to local services and tools.

The demo collects working source code examples for WeChat Mini Program components, platform APIs, and cloud development features. It is designed as a reference for developers building their own mini programs, showing how the various built-in pieces fit together in real code. A scannable QR code in the README lets you try the demo directly on a phone by opening it through the WeChat app.

Running the project requires the WeChat Developer Tools, which is the official development environment provided by WeChat for building and previewing mini programs. To get started, you run npm run init to initialize the project, then use the Developer Tools to build the npm dependencies. The cloud development portions of the demo, which cover server-side cloud functions and data storage, have their own README with additional setup instructions.

The project accepts contributions through pull requests. Contributors are asked to install dependencies in the miniprogram directory and confirm that their code passes the built-in lint check before submitting. The README is written in Chinese, as the project is aimed at the WeChat developer community.

Where it fits