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