h5跳转小程序wx-open-launch-weapp跳转页面显示405?
发布于 6 年前 作者 jingdu 8679 次浏览 来自 官方Issues

h5使用开放标签跳转小程序点击按钮跳转页面405

代码如下:

                <wx-open-launch-weapp
                		  id="launch-btn"
		  username="gh_591952ddxxxx"
		  path="pages/mine/mine.html"
		>
		 
		    <style>.btn { padding: 12px }style>
	&nbsp; &nbsp; <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn"</span>&gt;</span>打开小程序<span class="hljs-tag"><!--<span class="hljs-name"-->button</span>&gt;
	&nbsp;
	<span class="hljs-tag"><!--<span class="hljs-name"-->wx-open-launch-weapp</span>&gt;

<script>   var btn = document.getElementById(‘launch-btn’);   btn.addEventListener(‘launch’, function (e) {     console.log(‘success’);   });   btn.addEventListener(‘error’, function (e) {     console.log(‘fail’, e.detail);   }); script>

回到顶部