# 微信小程序

**微信小程序**（Weixin Mini Programs）是运行于腾讯微信（Weixin，国际版称WeChat）平台内部的轻量级第三方应用，无需从应用商店下载或安装。用户通过扫描[二维码](https://www.edgepedia.org/zh/qr-code)、在微信内搜索或点击分享链接即可打开，随后无需离开宿主应用便能购物、点餐、订票、缴费或玩游戏。<sup>[1](https://www.tencent.com/products/weixin-mini-programs/)</sup><sup> • </sup><sup>[2](https://www.up2china.com/what-is-a-mini-program-a-guide-for-china-market-entry/)</sup>

| 关键事实 | 详情 |
|---|---|
| 上线 | 由微信首创，于2017年1月9日正式上线；三周年为2020年1月9日<sup>[3](https://www.tencent.com/wechat-mini-programs-showcases-new-capabilities-to-celebrate-its-third-anniversary/)</sup><sup> • </sup><sup>[20](https://www.tencent.net.cn/wp-content/uploads/2022/12/2017-CSR-Report_compressed.pdf)</sup> |
| 入口 | 扫码、应用内搜索、分享链接、公众号、服务消息或线下门店入口；无需应用商店安装<sup>[1](https://www.tencent.com/products/weixin-mini-programs/)</sup><sup> • </sup><sup>[4](https://daxueconsulting.com/wechat-mini-programs/)</sup> |
| 用户 | 截至2020年1月日活跃用户超3亿；2020年日活跃用户超4亿；据报道2026年月活跃用户超11亿<sup>[3](https://www.tencent.com/wechat-mini-programs-showcases-new-capabilities-to-celebrate-its-third-anniversary/)</sup><sup> • </sup><sup>[5](https://static.www.tencent.com/uploads/2021/04/14/edc7bc58034707bd3fa2f4097320cdc3.pdf)</sup><sup> • </sup><sup>[6](https://www.tencent.com/en-us/articles/2202317.html)</sup> |
| 交易额 | 2019年超8000亿元人民币，同比增长160%；2020年全年交易量同比翻倍以上<sup>[3](https://www.tencent.com/wechat-mini-programs-showcases-new-capabilities-to-celebrate-its-third-anniversary/)</sup><sup> • </sup><sup>[5](https://static.www.tencent.com/uploads/2021/04/14/edc7bc58034707bd3fa2f4097320cdc3.pdf)</sup> |
| 技术 | 自有的WXML（微信标记语言）与WXSS，采用视图层/应用服务层双层架构，运行于宿主的JavaScript运行时<sup>[7](https://www.besthub.dev/articles/understanding-wechat-mini-program-architecture-from-view-layer-to-app-service-48faeee02935)</sup><sup> • </sup><sup>[8](https://www.measuretheweb.org/design/mobile_and_app_measurement/mini_programs)</sup> |
| 覆盖 | 2025年生态覆盖100个国家和地区的108个行业垂直领域，跨境交易额同比增长超70%<sup>[6](https://www.tencent.com/en-us/articles/2202317.html)</sup> |

## 概念与起源

小程序是宿主超级应用以安装包形式下载、并在其自有[JavaScript](https://www.edgepedia.org/zh/javascript)运行时中运行的第三方程序。小程序从不直接与手机操作系统通信：它只能通过宿主开放的API、在宿主定义的权限下、经由宿主加入白名单的域名、在宿主完成审核之后，访问摄像头、定位、用户身份和网络。<sup>[8](https://www.measuretheweb.org/design/mobile_and_app_measurement/mini_programs)</sup>

微信创始人及主要开发者之一张小龙（Allen Zhang）设想中的小程序类似于[Web 2.0](https://www.edgepedia.org/zh/web-2-0)时代的网站，将不同机构的功能集成于一个屏幕之内，使终端用户无需离开微信即可获取外部产品与服务。小程序于2017年上线，通过有选择地向外部开发者开放微信平台，丰富了微信的功能，同时将微信集中打造为中国应用经济中的关键入口节点。<sup>[9](https://journals.sagepub.com/doi/full/10.1177/01634437221128937)</sup>

腾讯将该服务描述为覆盖购物、餐饮、日常生活、出行以及医疗、公用事业等公共服务，将小程序定位为简化日常活动的方式。<sup>[1](https://www.tencent.com/products/weixin-mini-programs/)</sup>在2020年年报中，腾讯表示将小程序视为原生移动应用的补充，有助于用户体验、企业关系及其支付、广告和云业务的发展。<sup>[5](https://static.www.tencent.com/uploads/2021/04/14/edc7bc58034707bd3fa2f4097320cdc3.pdf)</sup>

## 架构与开发

小程序采用双层架构，将负责界面渲染的视图层与负责运行应用逻辑的应用服务层分离。开发者用WXML（微信标记语言）编写界面，用WXSS设置样式，使用专用开发框架和一套覆盖用户资料、扫码、支付等功能的完整API。<sup>[7](https://www.besthub.dev/articles/understanding-wechat-mini-program-architecture-from-view-layer-to-app-service-48faeee02935)</sup>开发者将开发过程比作实现一个网站或Web应用。<sup>[10](https://doi.org/10.1007/s12599-022-00773-9)</sup>

API规模庞大且文档参差不齐。Wang、Chao、Zhang、Yue和Lin五位研究者2023年的一项研究发现，微信中文开发者文档列出975个API，而英文文档仅列出570个，并识别出仅存在于某一平台版本而不存在于另一平台的API，其中Windows与Android版本之间存在差异的API有105个，Windows与iOS之间40个，Android与iOS之间69个。<sup>[8](https://www.measuretheweb.org/design/mobile_and_app_measurement/mini_programs)</sup>

腾讯此后为该平台引入了AI工具：一款支持自然语言提示和图像输入的AI编程助手可缩短小程序开发时间，腾讯还表示随着时间推移，小程序代码可以演变为供AI智能体在微信内使用的工具。<sup>[11](https://static.www.tencent.com/uploads/2025/09/16/5a0b274dacf222d262734936c3508821.pdf)</sup>

## 规模与商业

**使用与交易增长。** 在2020年1月的三周年活动上，腾讯报告2019年小程序总交易额超过8000亿元人民币，同比增长160%，日活跃用户超3亿；2019年人均使用小程序数量增长98%，平均使用量增长45%。<sup>[3](https://www.tencent.com/wechat-mini-programs-showcases-new-capabilities-to-celebrate-its-third-anniversary/)</sup>腾讯年报记录2020年小程序日活跃用户超4亿，当年全年交易量同比翻倍以上。<sup>[5](https://static.www.tencent.com/uploads/2021/04/14/edc7bc58034707bd3fa2f4097320cdc3.pdf)</sup>第三方统计显示，截至2023年小程序数量超过400万个，日活跃用户超过6亿。<sup>[12](https://www.smallerik.com/guides/wechat-and-the-superapp-model/)</sup>

**应用场景。** 常见部署包括含应用内结算的直接面向消费者店铺、会员与忠诚度计划、预订与预约，以及广告和线下二维码的落地页，将实体接触点与数字体验连接起来。<sup>[2](https://www.up2china.com/what-is-a-mini-program-a-guide-for-china-market-entry/)</sup>小游戏是基于同一平台的独立类别；同样无需下载，微信公布的条款向小游戏开发者以现金支付应用内购买收入的60%外加10%的广告抵用金，并以现金支付广告收入的50%。<sup>[13](https://eightsixgames.com/blog/wechat-mini-games-for-western-developers)</sup>

**国际扩展。** 到2025年，小程序生态覆盖100个国家和地区的108个行业垂直领域，跨境交易额同比增长超70%，小程序月活跃用户超11亿。<sup>[6](https://www.tencent.com/en-us/articles/2202317.html)</sup>在马来西亚，亚洲航空（AirAsia）推出航班预订小程序，让中国旅客完全在微信内搜索、预订和支付；[吉隆坡](https://www.edgepedia.org/zh/kuala-lumpur)机场快线（KLIA Ekspres）将小程序票务与微信支付整合用于机场通勤；东南亚服务平台Gokoo基于小程序框架构建，于2025年12月在吉隆坡上线，提供外卖、餐厅预订、酒店预订和到家服务。<sup>[6](https://www.tencent.com/en-us/articles/2202317.html)</sup>

## 与原生应用的关系

小程序消除了应用安装的摩擦，且栖身于中国用户本就高频使用的应用之中，这一点很重要，因为用户除非打算频繁使用，否则往往不愿下载独立应用。然而小程序无法完全取代品牌的原生应用：独立应用让品牌对设计、功能和一致性有更多掌控，而小程序的使用取决于宿主平台的流量、服务、支付集成与合规要求。<sup>[4](https://daxueconsulting.com/wechat-mini-programs/)</sup>这一模式已蔓延至微信之外：支付宝、百度、抖音和QQ都拥有自己的小程序，类似形态还包括苹果的App Clips和Telegram Mini Apps。<sup>[8](https://www.measuretheweb.org/design/mobile_and_app_measurement/mini_programs)</sup><sup> • </sup><sup>[14](https://www.historytools.org/resources/mini-apps)</sup>

## 安全与隐私研究

平台的规模使其成为安全研究的目标。一项针对认证密钥泄露的大规模测量分析了110,993个微信小程序和10,000个百度小程序，发现硬编码开发者密钥用于小程序与超级应用之间的认证是认证绕过的主要成因。<sup>[15](https://arxiv.org/abs/2307.09317)</sup>相关工作还考察了无特权的第三方小程序可调用的、隐藏且未在文档中说明的API，<sup>[16](https://arxiv.org/abs/2306.08134)</sup>以及在多个小程序平台上发现的基于OAuth的认证误用。<sup>[17](https://arxiv.org/abs/2607.08232)</sup>

数据暴露同样影响终端用户。2026年，安全研究人员报告称，街机游戏制造商华立科技（Wahlap）未对一个与其微信小程序关联的数据库设置防护，导致1890万条记录暴露，包括660万个唯一Union ID、170万个唯一电话号码，以及24,000条附带全名的出生日期；研究人员联系该公司后不久该数据库即被锁定，未报告有先前数据外泄的证据。<sup>[18](https://www.techradar.com/pro/security/top-arcade-game-maker-leaks-nearly-19-million-user-records-via-wechat-mini-app)</sup>隐私研究者还研究了平台自身的第一方行为分析，考察敏感小程序行为数据向微信本身的泄露。<sup>[19](https://petsymposium.org/popets/2025/popets-2025-0163.pdf)</sup>

## References

1. [Weixin Mini Programs, Tencent](https://www.tencent.com/products/weixin-mini-programs/)
2. [What Is a Mini Program? A Guide for China Market, Up2China](https://www.up2china.com/what-is-a-mini-program-a-guide-for-china-market-entry/)
3. [WeChat Mini Programs Showcases New Capabilities to Celebrate its Third Anniversary, Tencent (January 9, 2020)](https://www.tencent.com/wechat-mini-programs-showcases-new-capabilities-to-celebrate-its-third-anniversary/)
4. [WeChat mini programs: enhanced engagement and independence, Daxue Consulting](https://daxueconsulting.com/wechat-mini-programs/)
5. [Tencent 2020 Annual Report (Weixin Mini Programs sections)](https://static.www.tencent.com/uploads/2021/04/14/edc7bc58034707bd3fa2f4097320cdc3.pdf)
6. [Weixin Empowers Local Businesses with Mini Program and Payment Solutions Ahead of Visit Malaysia 2026, Tencent](https://www.tencent.com/en-us/articles/2202317.html)
7. [Understanding WeChat Mini Program Architecture: From View Layer to App Service, BestHub](https://www.besthub.dev/articles/understanding-wechat-mini-program-architecture-from-view-layer-to-app-service-48faeee02935)
8. [Mini Programs (measurement overview), Measure The Web](https://www.measuretheweb.org/design/mobile_and_app_measurement/mini_programs)
9. [Jia, Lianrui; Nieborg, David B.; Poell, Thomas (2022). On super apps and app stores: digital media logics in China's app economy. Media, Culture & Society.](https://journals.sagepub.com/doi/full/10.1177/01634437221128937)
10. [Mini-App Ecosystems, Business & Information Systems Engineering](https://doi.org/10.1007/s12599-022-00773-9)
11. [Tencent Annual Report 2025 (AI coding assistant for Mini Programs)](https://static.www.tencent.com/uploads/2025/09/16/5a0b274dacf222d262734936c3508821.pdf)
12. [One App That Contains the Others, Smallerik](https://www.smallerik.com/guides/wechat-and-the-superapp-model/)
13. [WeChat Mini Games for Western Developers: Terms, Publishers and the Port, EightSix Games](https://eightsixgames.com/blog/wechat-mini-games-for-western-developers)
14. [Mini Apps Explained: A Practical Guide, History Tools](https://www.historytools.org/resources/mini-apps)
15. [Measuring the Leakage and Exploitability of Authentication Secrets in Super-apps: The WeChat Case, arXiv:2307.09317](https://arxiv.org/abs/2307.09317)
16. [Uncovering and Exploiting Hidden APIs in Mobile Super Apps, arXiv:2306.08134](https://arxiv.org/abs/2306.08134)
17. [Mini-Programs, Mega-Problems: Unveiling OAuth-based Authentication Misuses in Mini-Programs via Dynamic Analysis, arXiv:2607.08232](https://arxiv.org/abs/2607.08232)
18. [Top arcade game maker leaks nearly 19 million user records via WeChat mini app, TechRadar](https://www.techradar.com/pro/security/top-arcade-game-maker-leaks-nearly-19-million-user-records-via-wechat-mini-app)
19. [What WeChat Knows: Pervasive First-Party Tracking in a Billion-User Super-App Ecosystem, PoPETs 2025](https://petsymposium.org/popets/2025/popets-2025-0163.pdf)
20. [2017 CSR Report Compressed.pdf, tencent.net.cn](https://www.tencent.net.cn/wp-content/uploads/2022/12/2017-CSR-Report_compressed.pdf)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Named software products and platforms › Web browsers, app stores, and mobile app platforms › App stores and mobile platforms

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/weixin-mini-programs

English original: https://www.edgepedia.org/weixin-mini-programs
