huaidan 发表于 2025-3-28 15:40:25

坏蛋网络建站教程静态网站 H5 跳小程序h5跳转小程序菜鸟教程静态网站,程序,跳转 - Powered by Discuz!

<link rel="stylesheet" type="text/css" href="source/plugin/qzom_thread/styles/4/styles.css">静态网站 H5 跳小程序h5跳转小程序<br /><font style="color:rgb(34, 34, 34)"><font face="-apple-system, BlinkMacSystemFont, &amp;quot;"><strong>非个人主体并且已认证的</strong>(<font color="#576b95">微信认证</font>)小程序,使用<font color="#576b95">云开发</font>静态网站托管的网页,可以免鉴权跳转任意合法合规的小程序。即可以在微信内部浏览器的 H5 跳转小程序,也可以在微信外部浏览器或其他部分 App (如企业微信、QQ 等)跳转微信小程序。</font></font><font style="color:rgb(34, 34, 34)"><font face="-apple-system, BlinkMacSystemFont, &amp;quot;">静态网站网页在微信客户端打开时,wx.config 可以传入小程序 AppID 并且不需计算签名,也就是免鉴权即可使用跳转小程序的能力。</font></font><font style="color:rgb(34, 34, 34)"><font face="-apple-system, BlinkMacSystemFont, &amp;quot;">扫码体验(将会跳转到微信官方的 &quot;小程序示例&quot; 小程序):<a href="https://postpay-2g5hm2oxbbb721a4-1258211818.tcloudbaseapp.com/jump-mp.html" target="_blank">https://postpay-2g5hm2oxbbb721a4 ... pp.com/jump-mp.html</a></font></font><font style="color:rgb(34, 34, 34)"><br /></font><font style="color:rgb(34, 34, 34)"><br /></font><font face="-apple-system, BlinkMacSystemFont, &amp;quot;"><font size="4"><font color="#ff0000"><strong>注意,开通静态网站、绑定自定义域名,需要在「微信开发者工具 - 云开发 - 更多 - 静态网站」里进行,才能拥有免鉴权的能力。</strong></font></font></font><font style="color:rgb(34, 34, 34)"><font face="-apple-system, BlinkMacSystemFont, &amp;quot;">以下包含完整代码示例,包括 HTML 代码和云函数代码。示例无需准备公众号,只需准备好小程序和开通云开发以及云开发中的静态网站托管能力。网页会判断所在的环境来觉得采用哪种跳转方式,如检测到微信客户端内,则免鉴权使用开放标签跳转,如检测到在外部浏览器或 App,则使用 URL Scheme 跳转小程序。</font></font><font style="color:rgb(34, 34, 34)"><font face="-apple-system, BlinkMacSystemFont, &amp;quot;"><strong>注意</strong>,以下代码中有以下内容必须替换,可以搜索 &lt;!-- replace --&gt; 查看到所有需要替换的地方:</font></font><ul><li>你的小程序信息<br /><ul><li>小程序 AppID:填入你的小程序 AppID<li>云开发环境 ID:填入你的开通了静态网站托管的云开发环境 ID<br /></ul><li><font color="#222222">想要拉取的小程序信息</font><br /><ul><li>小程序原始账号 ID:填入要跳转的小程序原始账号 ID(gh_ 开头)<li>小程序页面路径:填入要跳转到的小程序的页面路径<li>小程序名称:填入要跳转到的小程序名称<li>HTML源码和下载<li><li><ol><li>&lt;html&gt;<br /><li>&nbsp;&nbsp;&lt;head&gt;<br /><li>&nbsp; &nbsp; &lt;title&gt;打开小程序&lt;/title&gt;<br /><li>&nbsp; &nbsp; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br /><li>&nbsp; &nbsp; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1&quot;&gt;<br /><li>&nbsp; &nbsp; &lt;script&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;window.onerror = e =&gt; {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;console.error(e)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;alert('发生错误' + e)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li>&nbsp; &nbsp; &lt;/script&gt;<br /><li>&nbsp; &nbsp; &lt;!-- weui 样式 --&gt;<br /><li>&nbsp; &nbsp; &lt;link rel=&quot;stylesheet&quot; href=&quot;https://res.wx.qq.com/open/libs/weui/2.4.1/weui.min.css&quot;&gt;&lt;/link&gt;<br /><li>&nbsp; &nbsp; &lt;!-- 调试用的移动端 console --&gt;<br /><li>&nbsp; &nbsp; &lt;!-- &lt;script src=&quot;https://cdn.jsdelivr.net/npm/eruda&quot;&gt;&lt;/script&gt; --&gt;<br /><li>&nbsp; &nbsp; &lt;!-- &lt;script&gt;eruda.init();&lt;/script&gt; --&gt;<br /><li>&nbsp; &nbsp; &lt;!-- 公众号 JSSDK --&gt;<br /><li>&nbsp; &nbsp; &lt;script src=&quot;https://res.wx.qq.com/open/js/jweixin-1.6.0.js&quot;&gt;&lt;/script&gt;<br /><li>&nbsp; &nbsp; &lt;!-- 云开发 Web SDK --&gt;<br /><li>&nbsp; &nbsp; &lt;script src=&quot;https://res.wx.qq.com/open/js/cloudbase/1.1.0/cloud.js&quot;&gt;&lt;/script&gt;<br /><li>&nbsp; &nbsp; &lt;script&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;function docReady(fn) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if (document.readyState === 'complete' || document.readyState === 'interactive') {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; fn()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;} else {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; document.addEventListener('DOMContentLoaded', fn);<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;docReady(async function() {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;var ua = navigator.userAgent.toLowerCase()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;var isWXWork = ua.match(/wxwork/i) == 'wxwork'<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;var isWeixin = !isWXWork &amp;&amp; ua.match(/micromessenger/i) == 'micromessenger'<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;var isMobile = false<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;var isDesktop = false<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|IEMobile)/i)) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; isMobile = true<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;} else {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; isDesktop = true<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if (isWeixin) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var containerEl = document.getElementById('wechat-web-container')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; containerEl.classList.remove('hidden')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; containerEl.classList.add('full', 'wechat-web-container')<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var launchBtn = document.getElementById('launch-btn')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; launchBtn.addEventListener('ready', function (e) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;console.log('开放标签 ready')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; })<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; launchBtn.addEventListener('launch', function (e) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;console.log('开放标签 success')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; })<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; launchBtn.addEventListener('error', function (e) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;console.log('开放标签 fail', e.detail)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; })<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; wx.config({<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// debug: true, // 调试时可开启<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;appId: '小程序 AppID', // &lt;!-- replace --&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;timestamp: 0, // 必填,填任意数字即可<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;nonceStr: 'nonceStr', // 必填,填任意非空字符串即可<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;signature: 'signature', // 必填,填任意非空字符串即可<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;jsApiList: ['chooseImage'], // 必填,随意一个接口即可 <br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;openTagList:['wx-open-launch-weapp'], // 填入打开小程序的开放标签名<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; })<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;} else if (isDesktop) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; // 在 pc 上则给提示引导到手机端打开<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var containerEl = document.getElementById('desktop-web-container')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; containerEl.classList.remove('hidden')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; containerEl.classList.add('full', 'desktop-web-container')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;else {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var containerEl = document.getElementById('public-web-container')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; containerEl.classList.remove('hidden')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; containerEl.classList.add('full', 'public-web-container')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var c = new cloud.Cloud({<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// 必填,表示是未登录模式<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;identityless: true,<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// 资源方 AppID<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;resourceAppid: '小程序 AppID', // &lt;!-- replace --&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// 资源方环境 ID<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;resourceEnv: '云开发环境 ID', // &lt;!-- replace --&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; })<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; await c.init()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; window.c = c<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var buttonEl = document.getElementById('public-web-jump-button')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var buttonLoadingEl = document.getElementById('public-web-jump-button-loading')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; try {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;await openWeapp(() =&gt; {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;buttonEl.classList.remove('weui-btn_loading')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;buttonLoadingEl.classList.add('hidden')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;})<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; } catch (e) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;buttonEl.classList.remove('weui-btn_loading')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;buttonLoadingEl.classList.add('hidden')<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;throw e<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; }<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;})<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;async function openWeapp(onBeforeJump) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;var c = window.c<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;const res = await c.callFunction({<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; name: 'public',<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; data: {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;action: 'getUrlScheme',<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; },<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;})<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;console.warn(res)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if (onBeforeJump) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; onBeforeJump()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;location.href = res.result.openlink<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li>&nbsp; &nbsp; &lt;/script&gt;<br /><li>&nbsp; &nbsp; &lt;style&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.hidden {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;display: none;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.full {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;position: absolute;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;top: 0;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;bottom: 0;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;left: 0;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;right: 0;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.public-web-container {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;display: flex;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;flex-direction: column;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;align-items: center;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.public-web-container p {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;position: absolute;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;top: 40%;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.public-web-container a {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;position: absolute;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;bottom: 40%;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.wechat-web-container {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;display: flex;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;flex-direction: column;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;align-items: center;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.wechat-web-container p {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;position: absolute;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;top: 40%;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.wechat-web-container wx-open-launch-weapp {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;position: absolute;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;bottom: 40%;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;left: 0;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;right: 0;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;display: flex;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;flex-direction: column;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;align-items: center;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.desktop-web-container {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;display: flex;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;flex-direction: column;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;align-items: center;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li><br /><li>&nbsp; &nbsp;&nbsp; &nbsp;.desktop-web-container p {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;position: absolute;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;top: 40%;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;}<br /><li>&nbsp; &nbsp; &lt;/style&gt;<br /><li>&nbsp;&nbsp;&lt;/head&gt;<br /><li>&nbsp;&nbsp;&lt;body&gt;<br /><li>&nbsp; &nbsp; &lt;div class=&quot;page full&quot;&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&lt;div id=&quot;public-web-container&quot; class=&quot;hidden&quot;&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;p class=&quot;&quot;&gt;正在打开 “填入你的小程序名称”...&lt;/p&gt; &lt;!-- replace --&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;a id=&quot;public-web-jump-button&quot; href=&quot;javascript:&quot; class=&quot;weui-btn weui-btn_primary weui-btn_loading&quot; onclick=&quot;openWeapp()&quot;&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;span id=&quot;public-web-jump-button-loading&quot; class=&quot;weui-primary-loading weui-primary-loading_transparent&quot;&gt;&lt;i class=&quot;weui-primary-loading__dot&quot;&gt;&lt;/i&gt;&lt;/span&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 打开小程序<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;/a&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&lt;/div&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&lt;div id=&quot;wechat-web-container&quot; class=&quot;hidden&quot;&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;p class=&quot;&quot;&gt;点击以下按钮打开 “填入你的小程序名称”&lt;/p&gt; &lt;!-- replace --&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;!-- 跳转小程序的开放标签。文档 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html --&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;wx-open-launch-weapp id=&quot;launch-btn&quot; username=&quot;小程序原始账号 ID(gh_ 开头的)&quot; path=&quot;要跳转到的页面路径&quot;&gt; &lt;!-- replace --&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;template&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;button style=&quot;width: 200px; height: 45px; text-align: center; font-size: 17px; display: block; margin: 0 auto; padding: 8px 24px; border: none; border-radius: 4px; background-color: #07c160; color:#fff;&quot;&gt;打开小程序&lt;/button&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;/template&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;/wx-open-launch-weapp&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&lt;/div&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&lt;div id=&quot;desktop-web-container&quot; class=&quot;hidden&quot;&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;p class=&quot;&quot;&gt;请在手机打开网页链接&lt;/p&gt;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&lt;/div&gt;<br /><li>&nbsp; &nbsp; &lt;/div&gt;<br /><li>&nbsp;&nbsp;&lt;/body&gt;<br /><li>&lt;/html&gt;</ol><br /><li><font style="background-color:rgb(247, 247, 247)"><font size="4"><font color="#ff0000"><strong>云开发环境 ID在哪?</strong></font></font></font><li><font style="background-color:rgb(247, 247, 247)"><font size="4"><font color="#ff0000"><strong></strong></font></font></font><br /></ul><br /></ul><br />    <h3>版权声明</h3>            <p>1、本站所有资源来源于网络搜集和会员分享</p><p>2、本站所有程序仅供大家学习和参考,不得进行商业用途</p><p>3、如果觉得程序还可以、请购买官方正版</p><p>4、对不遵守本声明或其他违法、恶意使用本网站内容者,本网站保留追究其法律责任的权利。</p>      <p>唯一网址: <a target="_blank" href='https://bbs.zonghengtx.cn/thread-2522-1-1.html' title='静态网站 H5 跳小程序h5跳转小程序'>https://bbs.zonghengtx.cn/thread-2522-1-1.html</a></p>
页: [1]
查看完整版本: 坏蛋网络建站教程静态网站 H5 跳小程序h5跳转小程序菜鸟教程静态网站,程序,跳转 - Powered by Discuz!