Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cauchy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
cauchy-ui
Commits
a5f1eeb8
Commit
a5f1eeb8
authored
Jul 17, 2021
by
FE-安焕焕
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改参数存储方式
parent
cf17d062
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
cookieStorage.service.js
src/service/cookieStorage.service.js
+1
-1
extends.js
src/views/pay/extends.js
+3
-3
index.vue
src/views/pay/index.vue
+6
-5
payResult.vue
src/views/pay/payResult.vue
+2
-2
No files found.
src/service/cookieStorage.service.js
View file @
a5f1eeb8
import
cookies
from
'
js-cookie
'
;
const
option
=
{
domain
:
window
.
location
.
host
.
indexOf
(
'
.q-gp.com
'
)
>=
0
?
'
.q-gp.com
'
:
''
,
expires
:
365
expires
:
1
};
const
Cookies
=
{
get
(
key
)
{
...
...
src/views/pay/extends.js
View file @
a5f1eeb8
import
localStorage
from
'
@/service/local
Storage.service
'
;
import
cookies
from
'
@/service/cookie
Storage.service
'
;
export
const
goUrlExtends
=
{
methods
:
{
goHome
()
{
...
...
@@ -20,7 +20,7 @@ export const goUrlExtends = {
},
goOrderDetail
()
{
const
returnUrl
=
this
.
getReturnUrl
();
const
orderNo
=
localStorage
.
get
(
'
orderNo
'
)?.
orderNo
;
const
orderNo
=
cookies
.
get
(
'
orderNo
'
)?.
orderNo
;
if
(
returnUrl
)
{
window
.
location
.
replace
(
`
${
returnUrl
}
/orderDetail?orderNo=
${
orderNo
}
`
);
return
;
...
...
@@ -31,7 +31,7 @@ export const goUrlExtends = {
});
},
getReturnUrl
()
{
const
returnUrl
=
localStorage
.
get
(
'
returnUrl
'
,
'
sessionStorage
'
);
const
returnUrl
=
cookies
.
get
(
'
returnUrl
'
);
return
returnUrl
;
}
}
...
...
src/views/pay/index.vue
View file @
a5f1eeb8
...
...
@@ -97,6 +97,7 @@ import { registeredEvents } from '@/service/sa.service';
import
localStorage
from
'
@/service/localStorage.service
'
;
import
{
throttle
}
from
'
@/service/utils.service
'
;
import
{
goUrlExtends
}
from
'
./extends
'
;
import
cookies
from
'
@/service/cookieStorage.service
'
;
import
{
codeArr
,
payTypeE
,
...
...
@@ -204,7 +205,7 @@ export default {
}
},
mounted
()
{
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
;
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
||
cookies
.
get
(
'
orderNo
'
)?.
orderNo
;
this
.
queryPayInfo
();
this
.
getCouponList
(
this
.
orderNo
);
},
...
...
@@ -397,7 +398,7 @@ export default {
this
.
retrieveLink
();
return
;
}
localStorage
.
set
(
'
orderNo
'
,
{
orderNo
:
this
.
orderNo
});
cookies
.
set
(
'
orderNo
'
,
{
orderNo
:
this
.
orderNo
});
const
paramsData
=
{
...
params
,
quitUrl
:
`
${
window
.
location
.
origin
}
/payWaiting`
,
...
...
@@ -470,7 +471,7 @@ export default {
?
this
.
displayInfo
.
orderAmt
||
'
0.00
'
:
(
this
.
displayInfo
.
orderAmt
-
this
.
selectedCoupon
.
faceValue
||
0
).
toFixed
(
2
);
const
freeAmount
=
this
.
showCoupon
?
this
.
selectedCoupon
.
faceValue
||
'
0.00
'
:
'
0.00
'
;
localStorage
.
set
(
'
amount
'
,
{
finalAmt
,
freeAmount
});
cookies
.
set
(
'
amount
'
,
{
finalAmt
,
freeAmount
});
/* 跳转支付结果页面 */
this
.
$router
.
replace
({
name
:
`pay
${
type
}
`
,
...
...
@@ -534,12 +535,12 @@ export default {
}
const
[{
url
}]
=
await
h5AppyUrl
();
if
(
!
url
)
return
;
window
.
location
.
href
=
url
;
window
.
location
.
href
=
`
${
url
}
&returnUrl=
${
window
.
location
.
origin
}
/pay`
;
},
async
getKaGetNextUrl
()
{
const
[{
nextUrl
}]
=
await
kaGetNextUrl
();
if
(
!
nextUrl
)
return
;
window
.
location
.
href
=
`
${
nextUrl
}
&returnUrl=
${
window
.
location
.
href
}
`
;
window
.
location
.
href
=
`
${
nextUrl
}
&returnUrl=
${
window
.
location
.
origin
}
/pay
`
;
},
/* 走h5活体流程 */
async
goOcr
()
{
...
...
src/views/pay/payResult.vue
View file @
a5f1eeb8
...
...
@@ -47,7 +47,7 @@
<
script
>
import
{
registeredEvents
}
from
'
@/service/sa.service
'
;
import
RecoGoods
from
'
@/components/RecoGoods.vue
'
;
import
localStorage
from
'
@/service/local
Storage.service
'
;
import
cookies
from
'
@/service/cookie
Storage.service
'
;
import
{
goUrlExtends
}
from
'
./extends
'
;
export
default
{
components
:
{
RecoGoods
},
...
...
@@ -63,7 +63,7 @@ export default {
created
()
{
const
{
orderNo
,
reason
}
=
this
.
$route
.
query
;
const
{
success
}
=
this
.
$route
.
meta
;
const
amount
=
localStorage
.
get
(
'
amount
'
);
const
amount
=
cookies
.
get
(
'
amount
'
);
this
.
money
=
amount
.
finalAmt
;
this
.
orderNo
=
orderNo
;
this
.
reason
=
reason
||
''
;
...
...
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