Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
50574203
Commit
50574203
authored
Jun 27, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
62c5332d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
21 deletions
+25
-21
alipay.vue
src/components/pay/alipay.vue
+25
-21
No files found.
src/components/pay/alipay.vue
View file @
50574203
...
@@ -7,30 +7,34 @@
...
@@ -7,30 +7,34 @@
<q-inner-loading
:showing=
"loading"
label=
"正在加載中"
></q-inner-loading>
<q-inner-loading
:showing=
"loading"
label=
"正在加載中"
></q-inner-loading>
<div
v-if=
"$q.platform.is.desktop && orderNo && payUrl!='' && !loading"
>
<div
v-if=
"$q.platform.is.desktop && orderNo && payUrl!='' && !loading"
>
<div
class=
"row justify-center"
>
<div
class=
"row justify-center"
>
<!--
<QrcodeVue
level=
"H"
size=
"200"
:value=
"payUrl"
class=
"light-shadow"
></QrcodeVue>
<div
style=
"text-align: center;"
>
<img
src=
"../../assets/img/pay/wx_tip.jpg"
class=
"q-ml-md"
style=
"height:200px;"
>
-->
<iframe
:src=
"payUrl"
scrolling=
"no"
style=
"width: 200px;height: 200px;"
frameborder=
"0"
></iframe>
</div>
<!--
<QrcodeVue
level=
"H"
size=
"200"
:value=
"payUrl"
class=
"light-shadow"
></QrcodeVue>
-->
<img
src=
"../../assets/img/pay/ali_tip.jpg"
class=
"q-ml-md"
style=
"height:200px;"
>
</div>
</div>
<div
class=
"text-body2 q-mt-lg text-grey-6"
>
請
點擊支付,前往支付寶(Alipay)支付,使用支付寶[掃一掃]掃描
二維碼進行支付
</div>
<div
class=
"text-body2 q-mt-lg text-grey-6"
>
請
打开支付寶(Alipay),使用 [掃一掃]掃描上方
二維碼進行支付
</div>
<div
class=
"q-mt-lg text-right"
>
<div
class=
"q-mt-lg text-right"
>
<q-btn
outline
dense
label=
"取消支付"
color=
"primary"
class=
"q-px-md q-mr-md"
@
click=
"cancelPayHandler"
></q-btn>
<q-btn
outline
dense
label=
"取消支付"
color=
"primary"
class=
"q-px-md q-mr-md"
@
click=
"cancelPayHandler"
></q-btn>
<q-btn
v-if=
"isPay"
unelevated
dense
label=
"已完成付款"
:loading=
"checkLoading"
color=
"primary"
class=
"q-px-md q-mr-md"
<!-- v-if="isPay" -->
<q-btn
unelevated
dense
label=
"已完成付款"
:loading=
"checkLoading"
color=
"primary"
class=
"q-px-md q-mr-md"
@
click=
"checkPaySatausHandler(1)"
></q-btn>
@
click=
"checkPaySatausHandler(1)"
></q-btn>
<!--
<q-btn
v-if=
"isPay"
unelevated
dense
label=
"退款"
:loading=
"checkLoading"
color=
"primary"
class=
"q-px-md"
<!--
<q-btn
v-if=
"isPay"
unelevated
dense
label=
"退款"
:loading=
"checkLoading"
color=
"primary"
class=
"q-px-md"
@
click=
"GetAliPayReturn"
></q-btn>
-->
@
click=
"GetAliPayReturn"
></q-btn>
-->
<
q-btn
v-if=
"!isPay"
unelevated
dense
label=
"支付"
:loading=
"checkLoading"
color=
"primary"
class=
"q-px-md"
@
click=
"Gotopay"
></q-btn
>
<
!--
<q-btn
v-if=
"!isPay"
unelevated
dense
label=
"支付"
:loading=
"checkLoading"
color=
"primary"
class=
"q-px-md"
@
click=
"Gotopay"
></q-btn>
--
>
</div>
</div>
</div>
</div>
<div
class=
"q-ma-xl"
v-if=
"!orderNo && !loading"
>
<div
class=
"q-ma-xl"
v-if=
"!orderNo && !loading"
>
創建付款連接失敗,請刷新頁面重試
創建付款連接失敗,請刷新頁面重試
</div>
</div>
</div>
</div>
</q-card>
</q-card>
</q-dialog>
</q-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -40,7 +44,7 @@ export default {
...
@@ -40,7 +44,7 @@ export default {
return
{
return
{
loading
:
true
,
loading
:
true
,
showDialog
:
true
,
showDialog
:
true
,
payUrl
:
'
weixin://wxpay/bizpayurl?pr=CDXqaD1zz
'
,
payUrl
:
''
,
checkLoading
:
false
,
checkLoading
:
false
,
isPay
:
true
isPay
:
true
}
}
...
@@ -61,7 +65,7 @@ export default {
...
@@ -61,7 +65,7 @@ export default {
},
},
methods
:
{
methods
:
{
Gotopay
(){
Gotopay
(){
this
.
OpenNewUrl
(
this
.
payUrl
)
this
.
OpenNewUrl
(
this
.
payUrl
)
},
},
initPayInfo
(){
initPayInfo
(){
this
.
apipost
(
"GetAliPayByOrderNo_post"
,{
OrderNo
:
this
.
orderNo
},
r
=>
{
this
.
apipost
(
"GetAliPayByOrderNo_post"
,{
OrderNo
:
this
.
orderNo
},
r
=>
{
...
@@ -77,34 +81,34 @@ export default {
...
@@ -77,34 +81,34 @@ export default {
if
(
r
.
data
.
resultCode
==
1
){
if
(
r
.
data
.
resultCode
==
1
){
if
(
r
.
data
.
data
.
OrderStatus
==
2
||
r
.
data
.
data
.
OrderStatus
==
3
){
if
(
r
.
data
.
data
.
OrderStatus
==
2
||
r
.
data
.
data
.
OrderStatus
==
3
){
if
(
type
==
1
){
if
(
type
==
1
){
this
.
CommonJump
(
"/paysuccess/"
+
this
.
orderNo
,
{});
this
.
CommonJump
(
"/paysuccess/"
+
this
.
orderNo
,
{});
}
}
}
else
{
}
else
{
this
.
isPay
=
false
this
.
isPay
=
false
if
(
type
==
1
){
if
(
type
==
1
){
this
.
$message
.
error
(
"當前訂單未支付,請您繼續完成訂單支付"
)
this
.
$message
.
error
(
"當前訂單未支付,請您繼續完成訂單支付"
)
}
}
}
}
}
else
{
}
else
{
this
.
isPay
=
false
this
.
isPay
=
false
if
(
type
==
1
){
if
(
type
==
1
){
location
.
reload
()
location
.
reload
()
}
}
}
}
},
e
=>
{
},
e
=>
{
this
.
isPay
=
false
this
.
isPay
=
false
})
})
},
},
// 支付宝退款
// 支付宝退款
GetAliPayReturn
(){
GetAliPayReturn
(){
this
.
apipost
(
"GetAliPayReturn_post"
,{
OrderNo
:
this
.
orderNo
},
r
=>
{
this
.
apipost
(
"GetAliPayReturn_post"
,{
OrderNo
:
this
.
orderNo
},
r
=>
{
if
(
r
.
data
.
message
==
"退款成功"
){
if
(
r
.
data
.
message
==
"退款成功"
){
this
.
$message
.
success
(
"退款成功"
)
this
.
$message
.
success
(
"退款成功"
)
}
else
{
}
else
{
this
.
$message
.
error
(
"退款失败"
)
this
.
$message
.
error
(
"退款失败"
)
}
}
},
e
=>
{
},
e
=>
{
})
})
},
},
cancelPayHandler
(){
cancelPayHandler
(){
...
@@ -116,4 +120,4 @@ export default {
...
@@ -116,4 +120,4 @@ export default {
<
style
>
<
style
>
</
style
>
</
style
>
\ No newline at end of file
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