CINXE.COM

小程序文档 - 支付宝文档中心

<!DOCTYPE html><html><head><script>window.injectInfo = { appName: "opendocs-web-site", env: "PROD" };</script><script>window.publicPath = window.__basement_public_path__ = "https://gw.alipayobjects.com/render/p/yuyan/180020010001230926/";</script><script>!function(){var e=window;function n(n){if(e.g_monitor&&e.g_monitor.events){var t=e.g_monitor.events;t.length<20&&t.push(n)}}e.g_monitor=e.g_monitor||{listener:{},events:[]};var r=e.g_monitor.listener;function t(t,n){try{e.addEventListener?e.addEventListener(t,n,!0):e.attachEvent?e.attachEvent("on"+t,n):e[t]=n,r[t]=n}catch(n){console.warn("Tracert 监控事件注册失败:"+t,n)}}r.error||t("error",n),r.unhandledrejection||t("unhandledrejection",n)}();</script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta name="keywords" content="支付宝文档、支付宝开放文档、支付宝小程序"> <meta name="description" content="支付宝文档中心"> <meta name="baidu-site-verification" content="codeva-89LqWoXDVM"> <meta name="google-site-verification" content="2ta8BYq1tQ4UDoAwDIaZYwETKvrnpO49pgkrRiqM9PE"> <meta name="bm_app_id" content="null"> <meta name="bm_sprint_id" content="S090011020669"> <meta name="data-aspm" content="a1693"> <meta name="data-bizType" content="lu"> <link rel="shortcut icon" href="https://img.alicdn.com/tfs/TB1qEwuzrj1gK0jSZFOXXc7GpXa-32-32.ico"> <title>小程序文档 - 支付宝文档中心</title> <link rel="stylesheet" href="https://gw.alipayobjects.com/render/p/yuyan/180020010001230926/umi.5e7e271b.css"> <script>this.globalThis || (this.globalThis = this)</script> <script src="https://gw.alipayobjects.com/render/p/yuyan_v/180020010000005484/7.1.21/CodeMirror.js"></script> <script async="" src="https://s13.cnzz.com/z_stat.php?id=1263339510&amp;web_id=1263339510f"></script> <script>// prettier-ignore !function(n,o,e,t,a,i){n.yuyanMonitor={config: function(){}, logError: function() {}, log: function(){}};var r=o.createElement("script"),c=o.querySelector("head").getElementsByTagName("script")[0]; r.async=1,r.src="https://gw.alipayobjects.com/render/p/yuyan_npm/@alipay_yuyan-monitor-sdk/1.3.0/dist/index.umd.min.js",r.crossOrigin="anonymous",r.onload=function(){ YuyanMonitor&&(n.yuyanMonitor=new YuyanMonitor({"_appId":"180020010001230926","yuyanId":"180020010001230926","sprintId":"S090011020669","isH5":false}));n.injectInfo && n.yuyanMonitor.config({ env: n.injectInfo.env })},o.querySelector("head").insertBefore(r,c)}(window,window.document)</script> <script> !function(src) { var _windowVM__TERN__; function assignProperty(target, k, v) { if (target.hasOwnProperty(k) && target[k] !== undefined) return; if (v === undefined) return; target[k] = v; } window._to = {}; if ((_windowVM__TERN__ = window.__TERN__) !== null && _windowVM__TERN__ !== void 0 && (_windowVM__TERN__ = _windowVM__TERN__.user) !== null && _windowVM__TERN__ !== void 0 && (_windowVM__TERN__ = _windowVM__TERN__.clientUser) !== null && _windowVM__TERN__ !== void 0 && _windowVM__TERN__.userId) { window._to.role_id = window.__TERN__.user.clientUser.userId; } window._to.yuyanId=180020010001230926; window._to._isPrimaryApp=true; assignProperty(window._to, 'spmAPos', "a1693"); assignProperty(window._to, 'bizType', "lu"); assignProperty(window._to, 'autoLogPv', false); assignProperty(window._to, 'autoExpo', true); (function loader() { if (Object.prototype.toString.call(window.TracertCmdCache) === '[object Array]') { window.TracertCmdCache = []; } var Tracert = { _isInit: true, _readyToRun: [], // 生成uuid _guid: function _guid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0; var v = c === 'x' ? r : r & 0x3 | 0x8; return v.toString(16); }); }, get: function get(key) { if (key === 'pageId') { window._tracert_loader_cfg = window._tracert_loader_cfg || {}; if (window._tracert_loader_cfg.pageId) { return window._tracert_loader_cfg.pageId; } var metaa = document.querySelectorAll('meta[name=data-aspm]'); var spma = metaa && metaa[0] && metaa[0].getAttribute('content'); var spmb = document.body && document.body.getAttribute('data-aspm'); var pageId = spma && spmb ? "".concat(spma, ".").concat(spmb, "_").concat(Tracert._guid(), "_").concat(Date.now()) : "-_".concat(Tracert._guid(), "_").concat(Date.now()); window._tracert_loader_cfg.pageId = pageId; return pageId; } return this[key]; }, call: function call() { var args = arguments; var argsList; try { argsList = [].slice.call(args, 0); } catch (ex) { var argsLen = args.length; argsList = []; for (var i = 0; i < argsLen; i++) { argsList.push(args[i]); } } Tracert.addToRun(function () { Tracert.call.apply(Tracert, argsList); }); }, addToRun: function addToRun(_fn) { var fn = _fn; if (typeof fn === 'function') { fn._logTimer = new Date() - 0; Tracert._readyToRun.push(fn); } }, createTracert: undefined, spmAPos: undefined, autoLogPv: undefined, autoExpo: undefined, bizType: undefined, ifRouterNeedPv: undefined, enableMicroAppInstance: undefined, v: undefined }; var fnlist = ['config', 'logPv', 'info', 'error', 'click', 'expo', 'pageName', 'pageState', 'time', 'timeEnd', 'parse', 'expoCheck', 'stringify', 'report', 'set', 'before']; for (var i = 0; i < fnlist.length; i++) { var fn = fnlist[i]; (function (fn) { Tracert[fn] = function () { var args = arguments; var argsList; try { argsList = [].slice.call(args, 0); } catch (ex) { var argsLen = args.length; argsList = []; for (var _i2 = 0; _i2 < argsLen; _i2++) { argsList.push(args[_i2]); } } argsList.unshift(fn); Tracert.addToRun(function () { Tracert.call.apply(Tracert, argsList); }); }; })(fn); } if (window.Proxy) { var handler = { get: function get(target, property) { var _targetVMhasOwnPropert; if (target !== null && target !== void 0 && (_targetVMhasOwnPropert = target.hasOwnProperty) !== null && _targetVMhasOwnPropert !== void 0 && _targetVMhasOwnPropert.call(target, property)) { return target[property]; } return target.call.bind(this, property); } }; var proxyTracert = new window.Proxy(Tracert, handler); window.Tracert = proxyTracert; } else { window.Tracert = Tracert; } })(); var _windowVMdocument, _windowVMdocumentVMcrea; var curScript = (_windowVMdocument = window.document) === null || _windowVMdocument === void 0 || (_windowVMdocumentVMcrea = _windowVMdocument.createElement) === null || _windowVMdocumentVMcrea === void 0 ? void 0 : _windowVMdocumentVMcrea.call(_windowVMdocument, 'script'); if (!curScript) return; curScript.async = true; var _windowVMdocumentVMquer, _documentVMquerySelect; curScript.crossOrigin = 'anonymous'; curScript.src = src; var insertScript = ((_windowVMdocumentVMquer = window.document.querySelector('head')) === null || _windowVMdocumentVMquer === void 0 ? void 0 : _windowVMdocumentVMquer.getElementsByTagName('script')[0]) || null; if (!insertScript) return; (_documentVMquerySelect = document.querySelector('head')) === null || _documentVMquerySelect === void 0 ? void 0 : _documentVMquerySelect.insertBefore(curScript, insertScript); curScript.onerror = function () { console.warn("[Bigfish] Tracert script load error, please check your network and spma."); var fallback = function fallback() { console.warn("[Bigfish] Tracert run error, please make sure the script import right."); }; var fnlist = ["call", "start", "config", "logPv", "info", "err", "click", "expo", "pageName", "pageState", "time", "timeEnd", "parse", "checkExpo", "stringify", "report", "set", "before"]; if (Object.prototype.toString.call(window.Tracert) != '[object Object]') { window.Tracert = {}; } for (var i = 0; i < fnlist.length; i++) { window.Tracert[fnlist[i]] = fallback; } }; }('https://ur.alipay.com/tracert_a1693.js'); </script> <script type="umi-route-chunk-files-map">{"p":"opendocs-web-site","b":"webpack","f":[["4.8df746f0.async.js",4],["38.48f02de7.chunk.css",38],["38.21fb24e7.async.js",38],["85.8b1d8684.async.js",85],["95.3ae054da.async.js",95],["p__DocsPage__index.92573a34.chunk.css",115],["p__DocsPage__index.4ab1ca4d.async.js",115],["p__DeveloperPage__index.33e759a4.chunk.css",152],["p__DeveloperPage__index.eb373ada.async.js",152],["186.0c8ac6dd.chunk.css",186],["186.eff9d0fb.async.js",186],["268.4e7cde54.async.js",268],["p__AfterLogin__index.3245f635.chunk.css",279],["p__AfterLogin__index.97608df2.async.js",279],["385.94929754.async.js",385],["392.7b5a8b15.async.js",392],["p__NotFound__index.8bcfbc00.chunk.css",449],["p__NotFound__index.b354818f.async.js",449],["p__HomePage__index.dfe61ead.chunk.css",478],["p__HomePage__index.f20b1007.async.js",478],["565.12302b06.chunk.css",565],["565.28fb8894.async.js",565],["634.a26f48a1.chunk.css",634],["634.a85d2f84.async.js",634],["642.ef4fb1fa.chunk.css",642],["843.56b9b893.async.js",843],["p__ChangeLog__index.a335c9d3.chunk.css",847],["p__ChangeLog__index.7c5d8705.async.js",847],["884.82ad6a77.async.js",884],["p__YuqueRender__index.d48cdf60.async.js",887],["908.85e65c7d.async.js",908],["961.f6542bf3.async.js",961],["p__Redirect__index.9746da27.async.js",986]],"r":{"/":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site/:catalogCode":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/search":[32],"/404":[16,17],"/home":[0,1,2,3,15,18,19,22,23,24,25,28],"/after-login":[12,13],"/changelog":[0,1,2,22,23,24,25,26,27],"/:site/:catalogCode/:third":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site/:catalogCode/:third/:fourth":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/yuque-render/:mainSiteCode/:catalogCode":[0,20,21,25,28,29,30],"/:site/:catalogCode/:third/:fourth/:fifth":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/u/doc":[0,1,2,3,4,7,8,11,22,23,24,25,28,30,31],"/:site/:catalogCode/:third/:fourth/:fifth/:sixth":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site/:catalogCode/:third/:fourth/:fifth/:sixth/:seventh":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site/:catalogCode/:third/:fourth/:fifth/:sixth/:seventh/:eighth":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site/:catalogCode/:third/:fourth/:fifth/:sixth/:seventh/:eighth/:nineth":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site/:catalogCode/:third/:fourth/:fifth/:sixth/:seventh/:eighth/:nineth/:tenth/*":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31],"/:site/:catalogCode/:third/:fourth/:fifth/:sixth/:seventh/:eighth/:nineth/:tenth":[0,1,2,3,4,5,6,9,10,11,15,20,21,24,25,28,30,31]}}</script> <meta name="yuyan_id" content="180020010001230926"> <meta name="bm_sprint_id" content="S090011020669"> <script> !function(){var e=window;function n(n){if(e.g_monitor&&e.g_monitor.events){var t=e.g_monitor.events;t.length<20&&t.push(n)}}e.g_monitor=e.g_monitor||{listener:{},events:[]};var r=e.g_monitor.listener;function t(t,n){try{e.addEventListener?e.addEventListener(t,n,!0):e.attachEvent?e.attachEvent("on"+t,n):e[t]=n,r[t]=n}catch(n){console.warn("Tracert 监控事件注册失败:"+t,n)}}r.error||t("error",n),r.unhandledrejection||t("unhandledrejection",n)}(); </script> <script> (function (window, document) { window.yuyanCmdCache = []; window.yuyanMonitor = { config: function () {}, logError: function () {}, log: function () { window.yuyanCmdCache.push(arguments); } }; var script = document.createElement('script'); script.async = true; script.src = 'https://gw.alipayobjects.com/os/lib/alipay/yuyan-monitor-sdk/1.1.0/dist/index.umd.min.js'; script.crossOrigin = "anonymous"; script.onload = function () { if (YuyanMonitor) { window.yuyanMonitor = new YuyanMonitor({ yuyanId: "180020010001230926" }); if (window.yuyanCmdCache.length) { for (let i = 0; i < window.yuyanCmdCache.length; i++) { window.yuyanMonitor.log.apply(window.yuyanMonitor, window.yuyanCmdCache[i]); } window.yuyanCmdCache.length = 0; } } } var insertAnchor = document.getElementsByTagName('script')[0]; if (insertAnchor.parentNode) { insertAnchor.parentNode.insertBefore(script, insertAnchor); } })(window, window.document); </script> </head> <body> <div id="root"></div> <script src="https://gw.alipayobjects.com/render/p/yuyan/180020010001230926/umi.f7802f35.js" crossorigin="anonymous"></script> <script> (function () { function matchBrowser() { var userAgent = navigator.userAgent; var isIE = (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1) || userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; return isIE; } function renderBrowserUpdate() { var div = document.createElement("div"); var style = document.createElement("style"); style.setAttribute("type", "text/css"); var styleContent = "html, body { width: 100%; height: 100%; overflow: hidden; }.legacy-warn { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; z-index: 999999; } .legacy-container { position: relative; width: 940px; margin: 150px auto; } .legacy-close { position: absolute; right: -16px; top: -32px; cursor: pointer; } .legacy-img { width: 438px; float: left; margin-right: 16px;}.legacy-tips{float: right;}.legacy-img img {min-width: 100%; max-width: 100%;}.legacy-tips-title { margin-bottom: .5em; color: rgba(0,0,0,.85); font-weight: 600; font-size: 30px;line-height: 1.35;}.legacy-tips-desc { margin: 8px 0 24px;color: rgba(0,0,0,.45);font-size: 16px; line-height: 24px;}.legacy-browsers { margin-top: 40px;}.legacy-browsers li { display: inline-block; text-align: center; width: 44px; margin-right: 32px;}.legacy-browsers a { color: rgba(0, 0, 0, 0.65); text-decoration: none; }.legacy-browsers img { margin-bottom: 8px;}"; // support IE 8 if (style.styleSheet) { style.styleSheet.cssText = styleContent; } else { style.innerHTML = styleContent; } div.innerHTML = '<div class="legacy-warn"><div class="legacy-container"><div class="legacy-close" id="legacy-close">X</div><div class="legacy-img"><img src="https://gw.alipayobjects.com/mdn/rms_defc2e/afts/img/A*vU2YQp24hpIAAAAAAAAAAABkARQnAQ" alt="" width="438" height="268" ></div><div class="legacy-tips"><p class="legacy-tips-title">浏览器版本不兼容</p><p class="legacy-tips-desc">浏览器版本过低,为避免可能存在的安全隐患,推荐升级以下浏览器</p><ul class="legacy-browsers"><li><a target="_blank" rel="noopener noreferrer" href="https://www.google.com/chrome/"><img src="https://gw.alipayobjects.com/mdn/rms_66ee3f/afts/img/A*DU8tSpLpRHYAAAAAAAAAAABkARQnAQ" alt="" width="32" height="32"><span>Chrome</span></a></li><li><a target="_blank" rel="noopener noreferrer" href="https://www.microsoft.com/edge"><img src="https://gw.alipayobjects.com/zos/antfincdn/F2rupPM9KL/Microsoft_Edge_Logo.png" alt="" width="32" height="32"><span>Edge</span></a></li><li><a target="_blank" rel="noopener noreferrer" href="https://support.apple.com/downloads/safari"><img src="https://gw.alipayobjects.com/mdn/rms_66ee3f/afts/img/A*TN2-R5PECp0AAAAAAAAAAABkARQnAQ" alt="" width="32" height="32"><span>Safari</span></a></li><li><a target="_blank" rel="noopener noreferrer" href="https://www.mozilla.org/exp/firefox/new/"><img src="https://gw.alipayobjects.com/mdn/rms_66ee3f/afts/img/A*m0yRSZUoWFMAAAAAAAAAAABkARQnAQ" alt="" width="32" height="32"><span>Firefox</span></a></li></div></div></div></div>'; document.body.appendChild(style); document.body.appendChild(div); var closeEle = document.getElementById("legacy-close"); if (closeEle) { closeEle.onclick = function () { document.body.removeChild(div); document.body.removeChild(style); }; } } try { if (matchBrowser()) { renderBrowserUpdate(); } } catch (e) { console.error("[BrowserUpdate ERROR]", navigator.userAgent, e); } })(); window._to = { autoLogPv: false, uepLogSwitch: false, // 关闭埋点自动采集 }; if (window.Tracert) { (() => { const { search } = window.location; const isFilter = !search.includes('isInspection=true'); const spmFilter = () => isFilter; window.Tracert.call('before', 'logPv', spmFilter); window.Tracert.call('before', 'expo', spmFilter); window.Tracert.call('before', 'click', spmFilter); window.Tracert.call('before', 'expo', ({ spmId }) => !spmId.includes('./:site') && !spmId.includes('./search')); })() } </script> </body></html>