Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Ygopro Arena Web
Commits
b849e68c
Commit
b849e68c
authored
Jul 13, 2023
by
铃兰
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
纠正api.js中的错误
parent
d6cce876
Pipeline
#22656
passed with stages
in 2 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
src/components/Profile.vue
src/components/Profile.vue
+0
-31
No files found.
src/components/Profile.vue
View file @
b849e68c
...
@@ -319,37 +319,6 @@ export default {
...
@@ -319,37 +319,6 @@ export default {
});
});
// 每月决斗记录数据获取
var
monthly
=
[];
function
fetchData
(
username
,
monthOffset
)
{
var
date
=
moment
().
subtract
(
monthOffset
,
'
months
'
).
format
(
'
YYYY-MM
'
);
// 发送请求获取数据
var
opt
=
{
username
:
username
,
season
:
date
};
return
API
.
getMonthlyHistory
(
opt
)
.
then
(
response
=>
{
const
res
=
response
.
data
;
// 判断是否有返回数据
if
(
res
&&
res
.
length
>
0
)
{
// 将每次收到的数据按照season从今日往更早的顺序存储在monthly数组中
console
.
log
(
opt
);
console
.
log
(
res
);
monthly
.
unshift
(...
res
);
// 继续请求前一个月的数据
return
fetchData
(
username
,
monthOffset
+
1
);
}
else
{
// 当不再返回数据时,结束递归,并返回最终的monthly数组
console
.
log
(
opt
);
console
.
log
(
'
之后没数据了
'
);
return
monthly
;
}});}
// 调用递归函数开始请求数据
fetchData
(
username
,
-
1
);
console
.
log
(
111
)
console
.
log
(
monthly
)
var
_this
=
this
;
var
_this
=
this
;
API
.
getFirstWin
({
username
:
username
}).
then
((
res
)
=>
{
API
.
getFirstWin
({
username
:
username
}).
then
((
res
)
=>
{
...
...
Tang Xinwei
@pokeboyexn
mentioned in commit
57c7d822
·
Jul 13, 2023
mentioned in commit
57c7d822
mentioned in commit 57c7d822c47d665357c670a7397783c04939d874
Toggle commit list
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