Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
软件工程实践2022年春W班
穿梭在银河的火箭队
FZUStudyRoom
提交
49a78d8a
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,发现更多精彩内容 >>
提交
49a78d8a
编写于
5月 11, 2022
作者:
ItbGcthate
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
304_change code
上级
56983137
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
32 addition
and
26 deletion
+32
-26
component/OnlineStudy/2-PlayerPKHome/index.js
component/OnlineStudy/2-PlayerPKHome/index.js
+8
-3
component/OnlineStudy/2-PlayerPKState/index.js
component/OnlineStudy/2-PlayerPKState/index.js
+1
-1
component/OnlineStudy/2-PlayerPKStudy/index.js
component/OnlineStudy/2-PlayerPKStudy/index.js
+8
-3
component/OnlineStudy/BannerStyle/index.js
component/OnlineStudy/BannerStyle/index.js
+1
-3
component/OnlineStudy/MyBanner/index.js
component/OnlineStudy/MyBanner/index.js
+7
-7
component/OnlineStudy/MyButton/index.js
component/OnlineStudy/MyButton/index.js
+1
-1
component/OnlineStudy/MyStatistics/index.js
component/OnlineStudy/MyStatistics/index.js
+1
-1
component/OnlineStudy/MyTest/index.js
component/OnlineStudy/MyTest/index.js
+2
-2
component/OnlineStudy/MyTitle/index.js
component/OnlineStudy/MyTitle/index.js
+1
-1
component/OnlineStudy/OnlineStudyHome/index.js
component/OnlineStudy/OnlineStudyHome/index.js
+2
-4
未找到文件。
component/OnlineStudy/2-PlayerPKHome/index.js
浏览文件 @
49a78d8a
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Dimensions
,
Image
,
ToastAndroid
,
Platform
,
BackHandler
}
from
"
react-native
"
;
import
{
View
,
StyleSheet
,
Image
,
ToastAndroid
,
Platform
,
BackHandler
,
}
from
'
react-native
'
;
import
Img1
from
'
./img/img1.png
'
;
import
Img2
from
'
./img/img2.png
'
;
import
MyButton
from
'
../MyButton
'
;
import
{
websocket
}
from
'
../MyUtilities
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
class
TwoPlayerPKHome
extends
Component
{
constructor
()
{
super
();
...
...
component/OnlineStudy/2-PlayerPKState/index.js
浏览文件 @
49a78d8a
...
...
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
import
Clock
from
'
./img/clock1.png
'
;
import
Searching
from
'
./img/searching1.png
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
const
{
height
}
=
Dimensions
.
get
(
'
window
'
);
class
TwoPlayerPKState
extends
Component
{
constructor
()
{
...
...
component/OnlineStudy/2-PlayerPKStudy/index.js
浏览文件 @
49a78d8a
...
...
@@ -22,7 +22,7 @@ import {
sno
,
}
from
'
../MyUtilities
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
const
{
height
}
=
Dimensions
.
get
(
'
window
'
);
/**
* 标语风格切换共使用了组件:
* 1. GlobalSetting(引入global变量global.bannerStyle,来控制标语风格)
...
...
@@ -57,6 +57,7 @@ class TwoPlayerPKStudy extends Component {
duration
:
-
1
,
timeInTheMatch
:
-
1
,
},
isGoBack
:
false
,
victories
:
0
,
isStarted
:
false
,
timeInTheGame
:
0
,
...
...
@@ -97,8 +98,11 @@ class TwoPlayerPKStudy extends Component {
}
backEvent
=
()
=>
{
this
.
finish
();
return
true
;
if
(
!
this
.
state
.
isGoBack
)
{
this
.
finish
();
return
true
;
}
return
false
;
};
resolveMessage
=
msg
=>
{
...
...
@@ -185,6 +189,7 @@ class TwoPlayerPKStudy extends Component {
// console.log('点击确定');
websocket
.
disconnect
();
clearInterval
(
this
.
timer
);
this
.
setState
({
isGoBack
:
true
});
this
.
props
.
navigation
.
goBack
();
},
},
...
...
component/OnlineStudy/BannerStyle/index.js
浏览文件 @
49a78d8a
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Dimensions
}
from
'
react-native
'
;
import
{
View
,
StyleSheet
}
from
'
react-native
'
;
import
MyButton
from
'
../MyButton
'
;
import
{
bannerStyle
}
from
'
../GlobalSetting
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
class
BannerStyle
extends
Component
{
constructor
()
{
super
();
...
...
component/OnlineStudy/MyBanner/index.js
浏览文件 @
49a78d8a
...
...
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import
MyButton
from
'
../MyButton
'
;
import
{
bannerStyle
}
from
'
../GlobalSetting
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
const
{
height
}
=
Dimensions
.
get
(
'
window
'
);
class
MyBanner
extends
Component
{
constructor
()
{
...
...
@@ -87,16 +87,16 @@ class MyBanner extends Component {
disabled
,
};
const
container
=
{...
styles
.
container
,
...
containerStyle
};
const
banner
Style
=
this
.
chooseBannerStyle
();
const
banner
Content
=
this
.
chooseBannerStyle
();
const
banner
=
{
containerStyle
:
styles
.
containerStyle
,
textEnabled
:
banner
Style
.
textEnabled
,
textDisabled
:
banner
Style
.
textDisabled
,
textEnabled
:
banner
Content
.
textEnabled
,
textDisabled
:
banner
Content
.
textDisabled
,
textStyle
:
styles
.
textStyle
,
buttonEnabled
:
banner
Style
.
buttonEnabled
,
buttonDisabled
:
banner
Style
.
buttonDisabled
,
buttonEnabled
:
banner
Content
.
buttonEnabled
,
buttonDisabled
:
banner
Content
.
buttonDisabled
,
buttonStyle
:
styles
.
buttonStyle
,
title
:
banner
Style
.
title
,
title
:
banner
Content
.
title
,
};
return
(
<
View
style
=
{
container
}
>
...
...
component/OnlineStudy/MyButton/index.js
浏览文件 @
49a78d8a
...
...
@@ -8,7 +8,7 @@ import {
}
from
'
react-native
'
;
import
PropTypes
from
'
prop-types
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
const
{
height
}
=
Dimensions
.
get
(
'
window
'
);
class
MyButton
extends
Component
{
constructor
()
{
...
...
component/OnlineStudy/MyStatistics/index.js
浏览文件 @
49a78d8a
...
...
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
import
{
View
,
Text
,
StyleSheet
,
Dimensions
,
Pressable
}
from
'
react-native
'
;
import
PropTypes
from
'
prop-types
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
const
{
height
}
=
Dimensions
.
get
(
'
window
'
);
class
MyStatistics
extends
Component
{
constructor
()
{
...
...
component/OnlineStudy/MyTest/index.js
浏览文件 @
49a78d8a
...
...
@@ -11,8 +11,8 @@ export function login() {
sno
:
sno
.
get
(),
password
:
password
.
get
(),
};
const
resolveData
=
data
=>
{
console
.
log
(
data
);
const
resolveData
=
r
=>
{
console
.
log
(
r
);
};
// console.log('[Login] sno: ' + data.sno + ' password: ' + data.password);
post
(
URL_LOGIN
,
data
).
then
(
resolveData
).
catch
();
...
...
component/OnlineStudy/MyTitle/index.js
浏览文件 @
49a78d8a
...
...
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
import
{
Text
,
StyleSheet
,
Dimensions
,
View
}
from
'
react-native
'
;
import
PropTypes
from
'
prop-types
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
const
{
height
}
=
Dimensions
.
get
(
'
window
'
);
class
MyTitle
extends
Component
{
constructor
()
{
...
...
component/OnlineStudy/OnlineStudyHome/index.js
浏览文件 @
49a78d8a
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Dimensions
,
Image
,
Pressable
}
from
'
react-native
'
;
import
{
View
,
StyleSheet
,
Image
,
Pressable
}
from
'
react-native
'
;
import
{
login
,
logout
}
from
'
../MyTest
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
class
OnlineStudyHome
extends
Component
{
constructor
()
{
super
();
...
...
@@ -62,7 +60,7 @@ const styles = StyleSheet.create({
textAlign
:
'
center
'
,
},
button
:
{
flex
:
0.5
,
flex
:
1
,
borderRadius
:
50
,
},
image
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录