whychdw
2019-10-23 ed5e5913150cc1e5bf372f8d6e8f1a5db09a6177
修改本地存储
2个文件已修改
22 ■■■■ 已修改文件
platforms/android/app/src/main/assets/www/pages/main/main.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
www/pages/main/main.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platforms/android/app/src/main/assets/www/pages/main/main.js
@@ -51,14 +51,19 @@
                    });
                },
                getIp: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.obtainDeviceIp();
                    }
                    var ip = localStorage.getItem('ip');
                    if(ip) {
                        this.ip = ip;
                    }else {
                        this.ip = '127.0.0.1';
                    }
                },
                setIp: function() {
                    var self = this;
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.setUpDeviceIp(this.ip);
                        // 将ip添加到本地,下一次登陆自动填充ip
                        localStorage.setItem('ip', this.ip);
                        self.enterIndex();
                    }else {
                        bui.alert('请使用手机端登陆!');
www/pages/main/main.js
@@ -51,14 +51,19 @@
                    });
                },
                getIp: function() {
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.obtainDeviceIp();
                    }
                    var ip = localStorage.getItem('ip');
                    if(ip) {
                        this.ip = ip;
                    }else {
                        this.ip = '127.0.0.1';
                    }
                },
                setIp: function() {
                    var self = this;
                    if(typeof(JSInterface) != 'undefined') {
                        JSInterface.setUpDeviceIp(this.ip);
                        // 将ip添加到本地,下一次登陆自动填充ip
                        localStorage.setItem('ip', this.ip);
                        self.enterIndex();
                    }else {
                        bui.alert('请使用手机端登陆!');