Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-psp-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-psp-show-h5
Commits
35998c72
提交
35998c72
authored
10月 23, 2024
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
fb581a91
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
23 行增加
和
18 行删除
+23
-18
api.ts
src/modules/course/api.ts
+0
-6
Detail.vue
src/modules/course/views/Detail.vue
+1
-3
api.ts
src/modules/pay/api.ts
+7
-0
PayH5.vue
src/modules/pay/components/PayH5.vue
+15
-9
没有找到文件。
src/modules/course/api.ts
浏览文件 @
35998c72
...
...
@@ -14,9 +14,3 @@ export function getVideo(params: { resource_id: string, course_id: string, chapt
export
function
uploadVideo
(
params
:
any
)
{
return
httpRequest
.
get
(
'/api/psp/v2/learning/upload-video'
,
{
params
})
}
export
function
getOrderSpec
(
data
?:
any
)
{
return
httpRequest
.
post
(
'https://shop-show-h5.ezijing.com/api/shop/commodity/spu/spec/value/search'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
src/modules/course/views/Detail.vue
浏览文件 @
35998c72
<
script
setup
lang=
"ts"
>
import
AppContainer
from
'@/components/base/AppContainer.vue'
import
{
getCourseDetail
,
getOrderSpec
}
from
'../api'
import
{
getCourseDetail
}
from
'../api'
import
CourseCatalog
from
'../components/CourseCatalog.vue'
import
{
useUserStore
}
from
'@/stores/user'
import
{
Dialog
}
from
'vant'
...
...
@@ -23,8 +23,6 @@ getCourseDetail({ id: route.query?.id as string }).then((res: any) => {
}
// console.log(d)
// getURLParameters()
// const urlParam = getURLParameters(d.url)
// getOrderSpec({ shop_id: urlParam.shop_id, spu_id: urlParam.id })
data
.
course
=
d
})
...
...
src/modules/pay/api.ts
浏览文件 @
35998c72
...
...
@@ -38,4 +38,10 @@ export function applications(data?: any) {
return
httpRequest
.
post
(
'/api/zws/v1/enrollment/applications'
,
data
,
{
// headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
}
export
function
getOrderSpec
(
data
?:
any
)
{
return
httpRequest
.
post
(
'https://shop-show-pc.ezijing.com/api/shop/commodity/spu/spec/value/search'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
\ No newline at end of file
src/modules/pay/components/PayH5.vue
浏览文件 @
35998c72
...
...
@@ -2,6 +2,7 @@
import
{
usePay
}
from
'../composables/usePay'
import
{
Toast
}
from
'vant'
import
{
getUser
}
from
'@/api/base'
import
{
getOrderSpec
}
from
'../api'
const
props
=
defineProps
({
shopItem
:
{
type
:
Object
,
default
:
()
=>
({})
}
})
const
emit
=
defineEmits
([
'success'
])
...
...
@@ -27,16 +28,21 @@ function handlePay() {
return
}
if
(
!
props
.
shopItem
?.
url
)
return
// const urlParam = getURLParameters(d.url)
const
payUrl
=
getURLParameters
(
props
.
shopItem
?.
url
)
const
data
=
{
shop_id
:
payUrl
?.
shop_id
||
''
,
spu_id
:
payUrl
?.
spu_id
||
payUrl
?.
id
||
''
,
sku_id
:
payUrl
?.
sku_id
||
''
,
nUrl
:
`https://wmpc-show-h5.ezijing.com/api/psp/v2/index/pay-callback?tenant=wmpc&course_id=
${
props
.
shopItem
.
id
}
&user_id=
${
uId
}
`
,
amount
:
props
.
shopItem
?.
prices
,
type
:
params
.
payment_method
}
pay
(
params
,
data
)
getOrderSpec
({
shop_id
:
payUrl
.
shop_id
,
spu_id
:
payUrl
.
id
}).
then
(
res
=>
{
if
(
res
.
data
?.
length
)
{
const
data
=
{
shop_id
:
payUrl
?.
shop_id
||
''
,
spu_id
:
payUrl
?.
id
||
res
.
data
[
0
]?.
spu_id
||
''
,
sku_id
:
res
.
data
[
0
]?.
sku_id
||
''
,
nUrl
:
`https://wmpc-show-h5.ezijing.com/api/psp/v2/index/pay-callback?tenant=wmpc&course_id=
${
props
.
shopItem
.
id
}
&user_id=
${
uId
}
`
,
amount
:
props
.
shopItem
?.
prices
,
type
:
params
.
payment_method
}
pay
(
params
,
data
)
}
})
}
const
getURLParameters
=
(
url
:
any
)
=>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论