Boost Your WeChat Mini‑Program Marketing with the wxapp‑market Component Library
The wxapp‑market library provides a collection of ready‑to‑use marketing components for WeChat mini‑programs—such as big wheel, scratch tickets, slot machines, and gesture locks—along with clear setup instructions, code examples, and a GitHub repository for quick integration.
Introduction
wxapp‑market is a component library for WeChat mini‑programs that provides ready‑made marketing widgets such as a big wheel, scratch tickets, slot machine, fruit machine, grid card, shake, and gesture lock. It enables rapid development of marketing‑oriented mini‑program pages.
Repository:
https://github.com/o2team/wxapp-marketFeatures
Modular development using WXML template modules.
Simple API and easy extension.
Supports multiple marketing play styles.
Preview
Components can be previewed in the WeChat Web Developer Tools.
Quick Start
Clone the repository
git clone [email protected]:o2team/wxapp-market.gitComponent directory
Big wheel: /components/wheel/ Scratch tickets: /components/scratch/ Slot machine: /components/slotMachine/ Fruit machine: /components/fruitMachine/ Grid card: /components/card/ Shake: /components/shake/ Gesture lock:
/components/lock/Importing a component (example: big wheel)
WXSS: @import "../../components/wheel/wheel.wxss" WXML: <import src="../../components/wheel/wheel.wxml"/> JS:
import Wheel from "../../components/wheel/wheel.js" new Wheel(this, {
areaNumber: 8, // number of sections
speed: 16, // rotation speed
awardNumber: 2, // winning section (1‑based)
mode: 1, // 1 = pointer rotation, 2 = wheel rotation
callback: (idx, award) => {
// executed after spin ends
}
});Conclusion
The library lowers the entry barrier for adding marketing interactions to WeChat mini‑programs and is designed for community contributions. Issues and pull requests are welcomed.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Aotu Lab
Aotu Lab, founded in October 2015, is a front-end engineering team serving multi-platform products. The articles in this public account are intended to share and discuss technology, reflecting only the personal views of Aotu Lab members and not the official stance of JD.com Technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
