Building a Cross-Platform Secret-Code Red Envelope Feature for Taobao & Tmall

This article details a cross-terminal technical solution for implementing the Double 11 secret-code red-envelope activity on Taobao and Tmall, covering requirements, responsive design for Phone, Pad and PC, native poplayer integration, KISSY module usage, and final visual results across devices.

21CTO
21CTO
21CTO
Building a Cross-Platform Secret-Code Red Envelope Feature for Taobao & Tmall

Overview

This article describes the design and implementation of a secret‑code red‑envelope activity that ran during Double 11 and how to recreate it after the event using a cross‑terminal solution for Taobao and Tmall.

Requirements

The activity includes two types of red envelopes: a “secret‑code” envelope triggered by a user‑entered keyword and a “keyword” envelope that plays an animation before the draw. The solution must work on iOS and Android, on Phone, Pad and PC, and be integrated into native apps and web pages.

Cross‑Terminal Adaptation

Phone pages use the lib.flexible layout and a px2rem toolchain (gulp plugin, webpack loader, postcss plugin). PC pages are delivered as KISSY modules compatible with older IE. Pad pages lack dedicated layout support, so the Pad version is built on top of the PC module with additional styling and functionality.

Integration

Phone & Pad

Both platforms use the native poplayer component to overlay an H5 page on the current native screen. Poplayer can be transparent, allowing click‑through, and enables rapid iteration of the activity UI.

PC

On PC the activity is exposed as a KISSY module that external pages (home, search results) can import. The module’s dependency graph is shown below.

After importing the module, the search flow follows the illustrated steps.

Final Effects

Examples of the activity on different terminals:

Phone

Pad

PC

Conclusion

The project demonstrates how a seemingly simple promotional feature can involve multiple front‑end technologies and cross‑terminal challenges, and how a clear technical solution can be documented and reused.

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.

frontendMobilecross-platformWebResponsive
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

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.