Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
alumni-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
alumni-show-h5
Commits
b34e98e9
提交
b34e98e9
authored
11月 20, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改支付
上级
960de049
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
37 行增加
和
16 行删除
+37
-16
api.js
src/views/attestation/buy/api.js
+23
-15
h5Pay.vue
src/views/attestation/buy/components/h5Pay.vue
+13
-0
index.vue
src/views/attestation/index.vue
+1
-1
没有找到文件。
src/views/attestation/buy/api.js
浏览文件 @
b34e98e9
...
@@ -13,6 +13,29 @@ export function getOpenId(params) {
...
@@ -13,6 +13,29 @@ export function getOpenId(params) {
})
})
}
}
/**
* 获取订单状态
*/
export
function
getOrderStatus
()
{
return
httpRequest
.
get
(
'/api/pay/v1/mall/order/status'
)
}
/**
* 获取订单
*/
export
function
getOrder
(
orderId
)
{
return
httpRequest
.
get
(
`/api/pay/v1/mall/order/
${
orderId
}
`
)
}
// upload 支付状态
export
function
uploadPay
(
id
,
data
)
{
return
httpRequest
({
url
:
`/api/alumni/v1/certification/change/
${
id
}
`
,
method
:
'post'
,
data
})
}
/**
/**
* 生成订单
* 生成订单
*/
*/
...
@@ -33,18 +56,3 @@ export function genOrder(data) {
...
@@ -33,18 +56,3 @@ export function genOrder(data) {
export
function
getProduct
(
productId
)
{
export
function
getProduct
(
productId
)
{
return
httpRequest
.
get
(
`/api/pay/v2/mall/product/
${
productId
}
`
)
return
httpRequest
.
get
(
`/api/pay/v2/mall/product/
${
productId
}
`
)
}
}
/**
* 获取订单
*/
export
function
getOrder
(
orderId
)
{
return
httpRequest
.
get
(
`/api/pay/v2/mall/order/
${
orderId
}
`
)
}
/**
* 获取订单状态
*/
export
function
getOrderStatus
()
{
return
httpRequest
.
get
(
'/api/pay/v2/mall/order/status'
)
}
src/views/attestation/buy/components/h5Pay.vue
浏览文件 @
b34e98e9
...
@@ -12,6 +12,7 @@ export default {
...
@@ -12,6 +12,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
clearTime
:
null
,
openId
:
''
,
openId
:
''
,
order
:
{
options
:
{}
}
order
:
{
options
:
{}
}
}
}
...
@@ -47,10 +48,22 @@ export default {
...
@@ -47,10 +48,22 @@ export default {
}
}
api
.
genOrder
(
params
).
then
(
response
=>
{
api
.
genOrder
(
params
).
then
(
response
=>
{
this
.
order
=
response
.
data
this
.
order
=
response
.
data
this
.
clearTime
=
setInterval
(()
=>
{
this
.
getOrderStatus
(
this
.
order
.
order_no
)
},
1000
)
// 调起微信支付
// 调起微信支付
this
.
wxPay
()
this
.
wxPay
()
})
})
},
},
getOrderStatus
(
id
)
{
api
.
getOrder
(
id
).
then
(
response
=>
{
const
code
=
parseInt
(
response
.
data
.
status
)
if
(
code
!==
-
1
)
{
clearInterval
(
this
.
clearTime
)
this
.
$router
.
go
(
0
)
}
})
},
// 微信支付
// 微信支付
wxPay
()
{
wxPay
()
{
const
options
=
this
.
order
.
options
const
options
=
this
.
order
.
options
...
...
src/views/attestation/index.vue
浏览文件 @
b34e98e9
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<div
class=
"icon-yes"
v-if=
"item.approve_status"
></div>
<div
class=
"icon-yes"
v-if=
"item.approve_status"
></div>
</div>
</div>
</template>
</template>
<
div
class=
"btn"
@
click=
"orderPays"
style=
"font-size:30px;position: relative;z-index: 999;"
>
支付
</div
>
<
!-- <div class="btn" @click="orderPays" style="font-size:30px;position: relative;z-index: 999;">支付</div> --
>
<
template
v-if=
"data.length == 0"
>
<
template
v-if=
"data.length == 0"
>
<van-empty
description=
"您还没有提交申请"
/>
<van-empty
description=
"您还没有提交申请"
/>
<div
class=
"list-btn"
v-if=
"data.length == 0"
@
click=
"apply"
>
申请三级认证
</div>
<div
class=
"list-btn"
v-if=
"data.length == 0"
@
click=
"apply"
>
申请三级认证
</div>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论