Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
h5-base
Commits
623f381f
Commit
623f381f
authored
Sep 12, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付
parent
23b8e891
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
46 deletions
+5
-46
buy.vue
src/components/buy/buy.vue
+5
-46
No files found.
src/components/buy/buy.vue
View file @
623f381f
...
@@ -380,58 +380,17 @@ export default {
...
@@ -380,58 +380,17 @@ export default {
let
payTypeArr
=
[
'WX'
,
'ALI'
,
'KFQ'
]
let
payTypeArr
=
[
'WX'
,
'ALI'
,
'KFQ'
]
let
data
=
{
pay_type
:
payTypeArr
[
this
.
payIndex
],
return_url
:
window
.
location
.
href
,
goods_id
:
json
.
goods_id
,
buy_type
:
this
.
groupDetail
.
goods_type
,
group_order_id
:
json
.
group_order_id
,
order_coupon_id
:
json
.
order_coupon_id
}
let
data
=
{
pay_type
:
payTypeArr
[
this
.
payIndex
],
return_url
:
window
.
location
.
href
,
goods_id
:
json
.
goods_id
,
buy_type
:
this
.
groupDetail
.
goods_type
,
group_order_id
:
json
.
group_order_id
,
order_coupon_id
:
json
.
order_coupon_id
}
/*
postPayBillApi(data).then(res => {
postPayBillApi
(
data
).
then
(
res
=>
{
if
(
this
.
payIndex
===
0
)
{
if
(
this
.
payIndex
===
0
)
{
window
.
location
.
href
=
res
.
pay_url
;
this.orderNo = res.out_trade_no;
if (res.out_trade_no && !res.appId) {
console.log(9999)
getCourseInfoApi().then(res => {
this.userCourse = res;
localStorage.setItem(
"userCourse",
JSON.stringify(this.userCourse)
);
this.navPage(res);
});
} else {
console.log(8888)
let that = this;
this.orderNo = res.out_trade_no;
this.jsApiParameters = res;
wx.miniProgram.getEnv(function(res) {
if (res.miniprogram) {
let payParam = encodeURIComponent(JSON.stringify(json));
wx.miniProgram.navigateTo({
url: `pages/wxPay/main?payParam=${payParam}`
});
} else if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener(
"WeixinJSBridgeReady",
that.jsApiCall,
false
);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", that.jsApiCall);
document.attachEvent(
"onWeixinJSBridgeReady",
that.jsApiCall
);
}
} else {
that.jsApiCall();
}
});
}
}
else
if
(
this
.
payIndex
===
1
){
}
else
if
(
this
.
payIndex
===
1
){
this
.
payUrl
=
res
.
pay_url
;
this
.
payUrl
=
res
.
pay_url
;
}
else
if
(
this
.
payIndex
===
2
)
{
}
else
if
(
this
.
payIndex
===
2
)
{
this
.
payUrl
=
res
.
pay_url
;
this
.
payUrl
=
res
.
pay_url
;
}
}
})
*/
})
payApi
(
json
).
then
(
res
=>
{
/*
payApi(json).then(res => {
this.orderNo = res.out_trade_no;
this.orderNo = res.out_trade_no;
console.log(res)
console.log(res)
if (res.out_trade_no && !res.appId) {
if (res.out_trade_no && !res.appId) {
...
@@ -476,7 +435,7 @@ export default {
...
@@ -476,7 +435,7 @@ export default {
.catch(res => {
.catch(res => {
// alert(res)
// alert(res)
this.orderFlag = true;
this.orderFlag = true;
});
});
*/
}
}
},
},
closeAdd
(
data
)
{
closeAdd
(
data
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment