Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
47fc254a
Commit
47fc254a
authored
Sep 16, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updaet privacy script
parent
55d6aac3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
script/privacy/update_privacy.py
+8
-1
src/main/java/com/common/activity/AgreementPolicyActivity.java
+10
-2
No files found.
script/privacy/update_privacy.py
View file @
47fc254a
...
...
@@ -31,4 +31,11 @@ if success and update_local == "true":
content
=
requests
.
get
(
privacy_url
)
.
text
with
io
.
open
(
path
+
"privacy.html"
,
"w+"
,
encoding
=
"ISO-8859-1"
)
as
fout
:
fout
.
write
(
content
)
print
(
"本地协议已更新!"
)
print
(
"本地协议已更新!"
+
privacy_url
)
ksp_url
=
privacy_url
.
replace
(
".html"
,
"Ksp.html"
)
content
=
requests
.
get
(
ksp_url
)
.
text
if
"<Code>NoSuchKey</Code>"
not
in
content
:
with
io
.
open
(
path
+
"privacyKsp.html"
,
"w+"
,
encoding
=
"UTF-8"
)
as
fout
:
fout
.
write
(
content
)
print
(
"本地KSP协议已更新!"
+
ksp_url
)
src/main/java/com/common/activity/AgreementPolicyActivity.java
View file @
47fc254a
...
...
@@ -37,6 +37,7 @@ import tech.starwin.utils.context_utils.EasyActivityResult;
import
tech.starwin.utils.ui_utils.DialogFactory
;
import
tech.starwin.utils.ui_utils.UIHelper
;
import
com.common.toolbox.app_utils.DeviceInfo
;
import
com.common.toolbox.tracker.TrackEvent
;
import
com.common.widget.TopBar
;
...
...
@@ -67,10 +68,17 @@ public class AgreementPolicyActivity extends BaseActivity {
@Override
public
void
onEventClick
(
View
v
)
{
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_agreement_tv
)
{
String
agreement
=
type
!=
Type
.
AGREEMENT_HOOK
?
Gateway
.
getAgreementPolicyUrl
()
:
"file:///android_asset/web/privacy.html?name="
+
LibConfig
.
APP_NAME
.
replace
(
" "
,
"%20"
);
String
agreement
=
Gateway
.
getAgreementPolicyUrl
();
if
(
DeviceInfo
.
isReviewMachine
(
context
))
{
agreement
=
"file:///android_asset/web/privacy.html?name="
+
LibConfig
.
APP_NAME
.
replace
(
" "
,
"%20"
)
}
WebActivity
.
start
(
context
,
context
.
getString
(
R
.
string
.
login_statement_title
),
agreement
);
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_ksp_tv
)
{
WebActivity
.
start
(
context
,
context
.
getString
(
R
.
string
.
koperasi_form
),
Gateway
.
getKSPUrl
());
String
kspUrl
=
Gateway
.
getKSPUrl
();
if
(
DeviceInfo
.
isReviewMachine
(
context
))
{
kspUrl
=
"file:///android_asset/web/privacyKsp.html?name="
+
LibConfig
.
APP_NAME
.
replace
(
" "
,
"%20"
)
}
WebActivity
.
start
(
context
,
context
.
getString
(
R
.
string
.
koperasi_form
),
kspUrl
);
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_agree_tv
)
{
viewHolder
.
getCheckBox
(
R
.
id
.
dialog_policy_checkbox
).
setChecked
(
true
);
}
else
if
(
v
.
getId
()
==
R
.
id
.
dialog_policy_cancel_btn
)
{
...
...
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