Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
748bebce
Commit
748bebce
authored
Oct 14, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0f1a5ca5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
5 deletions
+72
-5
payURL.vue
src/components/commonPage/payURL.vue
+72
-5
No files found.
src/components/commonPage/payURL.vue
View file @
748bebce
<
template
>
<div
class=
"templatePayURL"
style=
"display: inline-block; float: right; margin-right: 10px;"
>
<el-popover
width=
"320"
trigger=
"manual"
v-model=
"
visible"
>
<div>
<el-popover
width=
"320"
trigger=
"manual"
v-model=
"
alipayVisible"
>
<div
v-if=
"QrCodeType==0"
>
<p
style=
"margin:0 0 15px 0;"
>
二维码收款
<i
class=
"el-icon-circle-close-outline fr"
style=
"cursor: pointer; margin: 3px 0 0 0;"
@
click=
"closePic()"
></i>
</p>
...
...
@@ -29,6 +29,32 @@
<p
class=
"fz12 color333"
>
倒计时
</p>
<p
style=
"color: #E95252; font-weight: bold; font-size: 12px; margin: 8px 0;"
>
{{
descMin
}}
分
{{
descSecond
}}
秒
</p>
</div>
</div>
<div
v-if=
"QrCodeType==1"
>
<p
style=
"margin:0 0 15px 0;"
>
支付宝二维码收款
<i
class=
"el-icon-circle-close-outline fr"
style=
"cursor: pointer; margin: 3px 0 0 0;"
@
click=
"closePic()"
></i>
</p>
<div
style=
"margin: 15px 0;"
v-show=
"!isShowPic"
>
<el-input
placeholder=
"请输入金额"
v-model=
"payMoney"
@
input=
"payMoney=/^\d+\.?\d
{0,2}$/.test(payMoney)||payMoney == '' ? payMoney : payMoney=''">
</el-input>
<p
style=
"margin-top:5px;"
>
<input
type=
"button"
@
click=
"getAliPayDetail(item,2)"
class=
"normalBtn w280"
value=
"生成收款码"
/>
</p>
</div>
<div
v-show=
"isShowPic"
>
<img
:src=
"'data:image/png;base64,'+payPic"
style=
"float: left; margin-right: 15px; width: 150px; height: 150px; border: 1px solid #ccc;"
/>
<p
style=
"padding-right: 10px; font-size: 12px; line-height: 20px; margin-bottom: 10px;"
>
<span
style=
"color: #E95252;"
>
{{
payWay
==
"1"
?
'微信'
:
'支付宝'
}}
</span>
二维码有效时间为
<template
v-if=
"QrCodeType==1"
>
2小时
</
template
>
<
template
v-else
>
5分钟
</
template
>
,为了不影响客户支付,请及时转发,以免失效
</p>
<
template
>
<p
class=
"fz12 color333"
>
倒计时
</p>
<p
style=
"color: #E95252; font-weight: bold; font-size: 12px; margin: 8px 0;"
>
{{
descMin
}}
分
{{
descSecond
}}
秒
</p>
</
template
>
</div>
</div>
<el-select
slot=
"reference"
v-model=
"value"
class=
'w80'
placeholder=
"收款方式"
@
change=
'chanceType(item)'
>
<!-- <el-option label="二维码" value="1"></el-option> -->
...
...
@@ -37,6 +63,7 @@
<el-option
label=
"团队小费"
value=
"4"
></el-option>
<el-option
v-if=
"photoF"
label=
"照片服务费"
value=
"5"
></el-option>
<el-option
label=
"月结平台费"
value=
"6"
></el-option>
<el-option
label=
"支付宝二维码"
value=
"7"
v-if=
"false"
></el-option>
</el-select>
</el-popover>
</div>
...
...
@@ -49,6 +76,7 @@
return
{
value
:
''
,
visible
:
false
,
alipayVisible
:
false
,
payObj
:
{},
payWay
:
'3'
,
minpay
:
'0'
,
...
...
@@ -67,7 +95,8 @@
begin
:
0
,
nowDate
:
new
Date
(),
timer
:
null
,
chaTime
:
0
chaTime
:
0
,
QrCodeType
:
0
,
};
},
watch
:{
...
...
@@ -93,7 +122,8 @@
},
methods
:
{
closePic
(){
this
.
visible
=
false
this
.
visible
=
false
;
this
.
alipayVisible
=
false
;
this
.
value
=
''
if
(
this
.
timer
)
{
...
...
@@ -216,6 +246,13 @@
}
});
}
else
if
(
this
.
value
===
'7'
)
{
this
.
alipayVisible
=
true
;
this
.
QrCodeType
=
1
;
//this.getAliPayDetail(obj,2)
//this.$emit("childByValue",obj.orderId)
}
this
.
value
=
''
},
getPayDetail
(
obj
,
Type
)
{
...
...
@@ -257,7 +294,36 @@
// }
},
getAliPayDetail
(
obj
,
Type
)
{
let
nowTime
=
new
Date
()
let
ExpireDate
=
''
this
.
apipost
(
'alipay_post_AlipayTradePrecreate'
,
{
orderId
:
obj
.
orderId
,
PayMoney
:
this
.
payMoney
,
//OrderType: obj.OrderType,
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
lastTime
=
new
Date
();
//res.data.data.ExpireDate
this
.
nowDate
=
this
.
lastTime
;
//res.data.data.ExpireDate
this
.
lastTime
=
new
Date
(
this
.
lastTime
.
valueOf
()
+
2
*
60
*
60
*
1000
);
//=new Date();//res.data.data.NowDate
//this.lastTime.getHours()+2;
this
.
lastTime
=
new
Date
(
this
.
lastTime
.
valueOf
()
-
5000
);
console
.
log
(
"this.lastTime"
,
this
.
lastTime
);
console
.
log
(
"this.nowDate"
,
this
.
nowDate
);
this
.
chaTime
=
this
.
lastTime
-
this
.
nowDate
ExpireDate
=
new
Date
(
res
.
data
.
data
.
ExpireDate
)
this
.
timer
=
setInterval
(()
=>
{
this
.
descTime
(
this
.
chaTime
)
},
1000
);
this
.
payPic
=
res
.
data
.
data
.
QrCode
this
.
isShowPic
=
true
}
else
{
this
.
$message
.
warning
(
'获取支付宝二维码失败'
)
}
},
err
=>
{})
},
getCodeUrl
(
obj
)
{
this
.
apipost
(
'Financial_post_GetLowPrice'
,
{
OrderID
:
obj
.
orderId
,
...
...
@@ -332,6 +398,7 @@
// // 一秒后递归
// },
descTime
()
{
console
.
log
(
"this.chaTime"
,
this
.
chaTime
);
let
day
=
parseInt
(
this
.
chaTime
/
1000
/
60
/
60
/
24
)
let
hr
=
parseInt
(
this
.
chaTime
/
1000
/
60
/
60
%
24
)
let
min
=
parseInt
(
this
.
chaTime
/
1000
/
60
%
60
)
...
...
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