收藏
回答

ios14以上配置sdk提示无效的appid?安卓没问题

<!DOCTYPE html>
<html lang="en">


<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <script>
        let url = encodeURIComponent('https://qcjbdemo.ugetme.cn/ceshi.html');
        console.log(url)
        document.write('<script src="https://open.esurl.cn/jsapi/wxconfig/135?http_referer=' + url + '"><\/script>');
        document.write('<script src="https://files.esurl.cn/public/js/eruda.min.js"><\/script>');
        document.write('<script>eruda.init();<\/script>');
    </script>




</head>


<body>
    <div class="banner2">


        <wx-open-launch-weapp id="launch-btn" username="gh_7b088044c6c6" path="/pages/market/activity/index?activityId=1102587782&activityType=10">
            <template>
            <button class="btns">打开小程序<button>
          </template>
        </wx-open-launch-weapp>




    </div>
</body>
<script>
    wx.config({
        debug: true// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
        appId: js_appid, // 必填,公众号的唯一标识
        timestamp: timestamp, // 必填,生成签名的时间戳
        nonceStr: nonceStr, // 必填,生成签名的随机串
        signature: signature, // 必填,签名,见附录1
        jsApiList: ['onMenuShareTimeline''onMenuShareAppMessage''hideOptionMenu'], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
        openTagList: ['wx-open-launch-weapp']


    });
</script>


</html>
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签