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
83ffd2bd
Commit
83ffd2bd
authored
Aug 26, 2021
by
ben.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:适配秒杀
parent
3903cd87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
.npmrc
.npmrc
+1
-0
index.vue
src/views/pay/index.vue
+7
-0
payResult.vue
src/views/pay/payResult.vue
+19
-6
No files found.
.npmrc
0 → 100644
View file @
83ffd2bd
registry=http://npmprivate.quantgroups.com/
\ No newline at end of file
src/views/pay/index.vue
View file @
83ffd2bd
...
...
@@ -216,6 +216,7 @@ export default {
}
},
mounted
()
{
this
.
setIsOrder
();
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
||
cookies
.
get
(
'
orderNo
'
)?.
orderNo
;
cookies
.
set
(
'
orderNo
'
,
{
orderNo
:
this
.
orderNo
});
if
(
this
.
$route
?.
query
?.
ocrflag
)
{
...
...
@@ -232,6 +233,12 @@ export default {
this
.
getCouponList
(
this
.
orderNo
);
},
methods
:
{
setIsOrder
()
{
const
{
hideOrder
}
=
this
.
$route
.
query
||
{};
if
(
hideOrder
)
{
localStorage
.
set
(
'
hideOrder
'
,
hideOrder
);
}
},
/* 查询支付信息 */
async
queryPayInfo
()
{
const
[
data
,
error
]
=
await
queryPayInfo
({
...
...
src/views/pay/payResult.vue
View file @
83ffd2bd
...
...
@@ -14,19 +14,19 @@
<p
v-if=
"freeAmount > 0"
class=
"info__text info__free"
>
已优惠¥
{{
freeAmount
}}
</p>
</div>
</div>
<p
class=
"tips"
>
<p
v-if=
"isOrder"
class=
"tips"
>
您可在“我的-我的订单”中查看详情
</p>
<div
class=
"actions
"
>
<div
:class=
"['actions', !isOrder && 'no-order']
"
>
<cr-button
shape=
"circle"
class=
"actions__back"
:plain=
"true"
type=
"primary"
@
click=
"goHome
(payStatus)
"
>
返回首页
</cr-button
@
click=
"goHome"
>
{{
returnUrl
?
'
返回秒杀
'
:
'
返回首页
'
}}
</cr-button
>
<cr-button
shape=
"circle"
type=
"primary"
@
click=
"goOrderList(payStatus)"
<cr-button
v-if=
"isOrder"
shape=
"circle"
type=
"primary"
@
click=
"goOrderList(payStatus)"
>
查看订单
</cr-button
>
</div>
...
...
@@ -54,6 +54,7 @@
<
script
>
import
RecoGoods
from
'
@/components/RecoGoods.vue
'
;
import
cookies
from
'
@/service/cookieStorage.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
{
goUrlExtends
}
from
'
./extends
'
;
export
default
{
components
:
{
RecoGoods
},
...
...
@@ -64,10 +65,13 @@ export default {
orderNo
:
null
,
isSuccess
:
false
,
freeAmount
:
0
,
payStatus
:
''
payStatus
:
''
,
returnUrl
:
''
,
isOrder
:
true
};
},
created
()
{
this
.
getQuery
();
const
{
orderNo
,
reason
}
=
this
.
$route
.
query
;
const
{
success
}
=
this
.
$route
.
meta
;
const
amount
=
cookies
.
get
(
'
amount
'
)
||
{};
...
...
@@ -82,6 +86,12 @@ export default {
});
},
methods
:
{
getQuery
()
{
this
.
returnUrl
=
cookies
.
get
(
'
returnUrl
'
)
||
''
;
if
(
localStorage
.
get
(
'
hideOrder
'
))
{
this
.
isOrder
=
false
;
}
},
goPay
()
{
this
.
$track
.
registeredEvents
(
'
h5_RechargeResultPageClick
'
,
{
pay_status
:
this
.
payStatus
,
...
...
@@ -141,6 +151,9 @@ export default {
flex-direction: row;
margin-top: @padding-lg;
justify-content: space-between;
&.no-order {
justify-content: center;
}
&__back {
color: @cherry-color-error;
border: 1px solid @cherry-color-error;
...
...
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