whychdw
2019-11-08 670f8effe994185a48b49d9fb9a237581e8168c7
bug修改
2个文件已修改
24 ■■■■ 已修改文件
platforms/android/app/src/main/assets/www/pages/main/main.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/main/main.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/main/main.js
@@ -22,26 +22,26 @@
                }
            },
            methods: {
                hello() {
                hello: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.hello('你好');
                    }else {
                        bui.alert('请使用手机App访问');
                    }
                },
                getAllRS485Names() {
                getAllRS485Names: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.getAllRS485Names();
                    }else {
                        bui.alert('请使用手机App访问');
                    }
                },
                show(content) {
                show: function(content) {
                    alert(content);
                },
                
            },
            mounted() {
            mounted: function() {
                var self = this;
                window['javacalljs'] = function(content) {
                    self.show(content);
@@ -52,10 +52,10 @@
                    bui.alert(content);
                }
            },
            destroyed: function destroyed() {}
            destroyed: function() {}
        });
    },
    destroyed: function destroyed() {
    destroyed: function() {
        this.vm.$destroy();
    }
});
www/pages/main/main.js
@@ -22,26 +22,26 @@
                }
            },
            methods: {
                hello() {
                hello: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.hello('你好');
                    }else {
                        bui.alert('请使用手机App访问');
                    }
                },
                getAllRS485Names() {
                getAllRS485Names: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.getAllRS485Names();
                    }else {
                        bui.alert('请使用手机App访问');
                    }
                },
                show(content) {
                show: function(content) {
                    alert(content);
                },
                
            },
            mounted() {
            mounted: function() {
                var self = this;
                window['javacalljs'] = function(content) {
                    self.show(content);
@@ -52,10 +52,10 @@
                    bui.alert(content);
                }
            },
            destroyed: function destroyed() {}
            destroyed: function() {}
        });
    },
    destroyed: function destroyed() {
    destroyed: function() {
        this.vm.$destroy();
    }
});