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
eda47d95
Commit
eda47d95
authored
Sep 25, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付
parent
af8786c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
buy.vue
src/components/buy/buy.vue
+14
-10
No files found.
src/components/buy/buy.vue
View file @
eda47d95
...
@@ -84,6 +84,7 @@
...
@@ -84,6 +84,7 @@
</ul>
</ul>
</div>
</div>
<footer>
<footer>
<div
class=
"sub-block"
>
<div
class=
"sub-block"
>
<span
v-if=
"groupDetail.goods_desc"
>
¥
{{
priceTotal
}}
</span>
<span
v-if=
"groupDetail.goods_desc"
>
¥
{{
priceTotal
}}
</span>
...
@@ -91,11 +92,11 @@
...
@@ -91,11 +92,11 @@
class=
"tips-price"
class=
"tips-price"
v-if=
"groupDetail.goods_desc"
v-if=
"groupDetail.goods_desc"
>
{{
groupDetail
.
goods_desc
.
tips
?
groupDetail
.
goods_desc
.
tips
:
''
}}
</span>
>
{{
groupDetail
.
goods_desc
.
tips
?
groupDetail
.
goods_desc
.
tips
:
''
}}
</span>
<div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
>
提交订单
</div
>
<!--
<div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
>
提交订单
</div>
--
>
<
!--
<
div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
<div
class=
"pay-btn"
@
click=
"payOrder(orderFlag)"
v-clipboard:copy=
"pay
Index !== 0 ? payUrl : ''
"
v-clipboard:copy=
"pay
Url
"
v-clipboard:success=
"copy"
v-clipboard:success=
"copy"
v-clipboard:error=
"onError"
>
提交订单
</div>
-->
v-clipboard:error=
"onError"
>
提交订单
</div>
</div>
</div>
</footer>
</footer>
<transition
name=
"slide-fade"
>
<transition
name=
"slide-fade"
>
...
@@ -213,7 +214,8 @@ export default {
...
@@ -213,7 +214,8 @@ export default {
{
icon
:
zhifubao
,
title
:
'支付宝支付'
,
value
:
1
}
{
icon
:
zhifubao
,
title
:
'支付宝支付'
,
value
:
1
}
],
],
payIndex
:
0
,
payIndex
:
0
,
payUrl
:
''
payUrl
:
''
,
ui
:
''
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -248,8 +250,6 @@ export default {
...
@@ -248,8 +250,6 @@ export default {
copy
(
e
)
{
copy
(
e
)
{
if
(
this
.
payIndex
===
1
)
{
if
(
this
.
payIndex
===
1
)
{
Toast
(
"支付宝支付获取成功,请把粘贴到支付宝里"
);
Toast
(
"支付宝支付获取成功,请把粘贴到支付宝里"
);
}
else
if
(
this
.
payIndex
===
2
)
{
Toast
(
"信用卡支付获取成功"
);
}
}
},
},
onError
()
{
onError
()
{
...
@@ -259,7 +259,11 @@ export default {
...
@@ -259,7 +259,11 @@ export default {
},
},
// 支付方式
// 支付方式
payListClick
(
val
)
{
payListClick
(
val
)
{
this
.
orderFlag
=
true
;
this
.
payIndex
=
val
this
.
payIndex
=
val
/* if(val === 1) {
this.payOrder(true)
}*/
},
},
recursion
()
{
recursion
()
{
getCourseInfoApi
().
then
(
res
=>
{
getCourseInfoApi
().
then
(
res
=>
{
...
@@ -328,6 +332,7 @@ export default {
...
@@ -328,6 +332,7 @@ export default {
this
.
bindMobile
.
show
=
false
;
this
.
bindMobile
.
show
=
false
;
},
},
payOrder
(
flag
)
{
payOrder
(
flag
)
{
console
.
log
(
flag
)
let
type
=
this
.
type
?
0
:
1
;
let
type
=
this
.
type
?
0
:
1
;
let
that
=
this
;
let
that
=
this
;
this
.
orderCancel
=
false
;
this
.
orderCancel
=
false
;
...
@@ -377,7 +382,7 @@ export default {
...
@@ -377,7 +382,7 @@ export default {
json
.
group_order_id
=
this
.
$route
.
query
.
group_order_id
;
json
.
group_order_id
=
this
.
$route
.
query
.
group_order_id
;
}
}
this
.
orderFlag
=
false
;
this
.
orderFlag
=
false
;
console
.
log
(
this
.
payIndex
)
if
(
this
.
payIndex
===
0
)
{
if
(
this
.
payIndex
===
0
)
{
payApi
(
json
).
then
(
res
=>
{
payApi
(
json
).
then
(
res
=>
{
this
.
orderNo
=
res
.
out_trade_no
;
this
.
orderNo
=
res
.
out_trade_no
;
...
@@ -429,8 +434,7 @@ export default {
...
@@ -429,8 +434,7 @@ export default {
let
data
=
{
pay_type
:
'ALI'
,
return_url
:
window
.
location
.
href
,
buy_type
:
this
.
groupDetail
.
goods_type
}
let
data
=
{
pay_type
:
'ALI'
,
return_url
:
window
.
location
.
href
,
buy_type
:
this
.
groupDetail
.
goods_type
}
let
dataObj
=
Object
.
assign
({},
data
,
json
)
let
dataObj
=
Object
.
assign
({},
data
,
json
)
postPayBillApi
(
dataObj
).
then
(
res
=>
{
postPayBillApi
(
dataObj
).
then
(
res
=>
{
location
.
href
=
res
.
pay_url
;
this
.
payUrl
=
res
.
pay_url
})
})
}
}
return
;
return
;
...
...
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