Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea_resources_pc
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
张伯涛
tea_resources_pc
Commits
431f726c
Commit
431f726c
authored
Jul 24, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程列表记住筛选项并且从详情也面返回滚动到跳转前的位置
parent
a992452f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
9 deletions
+43
-9
App.vue
src/App.vue
+8
-4
index.vue
src/views/courseResources/courseDetails/index.vue
+1
-0
index.vue
src/views/courseResources/courseMall/index.vue
+1
-2
browsingHistory.vue
src/views/personalCenter/component/browsingHistory.vue
+17
-2
myFavoritePer.vue
src/views/personalCenter/component/myFavoritePer.vue
+16
-1
No files found.
src/App.vue
View file @
431f726c
...
...
@@ -49,23 +49,27 @@ export default {
},
scroll
(
newValue
,
oldValue
)
{
// 监听myVar变量的变化
console
.
log
(
'scrollscrollscrollscrollscrollscroll scroll:'
,
newValue
)
if
(
newValue
===
'1'
)
{
//
console.log('scrollscrollscrollscrollscrollscroll scroll:', newValue)
if
(
newValue
===
'1'
&&
this
.
$route
.
path
===
'/courseResources/courseMall/index'
)
{
setTimeout
(()
=>
{
console
.
log
(
'22222222222222222222222222222222222'
,
this
.
$route
)
window
.
scrollTo
(
0
,
1000
)
this
.
$store
.
dispatch
(
'app/scroll'
,
null
)
this
.
$refs
[
'scrollContainer'
].
scrollTo
({
top
:
this
.
$route
.
query
.
params
.
height
||
0
,
behavior
:
'smooth'
}
)
},
1500
)
}
// 这里可以执行一些操作,比如根据变化的值进行一些逻辑处理
}
},
mounted
()
{
// setTimeout(() => {
// this.$refs['scrollContainer'].scrollTo({ top: 1000 || 0, behavior: 'smooth' })
// }, 1500)
this
.
setupAutoLogoutTimer
()
// 页面加载时启动监控用户操作
},
methods
:
{
parentScroll
(
event
)
{
// 获取滚动高度
const
scrollHeight
=
event
.
target
.
scrollTop
// console.log('scrollHeight', scrollHeight)
if
(
this
.
routerPath
===
'/courseResources/courseMall/index'
)
{
this
.
$store
.
dispatch
(
'app/setTopE'
,
scrollHeight
)
}
...
...
src/views/courseResources/courseDetails/index.vue
View file @
431f726c
...
...
@@ -993,6 +993,7 @@ export default {
}
.subTitle
{
line-height
:
28px
;
height
:
95px
;
font-size
:
14px
;
font-weight
:
400
;
...
...
src/views/courseResources/courseMall/index.vue
View file @
431f726c
...
...
@@ -395,9 +395,8 @@ export default {
next
()
},
created
()
{
console
.
log
(
'createdcreatedcreatedcreatedcreatedcreated'
,
this
.
queryParams
)
this
.
getCoursePlanOptions
()
// 获取企业和院校的课程方案
this
.
handleToTop
()
// 一进入页面自动滚动到最顶部
//
this.handleToTop() // 一进入页面自动滚动到最顶部
this
.
mallIdentityType
=
this
.
$route
.
query
.
mallIdentityType
||
''
if
(
this
.
mallIdentityType
)
{
this
.
getDicts
(
dictCons
[
'TEC_CLASSIFY'
]).
then
(
response
=>
{
...
...
src/views/personalCenter/component/browsingHistory.vue
View file @
431f726c
...
...
@@ -16,8 +16,13 @@
<!--
<div
class=
"text"
>
{{
item
.
classHour
}}
课时
</div>
-->
</div>
<div
class=
"price"
>
<div
v-if=
"item.lessonPrice>0"
class=
"money"
><span
style=
"font-size:14px "
>
¥
</span>
{{
item
.
lessonPrice
}}
</div>
<div
v-else
class=
"free"
>
免费
</div>
<div
class=
"teacherRow"
>
<img
class=
"teacherImg"
:src=
"teacherImg"
>
<div>
讲师:
</div>
<div>
{{
item
.
teacherName
}}
</div>
</div>
<!--
<div
v-if=
"item.lessonPrice>0"
class=
"money"
><span
style=
"font-size:14px "
>
¥
</span>
{{
item
.
lessonPrice
}}
</div>
-->
<!--
<div
v-else
class=
"free"
>
免费
</div>
-->
</div>
</div>
</div>
...
...
@@ -47,6 +52,7 @@ export default {
name
:
'BrowsingHistory'
,
data
()
{
return
{
teacherImg
:
require
(
'@/assets/image/teacherImg.png'
),
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
queryParams
:
{
userId
:
store
.
getters
.
businessId
,
...
...
@@ -185,6 +191,15 @@ export default {
}
.bottom
{
padding
:
16px
;
.teacherRow
{
display
:
flex
;
align-items
:
center
;
.teacherImg
{
width
:
16px
;
height
:
16px
;
margin-right
:
8px
;
}
}
.price
{
margin-top
:
20px
;
.money
{
...
...
src/views/personalCenter/component/myFavoritePer.vue
View file @
431f726c
...
...
@@ -17,7 +17,12 @@
<div
class=
"text"
>
{{
item
.
classHour
}}
课时
</div>
</div>
<div
class=
"price"
>
<div
class=
"money"
><span
style=
"font-size:14px "
>
¥
</span>
{{
item
.
lessonPrice
}}
</div>
<div
class=
"teacherRow"
>
<img
class=
"teacherImg"
:src=
"teacherImg"
>
<div>
讲师:
</div>
<div>
{{
item
.
teacherName
}}
</div>
</div>
<!--
<div
class=
"money"
><span
style=
"font-size:14px "
>
¥
</span>
{{
item
.
lessonPrice
}}
</div>
-->
<div
class=
"favoriteLogo"
@
click=
"cancelFavorite(item.businessId)"
>
❤
</div>
</div>
</div>
...
...
@@ -53,6 +58,7 @@ export default {
name
:
'MyFavoritePer'
,
data
()
{
return
{
teacherImg
:
require
(
'@/assets/image/teacherImg.png'
),
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
isfree
:
true
,
queryParams
:
{
...
...
@@ -211,6 +217,15 @@ export default {
}
.bottom
{
padding
:
16px
;
.teacherRow
{
display
:
flex
;
align-items
:
center
;
.teacherImg
{
width
:
16px
;
height
:
16px
;
margin-right
:
8px
;
}
}
.price
{
display
:flex
;
justify-content
:
space-between
;
...
...
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