Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-fi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-fi
Commits
4ca6b31d
提交
4ca6b31d
authored
1月 13, 2023
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码优化
上级
10d434ca
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
72 行增加
和
120 行删除
+72
-120
ContactDialog.vue
src/modules/shop/components/ContactDialog.vue
+0
-1
CourseFooter.vue
src/modules/shop/components/CourseFooter.vue
+5
-8
CourseListItem.vue
src/modules/shop/components/CourseListItem.vue
+10
-13
DetailBanner.vue
src/modules/shop/components/DetailBanner.vue
+13
-22
Index.vue
src/modules/shop/views/Index.vue
+19
-22
View.vue
src/modules/shop/views/View.vue
+22
-43
shop.ts
src/stores/shop.ts
+3
-11
没有找到文件。
src/modules/shop/components/ContactDialog.vue
浏览文件 @
4ca6b31d
...
@@ -28,7 +28,6 @@ const handleCancel = () => {
...
@@ -28,7 +28,6 @@ const handleCancel = () => {
title=
"上课方式"
title=
"上课方式"
>
>
<div
class=
"buy_alert"
>
<div
class=
"buy_alert"
>
<!--
<img
src=
"https://webapp-pub.ezijing.com/project_online/fi/icon_contact.png"
alt=
""
/>
-->
<div
class=
"alert_con"
>
<div
class=
"alert_con"
>
<img
src=
"https://webapp-pub.ezijing.com/project_online/fi/contact_wx.png"
class=
"con_img"
/>
<img
src=
"https://webapp-pub.ezijing.com/project_online/fi/contact_wx.png"
class=
"con_img"
/>
<div
class=
"con_desc"
>
请联系小秘书:13263110169(同微信)
</div>
<div
class=
"con_desc"
>
请联系小秘书:13263110169(同微信)
</div>
...
...
src/modules/shop/components/CourseFooter.vue
浏览文件 @
4ca6b31d
...
@@ -6,9 +6,6 @@ const user = useUserStore()
...
@@ -6,9 +6,6 @@ const user = useUserStore()
const
{
mobile
}
=
useDevice
()
const
{
mobile
}
=
useDevice
()
const
router
=
useRouter
()
const
router
=
useRouter
()
const
props
=
defineProps
({
const
props
=
defineProps
({
payStatus
:
{
type
:
String
},
shopItem
:
{
shopItem
:
{
type
:
Object
type
:
Object
}
}
...
@@ -17,7 +14,7 @@ const buyDialogVisible = ref(false)
...
@@ -17,7 +14,7 @@ const buyDialogVisible = ref(false)
const
handleBuyCourse
=
()
=>
{
const
handleBuyCourse
=
()
=>
{
if
(
user
.
isLogin
)
{
if
(
user
.
isLogin
)
{
if
(
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
{
if
(
props
.
shopItem
?.
isBuy
===
true
)
{
if
(
props
.
shopItem
?.
category
===
'system_course'
)
{
if
(
props
.
shopItem
?.
category
===
'system_course'
)
{
buyDialogVisible
.
value
=
true
buyDialogVisible
.
value
=
true
}
else
{
}
else
{
...
@@ -37,7 +34,7 @@ const handleBuyCourse = () => {
...
@@ -37,7 +34,7 @@ const handleBuyCourse = () => {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"detail_footer"
v-if=
"!mobile"
>
<div
class=
"detail_footer"
v-if=
"!mobile"
>
<div
class=
"left_status"
v-if=
"
payStatus === '4' ||
shopItem?.isBuy === true"
>
已购买
</div>
<div
class=
"left_status"
v-if=
"shopItem?.isBuy === true"
>
已购买
</div>
<template
v-else
>
<template
v-else
>
<div
class=
"footer_left"
>
<div
class=
"footer_left"
>
<div
class=
"left_tit"
>
总学费
</div>
<div
class=
"left_tit"
>
总学费
</div>
...
@@ -49,11 +46,11 @@ const handleBuyCourse = () => {
...
@@ -49,11 +46,11 @@ const handleBuyCourse = () => {
</div>
</div>
</
template
>
</
template
>
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
>
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
>
{{
payStatus === '4' ||
shopItem?.isBuy === true || shopItem?.is_free === true ? '立即学习' : '立即购买' }}
{{ shopItem?.isBuy === true || shopItem?.is_free === true ? '立即学习' : '立即购买' }}
</div>
</div>
</div>
</div>
<div
class=
"detail_footer"
v-else
>
<div
class=
"detail_footer"
v-else
>
<div
class=
"left_status"
v-if=
"
payStatus === '4' ||
shopItem?.isBuy === true"
>
已购买
</div>
<div
class=
"left_status"
v-if=
"shopItem?.isBuy === true"
>
已购买
</div>
<
template
v-else
>
<
template
v-else
>
<div
class=
"footer_left"
v-if=
"shopItem?.type === '课程包'"
>
<div
class=
"footer_left"
v-if=
"shopItem?.type === '课程包'"
>
<div
class=
"left_tit"
>
<div
class=
"left_tit"
>
...
@@ -72,7 +69,7 @@ const handleBuyCourse = () => {
...
@@ -72,7 +69,7 @@ const handleBuyCourse = () => {
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
>
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
>
<div
class=
"btn_buy"
>
<div
class=
"btn_buy"
>
{{
payStatus === '4' ||
shopItem?.isBuy === true || shopItem?.is_free === true ? '立即学习' : '立即购买' }}
{{ shopItem?.isBuy === true || shopItem?.is_free === true ? '立即学习' : '立即购买' }}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/modules/shop/components/CourseListItem.vue
浏览文件 @
4ca6b31d
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
ContactDialog
from
'../components/ContactDialog.vue'
import
ContactDialog
from
'../components/ContactDialog.vue'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useUserStore
}
from
'@/stores/user'
const
{
mobile
}
=
useDevice
()
const
{
mobile
}
=
useDevice
()
const
user
=
useUserStore
()
const
router
=
useRouter
()
const
router
=
useRouter
()
const
buyDialogVisible
=
ref
(
false
)
const
buyDialogVisible
=
ref
(
false
)
...
@@ -14,20 +11,20 @@ defineProps({
...
@@ -14,20 +11,20 @@ defineProps({
}
}
})
})
// 查看详情
// 查看详情
const
handleD
a
tail
=
(
item
:
any
)
=>
{
const
handleD
e
tail
=
(
item
:
any
)
=>
{
router
.
push
({
router
.
push
({
path
:
`/shop/detail/
${
item
}
`
path
:
`/shop/detail/
${
item
}
`
})
})
}
}
const
handleBuy
=
(
courseItem
:
any
)
=>
{
const
handleBuy
=
(
courseItem
:
any
)
=>
{
if
(
courseItem
?.
isBuy
===
true
)
{
if
(
courseItem
?.
isBuy
)
{
if
(
courseItem
?.
is_new
===
true
)
{
if
(
courseItem
?.
is_new
)
{
buyDialogVisible
.
value
=
true
buyDialogVisible
.
value
=
true
}
else
{
}
else
{
window
.
open
(
'https://fi-learning.ezijing.com'
)
window
.
open
(
'https://fi-learning.ezijing.com'
)
}
}
}
else
{
}
else
{
if
(
courseItem
?.
is_free
===
true
)
{
if
(
courseItem
?.
is_free
)
{
buyDialogVisible
.
value
=
true
buyDialogVisible
.
value
=
true
}
else
{
}
else
{
router
.
push
(
`/shop/pay/
${
courseItem
.
id
}
`
)
router
.
push
(
`/shop/pay/
${
courseItem
.
id
}
`
)
...
@@ -39,14 +36,14 @@ const handleBuy = (courseItem: any) => {
...
@@ -39,14 +36,14 @@ const handleBuy = (courseItem: any) => {
<
template
>
<
template
>
<div
class=
"main_tab"
>
<div
class=
"main_tab"
>
<div
class=
"tab_con"
>
<div
class=
"tab_con"
>
<div
class=
"con_left"
@
click=
"handleD
a
tail(courseItem?.id)"
>
<div
class=
"con_left"
@
click=
"handleD
e
tail(courseItem?.id)"
>
<div
class=
"left_img"
>
<div
class=
"left_img"
>
<img
:src=
"courseItem?.image_url"
class=
"left_img"
/>
<img
:src=
"courseItem?.image_url"
class=
"left_img"
/>
</div>
</div>
<div
class=
"left_type"
>
{{
courseItem
?.
type
}}
</div>
<div
class=
"left_type"
>
{{
courseItem
?.
type
}}
</div>
</div>
</div>
<div
class=
"con_right"
>
<div
class=
"con_right"
>
<div
class=
"right_top"
@
click=
"handleD
a
tail(courseItem?.id)"
>
<div
class=
"right_top"
@
click=
"handleD
e
tail(courseItem?.id)"
>
<div
class=
"top_use"
>
<div
class=
"top_use"
>
<div
class=
"use_icon"
>
适用人群
</div>
<div
class=
"use_icon"
>
适用人群
</div>
<div
class=
"use_tips"
>
{{
courseItem
?.
for_people
}}
</div>
<div
class=
"use_tips"
>
{{
courseItem
?.
for_people
}}
</div>
...
@@ -57,17 +54,17 @@ const handleBuy = (courseItem: any) => {
...
@@ -57,17 +54,17 @@ const handleBuy = (courseItem: any) => {
</div>
</div>
</div>
</div>
<div
class=
"right_bottom"
>
<div
class=
"right_bottom"
>
<div
class=
"bottom_price"
v-if=
"!mobile &&
courseItem?.price !== 0
"
>
<div
class=
"bottom_price"
v-if=
"!mobile &&
!courseItem?.is_free
"
>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_num"
>
{{
courseItem
?.
price
}}
</div>
<div
class=
"price_num"
>
{{
courseItem
?.
price
}}
</div>
</div>
</div>
<div
class=
"bottom_price"
v-if=
"!mobile && courseItem?.
price === 0
"
>
<div
class=
"bottom_price"
v-if=
"!mobile && courseItem?.
is_free
"
>
<div
class=
"price_icon"
>
免费
</div>
<div
class=
"price_icon"
>
免费
</div>
</div>
</div>
<div
class=
"bottom_btn"
>
<div
class=
"bottom_btn"
>
<div
class=
"btn_detail"
v-if=
"!mobile"
@
click=
"handleD
a
tail(courseItem?.id)"
>
查看详情
</div>
<div
class=
"btn_detail"
v-if=
"!mobile"
@
click=
"handleD
e
tail(courseItem?.id)"
>
查看详情
</div>
<div
class=
"btn_buy"
@
click=
"handleBuy(courseItem)"
>
<div
class=
"btn_buy"
@
click=
"handleBuy(courseItem)"
>
{{
courseItem
?.
isBuy
===
true
||
courseItem
?.
category
===
'free_course'
?
'立即学习'
:
'立即购买'
}}
{{
courseItem
?.
isBuy
===
true
||
courseItem
?.
is_free
?
'立即学习'
:
'立即购买'
}}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/modules/shop/components/DetailBanner.vue
浏览文件 @
4ca6b31d
...
@@ -2,16 +2,11 @@
...
@@ -2,16 +2,11 @@
import
ShareDialog
from
'./ShareDialog.vue'
import
ShareDialog
from
'./ShareDialog.vue'
import
ContactDialog
from
'../components/ContactDialog.vue'
import
ContactDialog
from
'../components/ContactDialog.vue'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useUserStore
}
from
'@/stores/user'
const
user
=
useUserStore
()
const
{
mobile
}
=
useDevice
()
const
{
mobile
}
=
useDevice
()
const
props
=
defineProps
({
const
props
=
defineProps
({
shopItem
:
{
shopItem
:
{
type
:
Object
type
:
Object
},
payStatus
:
{
type
:
String
}
}
})
})
const
router
=
useRouter
()
const
router
=
useRouter
()
...
@@ -31,22 +26,18 @@ const shareTit = computed(() => {
...
@@ -31,22 +26,18 @@ const shareTit = computed(() => {
})
})
// 购买课程
// 购买课程
const
handleBuyCourse
=
()
=>
{
const
handleBuyCourse
=
()
=>
{
if
(
user
.
isLogin
)
{
if
(
props
.
shopItem
?.
isBuy
)
{
if
(
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
{
if
(
props
.
shopItem
?.
is_new
)
{
if
(
props
.
shopItem
?.
is_new
===
true
)
{
buyDialogVisible
.
value
=
true
buyDialogVisible
.
value
=
true
}
else
{
window
.
open
(
'https://fi-learning.ezijing.com'
)
}
}
else
{
}
else
{
if
(
props
.
shopItem
?.
is_free
===
true
)
{
window
.
open
(
'https://fi-learning.ezijing.com'
)
buyDialogVisible
.
value
=
true
}
else
{
router
.
push
(
`/shop/pay/
${
props
.
shopItem
?.
id
}
`)
}
}
}
}
else
{
}
else
{
window.location.href = `
$
{
import
.
meta
.
env
.
VITE_LOGIN_URL
}?
rd
=
$
{
encodeURIComponent
(
location
.
href
)}
`
if
(
props
.
shopItem
?.
is_free
)
{
buyDialogVisible
.
value
=
true
}
else
{
router
.
push
(
`/shop/pay/
${
props
.
shopItem
?.
id
}
`)
}
}
}
}
}
// 控制复制弹窗显示
// 控制复制弹窗显示
...
@@ -124,9 +115,9 @@ const handleCopyLink = () => {
...
@@ -124,9 +115,9 @@ const handleCopyLink = () => {
</div>
</div>
<div
class=
"detail_buy"
>
<div
class=
"detail_buy"
>
<div
class=
"buy_left"
>
<div
class=
"buy_left"
>
<div
class=
"left_status"
v-if=
"
payStatus === '4' || shopItem?.isBuy === true
"
>
已购买
</div>
<div
class=
"left_status"
v-if=
"
shopItem?.isBuy
"
>
已购买
</div>
<
template
v-else
>
<
template
v-else
>
<div
class=
"left_price"
v-if=
"
shopItem?.price !== 0
"
>
<div
class=
"left_price"
v-if=
"
!shopItem?.is_free
"
>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_num"
>
{{
shopItem
?.
price
}}
</div>
<div
class=
"price_num"
>
{{
shopItem
?.
price
}}
</div>
</div>
</div>
...
@@ -135,12 +126,12 @@ const handleCopyLink = () => {
...
@@ -135,12 +126,12 @@ const handleCopyLink = () => {
</div>
</div>
</
template
>
</
template
>
<div
class=
"left_tip"
>
<div
class=
"left_tip"
>
<div
class=
"tip1 tip"
v-if=
"shopItem?.
price !== 0
"
>
支付安全
</div>
<div
class=
"tip1 tip"
v-if=
"shopItem?.
is_free
"
>
支付安全
</div>
<div
class=
"tip2 tip"
>
课程回放
</div>
<div
class=
"tip2 tip"
>
课程回放
</div>
</div>
</div>
</div>
</div>
<div
class=
"buy_right"
@
click=
"handleBuyCourse"
v-if=
"!mobile"
>
<div
class=
"buy_right"
@
click=
"handleBuyCourse"
v-if=
"!mobile"
>
{{
payStatus === '4' ||
shopItem?.isBuy === true || shopItem?.is_free === true ? '立即学习' : '立即购买' }}
{{ shopItem?.isBuy === true || shopItem?.is_free === true ? '立即学习' : '立即购买' }}
</div>
</div>
</div>
</div>
<div
class=
"detail_info"
v-if=
"mobile"
>
<div
class=
"detail_info"
v-if=
"mobile"
>
...
...
src/modules/shop/views/Index.vue
浏览文件 @
4ca6b31d
...
@@ -63,28 +63,25 @@ const changeMenuChildTab = function (item: any) {
...
@@ -63,28 +63,25 @@ const changeMenuChildTab = function (item: any) {
<div
class=
"shop_con"
>
<div
class=
"shop_con"
>
<div
class=
"con_tab"
>
<div
class=
"con_tab"
>
<el-menu
:default-active=
"activeIndex"
mode=
"horizontal"
menu-trigger=
"click"
>
<el-menu
:default-active=
"activeIndex"
mode=
"horizontal"
menu-trigger=
"click"
>
<el-menu-item
index=
"1"
@
click=
"handleClickTab(shopStore.filters[0].value)"
<template
v-for=
"(item, index) in shopStore.filters"
:key=
"index"
>
>
{{
shopStore
.
filters
[
0
].
label
}}
<template
v-if=
"item?.children && item?.children.length"
>
</el-menu-item>
<el-sub-menu
:index=
"(index + 1).toString()"
:popper-offset=
"20"
>
<el-menu-item
index=
"2"
@
click=
"handleClickTab(shopStore.filters[1].value)"
<template
#
title
>
{{
item
.
label
}}
</
template
>
>
{{
shopStore
.
filters
[
1
].
label
}}
<el-menu-item
</el-menu-item>
:index=
"((index + 1).toString() + (index1 + 1)).toString()"
<el-menu-item
index=
"3"
@
click=
"handleClickTab(shopStore.filters[2].value)"
v-for=
"(it, index1) in item.children"
>
{{
shopStore
.
filters
[
2
].
label
}}
:key=
"index1"
</el-menu-item>
@
click=
"handleClickTab(it.value)"
<el-sub-menu
index=
"4"
:popper-offset=
"20"
>
>
{{ it.label }}
</el-menu-item
<template
#
title
>
{{
shopStore
.
filters
[
3
].
label
}}
</
template
>
>
<el-menu-item
</el-sub-menu>
:index=
"'4' + (index + 1)"
</template>
v-for=
"(item, index) in shopStore.filters[3]?.children"
<
template
v-else
>
:key=
"index"
<el-menu-item
:index=
"(index + 1).toString()"
@
click=
"handleClickTab(item.value)"
@
click=
"handleClickTab(item.value)"
>
{{
item
.
label
}}
>
{{ item.label }}
</el-menu-item
</el-menu-item>
>
</
template
>
</el-sub-menu>
</template>
<el-menu-item
index=
"5"
@
click=
"handleClickTab(shopStore.filters[4].value)"
>
{{ shopStore.filters[4].label }}
</el-menu-item>
</el-menu>
</el-menu>
<CourseList
:type=
"type"
:courseList=
"shopStore.shopList"
/>
<CourseList
:type=
"type"
:courseList=
"shopStore.shopList"
/>
</div>
</div>
...
...
src/modules/shop/views/View.vue
浏览文件 @
4ca6b31d
...
@@ -10,74 +10,53 @@ import RecommendCourse from '../components/RecommendCourse.vue'
...
@@ -10,74 +10,53 @@ import RecommendCourse from '../components/RecommendCourse.vue'
import
CourseFooter
from
'../components/CourseFooter.vue'
import
CourseFooter
from
'../components/CourseFooter.vue'
import
{
useShopStore
}
from
'@/stores/shop'
import
{
useShopStore
}
from
'@/stores/shop'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
storeToRefs
}
from
'pinia'
const
{
mobile
}
=
useDevice
()
const
{
mobile
}
=
useDevice
()
const
shopStore
=
useShopStore
()
const
shopStore
=
useShopStore
()
const
route
=
useRoute
()
const
{
shopItem
}
=
storeToRefs
(
shopStore
)
const
payStatus
:
any
=
ref
(
route
.
query
.
payStatus
)
const
courseItem
:
any
=
ref
([])
// 课程所属课程包
courseItem
.
value
=
shopStore
.
shopList
.
filter
(
(
item
:
any
)
=>
item
.
type
===
'课程包'
&&
item
.
child_ids
.
includes
(
shopStore
.
shopItem
?.
id
)
)
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"course_detail"
v-if=
"!mobile"
>
<div
class=
"course_detail"
v-if=
"!mobile"
>
<DetailBanner
:shopItem=
"shop
Store.shopItem"
:payStatus=
"payStatus
"
/>
<DetailBanner
:shopItem=
"shop
Item
"
/>
<div
class=
"detail_con"
>
<div
class=
"detail_con"
>
<div
class=
"con_left"
>
<div
class=
"con_left"
>
<IncludeCourseCard
<IncludeCourseCard
v-if=
"
:courseItem=
"shopItem?.course_list"
shopStore.shopItem?.type === '课程' &&
v-if=
"shopItem?.type === '课程' && shopItem?.course_list.length"
shopStore.shopItem?.category !== 'system_course' &&
shopStore.shopItem?.category !== 'free_course'
"
:courseItem=
"courseItem"
/>
/>
<div
<div
class=
"left_course"
class=
"left_course"
v-if=
"
v-if=
"shopItem?.type === '课程包' || ['system_course', 'free_course'].includes(shopItem?.category)"
shopStore.shopItem?.type === '课程包' ||
shopStore.shopItem?.category === 'system_course' ||
shopStore.shopItem?.category === 'free_course'
"
>
>
<CourseIntrouduce
:shopItem=
"shop
Store.shop
Item"
/>
<CourseIntrouduce
:shopItem=
"shopItem"
/>
<CourseFor
:shopItem=
"shop
Store.shop
Item"
/>
<CourseFor
:shopItem=
"shopItem"
/>
<CourseCatalogPC
v-if=
"shop
Store.shopItem?.type === '课程包'"
:shopItem=
"shopStore.
shopItem"
/>
<CourseCatalogPC
v-if=
"shop
Item?.type === '课程包'"
:shopItem=
"
shopItem"
/>
</div>
</div>
</div>
</div>
<div
class=
"con_right"
>
<div
class=
"con_right"
>
<!--
<TeacherCard
:lecturerList=
"shop
Store.shop
Item?.lecturer_list"
/>
-->
<!--
<TeacherCard
:lecturerList=
"shopItem?.lecturer_list"
/>
-->
<RecommendCourse
:shopRelatedList=
"shopStore.shopRelatedList"
/>
<RecommendCourse
:shopRelatedList=
"shopStore.shopRelatedList"
/>
</div>
</div>
</div>
</div>
<CourseFooter
:
payStatus=
"payStatus"
:shopItem=
"shopStore.shopItem"
v-if=
"shopStore.
shopItem?.type == '课程包'"
/>
<CourseFooter
:
shopItem=
"shopItem"
v-if=
"
shopItem?.type == '课程包'"
/>
</div>
</div>
<div
class=
"course_detail"
v-else
>
<div
class=
"course_detail"
v-else
>
<DetailBanner
:shopItem=
"shop
Store.shopItem"
:payStatus=
"payStatus
"
/>
<DetailBanner
:shopItem=
"shop
Item
"
/>
<IncludeCourseCard
<IncludeCourseCard
v-if=
"
:courseItem=
"shopItem?.course_list"
shopStore.shopItem?.type === '课程' &&
v-if=
"shopItem?.type === '课程' && shopItem?.course_list.length > 0"
shopStore.shopItem?.category !== 'system_course' &&
shopStore.shopItem?.category !== 'free_course'
"
:courseItem=
"courseItem"
/>
/>
<div
class=
"detail_con"
>
<div
<CourseIntrouduce
class=
"detail_con"
:shopItem=
"shopStore.shopItem"
v-if=
"shopItem?.type === '课程包' || ['system_course', 'free_course'].includes(shopItem?.category)"
v-if=
"
>
shopStore.shopItem?.type === '课程包' ||
<CourseIntrouduce
:shopItem=
"shopItem"
/>
shopStore.shopItem?.category !== 'system_course' ||
<!--
<TeacherCard
:lecturerList=
"shopItem?.lecturer_list"
/>
-->
shopStore.shopItem?.category !== 'free_course'
<CourseCatalogH5
:shopItem=
"shopItem"
v-if=
"shopItem?.type === '课程包'"
/>
"
/>
<!--
<TeacherCard
:lecturerList=
"shopStore.shopItem?.lecturer_list"
/>
-->
<CourseCatalogH5
:shopItem=
"shopStore.shopItem"
v-if=
"shopStore.shopItem?.type === '课程包'"
/>
</div>
</div>
<RecommendCourse
:shopRelatedList=
"shopStore.shopRelatedList"
/>
<RecommendCourse
:shopRelatedList=
"shopStore.shopRelatedList"
/>
<CourseFooter
:
payStatus=
"payStatus"
:shopItem=
"shopStore.
shopItem"
/>
<CourseFooter
:
shopItem=
"
shopItem"
/>
</div>
</div>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/stores/shop.ts
浏览文件 @
4ca6b31d
...
@@ -43,20 +43,12 @@ export const useShopStore = defineStore('shop', () => {
...
@@ -43,20 +43,12 @@ export const useShopStore = defineStore('shop', () => {
const
shopRelatedList
=
computed
(()
=>
{
const
shopRelatedList
=
computed
(()
=>
{
if
(
shopItem
.
value
?.
category
===
'free_course'
)
{
if
(
shopItem
.
value
?.
category
===
'free_course'
)
{
return
shopList
.
value
.
filter
(
item
=>
item
.
category
===
'system_course'
&&
!
item
.
is_test
)
return
shopList
.
value
.
filter
(
item
=>
item
.
category
===
'system_course'
&&
!
item
.
is_test
)
}
else
if
(
shopItem
.
value
?.
type
===
'课程包'
)
{
return
shopList
.
value
.
filter
(
item
=>
item
.
type
===
shopItem
.
value
?.
type
&&
!
item
.
is_test
&&
item
.
id
!==
shopItem
.
value
?.
id
)
}
else
{
}
else
{
return
shopList
.
value
.
filter
(
const
list
=
shopList
.
value
.
filter
(
item
=>
item
=>
item
.
type
===
shopItem
.
value
?.
type
&&
!
item
.
is_test
&&
item
.
id
!==
shopItem
.
value
?.
id
item
.
type
===
shopItem
.
value
?.
type
&&
!
item
.
is_test
&&
item
.
id
!==
shopItem
.
value
?.
id
&&
item
.
category
===
shopItem
.
value
?.
category
)
)
return
shopItem
.
value
?.
type
===
'课程包'
?
list
:
list
.
filter
(
item
=>
item
.
category
===
shopItem
.
value
?.
category
)
}
}
})
})
return
{
filters
,
list
,
shopList
,
shopItem
,
shopRelatedList
}
return
{
filters
,
list
,
shopList
,
shopItem
,
shopRelatedList
}
})
})
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论