import Vue from 'vue' console.info('loader success base.js...') Vue.prototype.routerTo = function (path) { this.$router.push({path: path}) } Vue.prototype.timetrans = function (date) { var time = new Date(date * 1000) var Y = time.getFullYear() + '-' var M = (time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1) + '-' var D = (time.getDate() < 10 ? '0' + (time.getDate()) : time.getDate()) + ' ' var h = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ':' var m = (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ':' var s = (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds()) return Y + M + D + h + m + s } Vue.prototype.ClickInput = function (e) { e.target.select() } ;(function (doc, win) { var docEl = doc.documentElement var resizeEvt = 'orientationchange' in win ? 'orientationchange' : 'resize' var recalc = function () { var clientWidth = docEl.clientWidth if (clientWidth === undefined) return docEl.style.fontSize = 37.5 * (clientWidth / 375) + 'px' } if (doc.addEventListener === undefined) return win.addEventListener(resizeEvt, recalc, false) doc.addEventListener('DOMContentLoaded', recalc, false) })(document, window)