Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 99f92b31
authored
Apr 09, 2026
by
岑成威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
webview高度
1 parent
6eb36465
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
395 additions
and
70 deletions
assets/css/sprite.scss
assets/images/sprite.png
pages/usedCar/inspectionReport/index.vue
assets/css/sprite.scss
View file @
99f92b3
...
...
@@ -49,10 +49,12 @@
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5127877237851662
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.45865302642796246
);}
.icon-calendar
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5272804774083546
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4113384484228474
);}
.icon-canInfoIcon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4497016197783461
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-carInfo
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.06521739130434782
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-carInfoIcon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4
497016197783461
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4
9701619778346123
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-certificate
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7020460358056266
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.04731457800511509
);}
.icon-change-account
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
...
...
@@ -68,7 +70,7 @@
.icon-course
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.12531969309462915
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-create-order
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
49701619778346123
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
5443307757885762
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-createOrder
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7020460358056266
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.08098891730605286
);}
.icon-customer-1
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.13640238704177324
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.13640238704177324
);
...
...
@@ -88,23 +90,23 @@
.icon-customer-list
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011935208866155157
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011935208866155157
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7357203751065644
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.3388746803069054
);}
.icon-daily-report
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5
443307757885762
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5
916453537936914
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-day-points
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7020460358056266
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.11466325660699062
);}
.icon-defeat-detail
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.030690537084398978
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.030690537084398978
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.24296675191815856
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6381074168797954
);}
.icon-defeat-order
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5916453537936914
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-defeat-summary
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.030690537084398978
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.030690537084398978
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.28005115089514065
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6381074168797954
);}
.icon-defeatOrder
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7020460358056266
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.1483375959079284
);}
.icon-delivery-management
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.04731457800511509
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-delivery-step-1
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.020460358056265986
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.020460358056265986
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.340153452685422
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.15942028985507245
);}
.icon-delivery-step-2
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.0
4731457800511509
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.0
9462915601023018
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-detail-arrow
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.1453537936913896
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-detail-btn
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
...
...
@@ -116,7 +118,7 @@
.icon-end-right
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6150895140664961
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-equity-order
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
09462915601023018
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
14194373401534527
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-equityClose
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.010230179028132993
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.010230179028132993
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7357203751065644
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5528559249786871
);}
.icon-equityTip
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
...
...
@@ -124,11 +126,11 @@
.icon-errortips
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.20545609548167093
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-evaluation-management
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.1
419437340153452
7
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.1
892583120204603
7
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-evaluationClose
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.1257459505541347
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6786018755328218
);}
.icon-expiration
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
18925831202046037
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
23657289002557544
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-eye-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.22549019607843138
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-eyes-off
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
...
...
@@ -136,13 +138,13 @@
.icon-eyes-on
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.26555839727195224
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-face-error-active
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.23657289002557544
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-face-error
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.28388746803069054
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-face-
success-active
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
.icon-face-
error
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.3312020460358056
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-face-success
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
.icon-face-success
-active
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.37851662404092073
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-face-success
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4258312020460358
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-feedback
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7020460358056266
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.18201193520886616
);}
.icon-feedbackIcon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011082693947144074
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011082693947144074
);
...
...
@@ -250,19 +252,19 @@
.icon-normal
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011935208866155157
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011935208866155157
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7357203751065644
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.3938618925831202
);}
.icon-notice-recording
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4258312020460358
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-notice-script
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4731457800511509
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-notice-s
tudy
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
.icon-notice-s
cript
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.520460358056266
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-notice-study
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5677749360613811
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-notice-success
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6061381074168798
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-notice-system
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5677749360613811
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5907928388746803
);}
.icon-notice-violate
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
0
);}
.icon-
order-management
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
.icon-
notice-violate
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.04731457800511509
);}
.icon-order-management
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.09462915601023018
);}
.icon-pause
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.2898550724637681
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6786018755328218
);}
.icon-payType-1
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.06820119352088662
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.06820119352088662
);
...
...
@@ -306,7 +308,7 @@
.icon-qgtc-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.3836317135549872
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6786018755328218
);}
.icon-qr-success
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
09462915601023018
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
14194373401534527
);}
.icon-qt-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.407075873827792
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6786018755328218
);}
.icon-quality-no-data
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.19096334185848252
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.0886615515771526
);
...
...
@@ -338,11 +340,11 @@
.icon-record
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.0443307757885763
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.0443307757885763
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.10144927536231885
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-report-management
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.14194373401534527
);}
.icon-report
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.18925831202046037
);}
.icon-re
voke
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
.icon-re
port
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.23657289002557544
);}
.icon-revoke
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.28388746803069054
);}
.icon-revokeOrder
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.027280477408354646
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7020460358056266
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.38405797101449274
);}
.icon-right-arrow
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
...
...
@@ -360,11 +362,11 @@
.icon-scanIconX
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.02557544757033248
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.44884910485933505
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.45865302642796246
);}
.icon-scene-0
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.28388746803069054
);}
.icon-scene-1
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.3312020460358056
);}
.icon-scene-
7
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
.icon-scene-
1
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.37851662404092073
);}
.icon-scene-7
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4258312020460358
);}
.icon-scene-active
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.0443307757885763
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.0443307757885763
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.15217391304347827
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-scene-change
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
...
...
@@ -400,7 +402,7 @@
.icon-store-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7357203751065644
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.1402387041773231
);}
.icon-store
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4
258312020460358
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.4
731457800511509
);}
.icon-study-active
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.0443307757885763
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.0443307757885763
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.2536231884057971
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5400682011935208
);}
.icon-study-tips
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011935208866155157
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.011935208866155157
);
...
...
@@ -460,7 +462,7 @@
.icon-visible
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.017050298380221655
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.5946291560102301
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6786018755328218
);}
.icon-wage-appeal
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
4731457800511509
);}
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.
520460358056266
);}
.icon-warning-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7357203751065644
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.26044330775788577
);}
.icon-weibao
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.015345268542199489
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.015345268542199489
);
...
...
@@ -472,6 +474,4 @@
.icon-yw-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.015345268542199489
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.015345268542199489
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.043478260869565216
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7054560954816709
);}
.icon-zj-icon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.013640238704177323
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7357203751065644
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.30051150895140666
);}
.icon-canInfoIcon
{
width
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
height
:
calc
(
100vmin
*
(
1173
/
768
)
*
0
.04092071611253197
);
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.6547314578005116
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.520460358056266
);}
\ No newline at end of file
background-position
:
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.7357203751065644
)
calc
(
100vmin
*
(
1173
/
768
)
*
-0
.30051150895140666
);}
\ No newline at end of file
assets/images/sprite.png
View file @
99f92b3
3.04 MB
|
W:
|
H:
3.05 MB
|
W:
|
H:
2-up
Swipe
Onion skin
pages/usedCar/inspectionReport/index.vue
View file @
99f92b3
<!--
* App::fullscreen="false" 时必须同时给出 webview-styles 的 top/left/width/height(px),
* 否则子 webview 会缩在左上角一小块;再用 setStyle 重试对齐实测导航栏底边。
* 原生子 webview:setStyle 用显式 top/left/width/height(不用 bottom)。部分机型 top+bottom 推算高度小于父层,肉眼短一截。
* 子 webview height = ceil(根窗口可视高) + slop(真机上不减 top;top 由 setStyle 单独指定)。
* @FilePath: /gl_tape/pages/usedCar/inspectionReport/index.vue
-->
<
template
>
<view
class=
"inspection-page"
>
<view
class=
"inspection-page"
:class=
"
{ 'layout-debug': layoutDebug }"
>
<view
class=
"header"
>
<view
class=
"nav-bar"
@
click=
"back"
>
<view
class=
"back"
>
...
...
@@ -13,14 +15,26 @@
<view
class=
"title"
>
{{
title
}}
</view>
</view>
</view>
<view
class=
"ai-window"
v-if=
"webviewUrl"
>
<view
class=
"ai-window"
v-if=
"webviewUrl"
:style=
"aiWindowInsetStyle"
>
<web-view
class=
"ai-window-wv"
:src=
"webviewUrl"
:fullscreen=
"false"
:webview-styles=
"appWebviewStyles"
@
message=
"handleMessage"
></web-view>
</view>
<view
v-if=
"layoutDebug"
class=
"layout-debug-panel"
:style=
"layoutDebugPanelStyle"
>
<view
class=
"layout-debug-title"
>
布局调试(贴在标题下,不占底部布局;此前 fixed+底边会盖住 webview)
</view>
<view>
页面 windowHeight:
{{
debugSys
.
windowHeight
!=
null
?
debugSys
.
windowHeight
+
'px'
:
'—'
}}
(见下方说明)
</view>
<view>
screenHeight:
{{
debugSys
.
screenHeight
!=
null
?
debugSys
.
screenHeight
:
'—'
}}
statusBar:
{{
debugSys
.
statusBarHeight
!=
null
?
debugSys
.
statusBarHeight
+
'px'
:
'—'
}}
</view>
<view>
header 实测 top→bottom:
{{
headerDebugText
}}
</view>
<view>
header 高度(height):
{{
headerHeightText
}}
</view>
<view>
ai-window 容器:
{{
aiWindowDebugText
}}
</view>
<view>
webview_styles: top=
{{
webviewStylesText
.
top
}}
h=
{{
webviewStylesText
.
height
}}
w=
{{
webviewStylesText
.
width
}}
</view>
<view>
原生 setStyle:
{{
nativeStyleText
}}
</view>
<view
class=
"layout-debug-hint"
>
{{
layoutHeightHint
}}
</view>
</view>
</view>
</
template
>
...
...
@@ -33,10 +47,56 @@ export default {
return
{
webviewUrl
:
''
,
title
:
'检测报告'
,
measuredHeaderBottomPx
:
0
measuredHeaderBottomPx
:
0
,
/** 实测 .ai-window 像素框,与原生子 webview setStyle 共用,避免 windowHeight 与布局不一致 */
measuredWebviewFrame
:
null
,
/** 设为 true 开启日志与浅色标记;勿长期开,易与 inset 调试样式混淆真机留白 */
layoutDebug
:
false
,
debugSys
:
{},
debugHeaderRect
:
null
,
debugNativeWebviewStyle
:
null
,
/** 在 ceil(根窗口高) 上再加的像素,默认 0 */
nativeWebviewHeightSlopPx
:
0
}
},
computed
:
{
layoutHeightHint
()
{
return
'windowHeight:uni 文档为「可使用窗口高度」;App 端一般指当前页面 webview 可视区域高度,通常不含状态栏占用高度。header/webview 的 boundingClientRect 相对该可视区域,top=0 在内容区顶边(多在状态栏下方)。'
},
headerDebugText
()
{
const
r
=
this
.
debugHeaderRect
return
r
?
`
${
r
.
top
}
→
${
r
.
bottom
}
`
:
'—'
},
headerHeightText
()
{
const
r
=
this
.
debugHeaderRect
return
r
?
`
${
r
.
height
}
px`
:
'—'
},
aiWindowDebugText
()
{
const
f
=
this
.
measuredWebviewFrame
return
f
?
`top
${
f
.
top
}
高
${
f
.
height
}
宽
${
f
.
width
}
`
:
'—'
},
webviewStylesText
()
{
const
s
=
this
.
appWebviewStyles
if
(
!
s
||
!
Object
.
keys
(
s
).
length
)
return
{
top
:
'—'
,
height
:
'—'
,
width
:
'—'
}
return
{
top
:
s
.
top
,
height
:
s
.
height
,
width
:
s
.
width
}
},
nativeStyleText
()
{
const
n
=
this
.
debugNativeWebviewStyle
if
(
!
n
)
return
'—'
const
b
=
n
.
bottom
!=
null
&&
n
.
bottom
!==
''
?
n
.
bottom
:
'—'
return
`top=
${
n
.
top
}
bottom=
${
b
}
h=
${
n
.
height
}
w=
${
n
.
width
}
`
},
/** 调试条放标题栏下方,避免 position:fixed + bottom:0 叠在整页最上层挡住 ai-window 底边 */
layoutDebugPanelStyle
()
{
return
{
top
:
`
${
this
.
webviewTopPx
}
px`
,
bottom
:
'auto'
}
},
isApp
()
{
return
typeof
plus
!==
'undefined'
},
...
...
@@ -45,19 +105,54 @@ export default {
const
sys
=
uni
.
getSystemInfoSync
()
return
Math
.
ceil
(
sys
.
windowHeight
*
0.1
)
},
/**
* .ai-window 仅占「根窗 − 顶栏」区域;原生子 webview height 另用 nativeSubWebviewHeightPx(整窗高 + slop)。
*/
aiWindowInsetStyle
()
{
const
sys
=
uni
.
getSystemInfoSync
()
const
topPx
=
this
.
webviewTopPx
const
winH
=
this
.
usableWindowHeightFloat
(
sys
)
const
h
=
Math
.
max
(
0
,
Math
.
floor
(
winH
-
topPx
))
return
{
top
:
`
${
topPx
}
px`
,
height
:
`
${
h
}
px`
,
bottom
:
'auto'
}
},
appWebviewStyles
()
{
if
(
!
this
.
isApp
)
return
{}
const
sys
=
uni
.
getSystemInfoSync
()
const
frame
=
this
.
measuredWebviewFrame
if
(
frame
&&
frame
.
height
>
0
)
{
const
topPx
=
frame
.
top
const
cw
=
this
.
contentWidthPx
(
sys
)
const
w
=
cw
>
0
?
cw
:
frame
.
width
const
h
=
this
.
nativeSubWebviewHeightPx
(
sys
)
return
{
top
:
`
${
topPx
}
px`
,
left
:
'0px'
,
width
:
`
${
w
}
px`
,
height
:
`
${
h
}
px`
}
}
const
topPx
=
this
.
webviewTopPx
const
h
=
Math
.
max
(
0
,
Math
.
floor
(
sys
.
windowHeight
-
topPx
))
const
h
=
this
.
nativeSubWebviewHeightPx
(
sys
)
const
ww
=
this
.
contentWidthPx
(
sys
)
||
sys
.
windowWidth
||
0
return
{
top
:
topPx
,
left
:
0
,
width
:
sys
.
windowWidth
,
height
:
h
top
:
`
${
topPx
}
px`
,
left
:
'0px'
,
width
:
`
${
ww
}
px`
,
height
:
`
${
h
}
px`
}
}
},
created
()
{
try
{
this
.
debugSys
=
uni
.
getSystemInfoSync
()
||
{}
}
catch
(
e
)
{
this
.
debugSys
=
{}
}
},
onLoad
(
options
)
{
const
isCarInfo
=
options
.
h5Entry
===
'carInfo'
if
(
options
.
pageTitle
)
{
...
...
@@ -103,16 +198,24 @@ export default {
const
sep
=
baseUrl
.
includes
(
'?'
)
?
'&'
:
'?'
this
.
webviewUrl
=
token
?
`
${
baseUrl
}${
sep
}
token=
${
encodeURIComponent
(
token
)}
`
:
baseUrl
}
console
.
log
(
'[inspectionReport] webviewUrl'
,
this
.
webviewUrl
)
},
onReady
()
{
this
.
measureHeaderThenInset
()
this
.
logLayoutMetrics
(
'onReady'
)
if
(
this
.
isApp
)
{
this
.
$nextTick
(()
=>
{
;[
120
,
400
,
800
].
forEach
(
ms
=>
setTimeout
(()
=>
this
.
applyNativeWebviewInset
(),
ms
))
this
.
measureWebviewFrameThenApply
()
;[
120
,
400
,
800
,
1500
,
2500
].
forEach
(
ms
=>
setTimeout
(()
=>
this
.
measureWebviewFrameThenApply
(),
ms
)
)
})
}
},
onShow
()
{
if
(
this
.
isApp
&&
this
.
webviewUrl
)
{
this
.
$nextTick
(()
=>
this
.
measureWebviewFrameThenApply
())
}
},
onBackPress
(
options
)
{
if
(
options
.
from
===
'backbutton'
)
{
this
.
back
()
...
...
@@ -120,15 +223,94 @@ export default {
}
return
false
},
onResize
()
{
this
.
measureHeaderThenInset
()
if
(
this
.
isApp
)
{
this
.
$nextTick
(()
=>
this
.
measureWebviewFrameThenApply
())
}
},
methods
:
{
logLayoutMetrics
(
tag
)
{
if
(
!
this
.
layoutDebug
)
return
const
sys
=
uni
.
getSystemInfoSync
()
||
{}
const
payload
=
{
tag
,
系统信息
:
{
screenHeight
:
sys
.
screenHeight
,
windowHeight
:
sys
.
windowHeight
,
windowWidth
:
sys
.
windowWidth
,
statusBarHeight
:
sys
.
statusBarHeight
,
safeArea
:
sys
.
safeArea
,
safeAreaInsets
:
sys
.
safeAreaInsets
},
文档含义
:
{
windowHeight
:
'可使用窗口高度;App 多为页面 webview 可视区域高度,一般不含状态栏本身高度(内容从状态栏下算起)'
,
screenHeight
:
'屏幕高度'
,
statusBarHeight
:
'状态栏高度'
,
boundingClientRect
:
'相对可视布局视口,通常顶部从 webview 内容区顶边起算(y=0 常在状态栏下方)'
},
header
实测
:
this
.
debugHeaderRect
,
measuredHeaderBottomPx
:
this
.
measuredHeaderBottomPx
,
aiWindow
容器
:
this
.
measuredWebviewFrame
,
webviewTopPx
:
this
.
webviewTopPx
,
appWebviewStyles
:
this
.
appWebviewStyles
,
原生
setStyle
:
this
.
debugNativeWebviewStyle
}
console
.
log
(
'[inspectionReport 布局]'
,
JSON
.
stringify
(
payload
,
null
,
2
))
},
/** 根 webview 高度(浮点),用于 ceil(剩余高) 对齐真机子 webview 绘制 */
getRootWebviewHeightFloat
()
{
if
(
typeof
plus
===
'undefined'
)
return
0
try
{
const
cur
=
this
.
$scope
&&
this
.
$scope
.
$getAppWebview
&&
this
.
$scope
.
$getAppWebview
()
if
(
!
cur
||
typeof
cur
.
getStyle
!==
'function'
)
return
0
const
st
=
cur
.
getStyle
()
if
(
!
st
||
st
.
height
==
null
)
return
0
const
n
=
parseFloat
(
String
(
st
.
height
).
replace
(
/px$/i
,
''
))
return
Number
.
isFinite
(
n
)
&&
n
>
0
?
n
:
0
}
catch
(
e
)
{
return
0
}
},
usableWindowHeightFloat
(
sys
)
{
let
h
=
Number
((
sys
&&
sys
.
windowHeight
)
||
0
)
try
{
if
(
typeof
uni
.
getWindowInfo
===
'function'
)
{
const
w
=
uni
.
getWindowInfo
()
if
(
w
&&
Number
(
w
.
windowHeight
)
>
0
)
h
=
Math
.
max
(
h
,
Number
(
w
.
windowHeight
))
}
}
catch
(
e
)
{
/* ignore */
}
const
rh
=
this
.
getRootWebviewHeightFloat
()
if
(
rh
>
0
)
h
=
Math
.
max
(
h
,
rh
)
return
h
},
/** 与 systemInfo.windowWidth 对齐,避免 rect.width 多 1px */
contentWidthPx
(
sys
)
{
const
w
=
Math
.
round
((
sys
&&
sys
.
windowWidth
)
||
0
)
return
w
>
0
?
w
:
0
},
/**
* 原生子 webview 的 height:ceil(根窗口可视高) + slop;不减 topPx(与 top 组合在目标机型上正常)。
*/
nativeSubWebviewHeightPx
(
sys
)
{
const
winH
=
this
.
usableWindowHeightFloat
(
sys
)
const
raw
=
Math
.
max
(
0
,
winH
)
const
slop
=
Math
.
max
(
0
,
Number
(
this
.
nativeWebviewHeightSlopPx
)
||
0
)
return
Math
.
max
(
0
,
Math
.
ceil
(
raw
-
1
e
-
6
)
+
slop
)
},
back
()
{
if
(
this
.
isApp
)
{
try
{
const
cur
=
this
.
$scope
.
$getAppWebview
()
const
sub
=
this
.
pickSubWebview
(
cur
)
if
(
sub
&&
typeof
sub
.
close
===
'function'
)
{
sub
.
close
()
}
this
.
pickSubWebviews
(
cur
).
forEach
(
sub
=>
{
if
(
sub
&&
typeof
sub
.
close
===
'function'
)
{
sub
.
close
()
}
})
if
(
cur
&&
typeof
cur
.
close
===
'function'
)
{
cur
.
close
()
return
...
...
@@ -146,10 +328,21 @@ export default {
.
select
(
'.header'
)
.
boundingClientRect
(
rect
=>
{
if
(
!
rect
||
rect
.
bottom
<=
0
)
return
if
(
this
.
layoutDebug
)
{
this
.
debugHeaderRect
=
{
top
:
Math
.
round
(
rect
.
top
),
bottom
:
Math
.
round
(
rect
.
bottom
),
height
:
Math
.
round
(
rect
.
height
),
width
:
Math
.
round
(
rect
.
width
)
}
}
const
bottom
=
Math
.
ceil
(
rect
.
bottom
)
if
(
bottom
===
this
.
measuredHeaderBottomPx
)
return
this
.
measuredHeaderBottomPx
=
bottom
this
.
$nextTick
(()
=>
this
.
applyNativeWebviewInset
())
this
.
logLayoutMetrics
(
'header'
)
this
.
$nextTick
(()
=>
{
this
.
measureWebviewFrameThenApply
()
})
})
.
exec
()
}
...
...
@@ -159,11 +352,56 @@ export default {
setTimeout
(
run
,
250
)
})
},
pickSubWebview
(
currentWebview
)
{
measureWebviewFrameThenApply
()
{
if
(
!
this
.
webviewUrl
)
return
this
.
$nextTick
(()
=>
{
const
q
=
uni
.
createSelectorQuery
().
in
(
this
)
q
.
select
(
'.ai-window'
).
boundingClientRect
()
q
.
exec
(
res
=>
{
const
rect
=
res
&&
res
[
0
]
if
(
!
rect
||
rect
.
height
<=
0
)
{
this
.
applyNativeWebviewInset
()
return
}
const
sys
=
uni
.
getSystemInfoSync
()
const
top
=
this
.
webviewTopPx
const
cw
=
this
.
contentWidthPx
(
sys
)
const
width
=
cw
>
0
?
cw
:
Math
.
round
(
rect
.
width
)
const
height
=
this
.
nativeSubWebviewHeightPx
(
sys
)
const
prev
=
this
.
measuredWebviewFrame
if
(
prev
&&
prev
.
top
===
top
&&
prev
.
width
===
width
&&
prev
.
height
===
height
)
{
this
.
applyNativeWebviewInset
()
return
}
this
.
measuredWebviewFrame
=
{
top
,
width
,
height
}
this
.
logLayoutMetrics
(
'ai-window'
)
this
.
$nextTick
(()
=>
this
.
applyNativeWebviewInset
())
})
})
},
/** 根 webview 下所有可调 setStyle 的子实例(布局用,避免只命中 draw 池仍漏掉真机上的内容 webview) */
listAllSubWebviewsForSetStyle
(
currentWebview
)
{
const
list
=
[]
try
{
const
kids
=
currentWebview
.
children
()
if
(
!
kids
||
!
kids
.
length
)
return
list
for
(
let
i
=
0
;
i
<
kids
.
length
;
i
++
)
{
const
c
=
kids
[
i
]
if
(
c
&&
typeof
c
.
setStyle
===
'function'
)
list
.
push
(
c
)
}
}
catch
(
e
)
{
/* ignore */
}
return
list
},
/**
* 关闭页面前:优先 URL 命中;与 pdfPreView 一致可带 draw 过滤,避免关错层。
*/
pickSubWebviews
(
currentWebview
)
{
try
{
const
kids
=
currentWebview
.
children
()
if
(
!
kids
||
!
kids
.
length
)
return
null
const
candidates
=
[]
if
(
!
kids
||
!
kids
.
length
)
return
[]
const
raw
=
[]
for
(
let
i
=
0
;
i
<
kids
.
length
;
i
++
)
{
const
c
=
kids
[
i
]
if
(
!
c
||
typeof
c
.
setStyle
!==
'function'
)
continue
...
...
@@ -173,40 +411,79 @@ export default {
}
catch
(
e
)
{
url
=
''
}
candidates
.
push
({
c
,
url
})
raw
.
push
({
c
,
url
})
}
if
(
!
candidates
.
length
)
return
null
const
pool
=
raw
.
filter
(
x
=>
typeof
x
.
c
.
draw
===
'function'
)
const
candidates
=
pool
.
length
?
pool
:
raw
if
(
!
candidates
.
length
)
return
[]
const
full
=
this
.
webviewUrl
||
''
const
hint
=
full
.
split
(
'?'
)[
0
]
if
(
hint
)
{
const
byHint
=
candidates
.
find
(
const
matched
=
candidates
.
filter
(
({
url
})
=>
url
&&
(
url
===
full
||
url
.
indexOf
(
hint
)
!==
-
1
)
)
if
(
byHint
)
return
byHint
.
c
if
(
matched
.
length
)
return
matched
.
map
(
m
=>
m
.
c
)
}
const
byHttp
=
candidates
.
find
(({
url
})
=>
url
&&
/^https
?
:
\/\/
/i
.
test
(
url
))
if
(
byHttp
)
return
byHttp
.
c
return
candidates
[
candidates
.
length
-
1
].
c
const
httpOnes
=
candidates
.
filter
(({
url
})
=>
url
&&
/^https
?
:
\/\/
/i
.
test
(
url
))
if
(
httpOnes
.
length
)
return
httpOnes
.
map
(
m
=>
m
.
c
)
return
[
candidates
[
candidates
.
length
-
1
].
c
]
}
catch
(
e
)
{
return
null
return
[]
}
},
/**
* 原生子 webview:显式 height,避免仅用 bottom 时真机绘制高度小于 .ai-window。
*/
buildNativeSubWebviewInsetStyle
(
topPx
,
widthPx
,
heightPx
)
{
return
{
top
:
`
${
topPx
}
px`
,
left
:
'0px'
,
width
:
`
${
widthPx
}
px`
,
height
:
`
${
heightPx
}
px`
}
},
applyNativeWebviewInset
()
{
if
(
!
this
.
isApp
||
!
this
.
webviewUrl
)
return
const
sys
=
uni
.
getSystemInfoSync
()
const
topPx
=
this
.
webviewTopPx
const
h
=
Math
.
max
(
0
,
Math
.
floor
(
sys
.
windowHeight
-
topPx
))
const
frame
=
this
.
measuredWebviewFrame
const
topPx
=
frame
&&
frame
.
height
>
0
?
frame
.
top
:
this
.
webviewTopPx
const
cw
=
this
.
contentWidthPx
(
sys
)
const
w
=
cw
>
0
?
cw
:
frame
&&
frame
.
height
>
0
?
frame
.
width
:
sys
.
windowWidth
const
hNative
=
this
.
nativeSubWebviewHeightPx
(
sys
)
const
styleInset
=
this
.
buildNativeSubWebviewInsetStyle
(
topPx
,
w
,
hNative
)
const
trySet
=
()
=>
{
try
{
const
cur
=
this
.
$scope
.
$getAppWebview
()
const
wv
=
this
.
pickSubWebview
(
cur
)
if
(
wv
)
{
wv
.
setStyle
({
top
:
String
(
topPx
),
left
:
'0'
,
width
:
String
(
sys
.
windowWidth
),
height
:
String
(
h
)
let
list
=
this
.
listAllSubWebviewsForSetStyle
(
cur
)
if
(
!
list
.
length
)
list
=
this
.
pickSubWebviews
(
cur
)
if
(
list
.
length
)
{
list
.
forEach
(
wv
=>
{
wv
.
setStyle
(
styleInset
)
})
if
(
this
.
layoutDebug
)
{
try
{
const
wv
=
list
[
0
]
const
st
=
wv
.
getStyle
&&
wv
.
getStyle
()
this
.
debugNativeWebviewStyle
=
{
top
:
st
&&
st
.
top
,
width
:
st
&&
st
.
width
,
height
:
st
&&
st
.
height
,
bottom
:
st
&&
st
.
bottom
}
}
catch
(
e
)
{
this
.
debugNativeWebviewStyle
=
{
top
:
styleInset
.
top
,
width
:
styleInset
.
width
,
height
:
styleInset
.
height
}
}
this
.
logLayoutMetrics
(
'native-setStyle'
)
}
return
true
}
}
catch
(
e
)
{
...
...
@@ -215,7 +492,7 @@ export default {
return
false
}
const
retry
=
(
n
=
0
)
=>
{
if
(
trySet
()
||
n
>
3
5
)
return
if
(
trySet
()
||
n
>
5
5
)
return
setTimeout
(()
=>
retry
(
n
+
1
),
50
)
}
retry
()
...
...
@@ -244,6 +521,45 @@ export default {
box-sizing
:
border-box
;
}
.inspection-page.layout-debug
{
background-color
:
#ffcdd2
;
.header
{
background-color
:
#ffe082
!important
;
box-shadow
:
inset
0
0
0
3px
#ff6f00
;
}
/* 不要用 inset 描边:会在四边形成固定宽度的「绿框」,子 webview 即使与 rect 对齐也会露出来,极易误判未铺满 */
.ai-window
{
background-color
:
rgba
(
46
,
125
,
50
,
0.1
);
}
}
.layout-debug-panel
{
position
:
fixed
;
left
:
0
;
right
:
0
;
z-index
:
99999
;
padding
:
8px
10px
12px
;
background
:
rgba
(
0
,
0
,
0
,
0.82
);
color
:
#fff
;
font-size
:
11px
;
line-height
:
1.45
;
max-height
:
38vh
;
overflow-y
:
auto
;
box-sizing
:
border-box
;
border-bottom
:
2px
solid
#ffeb3b
;
box-shadow
:
0
4px
12px
rgba
(
0
,
0
,
0
,
0.35
);
}
.layout-debug-title
{
font-weight
:
700
;
margin-bottom
:
4px
;
color
:
#ffeb3b
;
}
.layout-debug-hint
{
margin-top
:
6px
;
opacity
:
0.85
;
font-size
:
10px
;
}
.header
{
padding-top
:
30px
;
background-color
:
#f5f9ff
;
...
...
@@ -277,12 +593,21 @@ export default {
}
.ai-window
{
position
:
absolute
;
top
:
10%
;
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
90vh
;
z-index
:
1
;
box-sizing
:
border-box
;
overflow
:
hidden
;
display
:
flex
;
flex-direction
:
column
;
}
.ai-window-wv
{
flex
:
1
;
width
:
100%
;
min-height
:
0
;
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment