Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
alumni-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
alumni-show-h5
Commits
3eb772ec
提交
3eb772ec
authored
12月 24, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改支付
上级
f4373c31
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
11 行删除
+15
-11
api.js
src/views/attestation/buy/api.js
+3
-3
h5Pay.vue
src/views/attestation/buy/components/h5Pay.vue
+9
-5
index.vue
src/views/attestation/index.vue
+3
-3
没有找到文件。
src/views/attestation/buy/api.js
浏览文件 @
3eb772ec
...
@@ -39,10 +39,10 @@ export function uploadPay(id, data) {
...
@@ -39,10 +39,10 @@ export function uploadPay(id, data) {
/**
/**
* 生成订单
* 生成订单
*/
*/
export
function
genOrder
(
data
)
{
export
function
genOrder
(
data
,
id
)
{
return
httpRequest
({
return
httpRequest
({
url
:
'/api/pay/v1/wechat/order/pre'
,
url
:
`/api/pay/v1/wechat/unified-order/alumni/
${
id
}
`
,
method
:
'
pos
t'
,
method
:
'
ge
t'
,
headers
:
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
'Content-Type'
:
'application/x-www-form-urlencoded'
},
},
...
...
src/views/attestation/buy/components/h5Pay.vue
浏览文件 @
3eb772ec
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
// import { isDayjs } from 'dayjs'
import
*
as
api
from
'../api.js'
import
*
as
api
from
'../api.js'
export
default
{
export
default
{
...
@@ -14,7 +15,8 @@ export default {
...
@@ -14,7 +15,8 @@ export default {
return
{
return
{
clearTime
:
null
,
clearTime
:
null
,
openId
:
''
,
openId
:
''
,
order
:
{
options
:
{}
}
order
:
{
options
:
{}
},
oId
:
''
}
}
},
},
computed
:
{
computed
:
{
...
@@ -41,11 +43,11 @@ export default {
...
@@ -41,11 +43,11 @@ export default {
// 生成订单
// 生成订单
genOrder
()
{
genOrder
()
{
const
params
=
{
const
params
=
{
product_id
:
this
.
productId
,
open_id
:
this
.
openId
,
open_id
:
this
.
openId
,
type
:
'alumni-h5'
type
:
7
,
notify_url
:
process
.
env
.
NODE_ENV
!==
'development'
?
`https://alumni-frontend.ezijing.com/
${
this
.
oId
}
`
:
`http://docker-alumni-api.ezijing.com/
${
this
.
oId
}
`
}
}
api
.
genOrder
(
params
).
then
(
response
=>
{
api
.
genOrder
(
params
,
this
.
productId
).
then
(
response
=>
{
this
.
order
=
response
.
data
this
.
order
=
response
.
data
clearInterval
(
this
.
clearTime
)
clearInterval
(
this
.
clearTime
)
this
.
clearTime
=
setInterval
(()
=>
{
this
.
clearTime
=
setInterval
(()
=>
{
...
@@ -110,7 +112,9 @@ export default {
...
@@ -110,7 +112,9 @@ export default {
// }
// }
// })
// })
},
},
pay
()
{
pay
(
id
)
{
this
.
oId
=
id
console
.
log
(
this
.
oId
)
this
.
getOpenId
()
this
.
getOpenId
()
}
}
}
}
...
...
src/views/attestation/index.vue
浏览文件 @
3eb772ec
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</
template
>
</
template
>
<
template
v-if=
"item.approve_status == 1"
>
<
template
v-if=
"item.approve_status == 1"
>
<div
class=
"btn"
@
click=
"goLook(item.id)"
>
查看
</div>
<div
class=
"btn"
@
click=
"goLook(item.id)"
>
查看
</div>
<div
class=
"btn"
v-if=
"item.pay == 0"
@
click=
"orderPays"
>
支付
</div>
<div
class=
"btn"
v-if=
"item.pay == 0"
@
click=
"orderPays
(item.id)
"
>
支付
</div>
</
template
>
</
template
>
</div>
</div>
<div
class=
"icon-yes"
v-if=
"item.approve_status == 1"
></div>
<div
class=
"icon-yes"
v-if=
"item.approve_status == 1"
></div>
...
@@ -106,8 +106,8 @@ export default {
...
@@ -106,8 +106,8 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
orderPays
()
{
orderPays
(
id
)
{
this
.
$refs
.
h5pay
.
pay
()
this
.
$refs
.
h5pay
.
pay
(
id
)
},
},
goLook
(
id
)
{
goLook
(
id
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论