Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-fi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-fi
Commits
6473ec6f
提交
6473ec6f
authored
11月 22, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
8e42ccd5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
162 行增加
和
147 行删除
+162
-147
Confirm.vue
src/modules/pay/components/Confirm.vue
+2
-2
Order.vue
src/modules/pay/components/Order.vue
+2
-1
TeacherCard.vue
src/modules/shop/components/TeacherCard.vue
+152
-138
wxpay.js
src/utils/wxpay.js
+6
-6
没有找到文件。
src/modules/pay/components/Confirm.vue
浏览文件 @
6473ec6f
...
@@ -237,7 +237,7 @@ const handlePrev = () => {
...
@@ -237,7 +237,7 @@ const handlePrev = () => {
/>
/>
<div
class=
"radio_tit"
>
支付宝支付
</div>
<div
class=
"radio_tit"
>
支付宝支付
</div>
<div
<div
:class=
"payMode ===
'12'
? 'radio_check_active' : 'radio_check'"
:class=
"payMode ===
1
? 'radio_check_active' : 'radio_check'"
@
click=
"checkdChange('12')"
@
click=
"checkdChange('12')"
>
>
<template
v-if=
"currentCheck === '12'"
>
<template
v-if=
"currentCheck === '12'"
>
...
@@ -251,7 +251,7 @@ const handlePrev = () => {
...
@@ -251,7 +251,7 @@ const handlePrev = () => {
/>
/>
<div
class=
"radio_tit"
>
微信支付
</div>
<div
class=
"radio_tit"
>
微信支付
</div>
<div
<div
:class=
"payMode ===
'4'
? 'radio_check_active' : 'radio_check'"
:class=
"payMode ===
2
? 'radio_check_active' : 'radio_check'"
@
click=
"checkdChange('4')"
@
click=
"checkdChange('4')"
>
>
<
template
v-if=
"currentCheck === '4'"
>
<
template
v-if=
"currentCheck === '4'"
>
...
...
src/modules/pay/components/Order.vue
浏览文件 @
6473ec6f
...
@@ -33,7 +33,8 @@ onMounted(() => {
...
@@ -33,7 +33,8 @@ onMounted(() => {
if (props.payMethod === 1) {
if (props.payMethod === 1) {
params.payment_method = '11'
params.payment_method = '11'
// 微信扫码支付
// 微信扫码支付
} else if (props.payMethod === 2) {
}
if (props.payMethod === 2) {
params.payment_method = '1'
params.payment_method = '1'
}
}
createOrder(params).then((res: any) => {
createOrder(params).then((res: any) => {
...
...
src/modules/shop/components/TeacherCard.vue
浏览文件 @
6473ec6f
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
import
{
Swiper
,
SwiperSlide
}
from
'swiper/vue'
import
{
Swiper
,
SwiperSlide
}
from
'swiper/vue'
import
{
Grid
,
Navigation
}
from
'swiper'
import
{
Grid
,
Navigation
}
from
'swiper'
import
{
useDevice
}
from
'@/composables/useDevice'
import
{
useDevice
}
from
'@/composables/useDevice'
const
{
mobile
}
=
useDevice
()
import
'swiper/css'
import
'swiper/css'
import
'swiper/css/grid'
import
'swiper/css/grid'
import
'swiper/css/navigation'
import
'swiper/css/navigation'
const
{
mobile
}
=
useDevice
()
defineProps
({
defineProps
({
lecturerList
:
{
lecturerList
:
{
type
:
Array
type
:
Array
...
@@ -39,7 +40,10 @@ const list = [
...
@@ -39,7 +40,10 @@ const list = [
{
{
avatar
:
'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'
,
avatar
:
'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'
,
name
:
'陈秉正'
,
name
:
'陈秉正'
,
title_list
:
[
'清华大学经济管理学院金融系教授'
,
'中国保险与风险管理研究中心主任'
]
title_list
:
[
'清华大学经济管理学院金融系教授'
,
'中国保险与风险管理研究中心主任'
]
}
}
]
]
</
script
>
</
script
>
...
@@ -57,12 +61,19 @@ const list = [
...
@@ -57,12 +61,19 @@ const list = [
:spaceBetween="20"
:spaceBetween="20"
:slidePreview="1"
:slidePreview="1"
:modules="[Navigation, Grid]"
:modules="[Navigation, Grid]"
@swiper="
swiper
=> (swiper1 = swiper)"
@swiper="
(swiper)
=> (swiper1 = swiper)"
>
>
<SwiperSlide
v-for=
"(item, index) in lecturerList"
:key=
"index"
class=
"teacher-item"
>
<SwiperSlide
v-for=
"(item, index) in lecturerList"
:key=
"index"
class=
"teacher-item"
>
<div
class=
"item_top"
>
<div
class=
"item_top"
>
<img
<img
:src=
"item.avatar || 'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'"
:src=
"
item.avatar ||
'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'
"
class=
"top_img"
class=
"top_img"
/>
/>
<div
class=
"top_name"
>
{{
item
.
name
}}
</div>
<div
class=
"top_name"
>
{{
item
.
name
}}
</div>
...
@@ -84,165 +95,169 @@ const list = [
...
@@ -84,165 +95,169 @@ const list = [
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"teacher_list"
v-else
>
<div
class=
"teacher_list"
v-else
>
<div
class=
"con_tit"
>
讲师介绍
</div>
<div
class=
"con_tit"
>
讲师介绍
</div>
<div
class=
"con_teacher"
>
<div
class=
"con_teacher"
>
<div
v-for=
"(item, index) in lecturerList"
:key=
"index"
class=
"teacher-item"
>
<div
<div
class=
"item_top"
>
v-for=
"(item, index) in lecturerList"
<img
:key=
"index"
:src=
"item.avatar || 'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'"
class=
"teacher-item"
class=
"top_img"
>
/>
<div
class=
"item_top"
>
<div
class=
"top_name"
>
{{ item.name }}
</div>
<img
</div>
:src=
"
<ol
v-if=
"item.title_list?.length"
>
item.avatar ||
<li
v-for=
"it in item.title_list"
:key=
"it"
>
'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'
<p>
"
{{ it }}
class=
"top_img"
</p>
/>
</li>
<div
class=
"top_name"
>
{{ item.name }}
</div>
</ol>
</div>
</div>
<ol
v-if=
"item.title_list?.length"
>
<li
v-for=
"it in item.title_list"
:key=
"it"
>
<p>
{{ it }}
</p>
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.is-pc
{
.is-pc
{
.teacher_list
{
.list_con
{
width
:
396px
;
height
:
433px
;
background
:
#ffffff
;
box-shadow
:
0px
1px
18px
rgba
(
0
,
0
,
0
,
0
.1
);
border-radius
:
15px
;
border-top
:
6px
solid
#fde6c1
;
padding-top
:
27px
;
.teacher_list
{
.con_tit
{
.list_con
{
font-size
:
18px
;
width
:
396px
;
font-weight
:
500
;
height
:
433px
;
line-height
:
34px
;
background
:
#ffffff
;
color
:
#333333
;
box-shadow
:
0px
1px
18px
rgba
(
0
,
0
,
0
,
0
.1
);
text-align
:
center
;
border-radius
:
15px
;
border-top
:
6px
solid
#fde6c1
;
padding-top
:
27px
;
.con_tit
{
font-size
:
18px
;
font-weight
:
500
;
line-height
:
34px
;
color
:
#333333
;
text-align
:
center
;
}
.con_line
{
width
:
31px
;
height
:
2px
;
background
:
#c1ab85
;
margin
:
9px
0
0
183px
;
}
.con_teacher
{
padding
:
0
33px
;
position
:
relative
;
.teacher-item
:nth-child
(
even
)
{
border-bottom
:
none
;
}
}
.teacher-item
:last-child
{
.con_line
{
border-bottom
:
none
;
width
:
31px
;
height
:
2px
;
background
:
#c1ab85
;
margin
:
9px
0
0
183px
;
}
}
.teacher-item
{
.con_teacher
{
padding
:
29px
27px
33px
0
;
padding
:
0
33px
;
border-bottom
:
1px
dashed
#d5d5d5
;
position
:
relative
;
box-sizing
:
border-box
;
.teacher-item
:nth-child
(
even
)
{
.item_top
{
border-bottom
:
none
;
display
:
flex
;
align-items
:
center
;
.top_img
{
width
:
60px
;
height
:
60px
;
}
.top_name
{
font-size
:
18px
;
font-weight
:
500
;
line-height
:
34px
;
color
:
#333333
;
margin-left
:
13px
;
}
}
}
ol
{
.teacher-item
:last-child
{
margin-top
:
15px
;
border-bottom
:
none
;
li
{
}
list-style-type
:
disc
;
.teacher-item
{
color
:
#c1ab85
!
important
;
padding
:
29px
27px
33px
0
;
margin-left
:
20px
;
border-bottom
:
1px
dashed
#d5d5d5
;
p
{
box-sizing
:
border-box
;
font-size
:
14px
;
.item_top
{
font-weight
:
400
;
display
:
flex
;
line-height
:
22px
;
align-items
:
center
;
color
:
#666666
;
.top_img
{
width
:
295px
;
width
:
60px
;
white-space
:
wrap
;
height
:
60px
;
}
.top_name
{
font-size
:
18px
;
font-weight
:
500
;
line-height
:
34px
;
color
:
#333333
;
margin-left
:
13px
;
}
}
ol
{
margin-top
:
15px
;
li
{
list-style-type
:
disc
;
color
:
#c1ab85
!
important
;
margin-left
:
20px
;
p
{
font-size
:
14px
;
font-weight
:
400
;
line-height
:
22px
;
color
:
#666666
;
width
:
295px
;
white-space
:
wrap
;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
.my-swiper
{
.my-swiper
{
--swiper-navigation-size
:
14px
;
--swiper-navigation-size
:
14px
;
--swiper-navigation-color
:
#333333
;
--swiper-navigation-color
:
#333333
;
position
:
relative
;
position
:
relative
;
height
:
473px
;
height
:
473px
;
:deep
(
.swiper-slide
)
{
:deep
(
.swiper-slide
)
{
height
:
33%
;
height
:
33%
;
}
}
.swiper-button-prev
{
left
:
5px
;
top
:
-6%
;
color
:
#333333
;
}
.swiper-button-next
{
right
:
5px
;
top
:
-6%
;
color
:
#333333
;
}
.swiper-button-next
:after
{
font-size
:
12px
;
}
.swiper-button-prev
:after
{
font-size
:
12px
;
}
}
}
}
.swiper-button-prev
{
.is-h5
{
left
:
5px
;
.teacher_list
{
top
:
-6%
;
margin-top
:
0
.3rem
;
color
:
#333333
;
}
.swiper-button-next
{
right
:
5px
;
top
:
-6%
;
color
:
#333333
;
}
.swiper-button-next
:after
{
font-size
:
12px
;
}
.swiper-button-prev
:after
{
font-size
:
12px
;
}
}
.is-h5
{
.teacher_list
{
margin-top
:
0
.3rem
;
.con_tit
{
.con_tit
{
font-size
:
0
.28rem
;
font-size
:
0
.28rem
;
font-weight
:
500
;
font-weight
:
500
;
line-height
:
34px
;
line-height
:
34px
;
color
:
#333333
;
color
:
#333333
;
}
}
.con_teacher
{
overflow-x
:
auto
;
display
:
flex
;
.teacher-item
{
.con_teacher
{
width
:
5
.49rem
;
overflow-x
:
auto
;
background
:
#F4F8FB
;
display
:
flex
;
padding
:
0
.27rem
0
.2rem
;
border-radius
:
0
.16rem
;
.teacher-item
{
margin-right
:
0
.2rem
;
width
:
5
.49rem
;
.item_top
{
background
:
#f4f8fb
;
display
:
flex
;
padding
:
0
.27rem
0
.2rem
;
align-items
:
center
;
border-radius
:
0
.16rem
;
.top_img
{
margin-right
:
0
.2rem
;
width
:
0
.86rem
;
.item_top
{
}
display
:
flex
;
.top_name
{
align-items
:
center
;
font-size
:
0
.28rem
;
.top_img
{
color
:
#333333
;
width
:
0
.86rem
;
margin-left
:
0
.15rem
;
}
.top_name
{
font-size
:
0
.28rem
;
color
:
#333333
;
margin-left
:
0
.15rem
;
}
}
}
}
ol
{
ol
{
margin-top
:
0
.2rem
;
margin-top
:
0
.2rem
;
li
{
li
{
list-style-type
:
disc
;
list-style-type
:
disc
;
...
@@ -257,9 +272,8 @@ const list = [
...
@@ -257,9 +272,8 @@ const list = [
}
}
}
}
}
}
}
}
}
}
}
}
}
}
</
style
>
</
style
>
src/utils/wxpay.
t
s
→
src/utils/wxpay.
j
s
浏览文件 @
6473ec6f
...
@@ -14,11 +14,11 @@ import * as api from '@/api/base'
...
@@ -14,11 +14,11 @@ import * as api from '@/api/base'
/**
/**
* 获取微信openId
* 获取微信openId
* */
* */
export
function
getOpenId
(
code
:
any
,
callback
:
any
)
{
export
function
getOpenId
(
code
,
callback
)
{
if
(
!
code
)
{
if
(
!
code
)
{
return
getCode
()
return
getCode
()
}
}
api
.
getOpenId
({
code
,
identity
:
'ezijing'
}).
then
((
resp
:
any
)
=>
{
api
.
getOpenId
({
code
,
identity
:
'ezijing'
}).
then
((
resp
)
=>
{
const
openId
=
resp
.
data
.
openid
const
openId
=
resp
.
data
.
openid
openId
&&
localStorage
.
setItem
(
'openId'
,
openId
)
openId
&&
localStorage
.
setItem
(
'openId'
,
openId
)
callback
&&
callback
(
openId
)
callback
&&
callback
(
openId
)
...
@@ -28,13 +28,13 @@ import * as api from '@/api/base'
...
@@ -28,13 +28,13 @@ import * as api from '@/api/base'
/**
/**
* 微信JSAPI支付
* 微信JSAPI支付
* */
* */
export
function
wxJSPay
(
order
:
any
,
callback
:
any
)
{
export
function
wxJSPay
(
order
,
callback
)
{
if
(
!
order
.
payment_more_info
)
{
if
(
!
order
.
payment_more_info
)
{
alert
(
'订单创建错误'
)
alert
(
'订单创建错误'
)
return
return
}
}
const
payInfo
=
JSON
.
parse
(
order
.
payment_more_info
)
const
payInfo
=
JSON
.
parse
(
order
.
payment_more_info
)
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
payInfo
,
(
resp
:
any
)
=>
{
window
.
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
payInfo
,
(
resp
)
=>
{
callback
&&
callback
(
resp
)
callback
&&
callback
(
resp
)
})
})
}
}
1
\ No newline at end of file
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论