Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
hrs_app_h5
/
bill
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
deabca22
authored
Jul 13, 2020
by
cocomilk2012
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
cc93afe4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
34 deletions
src/views/Bill/index.vue
src/views/Bill/index.vue
View file @
deabca22
...
...
@@ -7,17 +7,29 @@
<div
class=
"header"
>
<div
class=
"header_date_time"
>
<div
class=
"choose-month"
>
<div
class=
"arrow-l"
:class=
"hideL?'hideDiv':''"
@
click=
"chooseMonth('left')"
>
<div
class=
"arrow-l"
:class=
"hideL ? 'hideDiv' : ''"
@
click=
"chooseMonth('left')"
>
<img
src=
"../../assets/images/triangle-arrow-l.png"
alt
/>
</div>
<div
class=
"month"
>
{{
period
[
currentPerIndex
].
name
}}
</div>
<div
class=
"arrow-r"
:class=
"hideR?'hideDiv':''"
@
click=
"chooseMonth('right')"
>
<div
class=
"month"
>
{{
period
[
currentPerIndex
].
name
}}
</div>
<div
class=
"arrow-r"
:class=
"hideR ? 'hideDiv' : ''"
@
click=
"chooseMonth('right')"
>
<img
src=
"../../assets/images/triangle-arrow-r.png"
alt
/>
</div>
</div>
<div
class=
"cycle"
>
<span>
入账周期:
</span>
<span>
{{
period
[
currentPerIndex
].
beginDate
|
periodMoment
}}
-
{{
period
[
currentPerIndex
].
endDate
|
periodMoment
}}
</span>
<span
>
{{
period
[
currentPerIndex
].
beginDate
|
periodMoment
}}
-
{{
period
[
currentPerIndex
].
endDate
|
periodMoment
}}
</span
>
</div>
</div>
<div
class=
"header_box"
>
...
...
@@ -25,18 +37,19 @@
<div
class=
"header_content"
>
<div
class=
"fund"
>
<span>
账户余额
</span>
<i>
{{
data
.
balance
|
moneyNum
}}
</i>
<i>
{{
data
.
balance
|
moneyNum
}}
</i>
</div>
<div
class=
"paid"
>
<span>
待付金额
</span>
<i
class=
"paid_color"
>
{{
data
.
waitPay
|
moneyNum
}}
</i>
<i
class=
"paid_color"
>
{{
data
.
waitPay
|
moneyNum
}}
</i>
</div>
</div>
<div
class=
"header_info"
>
<div
class=
"left"
@
click=
"toPay()"
>
<div
class=
"left"
@
click=
"toPay
_old
()"
>
<img
src=
"../../assets/images/icon01.png"
alt
/>
<span>
充值
</span>
</div>
<div
class=
"right"
@
click=
"toPage(2)"
>
<img
src=
"../../assets/images/icon02.png"
alt
/>
<span>
资金记录
</span>
...
...
@@ -53,7 +66,7 @@
</div>
<p>
<span>
托收金额
</span>
<i>
{{
data
.
hosting
.
amount
|
moneyNum
}}
</i>
<i>
{{
data
.
hosting
.
amount
|
moneyNum
}}
</i>
</p>
</div>
...
...
@@ -66,11 +79,11 @@
</div>
<p>
<span>
应付金额
</span>
<i>
{{
data
.
socical
.
total
|
moneyNum
}}
</i>
<i>
{{
data
.
socical
.
total
|
moneyNum
}}
</i>
</p>
<p>
<span>
待付金额
</span>
<i>
{{
data
.
socical
.
waitPay
|
moneyNum
}}
</i>
<i>
{{
data
.
socical
.
waitPay
|
moneyNum
}}
</i>
</p>
</div>
<!--公积金代理 accumulation-->
...
...
@@ -81,11 +94,11 @@
</div>
<p>
<span>
应付金额
</span>
<i>
{{
data
.
fund
.
total
|
moneyNum
}}
</i>
<i>
{{
data
.
fund
.
total
|
moneyNum
}}
</i>
</p>
<p>
<span>
待付金额
</span>
<i>
{{
data
.
fund
.
waitPay
|
moneyNum
}}
</i>
<i>
{{
data
.
fund
.
waitPay
|
moneyNum
}}
</i>
</p>
</div>
<!--个税代理 income-->
...
...
@@ -96,11 +109,11 @@
</div>
<p>
<span>
应付金额
</span>
<i>
{{
data
.
tax
.
total
|
moneyNum
}}
</i>
<i>
{{
data
.
tax
.
total
|
moneyNum
}}
</i>
</p>
<p>
<span>
待付金额
</span>
<i>
{{
data
.
tax
.
waitPay
|
moneyNum
}}
</i>
<i>
{{
data
.
tax
.
waitPay
|
moneyNum
}}
</i>
</p>
</div>
<!--服务费 service-->
...
...
@@ -111,11 +124,11 @@
</div>
<p>
<span>
应付金额
</span>
<i>
{{
data
.
service
.
total
|
moneyNum
}}
</i>
<i>
{{
data
.
service
.
total
|
moneyNum
}}
</i>
</p>
<p>
<span>
待付金额
</span>
<i>
{{
data
.
service
.
waitPay
|
moneyNum
}}
</i>
<i>
{{
data
.
service
.
waitPay
|
moneyNum
}}
</i>
</p>
</div>
<!--会员年费 vip-->
...
...
@@ -126,11 +139,11 @@
</div>
<p>
<span>
应付金额
</span>
<i>
{{
data
.
annual
.
total
|
moneyNum
}}
</i>
<i>
{{
data
.
annual
.
total
|
moneyNum
}}
</i>
</p>
<p>
<span>
待付金额
</span>
<i>
{{
data
.
annual
.
waitPay
|
moneyNum
}}
</i>
<i>
{{
data
.
annual
.
waitPay
|
moneyNum
}}
</i>
</p>
</div>
<!--其他事务办理 general-->
...
...
@@ -141,11 +154,11 @@
</div>
<p>
<span>
应付金额
</span>
<i>
{{
data
.
other
.
total
|
moneyNum
}}
</i>
<i>
{{
data
.
other
.
total
|
moneyNum
}}
</i>
</p>
<p>
<span>
待付金额
</span>
<i>
{{
data
.
other
.
waitPay
|
moneyNum
}}
</i>
<i>
{{
data
.
other
.
waitPay
|
moneyNum
}}
</i>
</p>
</div>
</div>
...
...
@@ -175,6 +188,7 @@ export default {
currentPerName
:
""
,
period
:
[{
name
:
""
}],
payUrl
:
""
,
nativePayUrl
:
""
,
data
:
{
balance
:
0
,
waitPay
:
0
,
...
...
@@ -234,6 +248,34 @@ export default {
"loadPayUrl"
]),
toPay
()
{
//TODO:根据UA判断:如果App版本
<
2.1
.
9
就走原来的充值逻辑;如果
App
版本
>=
2.1
.
9
就走新的充值逻辑;
const
userAgent
=
navigator
.
userAgent
.
toLowerCase
();
if
(
userAgent
.
indexOf
(
"qqxbua"
)
!=
-
1
)
{
let
tempArr
=
userAgent
.
split
(
"qqxbua:"
);
if
(
tempArr
.
length
>
1
)
{
const
tempStr
=
tempArr
[
1
];
const
QQXBUA
=
JSON
.
parse
(
tempStr
);
let
version
=
QQXBUA
.
version
;
console
.
log
(
"version="
,
version
);
if
(
version
<
"2.1.9"
)
{
this
.
toPay_old
();
}
else
{
this
.
toPay_new
();
}
}
}
else
{
this
.
toPay_old
();
}
},
toPay_new
()
{
console
.
log
(
"topay_new"
);
//TODO:先弹出一个遮罩层,点击任意按钮刷新页面
this
.
$bridge
.
getActionUrl
(
this
.
nativePayUrl
).
then
(
res
=>
{
console
.
log
(
"getActionUrl in bill index"
);
});
},
toPay_old
()
{
console
.
log
(
"topay_old"
);
this
.
$bridge
.
setPageNavState
({
headerColor
:
"#fff"
,
...
...
@@ -253,23 +295,23 @@ export default {
barColor
:
"#ffffff"
})
.
then
(
res
=>
{});
const
failUrl
=
encodeURIComponent
(
"https://pay.qinqinxiaobao.com/callback/fail"
);
const
successUrl
=
encodeURIComponent
(
"https://pay.qinqinxiaobao.com/callback/success"
);
console
.
log
(
"setBarColor"
);
const
failUrl
=
encodeURIComponent
(
"https://pay.qinqinxiaobao.com/callback/fail"
);
const
successUrl
=
encodeURIComponent
(
"https://pay.qinqinxiaobao.com/callback/success"
);
const
payMethod
=
0
;
const
payType
=
4
;
const
selected
=
0
;
const
fee
=
this
.
data
.
waitPay
;
let
payUrl
=
`
${
this
.
payUrl
}
&accountId=
${
this
.
currentPerId
}
&payMethod=
${
payMethod
}
&payType=
${
payType
}
&fee=
${
fee
}
&selected=0&failUrl=
${
failUrl
}
&successUrl=
${
successUrl
}
`
;
window
.
onpageshow
=
null
;
window
.
onpageshow
=
function
(
event
){
console
.
log
(
"old_pay_url="
,
payUrl
);
window
.
onpageshow
=
null
;
window
.
onpageshow
=
function
(
event
)
{
//event.persisted是否是缓存
location
.
reload
();
}
window
.
location
.
href
=
payUrl
;
};
console
.
log
(
'window.onpageshow '
);
//window.location.href = payUrl;
window
.
location
.
href
=
"http://www.baidu.com"
;
},
toPage
(
flag
)
{
switch
(
flag
)
{
...
...
@@ -385,6 +427,8 @@ export default {
data
=>
{
this
.
data
.
balance
=
data
.
balance
;
this
.
data
.
waitPay
=
data
.
waitPay
;
this
.
nativePayUrl
=
`hrs100://native/SelectRechargeMode?periodId=
${
this
.
currentPerId
}
&fee=
${
this
.
data
.
waitPay
}
`
;
console
.
log
(
"this.nativePayUrl="
,
this
.
nativePayUrl
);
},
err
=>
{
console
.
log
(
err
);
...
...
@@ -447,7 +491,7 @@ export default {
setBarHeightLowBee
()
{
setTimeout
(()
=>
{
const
barHeight
=
localStorage
.
getItem
(
"barHeight"
);
console
.
log
(
'barHeight='
,
barHeight
);
console
.
log
(
"barHeight="
,
barHeight
);
const
conHeight
=
46
+
parseInt
(
barHeight
);
const
dom
=
document
.
getElementsByClassName
(
"iosStyle"
)[
0
];
if
(
dom
)
{
...
...
@@ -514,11 +558,10 @@ export default {
this
.
setBarHeightLowBee
();
this
.
globalNavLeftArrowClick
(
this
.
navLeftArrowClick
);
await
this
.
loadPeriodData
();
},
async
created
()
{
this
.
payUrl
=
localStorage
.
getItem
(
"payUrl"
);
console
.
log
(
'this.payUrl='
,
this
.
payUrl
);
console
.
log
(
"this.payUrl="
,
this
.
payUrl
);
if
(
!
this
.
payUrl
)
{
this
.
payUrl
=
await
this
.
loadPayUrl
();
localStorage
.
setItem
(
"payUrl"
,
this
.
payUrl
);
...
...
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