开放标签:wx-open-launch-weapp
机型:VIVO x21 和oppo A9
微信版本号:7.0.17和7.0.15
系统:安卓9
问题描述:ios没问题,开启debug时有弹窗提示config ok,按钮可以显示,可以跳转.安卓开启debug有弹窗提示config ok,按钮无法显示.
可复现地址:http://renderer.test.rabbitpre.com/m3/aUe1Zi9ccg
代码如下:
var page = document.querySelector("body");
var openTags = document.createElement("wx-open-launch-weapp");
var username = "gh_xxxxx";
var path = "pages/index/index.html";
var judge = false;
openTags.innerHTML = `<template> <style>.wx-btn {width: 200px; height: 40px; text-align: center; line-height: 40px; font-size: 16px; border-radius: 20px; background: #62c655; color:#fff; border: 0;}
style><button class="wx-btn">打开小程序button>template>`;
openTags.setAttribute("username", username);
openTags.setAttribute("path", `${path}`);
page.appendChild(openTags);
你好,查到是被你们的csp拦截了,请参考文档配置一下csp规则