提交 4d0f26fd 编写于 作者: 张磊's avatar 张磊

auto commit

上级 b216b855
/* eslint-disable */
!(function (a, b) {
function c() {
var b = f.getBoundingClientRect().width;
b / i > 540 && (b = 540 * i);
var c = b / 10;
(f.style.fontSize = c + 'px'), (k.rem = a.rem = c);
}
var d,
e = a.document,
f = e.documentElement,
g = e.querySelector('meta[name="viewport"]'),
h = e.querySelector('meta[name="flexible"]'),
i = 0,
j = 0,
k = b.flexible || (b.flexible = {});
if (g) {
console.warn('将根据已有的meta标签来设置缩放比例');
var l = g.getAttribute('content').match(/initial\-scale=([\d\.]+)/);
l && ((j = parseFloat(l[1])), (i = parseInt(1 / j)));
} else if (h) {
var m = h.getAttribute('content');
if (m) {
var n = m.match(/initial\-dpr=([\d\.]+)/),
o = m.match(/maximum\-dpr=([\d\.]+)/);
n && ((i = parseFloat(n[1])), (j = parseFloat((1 / i).toFixed(2)))),
o && ((i = parseFloat(o[1])), (j = parseFloat((1 / i).toFixed(2))));
}
}
if (!i && !j) {
var p =
(a.navigator.appVersion.match(/android/gi),
a.navigator.appVersion.match(/iphone/gi)),
q = a.devicePixelRatio;
(i = p
? q >= 3 && (!i || i >= 3)
? 3
: q >= 2 && (!i || i >= 2)
? 2
: 1
: 1),
(j = 1 / i);
}
if ((f.setAttribute('data-dpr', i), !g))
if (
((g = e.createElement('meta')),
g.setAttribute('name', 'viewport'),
g.setAttribute(
'content',
'initial-scale=' +
j +
', maximum-scale=' +
j +
', minimum-scale=' +
j +
', user-scalable=no'
),
f.firstElementChild)
)
f.firstElementChild.appendChild(g);
else {
var r = e.createElement('div');
r.appendChild(g), e.write(r.innerHTML);
}
a.addEventListener(
'resize',
function () {
clearTimeout(d), (d = setTimeout(c, 300));
},
!1
),
a.addEventListener(
'pageshow',
function (a) {
a.persisted && (clearTimeout(d), (d = setTimeout(c, 300)));
},
!1
),
'complete' === e.readyState
? (e.body.style.fontSize = 12 * i + 'px')
: e.addEventListener(
'DOMContentLoaded',
function () {
e.body.style.fontSize = 12 * i + 'px';
},
!1
),
c(),
(k.dpr = a.dpr = i),
(k.refreshRem = c),
(k.rem2px = function (a) {
var b = parseFloat(a) * this.rem;
return 'string' == typeof a && a.match(/rem$/) && (b += 'px'), b;
}),
(k.px2rem = function (a) {
var b = parseFloat(a) / this.rem;
return 'string' == typeof a && a.match(/px$/) && (b += 'rem'), b;
});
})(window, window.lib || (window.lib = {}));
......@@ -4,6 +4,7 @@ import { PicaArea } from 'pica-area';
console.log('router, store, vueApp: ', router, store, vueApp);
const { Vue } = window;
import Loading from '@/components/loading/loading.js';
import '@/assets/js/flexible';
Vue.use(Loading);
Vue.use(PicaArea);
// 禁用双指放大
......
import { router } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto';
import insuranceBindCode from '@/views/insurance-bind-code/insurance-bind-code';
import insuranceDetectionDetail from '@/views/insurance-detection-detail/insurance-detection-detail';
import {toggleSkeletonRouter} from 'mn-template/plugins/toggleSkeleton.js';
import handleAllRouter from '../public_uat';
const routerConfig = [
......@@ -30,14 +29,9 @@ const routerConfig = [
name: 'appoint',
component: () => import('@/views/appoint/index.vue'),
},
{
path: '*',
redirect: process.env.VUE_APP_BASE_ROUTE
}
];
router.beforeEach(async (to, from, next) => {
toggleSkeletonRouter(to, from);
next();
});
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册