H5 跳转微信小程序 微信开发标签(wx-open-launch-weapp)的用法

微信官方文档链接地址:wx-open-launch-weapp

注意
在这里插入图片描述

 <view class="mini-relative">
        <view>
			此处填你的内容/此处填你的内容/此处填你的内容
        </view>
        <!--   env-version:正式版release、开发版develop、体验版trial -->
        <!--   username:所需跳转的小程序原始id,即小程序对应的以gh_开头的id(跳转时,有appid会优先使用appid,没有appid才会使用username) -->
        <!--   path:所需跳转的小程序内页面路径及参数 -->
        <wx-open-launch-weapp
          id="launch-btn"
          username="gh_xxxxxxxxx"
          @ready="ready"
          @launch="handleLaunch"
          @error="handleError"
          :env-version="isMiniProd"
          :path="`pages_live/pages/live/detail?id=${liveId}&type=mini`"
          style="position: absolute;top: 0;left: 0; width: 85%;height: 100%"
        >
          <script type="text/wxtag-template">
            <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;opacity: 0" />
          </script>
        </wx-open-launch-weapp>
      </view>
.mini-relative {
  position: relative;
  height: 110rpx;
}
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐