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.

Aotu Lab
Aotu Lab
Aotu Lab
Boost Your WeChat Mini‑Program Marketing with the wxapp‑market Component Library

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-market

Features

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.

Component preview
Component preview

Quick Start

Clone the repository

git clone [email protected]:o2team/wxapp-market.git

Component 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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Marketingmini-programcomponent-library
Aotu Lab
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.