Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
alumni-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
alumni-show-h5
Commits
3b3deea5
提交
3b3deea5
authored
12月 24, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改支付
上级
f26410e8
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
24 行删除
+24
-24
h5Pay.vue
src/views/attestation/buy/components/h5Pay.vue
+24
-24
没有找到文件。
src/views/attestation/buy/components/h5Pay.vue
浏览文件 @
3b3deea5
...
...
@@ -47,7 +47,6 @@ export default {
type
:
7
,
notify_url
:
process
.
env
.
NODE_ENV
!==
'development'
?
`https://alumni-frontend.ezijing.com/
${
this
.
oId
}
`
:
`http://docker-alumni-api.ezijing.com/
${
this
.
oId
}
`
}
console
.
log
(
params
)
api
.
genOrder
(
params
,
this
.
productId
).
then
(
response
=>
{
this
.
order
=
response
clearInterval
(
this
.
clearTime
)
...
...
@@ -73,29 +72,30 @@ export default {
// 微信支付
wxPay
()
{
const
options
=
this
.
order
.
options
window
.
WeixinJSBridge
.
invoke
(
'getBrandWCPayRequest'
,
{
appId
:
options
.
appId
,
// 公众号名称,由商户传入
timeStamp
:
options
.
timeStamp
,
// 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
nonceStr
:
options
.
nonceStr
,
// 支付签名随机串,不长于 32 位
package
:
`prepay_id=
${
this
.
order
.
prepay_id
}
`
,
// 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
signType
:
options
.
signType
,
// 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
paySign
:
options
.
paySign
// 支付签名
},
function
(
res
)
{
if
(
res
.
err_msg
===
'get_brand_wcpay_request:ok'
)
{
// 使用以上方式判断前端返回,微信团队郑重提示:
// res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
this
.
$toast
(
'支付成功'
)
// 支付成功后的回调函数
this
.
$emit
(
'success'
,
res
)
}
else
{
this
.
$toast
(
'支付失败'
)
this
.
$emti
(
'fail'
,
res
)
}
}
)
const
url
=
`https://web-pay.ezijing.com/wxpay/h5?app_id=
${
options
.
appId
}
&prepay_id=
${
this
.
productId
}
&redirect_uri=
${
window
.
location
.
href
}
`
// window.WeixinJSBridge.invoke(
// 'getBrandWCPayRequest',
// {
// appId: options.appId, // 公众号名称,由商户传入
// timeStamp: options.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
// nonceStr: options.nonceStr, // 支付签名随机串,不长于 32 位
// package: `prepay_id=${this.order.prepay_id}`, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
// signType: options.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
// paySign: options.paySign // 支付签名
// },
// function (res) {
// if (res.err_msg === 'get_brand_wcpay_request:ok') {
// // 使用以上方式判断前端返回,微信团队郑重提示:
// // res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
// this.$toast('支付成功')
// // 支付成功后的回调函数
// this.$emit('success', res)
// } else {
// this.$toast('支付失败')
// this.$emti('fail', res)
// }
// }
// )
// wx.chooseWXPay({
// timestamp: options.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
// nonceStr: options.nonceStr, // 支付签名随机串,不长于 32 位
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论