Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biz-trina5-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
贺双
biz-trina5-app
Commits
3c84a656
Commit
3c84a656
authored
Nov 06, 2025
by
刘威龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
司机登录页添加重要提醒功能
parent
312d6302
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
224 additions
and
161 deletions
+224
-161
apiList.js
api/apiList.js
+4
-0
dirverMenu.vue
pages/dirverMenu/dirverMenu.vue
+220
-161
No files found.
api/apiList.js
View file @
3c84a656
...
@@ -376,4 +376,8 @@ export function GetCarrierList(data) {
...
@@ -376,4 +376,8 @@ export function GetCarrierList(data) {
// 百度OCR ocrType: 身份证 idCard 驾驶证 drivingLicense 行驶证 vehicleLicense
// 百度OCR ocrType: 身份证 idCard 驾驶证 drivingLicense 行驶证 vehicleLicense
export
function
OCRService
(
ocrType
,
data
)
{
export
function
OCRService
(
ocrType
,
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/biz.adapter.AdapterTask.service.
${
ocrType
}
`
,
data
)
return
Request
(
`/api/entry/{mini}/m-action/biz.adapter.AdapterTask.service.
${
ocrType
}
`
,
data
)
}
//查询安全提醒文本
export
function
GetSafeIndicator
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/getSafeIndicator`
,
data
);
}
}
\ No newline at end of file
pages/dirverMenu/dirverMenu.vue
View file @
3c84a656
<
template
>
<
template
>
<view
class=
"park_content"
>
<view
class=
"park_content"
>
<!-- 弹窗遮罩 + 内容 -->
<view
class=
"mask"
v-if=
"visible"
@
click
.
stop
></view>
<view
class=
"model_box"
v-if=
"visible"
>
<view
class=
"mb-tit"
>
安全提醒
</view>
<view
class=
"mb-content"
>
<view
class=
"mb-con"
>
{{
text
}}
</view>
</view>
<button
class=
"confirm-btn"
@
click=
"closeReminder"
:disabled=
"!canClose"
>
{{
canClose
?
'我已阅读并同意'
:
`请阅读 ${countDown
}
秒后关闭`
}}
<
/button
>
<
/view
>
<!--
原有页面内容
-->
<
view
class
=
"park_header"
>
<
view
class
=
"park_header"
>
<!--
<image
class=
"header-bg"
src=
"../../static/img/bg/loginBg.png"
>
</image>
-->
<
image
class
=
"header-bg"
src
=
"../../static/img/bg/trina_dl.png"
><
/image
>
<
image
class
=
"header-bg"
src
=
"../../static/img/bg/trina_dl.png"
><
/image
>
<
/view
>
<
/view
>
<view
class=
"section_2 flex-col"
>
<
view
class
=
"section_2 flex-col"
>
<text
class=
"text_2"
>
运输执行
</text>
<
text
class
=
"text_2"
>
运输执行
<
/text
>
<view
class=
"park_body flex_sb flex_wrap"
>
<
view
class
=
"park_body flex_sb flex_wrap"
>
<view
class=
"park_card"
v-for=
"(item,index) in cardList"
:key=
"index"
@
click=
"openCard(item.path)"
>
<
view
class
=
"park_card"
v
-
for
=
"(item,index) in cardList"
:
key
=
"index"
@
click
=
"openCard(item.path)"
>
<image
class=
"image_2"
referrerpolicy=
"no-referrer"
:src=
"item.src"
/>
<
image
class
=
"image_2"
referrerpolicy
=
"no-referrer"
:
src
=
"item.src"
/>
<view
class=
"card_title"
>
{{
item
.
title
}}
</view>
<
view
class
=
"card_title"
>
{{
item
.
title
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
</view>
<
customTabBar
tabIndex
=
"0"
/>
<
customTabBar
tabIndex
=
"0"
/>
<
/view
>
<
/view
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{}
from
'../../api/apiList.js'
import
{
GetSafeIndicator
}
from
'../../api/apiList.js'
import
{
import
{
getLoginInfo
}
from
'../../mixins/loginBehavior'
getLoginInfo
}
from
'../../mixins/loginBehavior'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
code
:
""
,
code
:
""
,
cardList
:
[{
cardList
:
[{
title
:
"运单管理"
,
title
:
"运单管理"
,
path
:
"/subpkg/shipment/shipment"
,
path
:
"/subpkg/shipment/shipment"
,
src
:
"../../static/img/bg/drivers.png"
src
:
"../../static/img/bg/drivers.png"
}
,{
},{
title
:
"回单管理"
,
title
:
"回单管理"
,
path
:
"/subpkg/orderPod/orderPod"
,
path
:
"/subpkg/orderPod/orderPod"
,
src
:
"../../static/img/bg/orderPod.png"
src
:
"../../static/img/bg/orderPod.png"
}
],
}
/* ,{
// 弹窗相关参数(新增)
title:"在途上报",
visible
:
false
,
// 弹窗是否显示
path:"/subpkg/onWayUpload/onWayUpload",
canClose
:
false
,
// 是否允许关闭
src: "../../static/img/bg/onWay.png"
countDown
:
5
,
// 强制阅读倒计时(秒)
} */
text
:
""
}
;
}
,
onLoad
()
{
// 页面加载时判断是否需要显示弹窗(新增)
let
reqData
=
{
"args"
:
{
}
}
let
_this
=
this
;
GetSafeIndicator
(
reqData
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
console
.
log
(
'返回结果为:'
,
data
);
_this
.
text
=
data
.
text
.
replace
(
/↵/g
,
'
\
n'
);
console
.
log
(
'获取text为:'
,
_this
.
text
);
}
)
this
.
checkNeedShowReminder
();
}
,
methods
:
{
openCard
(
path
)
{
uni
.
navigateTo
({
url
:
path
}
);
}
,
],
// 新增:判断是否需要显示弹窗(7天间隔逻辑)
isAgree
:
false
,
checkNeedShowReminder
()
{
visible
:
false
,
// 获取本地存储的上次弹窗时间(时间戳)
};
const
lastShowTime
=
uni
.
getStorageSync
(
'lastReminderTime'
);
const
currentTime
=
Date
.
now
();
// 当前时间戳(毫秒)
const
sevenDays
=
7
*
24
*
60
*
60
*
1000
;
// 7天的毫秒数
// 无记录 或 间隔超过7天 → 显示弹窗
if
(
!
lastShowTime
||
currentTime
-
lastShowTime
>
sevenDays
)
{
this
.
visible
=
true
;
this
.
startCountDown
();
// 启动3秒倒计时
}
}
,
// 新增:3秒强制阅读倒计时
startCountDown
()
{
const
timer
=
setInterval
(()
=>
{
if
(
this
.
countDown
<=
1
)
{
clearInterval
(
timer
);
this
.
countDown
=
0
;
this
.
canClose
=
true
;
// 倒计时结束,允许关闭
}
else
{
this
.
countDown
--
;
}
}
,
1000
);
}
,
}
,
onLoad
()
{},
methods
:
{
// 新增:关闭弹窗
openCard
(
path
)
{
closeReminder
()
{
uni
.
navigateTo
({
if
(
this
.
canClose
)
{
url
:
path
,
this
.
visible
=
false
;
})
// 记录本次弹窗时间,用于下次间隔判断
},
uni
.
setStorageSync
(
'lastReminderTime'
,
Date
.
now
());
}
}
}
}
}
}
<
/script
>
<
/script
>
<
style
lang
=
"scss"
>
<
style
lang
=
"scss"
>
.park_content
{
.
park_content
{
.mask
{
/* 新增:弹窗样式 */
position
:
absolute
;
.
mask
{
top
:
0
;
position
:
fixed
;
left
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
left
:
0
;
z-index
:
999
;
right
:
0
;
bottom
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
z
-
index
:
999
;
}
.
model_box
{
width
:
80
%
;
position
:
fixed
;
top
:
50
%
;
left
:
50
%
;
transform
:
translate
(
-
50
%
,
-
50
%
);
z
-
index
:
1000
;
background
:
#
fff
;
border
-
radius
:
15
rpx
;
overflow
:
hidden
;
padding
-
bottom
:
30
rpx
;
}
.
confirm
-
btn
{
width
:
80
%
;
height
:
80
rpx
;
line
-
height
:
80
rpx
;
background
:
#
005
bb5
;
color
:
#
fff
;
font
-
size
:
28
rpx
;
border
-
radius
:
40
rpx
;
margin
:
0
auto
;
}
.
confirm
-
btn
[
disabled
]
{
background
:
#
ccc
;
color
:
#
999
;
}
/* 原有样式保持不变 */
.
park_header
{
background
-
color
:
#
E9EEF6
;
height
:
450
rpx
;
.
header
-
bg
{
width
:
100
%
;
width
:
100
%
;
height
:
100
%
;
height
:
100
%
;
margin
-
top
:
-
20
px
;
}
}
}
.model_box
{
.
section_2
{
width
:
80%
;
background
-
color
:
rgba
(
255
,
255
,
255
,
1
);
position
:
fixed
;
border
-
radius
:
24
px
24
px
0
px
0
px
;
top
:
50%
;
position
:
relative
;
left
:
50%
;
margin
-
top
:
-
29
px
;
transform
:
translate
(
-50%
,
-50%
);
padding
:
5
px
2
px
130
px
2
px
;
z-index
:
1000
;
}
background
:
#fff
;
.
text_2
{
height
:
25%
;
overflow
-
wrap
:
break
-
word
;
border-radius
:
15rpx
;
color
:
rgba
(
89
,
89
,
89
,
1
);
}
font
-
size
:
18
px
;
font
-
family
:
PingFangSC
-
Medium
;
.mb-content
{
font
-
weight
:
550
;
padding
:
10rpx
20rpx
10rpx
25rpx
;
text
-
align
:
left
;
box-sizing
:
border-box
;
white
-
space
:
nowrap
;
height
:
55%
;
line
-
height
:
44
px
;
overflow
:
scroll
;
margin
-
right
:
560
px
;
}
margin
-
left
:
10
px
;
}
.mb-tit
{
.
park_body
{
padding
:
15rpx
0rpx
;
padding
:
0
21
rpx
;
box-sizing
:
border-box
;
display
:
flex
;
font-size
:
34rpx
;
margin
-
top
:
-
12
px
;
text-align
:
center
;
.
park_card
{
}
margin
-
top
:
25
rpx
;
width
:
310
rpx
;
.mb-con
{
height
:
252
rpx
;
font-size
:
30rpx
;
background
-
color
:
#
F2F3F8
;
text-indent
:
1rem
;
line-height
:
1
.5
;
}
.shipment_code
{
line-height
:
40rpx
;
font-weight
:
bolder
;
text-shadow
:
1rpx
3rpx
12rpx
rgba
(
0
,
0
,
0
,
0
.04
);
}
.toutitle
{
font-size
:
16px
;
padding-left
:
10px
;
font-weight
:
540
;
}
.park_header
{
background-color
:
#E9EEF6
;
height
:
450rpx
;
.header-bg
{
width
:
100%
;
height
:
100%
;
margin-top
:
-20px
;
}
}
.section_2
{
background-color
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
24px
24px
0px
0px
;
position
:
relative
;
margin-top
:
-29px
;
padding
:
5px
2px
130px
2px
;
}
.text_2
{
overflow-wrap
:
break-word
;
color
:
rgba
(
89
,
89
,
89
,
1
);
font-size
:
18px
;
font-family
:
PingFangSC-Medium
;
font-weight
:
550
;
text-align
:
left
;
white-space
:
nowrap
;
line-height
:
44px
;
margin-right
:
560px
;
margin-left
:
10px
;
}
.park_body
{
padding
:
0
21rpx
;
display
:
flex
;
display
:
flex
;
margin-top
:
-12px
;
justify
-
content
:
center
;
.park_card
{
align
-
items
:
center
;
margin-top
:
25rpx
;
flex
-
direction
:
column
;
width
:
310rpx
;
border
-
radius
:
10
px
;
height
:
252rpx
;
&
:
after
{
background-color
:
#F2F3F8
;
content
:
""
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
border-radius
:
10px
;
.image_5
{
width
:
199rpx
;
height
:
199rpx
;
margin-top
:
-14px
;
}
.card_title
{
margin-top
:
-10rpx
;
font-size
:
30rpx
;
font-weight
:
1000
;
color
:
#005bb5
;
}
&
:after
{
content
:
""
;
}
}
}
}
}
.image_2
{
width
:
199rpx
;
height
:
199rpx
;
margin-top
:
-14px
;
}
}
}
</
style
>
.
image_2
{
width
:
199
rpx
;
height
:
199
rpx
;
margin
-
top
:
-
14
px
;
}
.
card_title
{
margin
-
top
:
-
10
rpx
;
font
-
size
:
30
rpx
;
font
-
weight
:
1000
;
color
:
#
005
bb5
;
}
.
mb
-
tit
{
padding
:
15
rpx
0
rpx
;
box
-
sizing
:
border
-
box
;
font
-
size
:
34
rpx
;
text
-
align
:
center
;
font
-
weight
:
600
;
border
-
bottom
:
1
rpx
solid
#
f5f5f5
;
}
.
mb
-
content
{
padding
:
20
rpx
25
rpx
;
box
-
sizing
:
border
-
box
;
max
-
height
:
300
rpx
;
overflow
:
auto
;
// 新增:确保父容器不限制子元素换行
white
-
space
:
normal
;
}
.
mb
-
con
{
// 核心:保留换行符并自动换行
white
-
space
:
pre
-
wrap
;
// 补充:长文本自动换行(防止单词/数字溢出)
word
-
break
:
break
-
all
;
font
-
size
:
26
rpx
;
line
-
height
:
2
;
// 增加行高,让换行后更清晰
color
:
#
666
;
}
}
<
/style>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment