Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-insurance
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.frontend
pica-insurance
提交
4d0f26fd
提交
4d0f26fd
编写于
2月 14, 2023
作者:
张磊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
auto commit
上级
b216b855
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
100 行增加
和
6 行删除
+100
-6
flexible.js
src/assets/js/flexible.js
+99
-0
main.js
src/main.js
+1
-0
index.js
src/router/index.js
+0
-6
未找到文件。
src/assets/js/flexible.js
0 → 100644
浏览文件 @
4d0f26fd
/* 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
=
{}));
src/main.js
浏览文件 @
4d0f26fd
...
...
@@ -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
);
// 禁用双指放大
...
...
src/router/index.js
浏览文件 @
4d0f26fd
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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录