Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
软件工程实践2022年春W班
穿梭在银河的火箭队
FZUStudyRoom
提交
0ff58e30
F
FZUStudyRoom
项目概览
软件工程实践2022年春W班
/
穿梭在银河的火箭队
/
FZUStudyRoom
通知
12
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FZUStudyRoom
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0ff58e30
编写于
5月 13, 2022
作者:
YYYTDMS
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
330_调整4.0
上级
39f10702
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
49 addition
and
5 deletion
+49
-5
component/Mine/Data/Achievement/index.js
component/Mine/Data/Achievement/index.js
+13
-1
component/Mine/Data/Analysis/index.js
component/Mine/Data/Analysis/index.js
+10
-0
component/Mine/Data/Outline/index.js
component/Mine/Data/Outline/index.js
+10
-1
component/Mine/Data/Rank/index.js
component/Mine/Data/Rank/index.js
+1
-0
component/Mine/person.js
component/Mine/person.js
+12
-0
component/OnlineStudy/RangePKStudy/index.js
component/OnlineStudy/RangePKStudy/index.js
+3
-3
未找到文件。
component/Mine/Data/Achievement/index.js
浏览文件 @
0ff58e30
...
...
@@ -26,10 +26,21 @@ class Achievement extends Component {
modalIndex
:
0
,
size
:
0
,
achievements
:
[],
hasFresh
:
false
,
}
this
.
getAchievements
=
this
.
getAchievements
.
bind
(
this
);
}
componentDidUpdate
(){
if
(
this
.
props
.
show
&&!
this
.
state
.
hasFresh
){
this
.
getAchievements
();
this
.
setState
({
hasFresh
:
true
})
}
if
(
!
this
.
props
.
show
&&
this
.
state
.
hasFresh
){
this
.
setState
({
hasFresh
:
false
})
}
}
async
componentDidMount
()
{
await
this
.
getAchievements
();
}
...
...
@@ -45,6 +56,7 @@ class Achievement extends Component {
.
then
(
function
(
res
)
{
tmp
=
res
.
data
.
data
;
//console.log(tmp)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
)
...
...
@@ -106,7 +118,7 @@ class Achievement extends Component {
transparent
=
{
true
}
visible
=
{
this
.
state
.
modalVisible
}
onRequestClose
=
{()
=>
{
alert
(
"
Modal has been closed.
"
);
//
alert("Modal has been closed.");
this
.
setState
({
modalVisible
:
false
});
}}
>
...
...
component/Mine/Data/Analysis/index.js
浏览文件 @
0ff58e30
...
...
@@ -37,12 +37,22 @@ class Analysis extends Component {
user_id
:
''
,
records
:
[],
start_date
:
''
,
hasFresh
:
false
,
}
this
.
getStudyRecords
=
this
.
getStudyRecords
.
bind
(
this
);
this
.
getAnalysis
=
this
.
getAnalysis
.
bind
(
this
);
}
componentDidUpdate
(){
if
(
this
.
props
.
show
&&!
this
.
state
.
hasFresh
){
this
.
getAnalysis
();
this
.
setState
({
hasFresh
:
true
})
}
if
(
!
this
.
props
.
show
&&
this
.
state
.
hasFresh
){
this
.
setState
({
hasFresh
:
false
})
}
}
componentDidMount
()
{
this
.
getAnalysis
();
...
...
component/Mine/Data/Outline/index.js
浏览文件 @
0ff58e30
...
...
@@ -24,11 +24,20 @@ class Outline extends Component {
days
:[],
size
:
0
,
records
:
[],
hasFresh
:
false
,
}
this
.
getstudyRecords
=
this
.
getstudyRecords
.
bind
(
this
);
}
componentDidUpdate
(){
if
(
this
.
props
.
show
&&!
this
.
state
.
hasFresh
){
this
.
getstudyRecords
();
this
.
setState
({
hasFresh
:
true
})
}
if
(
!
this
.
props
.
show
&&
this
.
state
.
hasFresh
){
this
.
setState
({
hasFresh
:
false
})
}
}
async
componentDidMount
()
{
await
this
.
getstudyRecords
();
...
...
component/Mine/Data/Rank/index.js
浏览文件 @
0ff58e30
...
...
@@ -56,6 +56,7 @@ class Rank extends Component {
tmp
.
ranks
.
map
((
item
,
index
)
=>
{
tmp
.
ranks
[
index
].
display
=
true
;
tmp
.
ranks
[
index
].
study_duration
=
tmp
.
ranks
[
index
].
study_duration
.
toFixed
(
2
);
})
await
this
.
setState
({
...
...
component/Mine/person.js
浏览文件 @
0ff58e30
...
...
@@ -31,6 +31,7 @@ class Person extends Component {
level
:
1
,
exp
:
0
,
dan_name
:
'
青铜
'
,
hasFresh
:
false
,
};
}
...
...
@@ -216,6 +217,16 @@ class Person extends Component {
});
};
componentDidUpdate
(){
if
(
this
.
props
.
show
&&!
this
.
state
.
hasFresh
){
this
.
getInfo
()
this
.
setState
({
hasFresh
:
true
})
}
if
(
!
this
.
props
.
show
&&
this
.
state
.
hasFresh
){
this
.
setState
({
hasFresh
:
false
})
}
}
render
()
{
const
{
image_url
,
...
...
@@ -236,6 +247,7 @@ class Person extends Component {
王者
:
require
(
'
../../images/King.png
'
),
};
const
{
user_sno
}
=
this
.
props
.
user
;
return
(
<
View
style
=
{{
position
:
'
relative
'
,
...
...
component/OnlineStudy/RangePKStudy/index.js
浏览文件 @
0ff58e30
...
...
@@ -324,12 +324,12 @@ class RangePKStudy extends Component {
}
=
this
.
state
;
return
(
<
View
style
=
{
styles
.
container
}
{...
this
.
panResponder
.
panHandlers
}
>
<
View
style
=
{
styles
.
container
}
>
<
MyTitle
title
=
{
'
当前的排名为 第
'
+
ranking
+
'
名
'
}
containerStyle
=
{
styles
.
containerTitle
}
/
>
<
View
style
=
{
styles
.
containerMain
}
>
<
View
style
=
{
styles
.
containerMain
}
{...
this
.
panResponder
.
panHandlers
}
>
<
MyStatistics
text
=
{{
first
:
{
...
...
@@ -376,7 +376,7 @@ class RangePKStudy extends Component {
}}
/
>
<
/View
>
<
View
style
=
{
styles
.
containerTimer
}
>
<
View
style
=
{
styles
.
containerTimer
}
{...
this
.
panResponder
.
panHandlers
}
>
<
Text
style
=
{
styles
.
text
}
>
{
'
<--
'
}
左滑打开排行榜
<
/Text
>
<
Text
style
=
{
styles
.
textTimer
}
>
{
parseTime
(
timeInTheMatch
)}
<
/Text
>
<
/View
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录