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
f842ac79
Commit
f842ac79
authored
Aug 10, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 兼容心理测试包的隐私政策
parent
cebfc34e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
H5Activity.java
m-user/src/main/java/com/yidianling/user/ui/login/H5Activity.java
+8
-2
OneKeyLoginHelp.kt
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
+15
-3
No files found.
m-user/src/main/java/com/yidianling/user/ui/login/H5Activity.java
View file @
f842ac79
...
...
@@ -9,7 +9,9 @@ import android.widget.ImageView;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
com.ydl.ydlcommon.base.BaseApp
;
import
com.ydl.ydlcommon.base.config.ChannelConfig
;
import
com.ydl.ydlcommon.bean.StatusBarOptions
;
import
com.ydl.ydlcommon.data.PlatformDataManager
;
import
com.yidianling.common.tools.RxNetTool
;
import
com.yidianling.user.R
;
...
...
@@ -58,11 +60,15 @@ public class H5Activity extends BaseActivity {
// 开启 DOM storage API 功能
web_view
.
getSettings
().
setDomStorageEnabled
(
true
);
if
(
getIntent
().
getBooleanExtra
(
INTENT_PRIVACY
,
false
))
{
String
ffrom
=
PlatformDataManager
.
INSTANCE
.
getRam
().
getChannelName
();
//隐私政策
if
(!
RxNetTool
.
isConnected
(
BaseApp
.
Companion
.
getApp
())){
if
(!
RxNetTool
.
isConnected
(
BaseApp
.
Companion
.
getApp
()))
{
//无网络 读取本地文件
web_view
.
loadUrl
(
"file:///android_asset/html/yinsi.html"
);
}
else
{
}
else
if
(
ffrom
.
startsWith
(
ChannelConfig
.
ATK_4
.
name
()))
{
//心理测试包更改隐私协议地址
web_view
.
loadUrl
(
"https://m.ydl.com/Protol/yinsi/shdh/test"
);
}
else
{
web_view
.
loadUrl
(
"https://m.ydl.com/Protol/yinsi/shdh"
);
//加载url
}
}
else
{
...
...
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
View file @
f842ac79
...
...
@@ -17,6 +17,8 @@ import com.mobile.auth.gatewayauth.model.TokenRet
import
com.ydl.ydlcommon.app.Apm
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.config.ChannelConfig
import
com.ydl.ydlcommon.data.PlatformDataManager.getRam
import
com.ydl.ydlcommon.utils.JPushUtils
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.YDLCacheUtils
...
...
@@ -307,7 +309,7 @@ object OneKeyLoginHelp {
val
appName
=
mActivity
.
resources
.
getString
(
R
.
string
.
user_login_name_start
)
var
appPrivacyOneTip
=
"${appName}用户使用协议"
var
appPrivacyOne
=
"https://h5.ydl.com/SDUserProtol"
var
appPrivacyTwo
=
"https://m.ydl.com/Protol/yinsi/shdh"
var
appPrivacyTwo
=
getPrivacyUrl
()
if
(
mAppType
==
YDL_EXPERT_APP
)
{
loginLogo
=
"ic_expert_login_logo"
loginHeight
=
60
...
...
@@ -394,7 +396,7 @@ object OneKeyLoginHelp {
// 每次打开页面前先清空所有的自定义控件,再重新设置
phoneNumberAuthHelper
.
removeAuthRegisterXmlConfig
()
phoneNumberAuthHelper
.
removeAuthRegisterViewConfig
()
var
appPrivacyTwo
=
getPrivacyUrl
()
val
dialogHeight
=
RxImageTool
.
px2dp
((
RxDeviceTool
.
getScreenHeight
(
mActivity
)
*
0.45f
))
phoneNumberAuthHelper
.
setAuthUIConfig
(
AuthUIConfig
.
Builder
()
...
...
@@ -422,7 +424,7 @@ object OneKeyLoginHelp {
.
setSwitchAccTextColor
(
Color
.
parseColor
(
"#999999"
))
.
setSwitchOffsetY_B
(
80
)
.
setAppPrivacyOne
(
"壹点灵用户使用协议"
,
"https://h5.ydl.com/SDUserProtol"
)
.
setAppPrivacyTwo
(
"隐私协议"
,
"https://m.ydl.com/Protol/yinsi/shdh"
)
.
setAppPrivacyTwo
(
"隐私协议"
,
appPrivacyTwo
)
.
setAppPrivacyColor
(
Color
.
parseColor
(
"#bfbfbf"
),
Color
.
parseColor
(
"#991da1f2"
))
.
setCheckboxHidden
(
checkBoxHidden
)
// 设置是否同意协议的checkbox隐藏
.
setCheckBoxHeight
(
22
)
...
...
@@ -439,6 +441,16 @@ object OneKeyLoginHelp {
)
}
private
fun
getPrivacyUrl
():
String
{
val
ffrom
=
getRam
().
getChannelName
()
var
appPrivacyTwo
=
"https://m.ydl.com/Protol/yinsi/shdh"
if
(
ffrom
.
startsWith
(
ChannelConfig
.
ATK_4
.
name
))
{
//心理测试包更改隐私协议地址
appPrivacyTwo
=
"https://m.ydl.com/Protol/yinsi/shdh/test"
}
return
appPrivacyTwo
}
// 一键登录token监听器
private
var
mTokenListener
:
TokenResultListener
=
object
:
TokenResultListener
{
...
...
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