CINXE.COM

安全指引 | 微信开放文档

<!DOCTYPE html> <html lang="cn"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>安全指引 | 微信开放文档</title> <meta name="description" content="微信开发者平台文档"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="theme-color" content="#ffffff"> <meta name="keywords" content="微信官方文档"> <link rel="shortcut icon" type="image/x-icon" href="https://res.wx.qq.com/a/wx_fed/assets/res/NTI4MWU5.ico"> <link rel="mask-icon" color="#4C4C4C" href="https://res.wx.qq.com/a/wx_fed/assets/res/MjliNWVm.svg"> <link rel="apple-touch-icon-precomposed" href="https://res.wx.qq.com/a/wx_fed/assets/res/OTE0YTAw.png"> <script> (function () { 'use strict'; const SCRIPT_URLs = [ 'https://dldir1.qq.com/WechatWebDev/devPlatform/px.min.js', 'https://dev.weixin.qq.com/platform-console/proxy/assets/tel/px.min.js', ]; const param = { maskMode: 'no-mask', // 隐私策略, all-mask 或 no-mask, 详见:https://dev.weixin.qq.com/docs/analysis/sdk/docs.html recordCanvas: false, // 若要采集canvas, 设为true projectId: 'wxef34f91ddab0c534-0HLdQNKAk-dzsFsA', // 项目 ID,需替换为体验分析项目 ID iframe: false, // 是否采集 iframe 页面 console: true, // 是否采集 console 输出的错误日志 network: true, // 是否采集网络错误 }; function loadScript(url) { return new Promise((resolve, reject) => { const scriptEle = document.createElement('script'); scriptEle.type = 'text/javascript'; scriptEle.async = true; scriptEle.src = url; scriptEle.onload = () => { resolve(url); }; scriptEle.onerror = () => { reject(new Error('Script load error')); }; document.head.appendChild(scriptEle); }); } async function main() { try { sessionStorage.setItem('wxobs_start_timestamp', String(Date.now())); const fastestUrl = await Promise.race(SCRIPT_URLs.map(url => loadScript(url))); window.__startPX && window.__startPX(param); } catch (error) { console.error('Error loading scripts:', error); } } main(); })(); </script> <link rel="preload" href="https://res.wx.qq.com/wxdoc/dist/assets/css/0.styles.1c26de10.css" as="style"><link rel="preload" href="https://res.wx.qq.com/wxdoc/dist/assets/js/app.531c6ec3.js" as="script"><link rel="preload" href="https://res.wx.qq.com/wxdoc/dist/assets/js/2431.192a81d1.js" as="script"> <link rel="stylesheet" href="https://res.wx.qq.com/wxdoc/dist/assets/css/0.styles.1c26de10.css"> </head> <body> <div id="app" data-server-rendered="true"><div class="theme-container"><div class="theme-container"><header class="navbar navbar_with-link"><div class="navbar__left"><a href="/doc/" class="home-link"><div class="logo__wrp"><span class="logo__icon"></span></div></a> <span class="dot"></span> <div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">小程序</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item selected"><!----> <a href="/miniprogram/dev/framework/" class="nav-link external"> 小程序 </a></li><li class="dropdown-item"><!----> <a href="/minigame/introduction/" class="nav-link external"> 小游戏 </a></li><li class="dropdown-item"><!----> <a href="/doc/offiaccount/Getting_Started/Overview.html" class="nav-link external"> 公众号 </a></li><li class="dropdown-item"><!----> <a href="/doc/aispeech/platform/INTRODUCTION.html" class="nav-link external"> 智能对话 </a></li><li class="dropdown-item"><!----> <a href="/doc/oplatform/Third-party_Platforms/2.0/getting_started/terminology_introduce.html" class="nav-link external"> 开放平台 </a></li><li class="dropdown-item"><!----> <a href="https://work.weixin.qq.com/api/doc" class="nav-link external"> 企业微信 </a></li><li class="dropdown-item"><!----> <a href="https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/index.shtml" class="nav-link external"> 微信支付 </a></li><li class="dropdown-item"><!----> <a href="/doc/channels/Operational_Guidelines/Shop_opening_guidelines.html" class="nav-link external"> 视频号 </a></li><li class="dropdown-item"><!----> <a href="/doc/store/API/basics/ChangeLog.html" class="nav-link external"> 微信小店 </a></li><li class="dropdown-item"><!----> <a href="/doc/xwei/xiaowei-introduction/Introduction.html" class="nav-link external"> 腾讯小微 </a></li><li class="dropdown-item"><!----> <a href="/doc/ministore/minishopquickstart/introduction.html" class="nav-link external"> 小商店 </a></li></ul></div></div> <div class="navbar__center"><nav class="nav-links"><div class="nav-item selected"><a href="/miniprogram/dev/framework/" class="nav-link external"> 开发 </a></div><div class="nav-item"><a href="/miniprogram/introduction/" class="nav-link external"> 介绍 </a></div><div class="nav-item"><a href="/miniprogram/design/" class="nav-link external"> 设计 </a></div><div class="nav-item"><a href="/miniprogram/product/" class="nav-link external"> 运营 </a></div><div class="nav-item"><a href="/miniprogram/analysis/wedata/intro/" class="nav-link external"> 数据 </a></div><div class="nav-item"><a href="/miniprogram/security/basic/" class="nav-link external"> 安全 </a></div></nav></div> <div class="navbar__right"><nav class="nav-links"><div class="nav-item community-item"><a href="https://developers.weixin.qq.com/community/develop/mixflow" target="_blank" class="nav-link external"> 社区 </a></div><div class="nav-item community-item"><a href="https://developers.weixin.qq.com/community/business" target="_blank" class="nav-link external"> 学堂 </a></div></nav> <ul class="lang-tab"><li class="lang-tab__icon"><img src="https://res.wx.qq.com/t/components/icons/base/translate_regular.svg"></li></ul> <div class="search__wrp-flex"><div class="search__input"><div class="weui-desktop-search"><button class="weui-desktop-icon-btn weui-desktop-search__btn weui-desktop-icon-btn__width"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.4529 16.4014C14.2428 17.4001 12.6915 18 11 18C7.134 18 4 14.866 4 11C4 7.134 7.134 4 11 4C14.866 4 18 7.134 18 11C18 12.7425 17.3633 14.3363 16.3099 15.5614L20.4243 19.6757L19.5757 20.5243L15.4529 16.4014ZM16.8 11C16.8 14.2033 14.2033 16.8 11 16.8C7.79674 16.8 5.2 14.2033 5.2 11C5.2 7.79676 7.79674 5.20001 11 5.20001C14.2033 5.20001 16.8 7.79676 16.8 11Z" fill="black"></path></svg></button></div> <a href="javascript:;" class="search-back__btn">取消</a></div> <div class="reco-list__wrp" style="display:none;"><ul class="reco__list"></ul> <div class="show-more"><a href="/doc/search?source=more&amp;query=&amp;doc_type=miniprogram&amp;jumpbackUrl=%2Fdoc%2F" class="reco-item__link">查看更多 </a></div></div> <div class="reco-list__wrp" style="display:none;"><div class="show-more"><a href="/doc/search?source=more&amp;query=&amp;doc_type=miniprogram&amp;jumpbackUrl=%2Fdoc%2F" class="reco-item__link">在小程序下暂无结果,查看其它业务相关内容 &gt; </a></div></div></div></div></header> <div class="subnavbar"><ul class="subnavbar__list"><li class="subnavbar__item selected" style="display:;"><div class="dropdown-subnavbar-title"><a href="/miniprogram/dev/framework/" target="_self" class="router-link-active"> 指南 </a> <!----></div> <!----></li><li class="subnavbar__item" style="display:;"><div class="dropdown-subnavbar-title"><a href="/miniprogram/dev/reference/" target="_self"> 框架 </a> <!----></div> <!----></li><li class="subnavbar__item" style="display:;"><div class="dropdown-subnavbar-title"><a href="/miniprogram/dev/component/" target="_self"> 组件 </a> <!----></div> <!----></li><li class="subnavbar__item" style="display:;"><div class="dropdown-subnavbar-title"><a href="/miniprogram/dev/api/" target="_self"> API </a> <!----></div> <!----></li><li class="subnavbar__item" style="display:;"><div class="dropdown-subnavbar-title"><a href="/miniprogram/dev/OpenApiDoc/" target="_self"> 服务端 </a> <!----></div> <!----></li><li class="subnavbar__item dropdown-subnavbar" style="display:;"><div class="dropdown-subnavbar-title"><a>平台能力</a> <span class="arrow right dropdown-subnavbar-select"></span></div> <ul class="dropdown-subnavbar-ul"><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/platform-capabilities/industry/" target="_self" class="nav-link external"> 行业能力 </a></li><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/platform-capabilities/business-capabilities/" target="_self" class="nav-link external"> 商业能力 </a></li><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/platform-capabilities/miniapp/" target="_self" class="nav-link external"> 多端能力 </a></li><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/platform-capabilities/service-market/" target="_self" class="nav-link external"> 服务市场 </a></li><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/platform-capabilities/cityservice/" target="_self" class="nav-link external"> 城市服务 </a></li><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/platform-capabilities/charge/" target="_self" class="nav-link external"> 付费能力 </a></li><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/platform-capabilities/extended/" target="_self" class="nav-link external"> 拓展能力 </a></li></ul></li><li class="subnavbar__item" style="display:;"><div class="dropdown-subnavbar-title"><a href="/miniprogram/dev/devtools/devtools" target="_self"> 工具 </a> <!----></div> <!----></li><li class="subnavbar__item dropdown-subnavbar" style="display:;"><div class="dropdown-subnavbar-title"><a>云服务</a> <span class="arrow right dropdown-subnavbar-select"></span></div> <ul class="dropdown-subnavbar-ul"><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/wxcloudservice/wxcloud/basis/getting-started" target="_self" class="nav-link external"> 云开发 </a></li><li class="dropdown-item" style="display:;"><a href="/miniprogram/dev/wxcloudservice/wxcloudrun/src/" target="_self" class="nav-link external"> 云托管 </a></li></ul></li><li class="subnavbar__item" style="display:;"><div class="dropdown-subnavbar-title"><a href="/miniprogram/dev/framework/release/" target="_self"> 更新日志 </a> <!----></div> <!----></li></ul></div> <div class="mobile-links__wrp"><div class="mobile-links_mobile"><a href="javascript:;" class="mobile-links__btn">开发</a></div> <div class="mobile-links__panel"><div class="links-panel__bd"><nav class="nav-links"><div class="nav-item selected"><a href="/miniprogram/dev/framework/" class="nav-link external"> 开发 </a></div><div class="nav-item"><a href="/miniprogram/introduction/" class="nav-link external"> 介绍 </a></div><div class="nav-item"><a href="/miniprogram/design/" class="nav-link external"> 设计 </a></div><div class="nav-item"><a href="/miniprogram/product/" class="nav-link external"> 运营 </a></div><div class="nav-item"><a href="/miniprogram/analysis/wedata/intro/" class="nav-link external"> 数据 </a></div><div class="nav-item"><a href="/miniprogram/security/basic/" class="nav-link external"> 安全 </a></div></nav></div> <div class="links-panel__ft"><ul class="lang-tab"><li class="lang-tab__icon"><img src="https://res.wx.qq.com/t/components/icons/base/translate_regular.svg"></li></ul></div></div> <div><div class="weui-mask" style="display:none;"></div> <div class="weui-actionsheet "><!----> <div class="weui-actionsheet__menu"><div class="weui-actionsheet__cell">中文</div><div class="weui-actionsheet__cell">EN</div></div> <div class="weui-actionsheet__action"><div class="weui-actionsheet__cell">取消</div></div></div></div></div> <a href="javascript:;" class="mobile-search-btn"></a> <div class="main-container" style="margin-top:144px;"><div class="main-contontaier__bd" style="min-height:0px;"><div class="sidebar__wrp"><div class="sidebar-cell_mobile"><li class="subnavbar__item selected"><a href="javascript:;" target="_self">指南</a></li></div> <aside class="sidebar" style="top:144px;"> <div class="TreeNavigation"><div class="NavigationLevel NavigationLevel--level-0"><ul><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/" class="NavigationItem__router-link"> 起步 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/#小程序简介" class="NavigationItem__router-link"> 小程序简介 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/#小程序技术发展史" class="NavigationItem__router-link"> 小程序技术发展史 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/#小程序与普通网页开发的区别" class="NavigationItem__router-link"> 小程序与普通网页开发的区别 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/#体验小程序" class="NavigationItem__router-link"> 体验小程序 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/getstart.html" class="NavigationItem__router-link"> 开始 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/getstart.html#申请账号" class="NavigationItem__router-link"> 申请账号 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/getstart.html#安装开发工具" class="NavigationItem__router-link"> 安装开发者工具 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/getstart.html#你的第一个小程序" class="NavigationItem__router-link"> 你的第一个小程序 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/getstart.html#编译预览" class="NavigationItem__router-link"> 编译预览 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/code.html" class="NavigationItem__router-link"> 小程序代码构成 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/code.html#JSON-配置" class="NavigationItem__router-link"> JSON 配置 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/code.html#WXML-模板" class="NavigationItem__router-link"> WXML 模板 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/code.html#WXSS-样式" class="NavigationItem__router-link"> WXSS 样式 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/code.html#JS-逻辑交互" class="NavigationItem__router-link"> JS 逻辑交互 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/framework.html" class="NavigationItem__router-link"> 小程序宿主环境 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/framework.html#渲染层和逻辑层" class="NavigationItem__router-link"> 渲染层和逻辑层 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/framework.html#程序与页面" class="NavigationItem__router-link"> 程序与页面 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/framework.html#组件" class="NavigationItem__router-link"> 组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/framework.html#API" class="NavigationItem__router-link"> API <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/release.html" class="NavigationItem__router-link"> 小程序协同工作和发布 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/release.html#协同工作" class="NavigationItem__router-link"> 协同工作 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/release.html#小程序的版本" class="NavigationItem__router-link"> 小程序的版本 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/release.html#发布上线" class="NavigationItem__router-link"> 发布上线 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/quickstart/release.html#运营数据" class="NavigationItem__router-link"> 运营数据 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <!----> <!----> <a href="https://developers.weixin.qq.com/ebook?action=get_post_info&amp;docid=0008aeea9a8978ab0086a685851c0a" target="_blank" class="NavigationItem__external-link">小程序开发指南</a></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/structure.html" class="NavigationItem__router-link"> 目录结构 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/config.html" class="NavigationItem__router-link"> 配置小程序 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/config.html#全局配置" class="NavigationItem__router-link"> 全局配置 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/config.html#页面配置" class="NavigationItem__router-link"> 页面配置 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/MINA.html" class="NavigationItem__router-link"> 小程序框架 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/MINA.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/scene.html" class="NavigationItem__router-link"> 场景值 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/" class="NavigationItem__router-link"> 逻辑层 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/app.html" class="NavigationItem__router-link"> 注册小程序 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/page.html" class="NavigationItem__router-link"> 注册页面 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/page-life-cycle.html" class="NavigationItem__router-link"> 页面生命周期 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/route.html" class="NavigationItem__router-link"> 页面路由 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/route-event-listener.html" class="NavigationItem__router-link"> 页面路由监听 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/module.html" class="NavigationItem__router-link"> 模块化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/app-service/api.html" class="NavigationItem__router-link"> API <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/" class="NavigationItem__router-link"> 视图层 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/wxml/" class="NavigationItem__router-link"> WXML <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/wxss.html" class="NavigationItem__router-link"> WXSS <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/wxs/" class="NavigationItem__router-link"> WXS <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/wxml/event.html" class="NavigationItem__router-link"> 事件系统 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/wxml/event.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/interactive-animation.html" class="NavigationItem__router-link"> WXS 响应事件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/tap.html" class="NavigationItem__router-link"> Tap 事件 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/two-way-bindings.html" class="NavigationItem__router-link"> 简易双向绑定 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/component.html" class="NavigationItem__router-link"> 基础组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/selector.html" class="NavigationItem__router-link"> 获取界面上的节点信息 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/resizable.html" class="NavigationItem__router-link"> 响应显示区域变化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/frameset.html" class="NavigationItem__router-link"> 分栏模式 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/animation.html" class="NavigationItem__router-link"> 动画 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/view/initial-rendering-cache.html" class="NavigationItem__router-link"> 初始渲染缓存 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/env.html" class="NavigationItem__router-link"> 小程序运行时 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/env.html" class="NavigationItem__router-link"> 运行环境 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/js-support.html" class="NavigationItem__router-link"> JavaScript 支持情况 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/operating-mechanism.html" class="NavigationItem__router-link"> 运行机制 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/update-mechanism.html" class="NavigationItem__router-link"> 更新机制 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/introduction.html" class="NavigationItem__router-link"> Skyline 渲染引擎 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/introduction.html" class="NavigationItem__router-link"> 概览 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/introduction.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/features.html" class="NavigationItem__router-link"> 特性 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/comparation.html" class="NavigationItem__router-link"> 性能对比 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/experience.html" class="NavigationItem__router-link"> 示例体验 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/component.html" class="NavigationItem__router-link"> 支持与差异 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/component.html" class="NavigationItem__router-link"> 基础组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/wxss.html" class="NavigationItem__router-link"> WXSS 样式 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/worklet.html" class="NavigationItem__router-link"> 增强特性 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/worklet.html" class="NavigationItem__router-link"> Worklet 动画 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/gesture.html" class="NavigationItem__router-link"> 手势系统 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/custom-route.html" class="NavigationItem__router-link"> 自定义路由 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/preset-route.html" class="NavigationItem__router-link"> 预设路由效果 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/open-container.html" class="NavigationItem__router-link"> 容器转场动画 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/pop-gesture.html" class="NavigationItem__router-link"> 页面返回手势 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/share-element.html" class="NavigationItem__router-link"> 共享元素动画 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/appbar.html" class="NavigationItem__router-link"> 全局工具栏 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/scroll-container.html" class="NavigationItem__router-link"> 滚动容器及其应用场景 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/migration/" class="NavigationItem__router-link"> 从 WebView 迁移 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/migration/" class="NavigationItem__router-link"> 起步 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/skyline.html" class="NavigationItem__router-link"> 新版组件框架适配指引 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/migration/best-practice.html" class="NavigationItem__router-link"> 最佳实践 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/migration/compatibility.html" class="NavigationItem__router-link"> 常见兼容问题 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/migration/release.html" class="NavigationItem__router-link"> 发布上线 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/migration/migration-tool.html" class="NavigationItem__router-link"> 迁移工具 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/debug.html" class="NavigationItem__router-link"> 性能调试 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/changelog.html" class="NavigationItem__router-link"> 动态 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/changelog.html" class="NavigationItem__router-link"> 更新日志 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/runtime/skyline/status.html" class="NavigationItem__router-link"> 特性状态 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/introduction.html" class="NavigationItem__router-link"> glass-easel 组件框架 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/introduction.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/migration.html" class="NavigationItem__router-link"> 适配指引 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/beta-features.html" class="NavigationItem__router-link"> 新增特性 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/beta-features.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/call-data-functions.html" class="NavigationItem__router-link"> 在模板中调用 data 里的函数 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/chaining-api.html" class="NavigationItem__router-link"> Chaining API <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/chaining-api-init.html" class="NavigationItem__router-link"> Chaining API 的 init 函数 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/glass-easel/dynamic-slots.html" class="NavigationItem__router-link"> 动态 slot <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/" class="NavigationItem__router-link"> 自定义组件 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/wxml-wxss.html" class="NavigationItem__router-link"> 组件模板和样式 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/component.html" class="NavigationItem__router-link"> Component 构造器 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/events.html" class="NavigationItem__router-link"> 组件间通信与事件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/lifetimes.html" class="NavigationItem__router-link"> 组件生命周期 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/behaviors.html" class="NavigationItem__router-link"> behaviors <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/relations.html" class="NavigationItem__router-link"> 组件间关系 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/observer.html" class="NavigationItem__router-link"> 数据监听器 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/pure-data.html" class="NavigationItem__router-link"> 纯数据字段 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/generics.html" class="NavigationItem__router-link"> 抽象节点 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/extend.html" class="NavigationItem__router-link"> 自定义组件扩展 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/trdparty.html" class="NavigationItem__router-link"> 开发第三方自定义组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/unit-test.html" class="NavigationItem__router-link"> 单元测试 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/update-perf-stat.html" class="NavigationItem__router-link"> 获取更新性能统计信息 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/placeholder.html" class="NavigationItem__router-link"> 占位组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/custom-component/debug.html" class="NavigationItem__router-link"> 查看自定义组件数据 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/" class="NavigationItem__router-link"> 插件 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/development.html" class="NavigationItem__router-link"> 开发插件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/using.html" class="NavigationItem__router-link"> 使用插件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/api-limit.html" class="NavigationItem__router-link"> 插件调用 API 的限制 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/component-limit.html" class="NavigationItem__router-link"> 插件使用组件的限制 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/functional-pages.html" class="NavigationItem__router-link"> 插件功能页 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/functional-pages.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/functional-pages/user-info.html" class="NavigationItem__router-link"> 用户信息功能页 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/functional-pages/request-payment.html" class="NavigationItem__router-link"> 支付功能页 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/functional-pages/choose-address.html" class="NavigationItem__router-link"> 收货地址功能页 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/functional-pages/choose-invoice.html" class="NavigationItem__router-link"> 发票功能页 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/plugin/functional-pages/choose-invoice-title.html" class="NavigationItem__router-link"> 发票抬头功能页 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/network.html" class="NavigationItem__router-link"> 基础能力 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/network.html" class="NavigationItem__router-link"> 网络 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/network.html" class="NavigationItem__router-link"> 使用说明 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/domain.html" class="NavigationItem__router-link"> 业务域名 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/mDNS.html" class="NavigationItem__router-link"> 局域网通信 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/HTTPDNS.html" class="NavigationItem__router-link"> 移动解析HttpDNS <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/storage.html" class="NavigationItem__router-link"> 存储 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/file-system.html" class="NavigationItem__router-link"> 文件系统 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/canvas.html" class="NavigationItem__router-link"> 画布 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/canvas.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/canvas-legacy-migration.html" class="NavigationItem__router-link"> 旧版迁移指南 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/subpackages.html" class="NavigationItem__router-link"> 分包加载 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/subpackages/basic.html" class="NavigationItem__router-link"> 使用分包 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/subpackages/independent.html" class="NavigationItem__router-link"> 独立分包 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/subpackages/preload.html" class="NavigationItem__router-link"> 分包预下载 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/subpackages/async.html" class="NavigationItem__router-link"> 分包异步化 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/lazyload.html" class="NavigationItem__router-link"> 按需注入和用时注入 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/workers.html" class="NavigationItem__router-link"> 多线程 Worker <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/server-ability/backend-api.html" class="NavigationItem__router-link"> 服务端能力 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/server-ability/backend-api.html" class="NavigationItem__router-link"> 服务端 API <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/server-ability/message-push.html" class="NavigationItem__router-link"> 消息推送 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/custom-tabbar.html" class="NavigationItem__router-link"> 自定义 tabBar <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/background-fetch.html" class="NavigationItem__router-link"> 周期性更新 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/pre-fetch.html" class="NavigationItem__router-link"> 数据预拉取 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/darkmode.html" class="NavigationItem__router-link"> DarkMode 适配指南 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/ability/adapt.html" class="NavigationItem__router-link"> 大屏适配指南 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/inference/tutorial.html" class="NavigationItem__router-link"> AI/AR <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/inference/tutorial.html" class="NavigationItem__router-link"> AI推理能力 <span class="wedoc-beta-tag" style="margin-left:0;">Beta</span></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/inference/tutorial.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/inference/supports.html" class="NavigationItem__router-link"> 算子支持列表 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/inference/tutorial_int8.html" class="NavigationItem__router-link"> 模型量化推理 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/base.html" class="NavigationItem__router-link"> VisionKit 视觉能力 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/base.html" class="NavigationItem__router-link"> VisionKit 基础 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/plane.html" class="NavigationItem__router-link"> 6Dof-水平面 AR <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/plane-options.html" class="NavigationItem__router-link"> 6Dof-水平面 AR 扩展能力 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/marker.html" class="NavigationItem__router-link"> Marker AR <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/osd.html" class="NavigationItem__router-link"> 单样本检测(OSD) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/face.html" class="NavigationItem__router-link"> 人脸检测 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/body.html" class="NavigationItem__router-link"> 人体检测 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/hand.html" class="NavigationItem__router-link"> 人手检测 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/shoe.html" class="NavigationItem__router-link"> 鞋部检测 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/ocr.html" class="NavigationItem__router-link"> OCR检测 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/idcard.html" class="NavigationItem__router-link"> 身份证检测 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/visionkit/depth.html" class="NavigationItem__router-link"> 深度估计 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/" class="NavigationItem__router-link"> XR-FRAME <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/" class="NavigationItem__router-link"> 开发指南 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/" class="NavigationItem__router-link"> 开始 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#新建一个XR组件" class="NavigationItem__router-link"> 新建一个XR组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#在页面中使用这个组件" class="NavigationItem__router-link"> 在页面中使用这个组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#添加一个物体" class="NavigationItem__router-link"> 添加一个物体 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#来点颜色和灯光" class="NavigationItem__router-link"> 来点颜色和灯光 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#有点寡淡,加上图像" class="NavigationItem__router-link"> 有点寡淡,加上图像 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#让场景更丰富,环境数据" class="NavigationItem__router-link"> 让场景更丰富,环境数据 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#动起来,加入动画" class="NavigationItem__router-link"> 动起来,加入动画 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#还是不够,放个模型" class="NavigationItem__router-link"> 还是不够,放个模型 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#再来点交互" class="NavigationItem__router-link"> 再来点交互 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#组件通信,加上HUD" class="NavigationItem__router-link"> 组件通信,加上HUD <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#虚拟-x-现实,追加-AR-能力" class="NavigationItem__router-link"> 虚拟 x 现实,追加 AR 能力 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#识别人脸,给自己戴个面具" class="NavigationItem__router-link"> 识别人脸,给自己戴个面具 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#手势,给喜欢的作品点赞" class="NavigationItem__router-link"> 手势,给喜欢的作品点赞 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#OSDMarker,给现实物体做标记" class="NavigationItem__router-link"> OSDMarker,给现实物体做标记 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#_2DMarker-视频,让照片动起来" class="NavigationItem__router-link"> 2DMarker+视频,让照片动起来 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#加上魔法,来点粒子" class="NavigationItem__router-link"> 加上魔法,来点粒子 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#后处理,让画面更加好玩" class="NavigationItem__router-link"> 后处理,让画面更加好玩 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#分享给你的好友吧!" class="NavigationItem__router-link"> 分享给你的好友吧! <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/xr-frame/#之后的,就交给你的创意" class="NavigationItem__router-link"> 之后的,就交给你的创意 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/bluetooth.html" class="NavigationItem__router-link"> 连接硬件能力 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/bluetooth.html" class="NavigationItem__router-link"> 蓝牙 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/bluetooth.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/ble.html" class="NavigationItem__router-link"> 蓝牙低功耗 (BLE) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/ble-mesh.html" class="NavigationItem__router-link"> 蓝牙低功耗网状网络 (BLE Mesh) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/beacon.html" class="NavigationItem__router-link"> 蓝牙信标 (Beacon) <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/nfc.html" class="NavigationItem__router-link"> 近场通信 (NFC) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/wifi.html" class="NavigationItem__router-link"> 无线局域网 (Wi-Fi) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-access.html" class="NavigationItem__router-link"> 硬件设备接入 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-message.html" class="NavigationItem__router-link"> 设备消息 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-register.html" class="NavigationItem__router-link"> 设备认证 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-register.html" class="NavigationItem__router-link"> 指引 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-register-wmpf.html" class="NavigationItem__router-link"> 使用 WMPF(安卓)认证设备 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-register-sdk.html" class="NavigationItem__router-link"> 设备认证 SDK(安卓) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-tee.html" class="NavigationItem__router-link"> 设备认证 TEE 规范 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-voip.html" class="NavigationItem__router-link"> 音视频通话(for 硬件) <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-voip.html" class="NavigationItem__router-link"> 指引 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/" class="NavigationItem__router-link"> VoIP 通话插件 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/" class="NavigationItem__router-link"> 接入指引 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-4"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/initByCaller.html" class="NavigationItem__router-link"> 接口文档 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-5"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/call-intro.html" class="NavigationItem__router-link"> 发起通话 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/call-intro.html" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/initByCaller.html" class="NavigationItem__router-link"> initByCaller <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/callWMPF.html" class="NavigationItem__router-link"> callWMPF <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/callDevice.html" class="NavigationItem__router-link"> callDevice <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/forceHangUpVoip.html" class="NavigationItem__router-link"> forceHangUpVoip <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/getPluginEnterOptions.html" class="NavigationItem__router-link"> getPluginEnterOptions <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/getPluginOnloadOptions.html" class="NavigationItem__router-link"> getPluginOnloadOptions <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/onVoipEvent.html" class="NavigationItem__router-link"> onVoipEvent <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/setCustomBtnText.html" class="NavigationItem__router-link"> setCustomBtnText <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/setUIConfig.html" class="NavigationItem__router-link"> setUIConfig <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/setVoipEndPagePath.html" class="NavigationItem__router-link"> setVoipEndPagePath <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/getIotBindContactList.html" class="NavigationItem__router-link"> getIotBindContactList <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/api/errCode.html" class="NavigationItem__router-link"> 错误码 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/wxpay.html" class="NavigationItem__router-link"> 支付刷脸模式 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-plugin/changelog.html" class="NavigationItem__router-link"> 更新日志 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/device-app-android.html" class="NavigationItem__router-link"> 开发安卓设备端应用 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/voip-sdk.html" class="NavigationItem__router-link"> 小程序音视频通话 SDK <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/voip-sdk.html" class="NavigationItem__router-link"> Linux 设备 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-4"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/le-device-sdk.html" class="NavigationItem__router-link"> RTOS 设备 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/le-device-sdk.html" class="NavigationItem__router-link"> 云对云设备端 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/cloud-server-sdk.html" class="NavigationItem__router-link"> 云对云服务端 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/voip-video.html" class="NavigationItem__router-link"> VoIP 视频流指南 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-sdk/wx_operation.html" class="NavigationItem__router-link"> 异步接口使用指南 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip-sdk/hal.html" class="NavigationItem__router-link"> 硬件抽象层 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/auth.html" class="NavigationItem__router-link"> 用户授权设备 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/call-wechat.html" class="NavigationItem__router-link"> 设备呼叫手机微信 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/call-wmpf.html" class="NavigationItem__router-link"> 手机微信呼叫设备(安卓) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/call-device.html" class="NavigationItem__router-link"> 手机微信呼叫设备(Linux) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/performance.html" class="NavigationItem__router-link"> 性能与体验优化 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/voip-faq.html" class="NavigationItem__router-link"> 问题排查 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/voip-faq.html" class="NavigationItem__router-link"> 常见问题 FAQ <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/guide.html" class="NavigationItem__router-link"> 通话异常排查指南 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/notification.html" class="NavigationItem__router-link"> 通话提醒异常排查指南 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/download-device-register.html" class="NavigationItem__router-link"> 下载 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/download-device-register.html" class="NavigationItem__router-link"> 设备认证工具 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/voip/download-wxvoipsdk-linux.html" class="NavigationItem__router-link"> 小程序音视频通话 SDK (Linux) <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <!----> <!----> <a href="https://developers.weixin.qq.com/doc/oplatform/Miniprogram_Frame/download.html" target="_blank" class="NavigationItem__external-link">安卓小程序硬件框架</a></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/device-group.html" class="NavigationItem__router-link"> 设备组 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/device/help.html" class="NavigationItem__router-link"> 需要帮助 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/login.html" class="NavigationItem__router-link"> 开放能力 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/login.html" class="NavigationItem__router-link"> 用户信息 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/login.html" class="NavigationItem__router-link"> 小程序登录 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/union-id.html" class="NavigationItem__router-link"> UnionID 机制说明 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/authorize.html" class="NavigationItem__router-link"> 授权 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/signature.html" class="NavigationItem__router-link"> 开放数据校验与解密 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/getPhoneNumber.html" class="NavigationItem__router-link"> 手机号快速验证组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/getRealtimePhoneNumber.html" class="NavigationItem__router-link"> 手机号实时验证组件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/userProfile.html" class="NavigationItem__router-link"> 获取头像昵称 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/bio-auth.html" class="NavigationItem__router-link"> 生物认证 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/share-timeline.html" class="NavigationItem__router-link"> 分享到朋友圈 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/share.html" class="NavigationItem__router-link"> 转发 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/share.html" class="NavigationItem__router-link"> 转发 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/share/updatable-message.html" class="NavigationItem__router-link"> 动态消息 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/share/private-message.html" class="NavigationItem__router-link"> 小程序私密消息 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/favorite.html" class="NavigationItem__router-link"> 收藏 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/material/support_material.html" class="NavigationItem__router-link"> 聊天素材打开 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/safe-password.html" class="NavigationItem__router-link"> 安全能力 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/user-encryptkey.html" class="NavigationItem__router-link"> 小程序加密网络通道 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/safe-password.html" class="NavigationItem__router-link"> 安全键盘 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/share-werun.html" class="NavigationItem__router-link"> 分享数据到微信运动 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/voip-chat.html" class="NavigationItem__router-link"> 音视频通话 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/voip-chat.html" class="NavigationItem__router-link"> 多人音视频对话 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/1v1voip.html" class="NavigationItem__router-link"> 双人音视频对话 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/launchApp.html" class="NavigationItem__router-link"> 打开 App <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/openEmbeddedMiniProgram.html" class="NavigationItem__router-link"> 打开半屏小程序 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/subscribe-message.html" class="NavigationItem__router-link"> 消息 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/subscribe-message-overview.html" class="NavigationItem__router-link"> 订阅消息 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/subscribe-message-2.html" class="NavigationItem__router-link"> 新版一次性订阅消息开发指南 <span class="wedoc-beta-tag" style="margin-left:0;">Beta</span></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-4"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/subscribe-message.html" class="NavigationItem__router-link"> 小程序订阅消息(用户通过弹窗订阅)开发指南 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/subscribe-message.html#订阅消息语音提醒" class="NavigationItem__router-link"> 订阅消息语音提醒 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/subscribe-message.html#订阅消息添加提醒" class="NavigationItem__router-link"> 订阅消息添加提醒 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/uniform-message.html" class="NavigationItem__router-link"> 统一服务消息 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/customer-message/customer-message.html" class="NavigationItem__router-link"> 客服消息 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/customer-message/customer-message.html" class="NavigationItem__router-link"> 概述 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/customer-message/receive.html" class="NavigationItem__router-link"> 接收消息和事件 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/customer-message/send.html" class="NavigationItem__router-link"> 发送消息 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/customer-message/trans.html" class="NavigationItem__router-link"> 转发消息 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/customer-message/typing.html" class="NavigationItem__router-link"> 下发客服输入状态 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/customer-message/temp-media.html" class="NavigationItem__router-link"> 临时素材 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/location-message.html" class="NavigationItem__router-link"> 位置消息 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/qr-code.html" class="NavigationItem__router-link"> 获取小程序码 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/url-scheme.html" class="NavigationItem__router-link"> 获取小程序链接 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/url-scheme.html" class="NavigationItem__router-link"> 获取 URL Scheme <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/url-link.html" class="NavigationItem__router-link"> 获取 URL Link <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/shortlink.html" class="NavigationItem__router-link"> 获取 Short Link <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/sms.html" class="NavigationItem__router-link"> 应用:短信打开小程序 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/NFC.html" class="NavigationItem__router-link"> 应用:NFC 标签打开小程序 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/migrateMiniprogram.html" class="NavigationItem__router-link"> 小程序账号迁移 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/channels-profile.html" class="NavigationItem__router-link"> 视频号 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/channels-profile.html" class="NavigationItem__router-link"> 视频号主页 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/channels-activity.html" class="NavigationItem__router-link"> 视频号视频 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/channels-live.html" class="NavigationItem__router-link"> 视频号直播 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/channels-event.html" class="NavigationItem__router-link"> 视频号活动 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/data-analysis.html" class="NavigationItem__router-link"> 数据分析 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/nearby.html" class="NavigationItem__router-link"> 附近的小程序 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/banner-ad.html" class="NavigationItem__router-link"> 广告 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/banner-ad.html" class="NavigationItem__router-link"> Banner 广告 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/rewarded-video-ad.html" class="NavigationItem__router-link"> 激励视频广告 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/interstitialAd-ad.html" class="NavigationItem__router-link"> 插屏广告 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/video-feeds-ad.html" class="NavigationItem__router-link"> 视频广告 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/video-patch-ad.html" class="NavigationItem__router-link"> 视频前贴广告 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/grid-ad.html" class="NavigationItem__router-link"> 格子广告 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/custom-ad.html" class="NavigationItem__router-link"> 原生模板广告 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/preload-ad.html" class="NavigationItem__router-link"> 广告预加载接口 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/ad-data-interface.html" class="NavigationItem__router-link"> 广告数据接口 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/ad-data-interface.html#一、获取小程序广告汇总数据(publisher-adpos-general)" class="NavigationItem__router-link"> 广告汇总数据 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/ad-data-interface.html#二、获取小程序广告细分数据(publisher-adunit-general)" class="NavigationItem__router-link"> 广告细分数据 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/ad-data-interface.html#三、获取小程序广告位清单(get-adunit-list)" class="NavigationItem__router-link"> 广告位清单 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/open-ability/ad/ad-data-interface.html#四、获取小程序结算收入数据及结算主体信息(publisher-settlement)" class="NavigationItem__router-link"> 结算收入数据 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/usability/debug.html" class="NavigationItem__router-link"> 调试 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/usability/debug.html" class="NavigationItem__router-link"> 概述 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/usability/vConsole.html" class="NavigationItem__router-link"> vConsole <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/usability/sourceMap.html" class="NavigationItem__router-link"> Source Map <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/realtimelog/" class="NavigationItem__router-link"> 实时日志 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/usability/PublicErrno.html" class="NavigationItem__router-link"> Errno错误码 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start.html" class="NavigationItem__router-link"> 性能与体验 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/" class="NavigationItem__router-link"> 概述 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start.html" class="NavigationItem__router-link"> 启动性能 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start.html" class="NavigationItem__router-link"> 概述 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start_process.html" class="NavigationItem__router-link"> 小程序启动流程 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start_optimizeA.html" class="NavigationItem__router-link"> 代码包体积优化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start_optimizeB.html" class="NavigationItem__router-link"> 代码注入优化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start_optimizeC.html" class="NavigationItem__router-link"> 首屏渲染优化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/start_optimizeD.html" class="NavigationItem__router-link"> 其他优化建议 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips.html" class="NavigationItem__router-link"> 运行时性能 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips.html" class="NavigationItem__router-link"> 概述 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/runtime_setData.html" class="NavigationItem__router-link"> 合理使用 setData <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/runtime_render.html" class="NavigationItem__router-link"> 渲染性能优化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/runtime_nav.html" class="NavigationItem__router-link"> 页面切换优化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/runtime_resource.html" class="NavigationItem__router-link"> 资源加载优化 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/tips/runtime_memory.html" class="NavigationItem__router-link"> 内存优化 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/perf_data.html" class="NavigationItem__router-link"> 性能数据 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/analysis.html" class="NavigationItem__router-link"> 体验分析 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/perf_debug.html" class="NavigationItem__router-link"> 调试工具 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/perf_debug.html" class="NavigationItem__router-link"> 概述 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/remote_debug_2.html" class="NavigationItem__router-link"> 真机调试 2.0 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/devtools-perf.html" class="NavigationItem__router-link"> 「模拟器」和「调试器」 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/quality-panel.html" class="NavigationItem__router-link"> 代码质量分析面板 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/fps_panel.html" class="NavigationItem__router-link"> FPS 面板 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/panel.html" class="NavigationItem__router-link"> 性能面板 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/audits/audits.html" class="NavigationItem__router-link"> 体验评分 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/audits/audits.html" class="NavigationItem__router-link"> 体验评分简介 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-3"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/audits/scoring.html" class="NavigationItem__router-link"> 评分方法与规则 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/audits/scoring.html" class="NavigationItem__router-link"> 评分方法 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/audits/performance.html" class="NavigationItem__router-link"> 性能 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/audits/accessibility.html" class="NavigationItem__router-link"> 体验 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/audits/best-practice.html" class="NavigationItem__router-link"> 最佳实践 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/wasm.html" class="NavigationItem__router-link"> WXWebAssembly <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/api-frequency.html" class="NavigationItem__router-link"> 接口调用频率规范 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/network.html" class="NavigationItem__router-link"> 网络调优 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/performance/weak-network.html" class="NavigationItem__router-link"> 弱网体验优化 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html" aria-current="page" class="NavigationItem__router-link router-link-exact-active router-link-active"> 安全指引 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#开发原则与注意事项" class="NavigationItem__router-link"> 开发原则与注意事项 <!----></a> <!----> <!----></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#通用" class="NavigationItem__router-link"> 通用 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#接口鉴权" class="NavigationItem__router-link"> 接口鉴权 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#代码管理与泄漏" class="NavigationItem__router-link"> 代码管理与泄漏 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#信息泄露" class="NavigationItem__router-link"> 信息泄露 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#授权用户信息变更" class="NavigationItem__router-link"> 授权用户信息变更 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#小程序违规处罚信息通知" class="NavigationItem__router-link"> 小程序违规处罚信息通知 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#后台(包括云函数与自建后台)" class="NavigationItem__router-link"> 后台 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#注入漏洞" class="NavigationItem__router-link"> 注入漏洞 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#弱口令" class="NavigationItem__router-link"> 弱口令 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#文件上传漏洞" class="NavigationItem__router-link"> 文件上传漏洞 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#文件下载" class="NavigationItem__router-link"> 文件下载 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#目录遍历" class="NavigationItem__router-link"> 目录遍历 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/security.html#条件竞争" class="NavigationItem__router-link"> 条件竞争 <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/operation.html" class="NavigationItem__router-link"> 健康运营指引 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-2"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/user-privacy/" class="NavigationItem__router-link"> 用户隐私保护 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/user-privacy/" class="NavigationItem__router-link"> 用户隐私保护指引填写说明 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/user-privacy/miniprogram-intro.html" class="NavigationItem__router-link"> 小程序用户隐私保护指引内容介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/user-privacy/plugin-intro.html" class="NavigationItem__router-link"> 插件用户隐私保护说明内容介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/user-privacy/PrivacyAuthorize.html" class="NavigationItem__router-link"> 小程序隐私协议开发指南 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/operation.html#用户安全解决方案" class="NavigationItem__router-link"> 用户安全解决方案 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/operation.html#内容安全解决方案" class="NavigationItem__router-link"> 内容安全解决方案 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/gateway.html" class="NavigationItem__router-link"> 业务安全解决方案 <!----></a> <!----> <!----></span></li></ul></div></li><li><span class="NavigationItem"><!----> <!----> <!----> <a href="https://developer.work.weixin.qq.com/document/path/92455" target="_blank" class="NavigationItem__external-link">企业微信兼容</a></span></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/client-lib/" class="NavigationItem__router-link"> 基础库 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/client-lib/" class="NavigationItem__router-link"> 介绍 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/client-lib/version.html" class="NavigationItem__router-link"> 版本分布 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/compatibility.html" class="NavigationItem__router-link"> 低版本兼容 <!----></a> <!----> <!----></span></li></ul></div></li><li><div class="NavigationLevel NavigationLevel--closed NavigationLevel--level-1"><div class="NavigationLevel__parent"><span class="NavigationToggle NavigationToggle--closed"><span class="NavigationToggle__icon NavigationToggle__icon--closed"></span></span> <span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/search/seo.html" class="NavigationItem__router-link"> 小程序搜索 <!----></a> <!----> <!----></span></div> <ul class="NavigationLevel__children"><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/search/seo.html" class="NavigationItem__router-link"> 小程序搜索优化指南 <!----></a> <!----> <!----></span></li><li><span class="NavigationItem"><!----> <a href="/miniprogram/dev/framework/product/" class="NavigationItem__router-link"> 商品数据接入(内测) <!----></a> <!----> <!----></span></li></ul></div></li></ul></div></div> </aside></div> <div class="page__wrp"><main class="page"><div class="page-inner" style="min-height:0px;"> <div id="docContent"><div class="Breadcrumb"></div> <div class="content custom"><h1 id="安全指引"><a href="#安全指引" class="header-anchor">#</a> 安全指引</h1> <h2 id="开发原则与注意事项"><a href="#开发原则与注意事项" class="header-anchor">#</a> 开发原则与注意事项</h2> <p>本文档整理了部分小程序开发中常见的安全风险和漏洞,用于帮助开发者在开发环节中发现和修复相关漏洞,避免在上线后对业务和数据造成损失。开发者在开发环节中必须基于以下原则:</p> <ol><li>互不信任原则,不要信任用户提交的数据,包括第三方系统提供的数据,必要的数据校验必须放在后台校验。</li> <li>最小权限原则,代码、模块等只拥有可以完成任务的最小权限,不赋予不必要的权限。</li> <li>禁止明文保存用户敏感数据。</li> <li>小程序代码(不包括云函数代码)跟传统 Web 应用的前端代码类似,可被外部获取及进行反混淆,重要业务逻辑应放在后台代码或云函数中进行。</li> <li>后台接口调用以及云函数调用,必须进行有效的身份鉴权。</li></ol> <h2 id="通用"><a href="#通用" class="header-anchor">#</a> 通用</h2> <h3 id="接口鉴权"><a href="#接口鉴权" class="header-anchor">#</a> 接口鉴权</h3> <p>接口鉴权是指后台接口(包括自建后台接口与云函数)在被调用时需要对本次接口调用进行权限校验,否则容易发生越权行为。如商品删除接口,后台在收到请求时应当校验调用者的身份信息(如 openid、 ip 地址、开发者自定义的登录态信息等),只有指定用户才可以通过校验进行删除。</p> <p>越权通常分为平行越权和垂直越权:</p> <ul><li><p>平行越权</p> <p>平行越权是指相同角色之间的越权。 A1、 A2 都是普通用户, A1 通过请求后台接口 userinfo.php?id=A1 来获取用户 A1 自己的信息,如果 userinfo.php 没有进行权限校验,用户 A1 把请求改为 userinfo.php?id=A2 便可以获取到 A2 用户的信息,造成 A2 用户信息的泄露。</p></li> <li><p>垂直越权</p> <p>垂直越权是指不同角色之间的越权。 B1 是管理员, B2 是普通用户,管理员 B1 通过请求后台接口 getalluserinfo.php 可以获取所有注册用户的信息,如果 getalluserinfo.php 没有进行权限校验, B2 用户也可以请求 getalluserinfo.php 来获取所有注册用户的信息,出现越权行为。</p></li></ul> <p><strong>开发建议:</strong></p> <ol><li><p>敏感数据、能力相关接口需要在后台进行鉴权。通常可校验 openid、 IP 地址、自定义登陆态等信息。</p></li> <li><p>鉴权逻辑应放在后台进行,不应在小程序前端以隐藏页面、隐藏按钮等方式来代替。参照原则4。</p></li> <li><p>鉴权代码示例(仅供参考)</p> <ul><li><p>自建后台鉴权</p> <div class="language-php extra-class"><pre class="language-php"><code><span class="token keyword">function</span> <span class="token function-definition function">actionDelete</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token variable">$item_id</span> <span class="token operator">=</span> <span class="token variable">$_POST</span><span class="token punctuation">[</span><span class="token string double-quoted-string">&quot;item_id&quot;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token variable">$openid</span> <span class="token operator">=</span> <span class="token variable">$_POST</span><span class="token punctuation">[</span><span class="token string double-quoted-string">&quot;openid&quot;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token variable">$ip</span> <span class="token operator">=</span> <span class="token variable">$_SERVER</span><span class="token punctuation">[</span><span class="token string single-quoted-string">'REMOTE_ADDR'</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token variable">$user_role</span> <span class="token operator">=</span> <span class="token variable">$_SESSION</span><span class="token punctuation">[</span><span class="token string double-quoted-string">&quot;user_role&quot;</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$openid</span> <span class="token operator">===</span> <span class="token string double-quoted-string">&quot;xxx&quot;</span> <span class="token operator">&amp;&amp;</span> <span class="token variable">$ip</span> <span class="token operator">===</span> <span class="token string double-quoted-string">&quot;192.168.0.101&quot;</span> <span class="token operator">&amp;&amp;</span> <span class="token variable">$user_role</span> <span class="token operator">===</span> <span class="token string double-quoted-string">&quot;admin&quot;</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token comment">// 进行删除操作</span> <span class="token comment">// ...</span> <span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span> <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span> <span class="token comment">// 记录非法请求</span> <span class="token comment">// ...</span> <span class="token keyword">return</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">;</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span> </code></pre></div></li> <li><p>云函数接口鉴权</p> <div class="language-js extra-class"><pre class="language-js"><code>exports<span class="token punctuation">.</span><span class="token function-variable function">main</span> <span class="token operator">=</span> <span class="token keyword">async</span> <span class="token punctuation">(</span><span class="token parameter">event<span class="token punctuation">,</span> context</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span> <span class="token keyword">const</span> <span class="token punctuation">{</span> <span class="token constant">OPENID</span><span class="token punctuation">,</span> <span class="token constant">APPID</span><span class="token punctuation">,</span> <span class="token constant">UNIONID</span> <span class="token punctuation">}</span> <span class="token operator">=</span> cloud<span class="token punctuation">.</span><span class="token function">getWXContext</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token constant">OPENID</span> <span class="token operator">===</span> <span class="token string">&quot;xxx&quot;</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token comment">// 进行删除操作</span> <span class="token comment">// ...</span> <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span> <span class="token comment">// 记录非法请求</span> <span class="token comment">// ...</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span> </code></pre></div></li></ul></li></ol> <h3 id="代码管理与泄漏"><a href="#代码管理与泄漏" class="header-anchor">#</a> 代码管理与泄漏</h3> <ol><li><p>当使用 git、 svn 等版本管理工具时,会产生 .git 等目录。某些编辑器或软件也会在运行过程中生成临时文件。若这些目录或文件被带到生产环境,则可能发生源码泄漏。</p></li> <li><p>使用<a href="https://git.weixin.qq.com" target="_blank" rel="noopener noreferrer">小程序代码管理平台<span></span></a>或 github 等第三方平台时需要注意项目权限,不要公开敏感、内部项目。</p></li></ol> <p><strong>开发建议:</strong></p> <ol><li>备份文件和版本管理工具产生的文件不要同步到 Web 目录下。</li> <li>禁止外部访问 .git 等目录与文件。</li> <li>在<a href="https://git.weixin.qq.com" target="_blank" rel="noopener noreferrer">小程序代码管理平台<span></span></a>等管理平台内配置适当的访问权限。</li></ol> <h2 id="小程序"><a href="#小程序" class="header-anchor">#</a> 小程序</h2> <h3 id="信息泄露"><a href="#信息泄露" class="header-anchor">#</a> 信息泄露</h3> <p>敏感信息是指一旦泄露可能会对开发者的业务、合作伙伴和用户带来利益损害的数据,包括但不限于<strong>账号 Appsecret、特权账号信息、后台加密密钥、登录账户密码、用户身份证号、手机号、银行卡号等</strong>。</p> <p><strong>开发建议:</strong></p> <ol><li><p>敏感信息不应以明文、注释、可逆的编码方式(如 base64)、不安全散列函数(如 MD5、 SHA1)等形式出现在小程序文件内。</p></li> <li><p>部分敏感信息如用户的银行卡号、手机号等需要用于展示的,需要进行脱敏处理。常用脱敏规范如下:</p> <div class="table-wrp"><table><thead><tr><th>敏感信息类型</th> <th>展示样例</th></tr></thead> <tbody><tr><td>姓名</td> <td>名字只有两个字,对第一个字打码,如:*三。 多于两个字,只保留第一个和最后一个,其余都打码,如:王*四、欧**五</td></tr> <tr><td>身份证</td> <td>只显示第一位和最后一位,如:3****************1</td></tr> <tr><td>手机号</td> <td>除去手机国际码后,手机号位数不少于10位时,只显示前三位和最后两位,如:156******77。手机号位数少于10位时,只显示前两位和后两位,如:12*****89。国家码可以完全显示。</td></tr> <tr><td>银行卡</td> <td>只显示最后4位,如:************1234</td></tr></tbody></table></div></li> <li><p><strong>如果小程序存在敏感信息泄露的问题,微信开放平台将有可能下架该小程序,并暂停该小程序的相关服务。</strong></p></li></ol> <h3 id="授权用户信息变更"><a href="#授权用户信息变更" class="header-anchor">#</a> 授权用户信息变更</h3> <p>1、 授权用户资料变更:当部分用户的资料存在风险时,平台会对用户资料进行清理,并通过消息推送服务器通知最近30天授权过的小程序开发者,我们建议开发者留意响应该事件,及时主动更新或清理用户的头像及昵称,降低风险。<br> 2、 授权用户资料撤回:当用户撤回授权信息时,平台会通过消息推送服务器通知给小程序开发者,请开发者注意及时删除用户信息。<br> 3、 授权用户完成注销:当授权用户完成注销后,平台会通过消息推送服务器通知给小程序开发者,请依法依规及时履行相应个人信息保护义务,保护用户权益。<br> 点击查看<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html" target="_blank" rel="noopener noreferrer">消息推送服务器配置<span></span></a></p> <h4 id="事件推送示例:"><a href="#事件推送示例:" class="header-anchor">#</a> 事件推送示例:</h4> <h5 id="XML"><a href="#XML" class="header-anchor">#</a> XML</h5> <div class="language- extra-class"><pre class="language-text"><code>&lt;xml&gt; &lt;ToUserName&gt;&lt;![CDATA[gh_870882ca4b1]]&gt;&lt;/ToUserName&gt; &lt;FromUserName&gt;&lt;![CDATA[owAqB1v0ahK_Xlc7GshIDdf2yf7E]]&gt;&lt;/FromUserName&gt; &lt;CreateTime&gt;1626857200&lt;/CreateTime&gt; &lt;MsgType&gt;&lt;![CDATA[event]]&gt;&lt;/MsgType&gt; &lt;Event&gt;&lt;![CDATA[user_authorization_revoke]]&gt;&lt;/Event&gt; &lt;OpenID&gt;&lt;![CDATA[owAqB1nqaOYYWl0Ng484G2z5NIwU]]&gt;&lt;/OpenID&gt; &lt;AppID&gt;&lt;![CDATA[wx13974bf780d3dc89]]&gt;&lt;/AppID&gt; &lt;RevokeInfo&gt;&lt;![CDATA[1]]&gt;&lt;/RevokeInfo&gt; &lt;PluginID&gt;&lt;![CDATA[wx13974bf780d3dc89]]&gt;&lt;/PluginID&gt; &lt; OpenPID&gt;&lt;![CDATA[G7esq5NVzP76HIHoB95t4CVBP6to]]&gt;&lt;/OpenPID&gt; &lt;/xml&gt; </code></pre></div><h5 id="JSON"><a href="#JSON" class="header-anchor">#</a> JSON</h5> <div class="language- extra-class"><pre class="language-text"><code>{ &quot;ToUserName&quot;: &quot;gh_870882ca4b1&quot;, &quot;FromUserName&quot;: &quot;oaKk346BaWE-eIn4oSRWbaM9vR7s&quot;, &quot;CreateTime&quot;: 1627359464, &quot;MsgType&quot;: &quot;event&quot;, &quot;Event&quot;: &quot;user_authorization_revoke&quot;, &quot;OpenID&quot;: &quot;oaKk343WOktAaT2ygsX138BGblrg&quot;, &quot;AppID&quot;: &quot;wx13974bf780d3dc89&quot;, &quot;RevokeInfo&quot;: &quot;1&quot;, &quot;PluginID&quot;: &quot;wx13974bf780d3dc89&quot;, &quot;OpenPID&quot;: &quot; G7esq5NVzP76HIHoB95t4CVBP6to&quot; } </code></pre></div><h4 id="事件字段定义"><a href="#事件字段定义" class="header-anchor">#</a> 事件字段定义</h4> <div class="table-wrp"><table><thead><tr><th>属性</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>ToUserName</td> <td>string</td> <td>小程序的UserName</td></tr> <tr><td>FromUserName</td> <td>string</td> <td>平台推送服务UserName</td></tr> <tr><td>MsgType</td> <td>string</td> <td>默认为:Event</td></tr> <tr><td>Event</td> <td>string</td> <td>user_info_modified:用户资料变更,user_authorization_revoke:用户撤回,user_authorization_cancellation:用户完成注销;</td></tr> <tr><td>CreateTime</td> <td>number</td> <td>发送时间</td></tr> <tr><td>OpenID</td> <td>string</td> <td>授权用户OpenID</td></tr> <tr><td>AppID</td> <td>string</td> <td>小程序的AppID</td></tr> <tr><td>RevokeInfo</td> <td>string</td> <td>用户撤回的授权信息,1:车牌号,2:地址,3:发票信息,4:蓝牙,5:麦克风,6:昵称和头像,7:摄像头,8:手机号,12:微信运动步数,13:位置信息,14:选中的图片或视频,15:选中的文件,16:邮箱地址,18:选择的位置信息,19:昵称输入键盘中选择的微信昵称,20:获取用户头像组件中选择的微信头像</td></tr> <tr><td>PluginID</td> <td>string</td> <td>插件场景用户撤回,插件的AppID</td></tr> <tr><td>OpenPID</td> <td>string</td> <td>插件场景用户撤回,撤回用户的OpenPID</td></tr></tbody></table></div><h3 id="小程序违规处罚信息通知"><a href="#小程序违规处罚信息通知" class="header-anchor">#</a> 小程序违规处罚信息通知</h3> <p>当小程序存在违规行为时,平台会通过消息推送服务器通知给小程序开发者,建议小程序开发者注意及时接收相关通知进行排查整改,此通知不影响已有站内信等通知方式。 点击查看<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html" target="_blank" rel="noopener noreferrer">消息推送服务器配置<span></span></a></p> <h4 id="_1-事件字段定义"><a href="#_1-事件字段定义" class="header-anchor">#</a> 1. 事件字段定义</h4> <p>1.1 字段【Event】等于&quot;wxa_punish_event&quot;时,则表示这是一条关于【小程序违规处罚事件】的通知。</p> <div class="table-wrp"><table><thead><tr><th>属性</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>Event</td> <td>string</td> <td>事件名称:wxa_punish_event,即小程序违规处罚信息</td></tr> <tr><td>event_type</td> <td>number</td> <td>事件类型。1:警告;2:功能封禁;3:下架;4:账号封禁;10:页面封禁。</td></tr> <tr><td>punish_id</td> <td>string</td> <td>违规处罚ID,用于唯一标识每次违规</td></tr> <tr><td>appid</td> <td>string</td> <td>被处罚小程序的AppID</td></tr> <tr><td>punish_time</td> <td>number</td> <td>违规时间(UNIX时间戳)</td></tr> <tr><td>illegal_reason</td> <td>string</td> <td>违规原因</td></tr> <tr><td>illegal_content</td> <td>string</td> <td>违规内容</td></tr> <tr><td>rule_name</td> <td>string</td> <td>违反规则名称</td></tr> <tr><td>rule_url</td> <td>string</td> <td>违反规则链接</td></tr> <tr><td>adjust_guide_url</td> <td>string</td> <td>违规申诉及整改指引链接</td></tr> <tr><td>detail</td> <td>string</td> <td>违规处罚详情,字段内容为JSON字符串,JSON具体结构取决于event_type,请参照下方说明对该字段中包含的JSON字符串进行正确的解析</td></tr></tbody></table></div><h5 id="_1-2违规处罚事件详情(detail详细释义)"><a href="#_1-2违规处罚事件详情(detail详细释义)" class="header-anchor">#</a> 1.2违规处罚事件详情(detail详细释义)</h5> <ul><li><p>当<strong>event_type=1</strong>时<strong>detail</strong>中的JSON字符串结构如下:</p> <div class="table-wrp"><table><thead><tr><th>属性</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>warned_type</td> <td>number</td> <td>警告类型。1:警告账号封禁;2:警告功能封禁;3:警告下架。</td></tr> <tr><td>rectify_deadline</td> <td>number</td> <td>警告的截止时间(UNIX时间戳)</td></tr> <tr><td>warned_function_names</td> <td>array&lt;string&gt;</td> <td>警告要封禁的功能项列表,如需获取列表中每个功能项的封禁时长,可直接在warned_ban_days的对应索引处获得,warned_function_names和warned_ban_days总是一一对应。(该字段仅当warned_type=2时生效)</td></tr> <tr><td>warned_ban_days</td> <td>array&lt;number&gt;</td> <td>警告封禁的天数列表。当warned_type=1时则该列表仅有一项,代表警告要封禁小程序账号的天数。当warned_type=2时列表中的每一项分别代表warned_function_names中对应索引处的功能项被警告要封禁的天数。当warned_type=3时则该列表仅有一项,代表警告要下架小程序的天数。注:0代表永久封禁</td></tr></tbody></table></div></li> <li><p>当<strong>event_type=2</strong>时<strong>detail</strong>中的JSON字符串结构如下:</p> <div class="table-wrp"><table><thead><tr><th>属性</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>banned_days</td> <td>array&lt;number&gt;</td> <td>功能项被封禁的天数列表,列表中的每一项分别代表banned_function_names中对应索引处的功能项被封禁的天数。注:0代表永久封禁</td></tr> <tr><td>banned_function_names</td> <td>array&lt;string&gt;</td> <td>被封禁的功能项列表,如需获取列表中每个功能项的封禁时长,可直接在banned_days的对应索引处获得,banned_days和banned_function_names总是一一对应。</td></tr></tbody></table></div></li> <li><p>当<strong>event_type=3</strong>时<strong>detail</strong>中的JSON字符串结构如下:</p> <div class="table-wrp"><table><thead><tr><th>属性</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>suspended_days</td> <td>number</td> <td>下架天数。注:0代表永久下架</td></tr></tbody></table></div></li> <li><p>当<strong>event_type=4</strong>时<strong>detail</strong>中的JSON字符串结构如下:</p> <div class="table-wrp"><table><thead><tr><th>属性</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>banned_days</td> <td>number</td> <td>账号封禁天数。注:0代表永久封禁</td></tr></tbody></table></div></li> <li><p>当<strong>event_type=5</strong>时<strong>detail</strong>中的JSON字符串结构如下:</p> <div class="table-wrp"><table><thead><tr><th>属性</th> <th>类型</th> <th>说明</th></tr></thead> <tbody><tr><td>path</td> <td>string</td> <td>封禁的页面路径</td></tr></tbody></table></div></li></ul> <h4 id="_2-事件推送参数示例"><a href="#_2-事件推送参数示例" class="header-anchor">#</a> 2. 事件推送参数示例</h4> <ul><li><p><strong>event_type=1</strong></p> <ul><li><strong>warned_type=1</strong><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span> <span class="token property">&quot;ToUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;gh_1d6c1222test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;FromUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;oyeHc4i5LqBbWLVTfnhf-3TZ4BNk&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;CreateTime&quot;</span><span class="token operator">:</span> <span class="token number">1699803867</span><span class="token punctuation">,</span> <span class="token property">&quot;MsgType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;Event&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wxa_punish_event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;649557&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;appid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wx54a8eaa26606test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_time&quot;</span><span class="token operator">:</span> <span class="token number">1699803865</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_reason&quot;</span><span class="token operator">:</span> <span class="token string">&quot;存在诱导分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_content&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;违规内容测试&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;detail&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;warned_type\&quot;:1,\&quot;rectify_deadline\&quot;:1699796571,\&quot;warned_function_names\&quot;:[],\&quot;warned_ban_days\&quot;:[3]}&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;adjust_guide_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;event_type&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span> </code></pre></div></li> <li><strong>warned_type=2</strong><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span> <span class="token property">&quot;ToUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;gh_1d6c1222test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;FromUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;oyeHc4pIdqHZwh80SufyUuIzSenw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;CreateTime&quot;</span><span class="token operator">:</span> <span class="token number">1699795665</span><span class="token punctuation">,</span> <span class="token property">&quot;MsgType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;Event&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wxa_punish_event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;649551&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;appid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wx54a8eaa26606test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_time&quot;</span><span class="token operator">:</span> <span class="token number">1699795663</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_reason&quot;</span><span class="token operator">:</span> <span class="token string">&quot;存在诱导分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_content&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;违规内容测试&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;detail&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;warned_type\&quot;:2,\&quot;rectify_deadline\&quot;:1699796571,\&quot;warned_function_names\&quot;:[\&quot;分享朋友圈\&quot;,\&quot;客服消息接口\&quot;],\&quot;warned_ban_days\&quot;:[1,1]}&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;adjust_guide_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;event_type&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span> </code></pre></div></li> <li><strong>warned_type=3</strong><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span> <span class="token property">&quot;ToUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;gh_1d6c1222test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;FromUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;oyeHc4tGxCvPcXlKeFI5tU0jV_yw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;CreateTime&quot;</span><span class="token operator">:</span> <span class="token number">1699795665</span><span class="token punctuation">,</span> <span class="token property">&quot;MsgType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;Event&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wxa_punish_event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;649551&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;appid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wx54a8eaa26606test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_time&quot;</span><span class="token operator">:</span> <span class="token number">1699795663</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_reason&quot;</span><span class="token operator">:</span> <span class="token string">&quot;存在诱导分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_content&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;违规内容测试&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;detail&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;warned_type\&quot;:3,\&quot;rectify_deadline\&quot;:1699796571,\&quot;warned_function_names\&quot;:[],\&quot;warned_ban_days\&quot;:[1]}&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;adjust_guide_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;event_type&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span> </code></pre></div></li></ul></li> <li><p><strong>event_type=2</strong></p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span> <span class="token property">&quot;ToUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;gh_1d6c1222test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;FromUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;oyeHc4gSrT2S8jG2Ll1ZS16rwqQk&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;CreateTime&quot;</span><span class="token operator">:</span> <span class="token number">1699791600</span><span class="token punctuation">,</span> <span class="token property">&quot;MsgType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;Event&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wxa_punish_event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;13577492&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;appid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wx54a8eaa26606test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_time&quot;</span><span class="token operator">:</span> <span class="token number">1699791599</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_reason&quot;</span><span class="token operator">:</span> <span class="token string">&quot;存在诱导分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_content&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;违规内容测试&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;detail&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;banned_days\&quot;:[1,1],\&quot;banned_function_names\&quot;:[\&quot;分享朋友圈\&quot;,\&quot;客服消息接口\&quot;]}&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;adjust_guide_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;event_type&quot;</span><span class="token operator">:</span> <span class="token number">2</span> <span class="token punctuation">}</span> </code></pre></div></li> <li><p><strong>event_type=3</strong></p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span> <span class="token property">&quot;ToUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;gh_1d6c1222test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;FromUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;oyeHc4qHkaYV-0NYupPZBTBrBNuw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;CreateTime&quot;</span><span class="token operator">:</span> <span class="token number">1699801563</span><span class="token punctuation">,</span> <span class="token property">&quot;MsgType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;Event&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wxa_punish_event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;13577869&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;appid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wx54a8eaa26606test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_time&quot;</span><span class="token operator">:</span> <span class="token number">1699801560</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_reason&quot;</span><span class="token operator">:</span> <span class="token string">&quot;存在诱导分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_content&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;违规内容测试&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;detail&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;suspended_days\&quot;:1}&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;adjust_guide_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;event_type&quot;</span><span class="token operator">:</span> <span class="token number">3</span> <span class="token punctuation">}</span> </code></pre></div></li> <li><p><strong>event_type=4</strong></p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span> <span class="token property">&quot;ToUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;gh_1d6c1222test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;FromUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;oyeHc4jjAdCWq1klrk-puPMe0FC4&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;CreateTime&quot;</span><span class="token operator">:</span> <span class="token number">1699784111</span><span class="token punctuation">,</span> <span class="token property">&quot;MsgType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;Event&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wxa_punish_event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;9328325&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;appid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wx54a8eaa26606test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_time&quot;</span><span class="token operator">:</span> <span class="token number">1699784109</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_reason&quot;</span><span class="token operator">:</span> <span class="token string">&quot;存在诱导分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_content&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;测试违规内容/证据&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;detail&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;banned_days\&quot;:3}&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;adjust_guide_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;event_type&quot;</span><span class="token operator">:</span> <span class="token number">4</span> <span class="token punctuation">}</span> </code></pre></div></li> <li><p><strong>event_type=10</strong></p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span> <span class="token property">&quot;ToUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;gh_1d6c1222test&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;FromUserName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;oyeHc4n0I6U3A4Fq7tfOAqmAJy8E&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;CreateTime&quot;</span><span class="token operator">:</span> <span class="token number">1699802583</span><span class="token punctuation">,</span> <span class="token property">&quot;MsgType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;Event&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wxa_punish_event&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;94185814&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;appid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;wx54a8eaa266009d6a&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;punish_time&quot;</span><span class="token operator">:</span> <span class="token number">1699802425</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_reason&quot;</span><span class="token operator">:</span> <span class="token string">&quot;发布低俗、性暗示或色情信息&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;illegal_content&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;测试证据&quot;</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;detail&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;path\&quot;:\&quot;pages/fengjin/fengjin\&quot;}&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://developers.weixin.qq.com/miniprogram/product/index.html#_6-2-色情低俗内容&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;rule_name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;《微信小程序平台运营规范》6.信息内容规范-6.2色情低俗内容&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;adjust_guide_url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;event_type&quot;</span><span class="token operator">:</span> <span class="token number">10</span> <span class="token punctuation">}</span> </code></pre></div></li></ul> <h2 id="后台(包括云函数与自建后台)"><a href="#后台(包括云函数与自建后台)" class="header-anchor">#</a> 后台(包括云函数与自建后台)</h2> <h3 id="注入漏洞"><a href="#注入漏洞" class="header-anchor">#</a> 注入漏洞</h3> <p>注入漏洞(SQL、 命令等)通常指用户绕过后台代码限制,直接在数据库、 shell 内执行自定义代码。</p> <p>常见的注入漏洞有:</p> <h4 id="SQL-注入"><a href="#SQL-注入" class="header-anchor">#</a> SQL 注入</h4> <p>SQL 注入是指 Web 程序代码中对于用户提交的参数未做有效过滤就直接拼接到 SQL 语句中执行,导致参数中的特殊字符打破了 SQL 语句原有逻辑,黑客可以利用该漏洞执行任意 SQL 语句。</p> <p><strong>开发建议:</strong></p> <ol><li>使用数据库提供的参数化查询来进行数据库操作,不允许直接通过拼接字符串的方式来合成 SQL 语句。</li> <li>如果存在部分情况需要通过拼接的方式来合成 SQL ,拼接的变量必须要经过处理: <ul><li>对于整数,需要判断变量是否为整数类型。</li> <li>对于字符串,需要对单引号、双引号等做转义处理。</li></ul></li> <li>避免 Web 应用显示 SQL 的报错信息。</li> <li>保证 Web 应用里每一数据层的编码统一。</li></ol> <h4 id="命令注入"><a href="#命令注入" class="header-anchor">#</a> 命令注入</h4> <p>命令注入漏洞是指 Web 应用未对用户可控参数进行有效过滤,攻击者可以构造恶意参数拼接到命令上来执行任意命令。</p> <p><strong>开发建议:</strong></p> <ul><li>对用户输入的数据(如 ;、|、&amp;等)进行过滤或转义。</li></ul> <h3 id="弱口令"><a href="#弱口令" class="header-anchor">#</a> 弱口令</h3> <p>弱口令指管理后台的用户名密码设置得较为简单或者使用默认账号。攻击者可以通过登录这些账号修改后台数据或进行下一步的入侵操作。</p> <p><strong>开发建议:</strong></p> <ol><li>后台服务禁用默认账号,修改后台弱口令。</li> <li>敏感服务增加二次验证机制,如短信验证码、邮箱验证码等。</li></ol> <h3 id="文件上传漏洞"><a href="#文件上传漏洞" class="header-anchor">#</a> 文件上传漏洞</h3> <p>文件上传漏洞是指 Web 应用允许用户上传指定文件,但未对文件类型、格式等做合法性校验,导致可以上传非预期格式的文件。</p> <p><strong>开发建议:</strong></p> <ul><li>正确解析上传文件的文件类型,通过白名单的方式限制可上传的文件类型。</li></ul> <h3 id="文件下载"><a href="#文件下载" class="header-anchor">#</a> 文件下载</h3> <p>文件下载漏洞是指 Web 应用允许用户通过指定路径和文件名的方式来下载对应的文件,但未正确限制可下载文件所在的目录范围,导致预期范围外的文件被下载泄露。</p> <p><strong>开发建议:</strong></p> <ol><li>正确限制可下载文件所在的目录范围</li> <li>通过指定文件 id 的方式来查找下载对应的文件</li></ol> <h3 id="目录遍历"><a href="#目录遍历" class="header-anchor">#</a> 目录遍历</h3> <p>目录遍历是指由后台服务对用户输入验证不足或配置不严谨导致的服务器目录内容泄漏。外部可能通过目录遍历获取系统文件、后台代码等敏感文件。</p> <p><strong>开发建议:</strong></p> <ol><li><p>web 服务配置</p> <ul><li>服务端禁止展示目录</li> <li>设置目录访问权限</li> <li>在每个目录下放置一个空的 index.html 页面</li></ul></li> <li><p>web 应用代码</p> <ul><li>严格检查文件路径参数,限定文件的范围</li></ul></li></ol> <h3 id="条件竞争"><a href="#条件竞争" class="header-anchor">#</a> 条件竞争</h3> <p>条件竞争比较常见的例子是攻击者通过并发 https 请求而达到多次获奖、多次收获、多次获赠等非正常逻辑所能触发的效果。</p> <ul><li><p>漏洞代码示例</p> <div class="language-cpp extra-class"><pre class="language-cpp"><code><span class="token comment">// 从DB里查询该用户剩余获奖次数,初始值为1</span> <span class="token keyword">int</span> remain_times <span class="token operator">=</span> <span class="token function">SelectRemainTimes</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token keyword">if</span><span class="token punctuation">(</span>remain_times <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token function">EarnRewards</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// 用户获得奖励</span> <span class="token function">ClearRemainTimes</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// 在DB里把该用户的剩余获奖次数清零</span> <span class="token punctuation">}</span> </code></pre></div><p>开发者的设计本意是只允许用户获得一次奖励,但当出现并发请求时,有可能出现请求 A 和请求 B 都刚好执行完第2行代码的情况,此时两个请求的 remain_times 都为1,也就是可以通过第4行代码的判断,获得两次奖励。</p></li></ul> <p><strong>开发建议:</strong></p> <ul><li>对关键(完整)逻辑加锁操作或把关键逻辑以队列任务的形式去进行处理。</li></ul></div> <div class="fixed-translate" style="display:none;"><span>The translations are provided by WeChat Translation and are for reference only. In case of any inconsistency and discrepancy between the Chinese version and the English version, the Chinese version shall prevail.Incorrect translation. <a href="javascript:;" class="fixed-translate-btn">Tap to report.</a></span></div></div> <!----> <div class="related"><!----> <!----></div> <footer class="page-edit"><!----></footer> <footer class="footer"><ul class="footer-links"><li class="footer-link"><a href="http://www.tencent.com/zh-cn/index.shtml" target="_blank">关于腾讯</a></li> <li class="footer-link"><a href="https://mp.weixin.qq.com/debug/wxadoc/introduction/index.html?t=1484641676" target="_blank">文档中心</a></li> <li class="footer-link"><a href="https://mp.weixin.qq.com/cgi-bin/opshowpage?action=dispelinfo&lang=zh_CN&begin=1&count=9" target="_blank">辟谣中心</a></li> <li class="footer-link"><a href="http://kf.qq.com/faq/120911VrYVrA1509086vyumm.html" target="_blank">客服中心</a></li></ul> <p class="copyright">Copyright © 2012-<span>2024</span> Tencent. All Rights Reserved.</p></footer></div></main></div> <!----></div></div> <div id="popoverWrapId" class="pop-links__wrp popover_hide"><ul class="pop-links__list"><li class="pop-links__item"><button class="pop-link">复制</button></li> <li class="pop-links__item"><button class="pop-link">问题反馈</button></li></ul></div> <div class="fixed-btns"><a href="javascript:;" class="fixed-btn fixed-btn__feedback"><div class="fixed-btn__inner"><span class="fixed-btn__icon"></span> <span class="fixed-btn__text">反馈</span></div></a> <a href="javascript:;" class="fixed-btn fixed-btn__top" style="display:none;"><div class="fixed-btn__inner"><span class="fixed-btn__icon"></span></div></a></div></div></div></div> <script src="https://res.wx.qq.com/wxdoc/dist/assets/js/app.531c6ec3.js" defer></script><script src="https://res.wx.qq.com/wxdoc/dist/assets/js/2431.192a81d1.js" defer></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10