Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-online-old
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-online-old
Commits
ff90a660
提交
ff90a660
authored
12月 28, 2021
作者:
haodaking
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化支付
上级
fd70082d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
14 行删除
+22
-14
base_api.js
src/api/base_api.js
+1
-1
h5Pay.vue
src/pages/my/welcome/components/h5Pay.vue
+20
-12
indexPay.vue
src/pages/my/welcome/indexPay.vue
+1
-1
没有找到文件。
src/api/base_api.js
浏览文件 @
ff90a660
...
@@ -8,7 +8,7 @@ export default class API {
...
@@ -8,7 +8,7 @@ export default class API {
// 让ajax携带cookie
// 让ajax携带cookie
axios
.
defaults
.
withCredentials
=
true
axios
.
defaults
.
withCredentials
=
true
this
.
_axios
=
axios
.
create
({
this
.
_axios
=
axios
.
create
({
timeout
:
config
.
timeout
||
5
*
1000
,
timeout
:
config
.
timeout
||
60
*
1000
,
/* 表示服务器响应的数据类型,可以是 'arraybuffer', 'blob', 'document', 'json', 'text', 'stream' */
/* 表示服务器响应的数据类型,可以是 'arraybuffer', 'blob', 'document', 'json', 'text', 'stream' */
responseType
:
config
.
resType
||
'json'
,
responseType
:
config
.
resType
||
'json'
,
/* 将自动加在 `url` 前面,除非 `url` 是一个绝对 URL */
/* 将自动加在 `url` 前面,除非 `url` 是一个绝对 URL */
...
...
src/pages/my/welcome/components/h5Pay.vue
浏览文件 @
ff90a660
<
template
>
<
template
>
<div
class=
"h5pay"
>
<div
class=
"h5pay"
>
<el-button
type=
"primary"
@
click=
"handlePay"
>
去支付
</el-button>
<el-button
type=
"primary"
@
click=
"handlePay"
:disabled=
"disabled"
>
去支付
</el-button>
</div>
</div>
</
template
>
</
template
>
...
@@ -9,7 +9,9 @@ import * as api from '@/api/my'
...
@@ -9,7 +9,9 @@ import * as api from '@/api/my'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
openId
:
window
.
localStorage
.
getItem
(
'open_id'
)
openId
:
window
.
localStorage
.
getItem
(
'open_id'
),
order
:
{},
disabled
:
false
}
}
},
},
computed
:
{
computed
:
{
...
@@ -20,16 +22,22 @@ export default {
...
@@ -20,16 +22,22 @@ export default {
methods
:
{
methods
:
{
// 获取订单
// 获取订单
getOrder
(
callback
)
{
getOrder
(
callback
)
{
api
.
getOrder
({
wx_open_id
:
this
.
openId
,
payment_method
:
'WX_PAY'
}).
then
(
response
=>
{
this
.
disabled
=
true
const
{
data
,
error
,
message
}
=
response
api
if
(
error
.
toString
()
===
'0'
)
{
.
getOrder
({
wx_open_id
:
this
.
openId
,
payment_method
:
'WX_PAY'
})
this
.
order
=
data
.
then
(
response
=>
{
this
.
$emit
(
'update'
,
this
.
order
)
const
{
data
,
error
,
message
}
=
response
callback
&&
callback
(
this
.
order
)
if
(
error
.
toString
()
===
'0'
)
{
}
else
{
this
.
order
=
data
this
.
$message
.
error
(
message
)
this
.
$emit
(
'update'
,
this
.
order
)
}
callback
&&
callback
(
this
.
order
)
})
}
else
{
this
.
$message
.
error
(
message
)
}
})
.
finally
(()
=>
{
this
.
disabled
=
false
})
},
},
// 获取微信code
// 获取微信code
getCode
()
{
getCode
()
{
...
...
src/pages/my/welcome/indexPay.vue
浏览文件 @
ff90a660
...
@@ -106,7 +106,7 @@ export default {
...
@@ -106,7 +106,7 @@ export default {
return
return
}
}
this
.
orderList
.
forEach
(
order
=>
this
.
checkPay
(
order
))
this
.
orderList
.
forEach
(
order
=>
this
.
checkPay
(
order
))
},
3
000
)
},
10
000
)
},
},
// 填写个人资料
// 填写个人资料
toApplication
()
{
toApplication
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论