mui和uniapp跳转外部链接

Hbuilder开发的app,会涉及到跳转H5页面

mui

typescript 复制代码
<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <link rel="stylesheet" href="css/mui.min.css" />
  <link rel="stylesheet" href="css/common/style.css" />
  <title></title>
 </head>
 <body>
  <header id="header" class="mui-bar mui-bar-nav">
      <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
      <h1 class="mui-title" id="title"></h1>
  </header>
  <script type="text/javascript" src="js/mui.min.js"></script>
  <script>
   mui.init();
   mui.plusReady(function () {
    var self = plus.webview.currentWebview();
    var title = self.title;
    document.getElementById("title").innerText = title;
    var url = "https://nt.zjrcbank.com/openplatformgw/app/openplatform/HN/index.html#/entry";
       var embed=plus.webview.create(url,'embed',{top:'44px',bottom:'0px'});
    var ws = plus.webview.currentWebview();
    ws.append(embed); 
    embed.addEventListener('loading',function(){       //当页面加载时
        plus.nativeUI.showWaiting('',{style:'black',modal:false,background:'rgba(0,0,0,0)'});
    },false);
    embed.addEventListener('loaded',function(){       //当页面加载完成时
        plus.nativeUI.closeWaiting();
    },false);
   })
  </script>
 </body>
</html>

uniapp

官网文档:web-view

typescript 复制代码
<web-view :src="webUrl" ></web-view>
相关推荐
吴传逞13 小时前
记一次uniapp微信小程序开发scss变量失效的问题
微信小程序·uni-app·scss
2501_915921431 天前
小团队如何高效完成 uni-app iOS 上架,从分工到工具组合的实战经验
android·ios·小程序·uni-app·cocoa·iphone·webview
2501_916008891 天前
uni-app iOS 文件管理与 itools 配合实战,多工具协作的完整流程
android·ios·小程序·https·uni-app·iphone·webview
!win !1 天前
uni-app项目Tabbar实现切换icon动效
小程序·uni-app
xw51 天前
uni-app项目Tabbar实现切换icon动效
前端·uni-app
2501_916007471 天前
uni-app iOS 文件调试常见问题与解决方案:结合 itools、克魔、iMazing 的实战经验
android·ios·小程序·https·uni-app·iphone·webview
豆豆(设计前端)1 天前
使用 Uni-app 打包 外链地址APK 及 iOS 注意事项
ios·uni-app
jingling5551 天前
uniapp | 解决组件样式不生效问题
前端·css·uni-app·html·学习方法
^Rocky1 天前
微信小程序(uniapp)实现连接蓝牙
微信小程序·uni-app·蓝牙连接
2501_915918411 天前
uni-app 项目 iOS 上架踩坑经验总结 从证书到审核的避坑指南
android·ios·小程序·https·uni-app·iphone·webview