这款小路由器是否支持5G,能否满足长距离高速传输需求?
- 内容介绍
- 文章标签
- 相关推荐
本文共计144个文字,预计阅读时间需要1分钟。
javascripth5页面 + (function(win, doc) { use strict; function Router(option) { this.routes=option.routes; this.viewHandle=option.viewHandle; this.currentUrl=''; this.v={}; this._init(); } Router.prototype._binEvent=function() { // 事件绑定逻辑 }; // 其他方法和逻辑})();
h5小页面(function (win, doc) { "use strict"; function Router(option) { this.routes = option.routes; this.viewHandle = option.viewHandle; this.currentUrl = ''; this.v = {}; this._init(); } Router.prototype._binEvent = function () { win.addEventListener('DOMContentLoaded', this.refresh.bind(this), false); win.addEventListener('hashchange', this.refresh.bind(this), false); }; Router.prototype.refresh = function () { var hash = win.location.hash; if (!hash) { win.location.hash = '/'; return; } this.currentUrl = hash.match(/#([\/\w]*)/)[1]; var mothod = this.routes[this.currentUrl]; if (mothod) { this.viewHandle(mothod); } }; Router.prototype._init = function () { this._binEvent(); }; Router.prototype.go = function (path, data) { win.location.hash = path; this.v.data = data; } win.Router = Router; })(window, document);
本文共计144个文字,预计阅读时间需要1分钟。
javascripth5页面 + (function(win, doc) { use strict; function Router(option) { this.routes=option.routes; this.viewHandle=option.viewHandle; this.currentUrl=''; this.v={}; this._init(); } Router.prototype._binEvent=function() { // 事件绑定逻辑 }; // 其他方法和逻辑})();
h5小页面(function (win, doc) { "use strict"; function Router(option) { this.routes = option.routes; this.viewHandle = option.viewHandle; this.currentUrl = ''; this.v = {}; this._init(); } Router.prototype._binEvent = function () { win.addEventListener('DOMContentLoaded', this.refresh.bind(this), false); win.addEventListener('hashchange', this.refresh.bind(this), false); }; Router.prototype.refresh = function () { var hash = win.location.hash; if (!hash) { win.location.hash = '/'; return; } this.currentUrl = hash.match(/#([\/\w]*)/)[1]; var mothod = this.routes[this.currentUrl]; if (mothod) { this.viewHandle(mothod); } }; Router.prototype._init = function () { this._binEvent(); }; Router.prototype.go = function (path, data) { win.location.hash = path; this.v.data = data; } win.Router = Router; })(window, document);

