zoukankan      html  css  js  c++  java
  • app内打开外部第三方瞎下载链接

    Q:我用cordova开发项目,想在app内跳转外部链接,安装了cordova-plugin-inappbrowser后确实可以跳转,但是跳转的页面有个按钮,原本点击会下载app,现在点击后毫无反应,求大神解惑。
    A:已经找到解决办法了,把cordova.InAppBrowser.open的打开网页方式改为“_system”即可,即用手机默认浏览器打开,这样点击目标网页的链接是可以下载文件的
     
    openUrl () {
     
     
    var ua = navigator.userAgent.toLowerCase()
    var option = [this.pageData.bak5,this.pageData.productName]
    if (/iphone|ipad|ipod/.test(ua)) {
    device.getPlayPPT(function () {},function () {},option)
    } else if(/android/.test(ua)){
    // device.inBrowser(function () {},function () {},option)
    cordova.InAppBrowser.open(this.pageData.bak5, '_system', 'location=yes')
    }else{
    window.open(this.pageData.bak5)
    }
    }
    

      

     
  • 相关阅读:
    MongoDB 查询$关键字 $in $or $all
    MongoDB limit 选取 skip跳过 sort排序 方法
    POJ 1700
    POJ 1666
    POJ 1701
    POJ 1674
    POJ 1664
    POJ 1665
    POJ 1658
    POJ 1656
  • 原文地址:https://www.cnblogs.com/weiqian/p/10876436.html
Copyright © 2011-2022 走看看