Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-fi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-fi
Commits
4d1e4658
提交
4d1e4658
authored
1月 12, 2023
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
d4469cfb
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
13 行增加
和
52 行删除
+13
-52
CourseFooter.vue
src/modules/shop/components/CourseFooter.vue
+5
-13
CourseListItem.vue
src/modules/shop/components/CourseListItem.vue
+1
-1
View.vue
src/modules/shop/views/View.vue
+6
-35
shop.ts
src/stores/shop.ts
+1
-3
没有找到文件。
src/modules/shop/components/CourseFooter.vue
浏览文件 @
4d1e4658
...
@@ -16,22 +16,14 @@ const props = defineProps({
...
@@ -16,22 +16,14 @@ const props = defineProps({
const
buyDialogVisible
=
ref
(
false
)
const
buyDialogVisible
=
ref
(
false
)
const
handleBuyCourse
=
()
=>
{
const
handleBuyCourse
=
()
=>
{
if
(
user
.
isLogin
)
{
if
(
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
{
if
(
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
{
if
(
props
.
shopItem
?.
category
===
'system_course'
)
{
if
(
props
.
shopItem
?.
category
===
'system_course'
)
{
buyDialogVisible
.
value
=
true
buyDialogVisible
.
value
=
true
}
else
{
window
.
open
(
'https://fi-learning.ezijing.com'
)
}
}
else
{
}
else
{
if
(
props
.
shopItem
?.
category
===
'free_course'
)
{
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
)}
`
router
.
push
(
`/shop/pay/
${
props
.
shopItem
?.
id
}
`)
}
}
}
}
</
script
>
</
script
>
...
...
src/modules/shop/components/CourseListItem.vue
浏览文件 @
4d1e4658
...
@@ -67,7 +67,7 @@ const handleBuy = (courseItem: any) => {
...
@@ -67,7 +67,7 @@ const handleBuy = (courseItem: any) => {
<div
class=
"bottom_btn"
>
<div
class=
"bottom_btn"
>
<div
class=
"btn_detail"
v-if=
"!mobile"
@
click=
"handleDatail(courseItem?.id)"
>
查看详情
</div>
<div
class=
"btn_detail"
v-if=
"!mobile"
@
click=
"handleDatail(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
?
'立即学习'
:
'立即购买'
}}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/modules/shop/views/View.vue
浏览文件 @
4d1e4658
...
@@ -26,25 +26,10 @@ courseItem.value = shopStore.shopList.filter(
...
@@ -26,25 +26,10 @@ courseItem.value = shopStore.shopList.filter(
<DetailBanner
:shopItem=
"shopStore.shopItem"
:payStatus=
"payStatus"
/>
<DetailBanner
:shopItem=
"shopStore.shopItem"
:payStatus=
"payStatus"
/>
<div
class=
"detail_con"
>
<div
class=
"detail_con"
>
<div
class=
"con_left"
>
<div
class=
"con_left"
>
<IncludeCourseCard
<IncludeCourseCard
v-if=
"shopStore.shopItem?.type === '课程'"
:courseItem=
"courseItem"
/>
v-if=
"
<div
class=
"left_course"
v-if=
"shopStore.shopItem?.type === '课程包'"
>
shopStore.shopItem?.type === '课程' &&
shopStore.shopItem?.category !== 'system_course' &&
shopStore.shopItem?.category !== 'free_course'
"
:courseItem=
"courseItem"
/>
<div
class=
"left_course"
v-if=
"
shopStore.shopItem?.type === '课程包' ||
shopStore.shopItem?.category === 'system_course' ||
shopStore.shopItem?.category === 'free_course'
"
>
<CourseIntrouduce
:shopItem=
"shopStore.shopItem"
/>
<CourseIntrouduce
:shopItem=
"shopStore.shopItem"
/>
<CourseFor
:shopItem=
"shopStore.shopItem"
/>
<CourseFor
:shopItem=
"shopStore.shopItem"
/>
<CourseCatalogPC
v-if=
"shopStore.shopItem?.type === '课程包'"
:shopItem=
"shopStore.shopItem"
/>
<CourseCatalogPC
v-if=
"shopStore.shopItem?.type === '课程包'"
:shopItem=
"shopStore.shopItem"
/>
</div>
</div>
</div>
</div>
...
@@ -57,25 +42,11 @@ courseItem.value = shopStore.shopList.filter(
...
@@ -57,25 +42,11 @@ courseItem.value = shopStore.shopList.filter(
</div>
</div>
<div
class=
"course_detail"
v-else
>
<div
class=
"course_detail"
v-else
>
<DetailBanner
:shopItem=
"shopStore.shopItem"
:payStatus=
"payStatus"
/>
<DetailBanner
:shopItem=
"shopStore.shopItem"
:payStatus=
"payStatus"
/>
<IncludeCourseCard
<IncludeCourseCard
v-if=
"shopStore.shopItem?.type === '课程'"
:courseItem=
"courseItem"
/>
v-if=
"
<div
class=
"detail_con"
v-if=
"shopStore.shopItem?.type === '课程包'"
>
shopStore.shopItem?.type === '课程' &&
<CourseIntrouduce
:shopItem=
"shopStore.shopItem"
/>
shopStore.shopItem?.category !== 'system_course' &&
shopStore.shopItem?.category !== 'free_course'
"
:courseItem=
"courseItem"
/>
<div
class=
"detail_con"
>
<CourseIntrouduce
:shopItem=
"shopStore.shopItem"
v-if=
"
shopStore.shopItem?.type === '课程包' ||
shopStore.shopItem?.category !== 'system_course' ||
shopStore.shopItem?.category !== 'free_course'
"
/>
<!--
<TeacherCard
:lecturerList=
"shopStore.shopItem?.lecturer_list"
/>
-->
<!--
<TeacherCard
:lecturerList=
"shopStore.shopItem?.lecturer_list"
/>
-->
<CourseCatalogH5
:shopItem=
"shopStore.shopItem"
v-if=
"shopStore.shopItem?.type === '课程包'"
/>
<CourseCatalogH5
:shopItem=
"shopStore.shopItem"
/>
</div>
</div>
<RecommendCourse
:shopRelatedList=
"shopStore.shopRelatedList"
/>
<RecommendCourse
:shopRelatedList=
"shopStore.shopRelatedList"
/>
<CourseFooter
:payStatus=
"payStatus"
:shopItem=
"shopStore.shopItem"
/>
<CourseFooter
:payStatus=
"payStatus"
:shopItem=
"shopStore.shopItem"
/>
...
...
src/stores/shop.ts
浏览文件 @
4d1e4658
...
@@ -42,9 +42,7 @@ export const useShopStore = defineStore('shop', () => {
...
@@ -42,9 +42,7 @@ export const useShopStore = defineStore('shop', () => {
// 相关推荐商品列表
// 相关推荐商品列表
const
shopRelatedList
=
computed
(()
=>
{
const
shopRelatedList
=
computed
(()
=>
{
if
(
shopItem
.
value
?.
category
===
'free_course'
)
{
if
(
shopItem
.
value
?.
type
===
'课程包'
)
{
return
shopList
.
value
.
filter
(
item
=>
item
.
category
===
'system_course'
&&
!
item
.
is_test
)
}
else
if
(
shopItem
.
value
?.
type
===
'课程包'
)
{
return
shopList
.
value
.
filter
(
return
shopList
.
value
.
filter
(
item
=>
item
.
type
===
shopItem
.
value
?.
type
&&
!
item
.
is_test
&&
item
.
id
!==
shopItem
.
value
?.
id
item
=>
item
.
type
===
shopItem
.
value
?.
type
&&
!
item
.
is_test
&&
item
.
id
!==
shopItem
.
value
?.
id
)
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论