Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dc08e48f
authored
Jan 29, 2021
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新增 APP 根据服务器版本号,自动更新下载(安卓可下载,IOS跳转到应用商店)
parent
c1bff884
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
36 deletions
app/containers/home/HomePage.js
app/containers/login/LoginPage.js
app/containers/login/module/UpgradeView.js
app/containers/home/HomePage.js
View file @
dc08e48f
...
@@ -33,33 +33,7 @@ class HomePage extends Component {
...
@@ -33,33 +33,7 @@ class HomePage extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
showList
:
[
showList
:
[],
// {
// icon: require('../../images/quick_order.png'),
// title: '借货订单', // 原快速下单、手术报台
// page: 'QuickOrderPage',
// },
// {
// icon: require('../../images/self_order.png'),
// title: '自助下单',
// page: 'SelfOrderPage',
// },
// {
// icon: require('../../images/trans_order.png'),
// title: '转单申请', // 原转单
// page: 'TransOrderPage',
// },
// {
// icon: require('../../images/equip_consu.png'),
// title: '消耗确认', // 原器械消耗
// page: 'EquipConsuPage',
// },
// {
// icon: require('../../images/return_login.png'),
// title: '返回登录页',
// page: 'LoginPage',
// }
],
backLoginInfo
:
{
// 不需要了
backLoginInfo
:
{
// 不需要了
icon
:
require
(
'../../images/return_login.png'
),
icon
:
require
(
'../../images/return_login.png'
),
title
:
'返回登录页'
,
title
:
'返回登录页'
,
...
@@ -132,7 +106,7 @@ class HomePage extends Component {
...
@@ -132,7 +106,7 @@ class HomePage extends Component {
hisDefauIcon
,
hisSeleIcon
,
hisDefauIcon
,
hisSeleIcon
,
borrowInfo
,
consumpInfo
,
borrowInfo
,
consumpInfo
,
transInfo
,
deviceInfo
,
transInfo
,
deviceInfo
,
selfOrderInfo
,
backLoginInfo
}
=
this
.
state
selfOrderInfo
}
=
this
.
state
functions
=
referenceArrSort
(
functions
,
'child_list'
,
'function_order'
)
functions
=
referenceArrSort
(
functions
,
'child_list'
,
'function_order'
)
let
tempTabNames
=
[]
let
tempTabNames
=
[]
let
tempTabCodes
=
[]
let
tempTabCodes
=
[]
...
@@ -166,7 +140,6 @@ class HomePage extends Component {
...
@@ -166,7 +140,6 @@ class HomePage extends Component {
}
}
})
})
}
}
// tempModuleList.push(backLoginInfo) // 不用了
}
else
if
(
item
.
function_code
==
'MOBILE_HISTORICAL_ORDER'
)
{
}
else
if
(
item
.
function_code
==
'MOBILE_HISTORICAL_ORDER'
)
{
tempTabIconNames
.
push
(
hisDefauIcon
)
tempTabIconNames
.
push
(
hisDefauIcon
)
...
@@ -225,7 +198,6 @@ class HomePage extends Component {
...
@@ -225,7 +198,6 @@ class HomePage extends Component {
/>
/>
<
SafeAreaView
style
=
{
safe_view
}
>
<
SafeAreaView
style
=
{
safe_view
}
>
<
HeadBackItem
title
=
{
'骨科智慧仓'
}
navigation
=
{
navigation
}
isRightExit
=
{
isRightExit
}
/
>
<
HeadBackItem
title
=
{
'骨科智慧仓'
}
navigation
=
{
navigation
}
isRightExit
=
{
isRightExit
}
/
>
<
ScrollableTabView
<
ScrollableTabView
style
=
{
styles
.
bom_tab_box
}
style
=
{
styles
.
bom_tab_box
}
initialPage
=
{
initialPage
}
initialPage
=
{
initialPage
}
...
@@ -317,7 +289,7 @@ const styles = StyleSheet.create({
...
@@ -317,7 +289,7 @@ const styles = StyleSheet.create({
fontFamily
:
font_family_regular
fontFamily
:
font_family_regular
},
},
bom_tab_box
:
{
bom_tab_box
:
{
flex
:
1
},
},
})
})
...
...
app/containers/login/LoginPage.js
View file @
dc08e48f
...
@@ -27,13 +27,14 @@ import {
...
@@ -27,13 +27,14 @@ import {
safe_view
,
safe_view
,
font_family_medium
font_family_medium
}
from
'../../base/BaseStyle'
;
}
from
'../../base/BaseStyle'
;
import
{
requestLogin
,
autoLogin
,
setDomainConfigurate
}
from
'../../action/LoginAction'
;
import
{
requestLogin
,
autoLogin
,
setDomainConfigurate
,
setVersionApk
}
from
'../../action/LoginAction'
;
import
{
show
,
isEmpty
}
from
'../../utils/Utils'
;
import
{
show
,
isEmpty
}
from
'../../utils/Utils'
;
import
{
LOGIN_DOING
,
LOGIN_SUCCESS
,
LOGIN_FAILURE
,
LOGIN_NO
}
from
'../../base/ActionTypes'
;
import
{
LOGIN_DOING
,
LOGIN_SUCCESS
,
LOGIN_FAILURE
,
LOGIN_NO
}
from
'../../base/ActionTypes'
;
import
StatusBarView
from
'../common/StatusBarView'
;
import
StatusBarView
from
'../common/StatusBarView'
;
import
LodingModel
from
'../common/LodingModel'
;
import
LodingModel
from
'../common/LodingModel'
;
import
FillDomainModel
from
'./module/FillDomainModel'
;
import
FillDomainModel
from
'./module/FillDomainModel'
;
import
SplashScreen
from
'react-native-splash-screen'
;
import
SplashScreen
from
'react-native-splash-screen'
;
import
UpgradeView
from
'./module/UpgradeView'
;
class
LoginPage
extends
Component
{
class
LoginPage
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -45,7 +46,8 @@ class LoginPage extends Component{
...
@@ -45,7 +46,8 @@ class LoginPage extends Component{
subTitList
:
[
'登录'
,
'登录中...'
],
subTitList
:
[
'登录'
,
'登录中...'
],
isSubLoding
:
false
,
isSubLoding
:
false
,
isShowDomain
:
false
,
// 域名填写
isShowDomain
:
false
,
// 域名填写
version_apk
:
'V1.2.2'
version_apk
:
''
,
isEnterHomeFlag
:
false
}
}
}
}
...
@@ -53,6 +55,7 @@ class LoginPage extends Component{
...
@@ -53,6 +55,7 @@ class LoginPage extends Component{
SplashScreen
.
hide
()
//关闭启动屏幕
SplashScreen
.
hide
()
//关闭启动屏幕
this
.
timer
=
setTimeout
(()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
getLocalUserName
()
this
.
getLocalUserName
()
this
.
setVersion
()
},
300
)
},
300
)
}
}
...
@@ -100,7 +103,12 @@ class LoginPage extends Component{
...
@@ -100,7 +103,12 @@ class LoginPage extends Component{
// 设置版本号
// 设置版本号
setVersion
()
{
setVersion
()
{
// NativeModules
NativeModules
.
RNToolsManager
.
getAppVersion
((
event
)
=>
{
this
.
props
.
setVersionApk
(
event
)
this
.
setState
({
version_apk
:
event
})
})
}
}
// 判断是否打开域名弹窗
// 判断是否打开域名弹窗
...
@@ -197,6 +205,9 @@ class LoginPage extends Component{
...
@@ -197,6 +205,9 @@ class LoginPage extends Component{
// 进入首页
// 进入首页
enterHomePage
()
{
enterHomePage
()
{
this
.
setState
({
isEnterHomeFlag
:
true
})
this
.
props
.
navigation
.
navigate
(
'HomePage'
)
this
.
props
.
navigation
.
navigate
(
'HomePage'
)
}
}
...
@@ -222,7 +233,7 @@ class LoginPage extends Component{
...
@@ -222,7 +233,7 @@ class LoginPage extends Component{
}
}
render
()
{
render
()
{
let
{
username
,
password
,
isSubLoding
,
subTit
,
isShowDomain
,
version_apk
}
=
this
.
state
let
{
username
,
password
,
isSubLoding
,
subTit
,
isShowDomain
,
version_apk
,
isEnterHomeFlag
}
=
this
.
state
let
{
global_domain_config
}
=
this
.
props
let
{
global_domain_config
}
=
this
.
props
let
tempInd
=
global_domain_config
.
indexOf
(
'/'
)
+
2
let
tempInd
=
global_domain_config
.
indexOf
(
'/'
)
+
2
let
tempGlobalDomain
=
global_domain_config
.
slice
(
tempInd
)
let
tempGlobalDomain
=
global_domain_config
.
slice
(
tempInd
)
...
@@ -300,6 +311,7 @@ class LoginPage extends Component{
...
@@ -300,6 +311,7 @@ class LoginPage extends Component{
callback
=
{(
domainVal
)
=>
this
.
fillDomainCallBack
(
domainVal
)}
callback
=
{(
domainVal
)
=>
this
.
fillDomainCallBack
(
domainVal
)}
domainValue
=
{
tempGlobalDomain
}
domainValue
=
{
tempGlobalDomain
}
/
>
/
>
{
isEnterHomeFlag
?
<
UpgradeView
version_apk
=
{
version_apk
}
/> : null
}
<
/View
>
<
/View
>
<
/ImageBackground
>
<
/ImageBackground
>
<
/SafeAreaView
>
<
/SafeAreaView
>
...
@@ -462,7 +474,10 @@ const mapDispatchToProps = (dispatch) => ({
...
@@ -462,7 +474,10 @@ const mapDispatchToProps = (dispatch) => ({
},
},
setDomainConfigurate
:
(
domainVal
)
=>
{
setDomainConfigurate
:
(
domainVal
)
=>
{
dispatch
(
setDomainConfigurate
(
domainVal
))
dispatch
(
setDomainConfigurate
(
domainVal
))
}
},
setVersionApk
:
(
versionApk
)
=>
{
dispatch
(
setVersionApk
(
versionApk
))
},
})
})
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
LoginPage
)
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
LoginPage
)
app/containers/login/module/UpgradeView.js
0 → 100644
View file @
dc08e48f
This diff is collapsed.
Click to expand it.
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