h5跳转微信小程序

h5跳转微信小程序

  1. 在微信公众凭条绑定js安全接口域名(线上域名外网可以访问到的,只有此公众号的管理员才可以添加)
  2. 在此域名下上传微信凭证 一个txt文件(绑定时会有提示)
  3. 引入js文件 https://res.wx.qq.com/open/js/jweixin-1.6.0.js
  4. 代码
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--H5页面窗口自动调整到设备宽度,并禁止用户缩放页面-->
    <meta name="viewport"
        content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <!--忽略将页面中的数字识别为电话号码-->
    <meta name="format-detection" content="telephone=no" />
    <!--忽略Android平台中对邮箱地址的识别-->
    <meta name="format-detection" content="email=no" />
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <title></title>
    <style>
        #wechat-web-container wx-open-launch-weapp {
   
            width: 100%;
            text-align: center;
            background: url(http://www.zhigonghui.com.cn/image/wqfw.svg)no-repeat top center;
            background-size: .68rem .68rem;
            display: flex;
            justify-content: center;
            height: .85rem;
        }

        /* vue 编译结束后显示 */
        [v-cloak] {
   
            display: none;
        }
    </style>
</head>

<body>
    <div id="index" class="home_index">
        <<
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值