Commit ca4b0b80837404b1529dc41194e3097c21b1bcee

Authored by zhiyangdu
1 parent afb16243

判断小米浏览器

src/components/callAppBox/callAppBox.vue
... ... @@ -15,18 +15,25 @@
15 15 export default {
16 16 data: function () {
17 17 return {
18   -
  18 +
19 19 }
20 20 },
21 21 props: ["callApps"],
22 22 methods: {
23   -
  23 +
24 24 /**
25 25 * H5唤起App按钮事件
26 26 */
27 27 callApp() {
28 28 if (typeof this.callApps.funcs === "object" && typeof this.callApps.funcs.callApp === "object" && typeof this.callApps.funcs.callApp.schemeLayer === "function") {
29 29 this.callApps.funcs.callApp.schemeLayer(this.callApps.funcs.callAppParams, this.callApps.funcs.callAppCallback);
  30 + //因小米浏览器未安装APP时点击打开无反应;故判断在小米浏览器打开跳转下载APP页面
  31 +// var u = navigator.userAgent, app = navigator.appVersion;
  32 +// if (u.indexOf('XiaoMi') > -1) {
  33 +// setTimeout(function () {
  34 +// window.open("http://wjjh5.cnlive.com/apkdownload.php")
  35 +// }, 2000)
  36 +// }
30 37 }
31 38 }
32 39 }
... ... @@ -36,4 +43,4 @@
36 43 <!-- Add "scoped" attribute to limit CSS to this component only -->
37 44 <style rel="stylesheet/less" lang="less">
38 45 @import './callAppBox';
39   -</style>
40 46 \ No newline at end of file
  47 +</style>
... ...