H5跳转微信小程序 - 新闻资讯 - 云南小程序开发|云南软件开发|云南网站建设-昆明葵宇信息科技有限公司

159-8711-8523

云南网建设/小程序开发/软件开发

知识

不管是网站,软件还是小程序,都要直接或间接能为您产生价值,我们在追求其视觉表现的同时,更侧重于功能的便捷,营销的便利,运营的高效,让网站成为营销工具,让软件能切实提升企业内部管理水平和效率。优秀的程序为后期升级提供便捷的支持!

您当前位置>首页 » 新闻资讯 » 小程序相关 >

H5跳转微信小程序

发表时间:2020-10-19

发布人:葵宇科技

浏览次数:45

<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="yes" name="apple-touch-fullscreen">
    <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> 
</head>
<body>
	<wx-open-launch-weapp
	  id="launch-btn"
	  username="gh_66666666666"
	  path="/pages/index/index.html">
	  <template>
	    <center><button class="btn">跳转</button></center>
	  </template>
	</wx-open-launch-weapp>
	<script type="text/javascript">
		wx.config({    
		debug:false,    
		appId:'<%=wjs.getAppid()%>',    
		timestamp:'<%=wjs.getTimestamp()%>',   
		nonceStr:'<%=wjs.getNoncestr()%>',    
		signature:'<%=wjs.getSignature()%>',     
		jsApiList:['openLocation'],
		openTagList: ['wx-open-launch-weapp'] // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
		}); 
		
		wx.error(function(res){
		});
		
		wx.ready(function(){	
		});
		
		var btn = document.getElementById('launch-btn');
		  btn.addEventListener('launch', function (e) {
		  });
		  btn.addEventListener('error', function (e) {
		  });
		
	</script>
</body>
</html>

相关案例查看更多