Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
manager-app-sz
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
manager-app-sz
Commits
7ae6a963
提交
7ae6a963
authored
11月 02, 2017
作者:
吴强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加了个人中心的页面导航
上级
75e662c6
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
176 行增加
和
18 行删除
+176
-18
local.properties
android/local.properties
+2
-2
domain.js
src/models/domain.js
+49
-0
userinfo.js
src/models/userinfo/userinfo.js
+39
-0
index.js
src/routes/main/index.js
+1
-1
UserInfoHomeScreen.js
src/routes/main/userinfo/UserInfoHomeScreen.js
+67
-0
index.js
src/routes/main/userinfo/index.js
+17
-0
userinfopage.js
src/routes/main/userinfopage.js
+0
-14
domain.js
src/services/domain.js
+1
-1
没有找到文件。
android/local.properties
浏览文件 @
7ae6a963
...
...
@@ -8,5 +8,5 @@
# For customization when using a Version Control System, please read the
# header note.
#Fri Oct 27 18:29:04 CST 2017
sdk.dir
=
D
\:\\
AppData
\\
Local
\\
Android
\\
sdk1
#
sdk.dir=D\:\\Android\\sdk
#
sdk.dir=D\:\\AppData\\Local\\Android\\sdk1
sdk.dir
=
D
\:\\
Android
\\
sdk
src/models/domain.js
0 → 100644
浏览文件 @
7ae6a963
import
{
fetchDomains
,
switchDomain
,
currentDomain
}
from
'../services/domain'
;
import
{
getDomain
,
setDomain
}
from
'../utils/auth'
;
export
default
{
namespace
:
'domain'
,
state
:
{
init
:
undefined
,
list
:
[],
},
subscriptions
:
{
setup
({
dispatch
})
{
// eslint-disable-line
},
},
effects
:
{
*
fetch
(
ignored
,
{
put
,
call
})
{
const
domain
=
yield
call
(
getDomain
);
const
init
=
domain
?
domain
.
path
:
undefined
;
const
list
=
yield
call
(
fetchDomains
,
'/'
,
true
);
yield
put
({
type
:
'queryInit'
,
payload
:
init
});
yield
put
({
type
:
'queryList'
,
payload
:
list
});
},
*
switch
({
payload
:
domainPath
},
{
put
,
call
})
{
yield
call
(
switchDomain
,
domainPath
);
const
{
path
,
name
}
=
yield
call
(
currentDomain
);
yield
call
(
setDomain
,
name
,
path
);
yield
put
({
type
:
'queryInit'
,
payload
:
path
});
},
},
reducers
:
{
queryInit
(
state
,
{
payload
:
init
})
{
return
{
...
state
,
init
,
};
},
queryList
(
state
,
{
payload
:
list
})
{
return
{
...
state
,
list
,
};
},
},
};
src/models/userinfo/userinfo.js
0 → 100644
浏览文件 @
7ae6a963
import
{
NavigationActions
}
from
'react-navigation'
;
import
{
getData
,
getMeta
}
from
'../../utils/DataTemplate'
;
export
default
{
namespace
:
'userInfo'
,
state
:
{
userName
:
undefined
,
currentJiDiName
:
undefined
,
jidiList
:
[],
},
subscriptions
:
{
setup
({
dispatch
})
{
// eslint-disable-line
},
},
reducers
:
{
setUserName
(
state
,
{
payload
:
userName
})
{
return
{
...
state
,
userName
,
};
},
setJiDiList
(
state
,
{
payload
:
jidiList
})
{
return
{
...
state
,
jidiList
,
};
},
setCurrentJiDi
(
state
,
{
payload
:
currentJiDiName
})
{
return
{
...
state
,
currentJiDiName
,
};
},
},
effects
:
{
},
};
src/routes/main/index.js
浏览文件 @
7ae6a963
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
Image
,
StyleSheet
}
from
'react-native'
;
import
{
TabNavigator
}
from
'react-navigation'
;
import
userInfoPageScreen
from
'./userinfo
page
'
;
import
userInfoPageScreen
from
'./userinfo
/index
'
;
import
fwInfo
from
'./fwInfo'
;
import
chatsIcon
from
'../../../image/chats-icon.png'
;
import
Empty
from
'../empty'
;
...
...
src/routes/main/userinfo/UserInfoHomeScreen.js
0 → 100644
浏览文件 @
7ae6a963
import
React
,
{
PureComponent
}
from
'react'
;
import
{
View
,
StyleSheet
,
RefreshControl
,
Dimensions
,
ScrollView
,
Text
}
from
'react-native'
;
const
width
=
Dimensions
.
get
(
'window'
).
width
;
const
height
=
Dimensions
.
get
(
'window'
).
height
;
// create a component
class
UserInfoHomeScreen
extends
PureComponent
{
renderHeader
=
()
=>
{
return
(
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{
styles
.
userContainer
}
>
<
Text
style
=
{
styles
.
avatar
}
/
>
<
View
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Text
style
=
{{
color
:
'white'
}}
>
素敌
<
/Text
>
<
Text
style
=
{{
marginLeft
:
4
}}
/
>
<
/View
>
<
Text
style
=
{{
color
:
'white'
,
marginTop
:
4
}}
>
个人信息
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
);
};
render
()
{
return
(
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#06C1AE'
}}
>
<
View
style
=
{{
position
:
'absolute'
,
width
,
height
,
backgroundColor
:
'#06C1AE'
}}
/
>
<
ScrollView
refreshControl
=
{
<
RefreshControl
refreshing
=
{
this
.
state
.
isRefreshing
}
onRefresh
=
{()
=>
this
.
onHeaderRefresh
()}
tintColor
=
"gray"
/>
}
>
{
this
.
renderHeader
}
<
/ScrollView
>
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
header
:
{
backgroundColor
:
'#06C1AE'
,
paddingBottom
:
20
,
},
icon
:
{
width
:
27
,
height
:
27
,
},
userContainer
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
margin
:
10
,
},
avatar
:
{
width
:
50
,
height
:
50
,
marginRight
:
10
,
borderRadius
:
25
,
borderWidth
:
2
,
borderColor
:
'#51D3C6'
,
},
});
export
default
UserInfoHomeScreen
;
src/routes/main/userinfo/index.js
0 → 100644
浏览文件 @
7ae6a963
import
{
StackNavigator
}
from
'react-navigation'
;
import
UserInfoHomeScreen
from
'./UserInfoHomeScreen'
;
const
userInfoPageScreen
=
StackNavigator
(
{
UserInfoHome
:
{
screen
:
UserInfoHomeScreen
,
},
},
{
headerMode
:
'none'
,
navigationOptions
:
{
gesturesEnabled
:
false
,
},
},
);
export
default
userInfoPageScreen
;
src/routes/main/userinfopage.js
deleted
100644 → 0
浏览文件 @
75e662c6
import
React
,
{
Component
}
from
'react'
;
import
{
Button
}
from
'react-native'
;
class
userInfoPageScreen
extends
Component
{
render
()
{
return
(
<
Button
onPress
=
{()
=>
this
.
props
.
navigation
.
goBack
()}
title
=
"Go back home"
/>
);
}
}
export
default
userInfoPageScreen
;
src/services/domain.js
浏览文件 @
7ae6a963
...
...
@@ -6,7 +6,7 @@ import { getDomain } from '../utils/auth';
export
async
function
fetchDomains
(
basePath
,
withRoot
=
false
)
{
if
(
!
basePath
)
{
const
domain
=
await
getDomain
();
const
domain
=
await
getDomain
();
// 从内存中拿到domain
if
(
!
domain
)
{
throw
new
Error
(
'Not set domain yet!'
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论