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 cc39e508
authored
Apr 28, 2026
by
岑成威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:webview样式
1 parent
f3aa22bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
13 deletions
components/HomeFrame/index.vue
components/StudyCenterPermissionPopup.vue
pages/boutique/components/OrderCard.vue
pages/boutique/tool/index.vue
pages/common/studyDetail/shortCourseLearnRoom.vue
components/HomeFrame/index.vue
View file @
cc39e50
...
...
@@ -399,6 +399,10 @@ export default {
},
handleStudyPermissionConfirm
()
{
this
.
showStudyPermissionPopup
=
false
if
(
this
.
lockReason
==
'2'
)
{
uni
.
navigateTo
({
url
:
'/pages/common/serviceDetail/index?moduleType=9'
})
return
}
// 切换到学习中心 tab
const
tabs
=
this
.
$refs
.
leftBox
?.
tabs
if
(
tabs
)
{
...
...
components/StudyCenterPermissionPopup.vue
View file @
cc39e50
...
...
@@ -28,7 +28,7 @@
<!-- 按钮 -->
<view
class=
"goto-button"
@
click=
"handleGoToStudy"
>
去往学习中心
{{ lockReason == '2' ? '去往服务中心' : '去往学习中心' }}
</view>
</view>
</template>
...
...
pages/boutique/components/OrderCard.vue
View file @
cc39e50
...
...
@@ -381,6 +381,10 @@ export default {
// 跳转学习中心
handleStudyPermissionConfirm
()
{
this
.
showStudyPermissionPopup
=
false
if
(
this
.
lockReason
==
'2'
)
{
uni
.
navigateTo
({
url
:
'/pages/common/serviceDetail/index?moduleType=9'
})
return
}
uni
.
navigateBack
({
success
:
()
=>
{
setTimeout
(()
=>
{
...
...
pages/boutique/tool/index.vue
View file @
cc39e50
...
...
@@ -137,7 +137,7 @@ export default {
if
(
!
noInterceptPage
.
includes
(
item
.
name
)
&&
(
await
this
.
checkDailyReport
()))
return
// 提示去学习中心弹窗
const
res
=
await
this
.
getLimitRecord
()
if
(
res
.
lockOrder
)
{
if
(
!
res
.
lockOrder
)
{
this
.
showStudyPermissionPopup
=
true
this
.
lockReason
=
res
.
lockReason
return
...
...
@@ -197,13 +197,20 @@ export default {
// 跳转学习中心
handleStudyPermissionConfirm
()
{
this
.
showStudyPermissionPopup
=
false
uni
.
navigateBack
({
console
.
log
(
this
.
lockReason
,
'lockReason'
)
if
(
this
.
lockReason
==
'2'
)
{
uni
.
navigateTo
({
url
:
'/pages/common/serviceDetail/index?moduleType=9'
})
return
}
else
{
uni
.
navigateBack
({
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
$emit
(
'studyCenter'
)
},
100
)
}
})
}
},
// 确认选择的月份
confirmMonth
(
month
)
{
...
...
pages/common/studyDetail/shortCourseLearnRoom.vue
View file @
cc39e50
...
...
@@ -252,7 +252,8 @@
<learn-popup
ref=
"learn"
content=
"尚未完成复盘,\n是否退出?"
@
confirm=
"backPage"
@
cancel=
"handlePracticeExitCancel"
@
confirm=
"handleBackConfirm"
/>
</view>
</template>
...
...
@@ -298,6 +299,7 @@
rightBoxMode
:
'knowledge'
,
practiceUrl
:
''
,
practiceWv
:
null
,
practiceWvStyle
:
null
,
practiceSceneIndex
:
1
}
},
...
...
@@ -641,6 +643,16 @@
this
.
rightBoxMode
=
'knowledge'
this
.
hidePracticeWebview
()
},
handlePracticeExitCancel
()
{
// 继续学习:把 webview 复原到原位
// #ifdef APP-PLUS
if
(
this
.
practiceWv
&&
this
.
practiceWvStyle
)
{
try
{
this
.
practiceWv
.
setStyle
(
this
.
practiceWvStyle
)
}
catch
(
e
)
{}
}
// #endif
},
openPracticeWebview
()
{
// 仅 App-Plus 支持子 webview 方式嵌入指定区域
// #ifdef APP-PLUS
...
...
@@ -674,13 +686,14 @@
const
barH
=
(
barRect
&&
barRect
.
height
)
?
barRect
.
height
:
(
typeof
uni
.
upx2px
===
'function'
?
uni
.
upx2px
(
120
)
:
0
)
wv
.
setStyle
(
{
this
.
practiceWvStyle
=
{
left
:
`
${
bodyRect
.
left
}
px`
,
top
:
`
${
bodyRect
.
top
+
barH
}
px`
,
width
:
`
${
bodyRect
.
width
}
px`
,
height
:
`
${
Math
.
max
(
0
,
bodyRect
.
height
-
barH
)}
px`
,
background
:
'transparent'
})
}
wv
.
setStyle
(
this
.
practiceWvStyle
)
wv
.
show
()
// 用页面内 CSS 实现圆角(原生 webview 本身不可靠支持圆角裁剪)
try
{
...
...
@@ -890,14 +903,20 @@
},
handleBackConfirm
()
{
this
.
closePracticeWebview
()
this
.
backPage
()
},
back
()
{
const
report
=
(
this
.
courseDetail
&&
Array
.
isArray
(
this
.
courseDetail
.
aiReviewReport
))
?
this
.
courseDetail
.
aiReviewReport
:
[]
const
shouldBlockExit
=
!
report
.
length
||
report
.
some
(
e
=>
Number
(
e
.
examStatus
)
!==
2
)
if
(
shouldBlockExit
)
this
.
learnRef
.
open
()
else
this
.
backPage
()
// 先把 webview 移出可视区(如果存在)
// #ifdef APP-PLUS
if
(
this
.
practiceWv
)
{
try
{
this
.
practiceWv
.
setStyle
({
left
:
'-9999px'
,
top
:
'-9999px'
})
}
catch
(
e
)
{}
}
// #endif
this
.
learnRef
.
open
()
}
}
}
...
...
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