Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-fi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-fi
Commits
a6f82784
提交
a6f82784
authored
12月 29, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改课程包可购买,以及微信分享等
上级
f820bdff
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
159 行增加
和
73 行删除
+159
-73
1.js
data/src/goods/1.js
+3
-3
2.js
data/src/goods/2.js
+3
-3
3.js
data/src/goods/3.js
+3
-3
index.html
index.html
+3
-2
Footer.vue
src/components/layout/Footer.vue
+6
-6
Header.vue
src/components/layout/Header.vue
+2
-2
main.ts
src/main.ts
+2
-0
Index.vue
src/modules/home/views/Index.vue
+4
-0
PayH5.vue
src/modules/pay/components/PayH5.vue
+1
-1
PayPC.vue
src/modules/pay/components/PayPC.vue
+1
-1
ContactDialog.vue
src/modules/shop/components/ContactDialog.vue
+13
-7
CourseFooter.vue
src/modules/shop/components/CourseFooter.vue
+35
-26
CourseListItem.vue
src/modules/shop/components/CourseListItem.vue
+9
-8
DetailBanner.vue
src/modules/shop/components/DetailBanner.vue
+11
-11
Index.vue
src/modules/shop/views/Index.vue
+5
-0
View.vue
src/modules/shop/views/View.vue
+5
-0
wx.js
src/utils/wx.js
+53
-0
没有找到文件。
data/src/goods/1.js
浏览文件 @
a6f82784
...
@@ -24,9 +24,9 @@ export default [
...
@@ -24,9 +24,9 @@ export default [
course_hour
:
'8课时'
,
course_hour
:
'8课时'
,
course_id
:
'7000656984332566528'
,
course_id
:
'7000656984332566528'
,
class_id
:
'6998519782265847808'
,
class_id
:
'6998519782265847808'
,
total_price_desc
:
'(课程费用
:4300元/人,考试费、认证费、
教材费合计680元/人)'
,
total_price_desc
:
'(课程费用
4300元/人,考试费/认证费/
教材费合计680元/人)'
,
sku_id
:
''
,
sku_id
:
'
7014129405609902080
'
,
spu_id
:
''
spu_id
:
'
7014129404863315968
'
},
},
{
{
category
:
'PAAP(Ⅰ)'
,
category
:
'PAAP(Ⅰ)'
,
...
...
data/src/goods/2.js
浏览文件 @
a6f82784
...
@@ -24,9 +24,9 @@ export default [
...
@@ -24,9 +24,9 @@ export default [
course_hour
:
'8课时'
,
course_hour
:
'8课时'
,
course_id
:
'6998547457529348096'
,
course_id
:
'6998547457529348096'
,
class_id
:
'6998519782265847808'
,
class_id
:
'6998519782265847808'
,
total_price_desc
:
'(课程费用
:7000元/人,考试费、认证费、
教材费合计680元/人)'
,
total_price_desc
:
'(课程费用
7000元/人,考试费/认证费/
教材费合计680元/人)'
,
sku_id
:
''
,
sku_id
:
'
7014130347952570368
'
,
spu_id
:
''
spu_id
:
'
7014130347390533632
'
},
},
{
{
category
:
'PAAP(Ⅱ)'
,
category
:
'PAAP(Ⅱ)'
,
...
...
data/src/goods/3.js
浏览文件 @
a6f82784
...
@@ -24,9 +24,9 @@ export default [
...
@@ -24,9 +24,9 @@ export default [
course_hour
:
'8课时'
,
course_hour
:
'8课时'
,
course_id
:
'6998547457529348096'
,
course_id
:
'6998547457529348096'
,
class_id
:
'6998519782265847808'
,
class_id
:
'6998519782265847808'
,
total_price_desc
:
'(课程费
:12000元/人,考试费、认证费、
教材费合计980元/人)'
,
total_price_desc
:
'(课程费
用12000元/人,考试费/认证费/
教材费合计980元/人)'
,
sku_id
:
''
,
sku_id
:
'
7014130543629434880
'
,
spu_id
:
''
spu_id
:
'
7014130542861877248
'
},
},
{
{
category
:
'PAAM'
,
category
:
'PAAM'
,
...
...
index.html
浏览文件 @
a6f82784
...
@@ -6,8 +6,10 @@
...
@@ -6,8 +6,10 @@
<meta
name=
"theme-color"
content=
"#3276fc"
/>
<meta
name=
"theme-color"
content=
"#3276fc"
/>
<meta
<meta
name=
"viewport"
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
/>
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
/>
<title>
清控紫荆金保
</title>
<title>
清控紫荆金保
</title>
<script
src=
"https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<script
type=
"module"
>
<script
type=
"module"
>
;(
async
()
=>
{
;(
async
()
=>
{
window
.
SHOP
=
await
import
(
'https://webapp-pub.ezijing.com/project_online/fi/shop.js'
)
window
.
SHOP
=
await
import
(
'https://webapp-pub.ezijing.com/project_online/fi/shop.js'
)
...
@@ -18,6 +20,5 @@
...
@@ -18,6 +20,5 @@
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/src/main.ts"
></script>
<script
type=
"module"
src=
"/src/main.ts"
></script>
<script
src=
"https://res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<script
src=
"https://res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
</body>
</body>
</html>
</html>
src/components/layout/Footer.vue
浏览文件 @
a6f82784
...
@@ -36,12 +36,12 @@ const { mobile } = useDevice()
...
@@ -36,12 +36,12 @@ const { mobile } = useDevice()
<div
class=
"concat_tit"
>
联系我们
</div>
<div
class=
"concat_tit"
>
联系我们
</div>
<div
class=
"concat_con"
v-if=
"!mobile"
>
<div
class=
"concat_con"
v-if=
"!mobile"
>
<div
class=
"con_address"
>
<div
class=
"con_address"
>
地
址:北京市海淀区中关村东路1号院清华科技园7号楼5层
地
址:北京市海淀区中关村东路1号院清华科技园7号楼5层
<br
/>
<br
/>
深圳市福田区博今商务广场A座22层
深圳市福田区博今商务广场A座22层
</div>
</div>
<div
class=
"con_email"
>
邮
箱:THHZJFI@ezijing.com
</div>
<div
class=
"con_email"
>
邮
箱:THHZJFI@ezijing.com
</div>
<div
class=
"con_email"
>
PAA秘书处
:13263110169(同微信)
</div>
<div
class=
"con_email"
>
FI办公室
:13263110169(同微信)
</div>
</div>
</div>
<div
class=
"concat_con"
v-else
>
<div
class=
"concat_con"
v-else
>
<div
class=
"con_address"
>
<div
class=
"con_address"
>
...
@@ -50,7 +50,7 @@ const { mobile } = useDevice()
...
@@ -50,7 +50,7 @@ const { mobile } = useDevice()
深圳市福田区博今商务广场A座22层
深圳市福田区博今商务广场A座22层
</div>
</div>
<div
class=
"con_email"
>
邮箱:THHZJFI@ezijing.com
</div>
<div
class=
"con_email"
>
邮箱:THHZJFI@ezijing.com
</div>
<div
class=
"con_email"
>
PAA秘书处
:13263110169(同微信)
</div>
<div
class=
"con_email"
>
FI办公室
:13263110169(同微信)
</div>
</div>
</div>
</div>
</div>
<div
class=
"part_code"
>
<div
class=
"part_code"
>
...
@@ -161,8 +161,8 @@ const { mobile } = useDevice()
...
@@ -161,8 +161,8 @@ const { mobile } = useDevice()
color
:
#ffffff
;
color
:
#ffffff
;
.con_address
{
.con_address
{
padding-left
:
84
px
;
padding-left
:
65
px
;
text-indent
:
-
84
px
;
text-indent
:
-
65
px
;
}
}
}
}
}
}
...
...
src/components/layout/Header.vue
浏览文件 @
a6f82784
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
useWindowScroll
}
from
'@vueuse/core'
import
{
useWindowScroll
}
from
'@vueuse/core'
import
{
useUserStore
}
from
'@/stores/user'
import
{
useUserStore
}
from
'@/stores/user'
import
AppNav
from
'./Nav.vue'
import
AppNav
from
'./Nav.vue'
// import { ElMessage } from 'element-plus'
// import { ElMessage } from 'element-plus'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useDevice
}
from
'@/composables/useDevice'
// const courseStore = useUserStore()
// const courseStore = useUserStore()
...
@@ -95,7 +95,7 @@ function handleUser() {
...
@@ -95,7 +95,7 @@ function handleUser() {
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
color
:
#fff
;
color
:
#fff
;
background
:
linear-gradient
(
0deg
,
rgba
(
0
,
0
,
0
,
0
)
0%
,
rgba
(
0
,
0
,
0
,
0
.
5
)
100%
);
background
:
linear-gradient
(
0deg
,
rgba
(
0
,
0
,
0
,
0
)
0%
,
rgba
(
0
,
0
,
0
,
0
.
9
)
100%
);
.logo
{
.logo
{
background
:
url('@/assets/images/logo_white.png')
no-repeat
;
background
:
url('@/assets/images/logo_white.png')
no-repeat
;
background-size
:
contain
;
background-size
:
contain
;
...
...
src/main.ts
浏览文件 @
a6f82784
...
@@ -19,6 +19,7 @@ import AppCard from '@/components/base/AppCard.vue'
...
@@ -19,6 +19,7 @@ import AppCard from '@/components/base/AppCard.vue'
import
AppContainer
from
'@/components/base/AppContainer.vue'
import
AppContainer
from
'@/components/base/AppContainer.vue'
import
modules
from
'./modules'
import
modules
from
'./modules'
import
useWXShare
from
'@/utils/wx'
const
app
=
createApp
(
App
)
const
app
=
createApp
(
App
)
...
@@ -35,3 +36,4 @@ app.use(createPinia())
...
@@ -35,3 +36,4 @@ app.use(createPinia())
app
.
use
(
router
)
app
.
use
(
router
)
app
.
use
(
ElementPlus
,
{
locale
:
zhCn
})
app
.
use
(
ElementPlus
,
{
locale
:
zhCn
})
app
.
mount
(
'#app'
)
app
.
mount
(
'#app'
)
useWXShare
()
src/modules/home/views/Index.vue
浏览文件 @
a6f82784
...
@@ -7,6 +7,10 @@ import Knowledge from '../components/Knowledge.vue'
...
@@ -7,6 +7,10 @@ import Knowledge from '../components/Knowledge.vue'
import
Course
from
'../components/Course.vue'
import
Course
from
'../components/Course.vue'
import
Brand
from
'../components/Brand.vue'
import
Brand
from
'../components/Brand.vue'
import
Contact
from
'../components/Contact.vue'
import
Contact
from
'../components/Contact.vue'
import
useWXShare
from
'@/utils/wx'
onMounted
(()
=>
{
useWXShare
()
})
</
script
>
</
script
>
<
template
>
<
template
>
...
...
src/modules/pay/components/PayH5.vue
浏览文件 @
a6f82784
...
@@ -80,7 +80,7 @@ const handleAgree = (val: any) => {
...
@@ -80,7 +80,7 @@ const handleAgree = (val: any) => {
</div>
</div>
<div
class=
"pay_con"
>
<div
class=
"pay_con"
>
<div
class=
"pay_phone"
>
<div
class=
"pay_phone"
>
课程提醒
将发送到您的手机:
<i
style=
"font-weight: bold"
>
{{
userStore
.
user
?.
mobile
}}
</i>
小提示:上课方式
将发送到您的手机:
<i
style=
"font-weight: bold"
>
{{
userStore
.
user
?.
mobile
}}
</i>
</div>
</div>
<div
class=
"pay_line"
></div>
<div
class=
"pay_line"
></div>
<div
class=
"pay_mode"
>
<div
class=
"pay_mode"
>
...
...
src/modules/pay/components/PayPC.vue
浏览文件 @
a6f82784
...
@@ -60,7 +60,7 @@ const handleAgree = (val: any) => {
...
@@ -60,7 +60,7 @@ const handleAgree = (val: any) => {
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"con_message"
>
课程提醒
将发送到您的手机:
{{
userStore
.
user
?.
mobile
}}
</div>
<div
class=
"con_message"
>
小提示:上课方式
将发送到您的手机:
{{
userStore
.
user
?.
mobile
}}
</div>
<div
class=
"con_mode"
>
<div
class=
"con_mode"
>
<div
class=
"mode_tit"
>
支付方式
</div>
<div
class=
"mode_tit"
>
支付方式
</div>
<div
class=
"mode_radio"
>
<div
class=
"mode_radio"
>
...
...
src/modules/shop/components/ContactDialog.vue
浏览文件 @
a6f82784
...
@@ -21,19 +21,17 @@ const handleCancel = () => {
...
@@ -21,19 +21,17 @@ const handleCancel = () => {
<div>
<div>
<el-dialog
<el-dialog
:model-value=
"buyDialogVisible"
:model-value=
"buyDialogVisible"
:width=
"!mobile ? '2
0
%' : '70%'"
:width=
"!mobile ? '2
5
%' : '70%'"
:top=
"!mobile ? '16%' : '50%'"
:top=
"!mobile ? '16%' : '50%'"
:modal=
"false"
:modal=
"false"
:before-close=
"handleCancel"
:before-close=
"handleCancel"
>
>
<div
class=
"buy_alert"
>
<div
class=
"buy_alert"
>
<img
<!--
<img
src=
"https://webapp-pub.ezijing.com/project_online/fi/icon_contact.png"
alt=
""
/>
-->
src=
"https://webapp-pub.ezijing.com/project_online/fi/icon_contact.png"
alt=
""
/>
<div
class=
"alert_con"
>
<div
class=
"alert_con"
>
<div
class=
"con_tit"
>
请联系我们
</div>
<div
class=
"con_tit"
>
上课方式
</div>
<div
class=
"con_desc"
>
PAA秘书处:13263110169(同微信)
</div>
<img
src=
"https://webapp-pub.ezijing.com/project_online/fi/contact_wx.png"
class=
"con_img"
/>
<div
class=
"con_desc"
>
请联系小秘书:13263110169(同微信)
</div>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -60,6 +58,10 @@ const handleCancel = () => {
...
@@ -60,6 +58,10 @@ const handleCancel = () => {
font-weight
:
400
;
font-weight
:
400
;
color
:
#333333
;
color
:
#333333
;
}
}
.con_img
{
width
:
200px
;
height
:
200px
;
}
.con_desc
{
.con_desc
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
...
@@ -93,6 +95,10 @@ const handleCancel = () => {
...
@@ -93,6 +95,10 @@ const handleCancel = () => {
color
:
#333333
;
color
:
#333333
;
margin-top
:
0
.25rem
;
margin-top
:
0
.25rem
;
}
}
.con_img
{
width
:
3rem
;
height
:
3rem
;
}
.con_desc
{
.con_desc
{
font-size
:
0
.24rem
;
font-size
:
0
.24rem
;
font-weight
:
400
;
font-weight
:
400
;
...
...
src/modules/shop/components/CourseFooter.vue
浏览文件 @
a6f82784
...
@@ -16,15 +16,17 @@ const props = defineProps({
...
@@ -16,15 +16,17 @@ const props = defineProps({
const
buyDialogVisible
=
ref
(
false
)
const
buyDialogVisible
=
ref
(
false
)
const
handleBuyCourse
=
()
=>
{
const
handleBuyCourse
=
()
=>
{
console
.
log
(
props
.
payStatus
,
props
.
shopItem
?.
isBuy
)
if
(
user
.
isLogin
)
{
if
(
user
.
isLogin
)
{
if
((
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
&&
props
.
shopItem
?.
type
===
'课程'
)
{
if
(
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
{
window
.
open
(
'https://paa-learning.ezijing.com'
)
// window.open('https://paa-learning.ezijing.com')
buyDialogVisible
.
value
=
true
}
else
{
}
else
{
if
(
props
.
shopItem
?.
type
===
'课程包'
)
{
//
if (props.shopItem?.type === '课程包') {
buyDialogVisible
.
value
=
true
//
buyDialogVisible.value = true
}
else
{
//
} else {
router
.
push
(
`/shop/pay/
${
props
.
shopItem
?.
id
}
`)
router
.
push
(
`/shop/pay/
${
props
.
shopItem
?.
id
}
`)
}
//
}
}
}
} else {
} else {
window.location.href = `
$
{
import
.
meta
.
env
.
VITE_LOGIN_URL
}?
rd
=
$
{
encodeURIComponent
(
location
.
href
)}
`
window.location.href = `
$
{
import
.
meta
.
env
.
VITE_LOGIN_URL
}?
rd
=
$
{
encodeURIComponent
(
location
.
href
)}
`
...
@@ -33,13 +35,11 @@ const handleBuyCourse = () => {
...
@@ -33,13 +35,11 @@ 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) && shopItem?.type === '课程'"
>
<div
class=
"left_status"
v-if=
"payStatus === '4' || shopItem?.isBuy === true"
>
已购买
</div>
已购买
</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>
<div
class=
"left_desc"
>
课程费用详情:
{{
shopItem
?.
total_price_desc
}}
</div>
<div
class=
"left_desc"
>
{{
shopItem
?.
total_price_desc
}}
</div>
</div>
</div>
<div
class=
"footer_price"
v-if=
"!mobile"
>
<div
class=
"footer_price"
v-if=
"!mobile"
>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_icon"
>
¥
</div>
...
@@ -47,36 +47,38 @@ const handleBuyCourse = () => {
...
@@ -47,36 +47,38 @@ const handleBuyCourse = () => {
</div>
</div>
</
template
>
</
template
>
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
>
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
>
{{
(payStatus === '4' || shopItem?.isBuy === true)
&&
shopItem?.type === '课程' ? '立即学习
' : '立即购买' }}
{{
payStatus === '4' || shopItem?.isBuy === 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) && shopItem?.type === '课程'
"
>
<div
class=
"left_status"
v-if=
"
payStatus === '4' || shopItem?.isBuy === true
"
>
已购买
已购买
<span
class=
"status_price"
>
¥{{ shopItem?.price }}
</span>
</div>
</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>
<div
class=
"left_tit"
>
<div
class=
"left_desc"
>
课程费用详情:
{{
shopItem
?.
total_price_desc
}}
</div>
总学费
<span
class=
"tit_price"
>
¥
{{
shopItem
?.
price
}}
</span>
<!--
<div
class=
"footer_price"
>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_price"
>
{{
shopItem
?.
price
}}
</div>
</div>
-->
</div>
<div
class=
"left_desc"
>
{{
shopItem
?.
total_price_desc
}}
</div>
</div>
</div>
<div
class=
"footer_left"
v-else
>
<div
class=
"footer_left"
v-else
>
<div
class=
"left_tit"
>
课程价格
</div>
<div
class=
"left_tit"
>
课程价格
</div>
</div>
</div>
</
template
>
</
template
>
<div
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
v-if=
"payStatus === '4' || shopItem?.isBuy === true"
>
class=
"footer_btn"
<div
class=
"btn_buy"
>
联系我们
</div>
@
click=
"handleBuyCourse"
v-if=
"(payStatus === '4' || shopItem?.isBuy === true) && shopItem?.type === '课程'"
>
<div
class=
"btn_buy"
>
立即学习
</div>
</div>
</div>
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
v-else
>
<div
class=
"footer_btn"
@
click=
"handleBuyCourse"
v-else
>
<div
class=
"footer_price"
>
<
!-- <
div class="footer_price">
<div class="price_icon">¥</div>
<div class="price_icon">¥</div>
<div class="price_price">{{ shopItem?.price }}</div>
<div class="price_price">{{ shopItem?.price }}</div>
</div>
</div>
-->
<
!-- <div class="btn_buy">立即购买</div> --
>
<
div
class=
"btn_buy"
>
立即购买
</div
>
</div>
</div>
</div>
</div>
<ContactDialog
v-model:buyDialogVisible=
"buyDialogVisible"
/>
<ContactDialog
v-model:buyDialogVisible=
"buyDialogVisible"
/>
...
@@ -161,11 +163,17 @@ const handleBuyCourse = () => {
...
@@ -161,11 +163,17 @@ const handleBuyCourse = () => {
font-size
:
0
.24rem
;
font-size
:
0
.24rem
;
font-weight
:
normal
;
font-weight
:
normal
;
color
:
#666666
;
color
:
#666666
;
.status_price
{
color
:
#aa1941
;
}
}
}
.footer_left
{
.footer_left
{
.left_tit
{
.left_tit
{
font-size
:
0
.24rem
;
font-size
:
0
.24rem
;
color
:
#333333
;
color
:
#333333
;
.tit_price
{
color
:
#aa1941
;
}
}
}
.left_desc
{
.left_desc
{
font-size
:
0
.22rem
;
font-size
:
0
.22rem
;
...
@@ -185,7 +193,7 @@ const handleBuyCourse = () => {
...
@@ -185,7 +193,7 @@ const handleBuyCourse = () => {
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
cursor
:
pointer
;
cursor
:
pointer
;
padding
:
0
0
.
5
6rem
;
padding
:
0
0
.
1
6rem
;
.footer_price
{
.footer_price
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -201,6 +209,7 @@ const handleBuyCourse = () => {
...
@@ -201,6 +209,7 @@ const handleBuyCourse = () => {
}
}
}
}
.btn_buy
{
.btn_buy
{
width
:
1
.5rem
;
font-size
:
0
.28rem
;
font-size
:
0
.28rem
;
color
:
#ffffff
;
color
:
#ffffff
;
cursor
:
pointer
;
cursor
:
pointer
;
...
...
src/modules/shop/components/CourseListItem.vue
浏览文件 @
a6f82784
...
@@ -21,14 +21,15 @@ const handleDatail = (item: any) => {
...
@@ -21,14 +21,15 @@ const handleDatail = (item: any) => {
}
}
const
handleBuy
=
(
courseItem
:
any
)
=>
{
const
handleBuy
=
(
courseItem
:
any
)
=>
{
if
(
user
.
isLogin
)
{
if
(
user
.
isLogin
)
{
if
(
courseItem
?.
isBuy
===
true
&&
courseItem
?.
type
===
'课程'
)
{
if
(
courseItem
?.
isBuy
===
true
)
{
window
.
open
(
'https://paa-learning.ezijing.com'
)
buyDialogVisible
.
value
=
true
// window.open('https://paa-learning.ezijing.com')
}
else
{
}
else
{
if
(
courseItem
.
type
===
'课程包'
)
{
//
if (courseItem.type === '课程包') {
buyDialogVisible
.
value
=
true
//
buyDialogVisible.value = true
}
else
{
//
} else {
router
.
push
(
`/shop/pay/
${
courseItem
.
id
}
`
)
router
.
push
(
`/shop/pay/
${
courseItem
.
id
}
`
)
}
//
}
}
}
}
else
{
}
else
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
...
@@ -64,7 +65,7 @@ const handleBuy = (courseItem: any) => {
...
@@ -64,7 +65,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
?.
type
===
'课程'
?
'立即学习
'
:
'立即购买'
}}
{{
courseItem
?.
isBuy
===
true
?
'联系我们
'
:
'立即购买'
}}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/modules/shop/components/DetailBanner.vue
浏览文件 @
a6f82784
...
@@ -32,14 +32,15 @@ const shareTit = computed(() => {
...
@@ -32,14 +32,15 @@ const shareTit = computed(() => {
// 购买课程
// 购买课程
const
handleBuyCourse
=
()
=>
{
const
handleBuyCourse
=
()
=>
{
if
(
user
.
isLogin
)
{
if
(
user
.
isLogin
)
{
if
((
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
&&
props
.
shopItem
?.
type
===
'课程'
)
{
if
(
props
.
payStatus
===
'4'
||
props
.
shopItem
?.
isBuy
===
true
)
{
window
.
open
(
'https://paa-learning.ezijing.com'
)
// window.open('https://paa-learning.ezijing.com')
buyDialogVisible
.
value
=
true
}
else
{
}
else
{
if
(
props
.
shopItem
?.
type
===
'课程包'
)
{
//
if (props.shopItem?.type === '课程包') {
buyDialogVisible
.
value
=
true
//
buyDialogVisible.value = true
}
else
{
//
} else {
router
.
push
(
`/shop/pay/
${
props
.
shopItem
?.
id
}
`)
router
.
push
(
`/shop/pay/
${
props
.
shopItem
?.
id
}
`)
}
//
}
}
}
} else {
} else {
window.location.href = `
$
{
import
.
meta
.
env
.
VITE_LOGIN_URL
}?
rd
=
$
{
encodeURIComponent
(
location
.
href
)}
`
window.location.href = `
$
{
import
.
meta
.
env
.
VITE_LOGIN_URL
}?
rd
=
$
{
encodeURIComponent
(
location
.
href
)}
`
...
@@ -99,6 +100,7 @@ const handleCopyLink = () => {
...
@@ -99,6 +100,7 @@ const handleCopyLink = () => {
<div
class=
"detail_banner"
>
<div
class=
"detail_banner"
>
<div
class=
"banner_con"
>
<div
class=
"banner_con"
>
<img
class=
"con_img"
:src=
"shopItem?.image_url"
/>
<img
class=
"con_img"
:src=
"shopItem?.image_url"
/>
<template
v-if=
"!mobile"
>
<template
v-if=
"!mobile"
>
<div
class=
"con_info"
>
<div
class=
"con_info"
>
<div
class=
"info_tit"
>
{{
shopItem
?.
title
}}
</div>
<div
class=
"info_tit"
>
{{
shopItem
?.
title
}}
</div>
...
@@ -119,9 +121,7 @@ const handleCopyLink = () => {
...
@@ -119,9 +121,7 @@ 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) && shopItem?.type === '课程'"
>
<div
class=
"left_status"
v-if=
"payStatus === '4' || shopItem?.isBuy === true"
>
已购买
</div>
已购买
</div>
<div
class=
"left_price"
v-else
>
<div
class=
"left_price"
v-else
>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_icon"
>
¥
</div>
<div
class=
"price_num"
>
{{ shopItem?.price }}
</div>
<div
class=
"price_num"
>
{{ shopItem?.price }}
</div>
...
@@ -132,7 +132,7 @@ const handleCopyLink = () => {
...
@@ -132,7 +132,7 @@ const handleCopyLink = () => {
</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?.type === '课程' ? '立即学习
' : '立即购买' }}
{{
payStatus === '4' || shopItem?.isBuy === 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
浏览文件 @
a6f82784
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
import
CourseList
from
'../components/CourseList.vue'
import
CourseList
from
'../components/CourseList.vue'
import
{
useShopStore
}
from
'@/stores/shop'
import
{
useShopStore
}
from
'@/stores/shop'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useDevice
}
from
'@/composables/useDevice'
import
useWXShare
from
'@/utils/wx'
const
{
mobile
}
=
useDevice
()
const
{
mobile
}
=
useDevice
()
const
shopStore
=
useShopStore
()
const
shopStore
=
useShopStore
()
const
handleTabClick
=
(
tab
:
any
)
=>
{
const
handleTabClick
=
(
tab
:
any
)
=>
{
...
@@ -10,6 +12,9 @@ const handleTabClick = (tab: any) => {
...
@@ -10,6 +12,9 @@ const handleTabClick = (tab: any) => {
window
.
location
.
reload
()
window
.
location
.
reload
()
}
}
}
}
onMounted
(()
=>
{
useWXShare
()
})
</
script
>
</
script
>
<
template
>
<
template
>
...
...
src/modules/shop/views/View.vue
浏览文件 @
a6f82784
...
@@ -10,6 +10,8 @@ import RecommendCourse from '../components/RecommendCourse.vue'
...
@@ -10,6 +10,8 @@ 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
useWXShare
from
'@/utils/wx'
const
{
mobile
}
=
useDevice
()
const
{
mobile
}
=
useDevice
()
const
shopStore
=
useShopStore
()
const
shopStore
=
useShopStore
()
const
route
=
useRoute
()
const
route
=
useRoute
()
...
@@ -27,6 +29,9 @@ const recommendCourse = computed(() => {
...
@@ -27,6 +29,9 @@ const recommendCourse = computed(() => {
return
shopStore
.
shopRelatedListOther
return
shopStore
.
shopRelatedListOther
}
}
})
})
onMounted
(()
=>
{
useWXShare
()
})
</
script
>
</
script
>
<
template
>
<
template
>
...
...
src/utils/wx.js
0 → 100644
浏览文件 @
a6f82784
import
httpRequest
from
'./axios'
export
default
function
useWXShare
(
data
)
{
const
shareData
=
Object
.
assign
(
{
title
:
'清控紫荆金保'
,
desc
:
'教育、科技、人才!努力建设成为国际卓越的金融保险平台'
,
link
:
location
.
href
,
imgUrl
:
'https://webapp-pub.ezijing.com/project_online/fi/logo.png'
},
data
)
const
updateShareData
=
()
=>
{
wx
.
updateAppMessageShareData
({
title
:
shareData
.
title
,
desc
:
shareData
.
desc
,
link
:
shareData
.
link
,
imgUrl
:
shareData
.
imgUrl
})
wx
.
updateTimelineShareData
({
title
:
shareData
.
title
,
link
:
shareData
.
link
,
imgUrl
:
shareData
.
imgUrl
})
}
httpRequest
.
post
(
'https://node-server.ezijing.com/share/getsignature'
,
{
appId
:
'wxfe67f37095e08d2f'
,
url
:
location
.
href
.
split
(
'#'
).
pop
()
},
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
)
.
then
(
result
=>
{
wx
.
config
({
debug
:
false
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId
:
'wxfe67f37095e08d2f'
,
// 必填,公众号的唯一标识
timestamp
:
result
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
result
.
noncestr
,
// 必填,生成签名的随机串
signature
:
result
.
token
,
// 必填,签名
jsApiList
:
[
'updateAppMessageShareData'
,
'updateTimelineShareData'
]
// 必填,需要使用的JS接口列表
})
wx
.
ready
(
updateShareData
)
})
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论