Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
72735bd1
Commit
72735bd1
authored
Jan 13, 2021
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:代码优化
parent
6bbf1bf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
MineFragment.java
m-user/src/main/java/com/yidianling/user/mine/MineFragment.java
+15
-8
OneKeyLoginHelp.kt
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
+1
-1
No files found.
m-user/src/main/java/com/yidianling/user/mine/MineFragment.java
View file @
72735bd1
package
com
.
yidianling
.
user
.
mine
;
import
android.Manifest
;
import
android.annotation.SuppressLint
;
import
android.content.Intent
;
import
android.os.Bundle
;
...
...
@@ -12,6 +13,7 @@ import android.widget.Button;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.tbruyelle.rxpermissions2.RxPermissions
;
import
com.ydl.course.api.ICourseService
;
import
com.ydl.webview.H5Params
;
import
com.ydl.webview.NewH5Activity
;
...
...
@@ -354,16 +356,21 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
}
}
/**
* 跳转到登录
*
* 请求获取设备权限并跳转到登录
*/
private
void
startLogin
(){
if
(
OneKeyLoginHelp
.
INSTANCE
.
getMIsOpenOneKeyLogin
())
{
OneKeyLoginHelp
.
INSTANCE
.
getLoginToken
(
true
);
}
else
{
RegisterAndLoginActivity
.
Companion
.
start
(
getActivity
());
}
@SuppressLint
(
"CheckResult"
)
private
void
startLogin
()
{
new
RxPermissions
(
getActivity
())
.
request
(
Manifest
.
permission
.
READ_PHONE_STATE
)
.
subscribe
(
permission
->
{
if
(
OneKeyLoginHelp
.
INSTANCE
.
getMIsOpenOneKeyLogin
())
{
OneKeyLoginHelp
.
INSTANCE
.
getLoginToken
(
true
);
}
else
{
RegisterAndLoginActivity
.
Companion
.
start
(
getActivity
());
}
});
}
...
...
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
View file @
72735bd1
...
...
@@ -84,7 +84,7 @@ object OneKeyLoginHelp {
}
}
// 获取渠道
val
channel
=
WalleChannelReader
.
getChannel
(
activity
)
val
channel
=
WalleChannelReader
.
getChannel
(
activity
.
applicationContext
)
checkBoxHidden
=
!(
channel
==
"huawei"
||
channel
==
"vivo"
)
LogUtil
.
e
(
"checkBoxHidde:$checkBoxHidden"
)
if
(!
checkBoxHidden
){
...
...
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