Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
accord-with-name
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
malin
accord-with-name
Commits
f2ac096c
Commit
f2ac096c
authored
Apr 15, 2021
by
malin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
r
parent
d15b7930
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
29 deletions
+14
-29
index.vue
src/views/Result/index.vue
+14
-29
No files found.
src/views/Result/index.vue
View file @
f2ac096c
...
@@ -100,8 +100,8 @@ export default {
...
@@ -100,8 +100,8 @@ export default {
const
n
=
JSON
.
parse
(
utils
.
getCookie
(
"baseInfo"
));
const
n
=
JSON
.
parse
(
utils
.
getCookie
(
"baseInfo"
));
this
.
baseInfo
=
n
?
n
:
[
"name"
,
"name"
];
this
.
baseInfo
=
n
?
n
:
[
"name"
,
"name"
];
this
.
_queryOrder
();
//
this._queryOrder();
//
this._fetchInfo();
this
.
_fetchInfo
();
},
},
methods
:
{
methods
:
{
...
@@ -114,31 +114,20 @@ export default {
...
@@ -114,31 +114,20 @@ export default {
orderId
:
orderId
,
orderId
:
orderId
,
};
};
API
.
API_fetchInfo
(
params
).
then
((
res
)
=>
{
API
.
API_fetchInfo
(
params
).
then
((
res
)
=>
{
// if (res.status != 200) {
if
(
res
.
status
!=
200
)
{
// setTimeout(() => {
// this.counter += 1;
// if (this.counter >= 80) {
// return;
// } else {
// this.is_result = false;
// return this._fetchInfo();
// }
// }, 1000);
// return;
// } else {
this
.
result
=
res
.
result
.
data
;
// this.is_result = true;
// }
if
(
res
.
result
.
data
==
null
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
counter
+=
1
;
this
.
counter
+=
1
;
if
(
this
.
counter
>=
80
)
{
if
(
this
.
counter
>=
80
)
{
return
;
return
;
}
else
{
}
else
{
this
.
is_result
=
false
;
return
this
.
_fetchInfo
();
return
this
.
_fetchInfo
();
}
}
},
1000
);
},
1000
);
return
;
return
;
}
else
{
this
.
result
=
res
.
result
.
data
;
this
.
is_result
=
true
;
}
}
});
});
},
},
...
@@ -158,24 +147,20 @@ export default {
...
@@ -158,24 +147,20 @@ export default {
};
};
API
.
API_gatewayQueryOrder
(
params
).
then
((
res
)
=>
{
API
.
API_gatewayQueryOrder
(
params
).
then
((
res
)
=>
{
let
status
=
res
.
result
.
data
.
status
;
let
status
=
res
.
result
.
data
.
status
;
// if (this.is_result == true) {
if
(
this
.
is_result
==
true
)
{
// return;
return
;
// }
}
this
.
is_result
=
false
;
if
(
status
==
200
)
{
if
(
status
==
200
)
{
this
.
_fetchInfo
();
this
.
is_result
=
true
;
return
;
return
;
}
else
{
}
else
{
// 支付不成功
// 支付不成功
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
this
.
countdown
>
1
)
{
if
(
this
.
countdown
==
1
)
{
return
this
.
$router
.
push
({
path
:
"/pay"
,
query
:
this
.
baseInfo
});
return
this
.
$router
.
push
({
path
:
"/pay"
,
query
:
this
.
baseInfo
});
}
else
{
}
this
.
countdown
+=
1
;
this
.
countdown
+=
1
;
this
.
_queryOrder
();
this
.
_queryOrder
();
}
},
2000
);
},
1000
);
}
}
});
});
},
},
...
...
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