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
59eaf80b
authored
Jul 15, 2020
by
cocomilk2012
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
60de14f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
22 deletions
src/router/index.js
src/views/Bill/index.vue
src/views/More/index.vue
src/router/index.js
View file @
59eaf80b
...
@@ -86,7 +86,7 @@ async function getToken(access_token, appid, redirectPath) {
...
@@ -86,7 +86,7 @@ async function getToken(access_token, appid, redirectPath) {
}
}
)
)
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
"
456err
="
,
err
);
console
.
log
(
"
err0716
="
,
err
);
});
});
}
}
...
...
src/views/Bill/index.vue
View file @
59eaf80b
...
@@ -257,19 +257,7 @@ export default {
...
@@ -257,19 +257,7 @@ export default {
//TODO:安卓的单独判断
//TODO:安卓的单独判断
try
{
try
{
const
userAgent
=
navigator
.
userAgent
.
toLowerCase
();
const
userAgent
=
navigator
.
userAgent
.
toLowerCase
();
let
isAndroid
=
userAgent
.
indexOf
(
"android"
)
>
-
1
||
userAgent
.
indexOf
(
"adr"
)
>
-
1
;
//android终端
if
(
userAgent
.
indexOf
(
"qqxbua"
)
!=
-
1
)
{
if
(
isAndroid
)
{
console
.
log
(
'android'
);
let
temp
=
userAgent
.
split
(
"teammix/"
)[
1
];
let
version
=
temp
.
split
(
"(android"
)[
0
];
console
.
log
(
"version="
,
version
);
if
(
version
<
"2.1.9"
)
{
this
.
toPay_old
();
}
else
{
this
.
toPay_new
();
}
}
else
if
(
userAgent
.
indexOf
(
"qqxbua"
)
!=
-
1
)
{
console
.
log
(
'ios'
);
console
.
log
(
'ios'
);
let
tempArr
=
userAgent
.
split
(
"qqxbua:"
);
let
tempArr
=
userAgent
.
split
(
"qqxbua:"
);
if
(
tempArr
.
length
>
1
)
{
if
(
tempArr
.
length
>
1
)
{
...
@@ -293,7 +281,6 @@ export default {
...
@@ -293,7 +281,6 @@ export default {
},
},
toPay_new
()
{
toPay_new
()
{
console
.
log
(
"topay_new"
);
console
.
log
(
"topay_new"
);
//TODO:先弹出一个遮罩层,点击任意按钮刷新页面
this
.
$bridge
.
getActionUrl
(
this
.
nativePayUrl
).
then
(
res
=>
{
this
.
$bridge
.
getActionUrl
(
this
.
nativePayUrl
).
then
(
res
=>
{
console
.
log
(
"getActionUrl in bill index"
);
console
.
log
(
"getActionUrl in bill index"
);
});
});
...
...
src/views/More/index.vue
View file @
59eaf80b
...
@@ -10,11 +10,11 @@
...
@@ -10,11 +10,11 @@
<div
class=
"header_content"
>
<div
class=
"header_content"
>
<div
class=
"fund"
>
<div
class=
"fund"
>
<span>
账户余额
</span>
<span>
账户余额
</span>
<i>
{{
summary
.
balance
|
moneyNum
}}
</i>
<i>
{{
summary
.
balance
|
moneyNum
}}
</i>
</div>
</div>
<div
class=
"paid"
>
<div
class=
"paid"
>
<span>
待付金额
</span>
<span>
待付金额
</span>
<i
class=
"paid_color"
>
{{
summary
.
waitPay
|
moneyNum
}}
</i>
<i
class=
"paid_color"
>
{{
summary
.
waitPay
|
moneyNum
}}
</i>
</div>
</div>
</div>
</div>
<div
class=
"header_info"
>
<div
class=
"header_info"
>
...
@@ -37,11 +37,11 @@
...
@@ -37,11 +37,11 @@
</div>
</div>
<p>
<p>
<span>
应付金额
</span>
<span>
应付金额
</span>
<i>
{{
item
.
totalAmount
|
moneyNum
}}
</i>
<i>
{{
item
.
totalAmount
|
moneyNum
}}
</i>
</p>
</p>
<p>
<p>
<span>
待付金额
</span>
<span>
待付金额
</span>
<i>
{{
item
.
waitPayAmount
|
moneyNum
}}
</i>
<i>
{{
item
.
waitPayAmount
|
moneyNum
}}
</i>
</p>
</p>
</div>
</div>
</div>
</div>
...
@@ -75,6 +75,44 @@ export default {
...
@@ -75,6 +75,44 @@ export default {
methods
:
{
methods
:
{
...
mapActions
([
"loadMoreList"
,
"loadMoreSummary"
,
"loadPayUrl"
]),
...
mapActions
([
"loadMoreList"
,
"loadMoreSummary"
,
"loadPayUrl"
]),
toPay
()
{
toPay
()
{
window
.
onpageshow
=
null
;
window
.
onpageshow
=
function
(
event
)
{
//event.persisted是否是缓存
location
.
reload
();
};
//根据UA判断:如果App版本
<
2.1
.
9
就走原来的充值逻辑;如果
App
版本
>=
2.1
.
9
就走新的充值逻辑;
//TODO:安卓的单独判断
try
{
const
userAgent
=
navigator
.
userAgent
.
toLowerCase
();
if
(
userAgent
.
indexOf
(
"qqxbua"
)
!=
-
1
)
{
console
.
log
(
"ios"
);
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
();
}
}
catch
(
error
)
{
console
.
log
(
error
);
this
.
toPay_old
();
}
},
toPay_new
()
{
console
.
log
(
"topay_new"
);
this
.
$bridge
.
getActionUrl
(
this
.
nativePayUrl
).
then
(
res
=>
{
console
.
log
(
"getActionUrl in bill index"
);
});
},
toPay_old
()
{
this
.
$bridge
.
setPageNavState
({
this
.
$bridge
.
setPageNavState
({
headerColor
:
"#fff"
,
headerColor
:
"#fff"
,
isShowClose
:
false
,
isShowClose
:
false
,
...
@@ -98,10 +136,10 @@ export default {
...
@@ -98,10 +136,10 @@ export default {
);
);
let
payUrl
=
`
${
this
.
payUrl
}
&accountType=19&selected=0&failUrl=
${
failUrl
}
&successUrl=
${
successUrl
}
`
;
let
payUrl
=
`
${
this
.
payUrl
}
&accountType=19&selected=0&failUrl=
${
failUrl
}
&successUrl=
${
successUrl
}
`
;
console
.
log
(
"payUrl="
,
payUrl
);
console
.
log
(
"payUrl="
,
payUrl
);
window
.
onpageshow
=
null
;
window
.
onpageshow
=
null
;
window
.
onpageshow
=
function
(
event
)
{
window
.
onpageshow
=
function
(
event
)
{
location
.
reload
();
location
.
reload
();
}
}
;
window
.
location
.
href
=
payUrl
;
window
.
location
.
href
=
payUrl
;
},
},
toPage
()
{
toPage
()
{
...
@@ -119,6 +157,8 @@ export default {
...
@@ -119,6 +157,8 @@ export default {
data
=>
{
data
=>
{
this
.
summary
=
data
;
this
.
summary
=
data
;
console
.
log
(
"this.summary="
,
this
.
summary
);
console
.
log
(
"this.summary="
,
this
.
summary
);
this
.
nativePayUrl
=
`hrs100://native/SelectRechargeMode?periodId=
${
this
.
currentPerId
}
&fee=
${
this
.
summary
.
waitPay
}
`
;
console
.
log
(
"this.nativePayUrl="
,
this
.
nativePayUrl
);
},
},
err
=>
{
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
...
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