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
e2e7bd48
authored
Mar 24, 2021
by
wong.peiyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
android加上打包渠道
(cherry picked from commit
7c031b4e
)
parent
1659da2f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
6 deletions
android/app/build.gradle
android/app/src/main/assets/index.android.bundle
android/app/src/main/java/com/bonehouse_business_app/RNToolsManager.java
android/app/src/main/res/drawable-mdpi/app_images_eye.png
app/containers/login/LoginPage.js
android/app/build.gradle
View file @
e2e7bd48
...
@@ -120,6 +120,7 @@ android {
...
@@ -120,6 +120,7 @@ android {
versionName
appVersion
versionName
appVersion
missingDimensionStrategy
'react-native-camera'
,
'general'
missingDimensionStrategy
'react-native-camera'
,
'general'
multiDexEnabled
true
multiDexEnabled
true
flavorDimensions
"versionCode"
}
}
splits
{
splits
{
abi
{
abi
{
...
@@ -146,6 +147,16 @@ android {
...
@@ -146,6 +147,16 @@ android {
matchingFallbacks
=
[
'release'
]
matchingFallbacks
=
[
'release'
]
}
}
}
}
productFlavors
{
sz
{
resValue
"string"
,
"baseUrl"
,
'"https://obs.uat.guke.tech"'
}
xhk
{
resValue
"string"
,
"baseUrl"
,
'"https://obs.xhk.orth.tech"'
}
}
// applicationVariants are e.g. debug, release
// applicationVariants are e.g. debug, release
applicationVariants
.
all
{
variant
->
applicationVariants
.
all
{
variant
->
variant
.
outputs
.
each
{
output
->
variant
.
outputs
.
each
{
output
->
...
...
android/app/src/main/assets/index.android.bundle
View file @
e2e7bd48
This diff could not be displayed because it is too large.
android/app/src/main/java/com/bonehouse_business_app/RNToolsManager.java
View file @
e2e7bd48
...
@@ -76,10 +76,10 @@ public class RNToolsManager extends ReactContextBaseJavaModule {
...
@@ -76,10 +76,10 @@ public class RNToolsManager extends ReactContextBaseJavaModule {
}
}
}
}
//
// 声明的设置域名方法,外界调用
// 声明的设置域名方法,外界调用
//
@ReactMethod
@ReactMethod
//
public void getBaseUrl(Promise promise) {
public
void
getBaseUrl
(
Promise
promise
)
{
// String STRING_API_ENV = getReactApplicationContext().getResources().getString(R.string.strKey
); // 需要在 android/app/build.gradle 添加'productFlavors'
String
STRING_API_ENV
=
getReactApplicationContext
().
getResources
().
getString
(
R
.
string
.
baseUrl
);
// 需要在 android/app/build.gradle 添加'productFlavors'
//
promise.resolve(STRING_API_ENV);
promise
.
resolve
(
STRING_API_ENV
);
//
}
}
}
}
\ No newline at end of file
android/app/src/main/res/drawable-mdpi/app_images_eye.png
0 → 100644
View file @
e2e7bd48
4.4 KB
app/containers/login/LoginPage.js
View file @
e2e7bd48
...
@@ -57,12 +57,22 @@ class LoginPage extends Component{
...
@@ -57,12 +57,22 @@ class LoginPage extends Component{
componentDidMount
()
{
componentDidMount
()
{
SplashScreen
.
hide
()
//关闭启动屏幕
SplashScreen
.
hide
()
//关闭启动屏幕
this
.
timer
=
setTimeout
(()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
setDefaultDomain
()
this
.
getLocalUserName
()
this
.
getLocalUserName
()
this
.
setVersion
()
this
.
setVersion
()
this
.
initLoginInfo
()
this
.
initLoginInfo
()
},
300
)
},
300
)
}
}
async
setDefaultDomain
()
{
try
{
const
baseUrl
=
await
NativeModules
.
RNToolsManager
.
getBaseUrl
()
this
.
props
.
setDomainConfigurate
(
baseUrl
)
}
catch
(
error
)
{
console
.
log
(
'do not suppor getBaseUrl'
)
}
}
componentWillUnmount
()
{
componentWillUnmount
()
{
clearTimeout
(
this
.
timer
)
clearTimeout
(
this
.
timer
)
}
}
...
...
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