Commit 47fc254a by sikang

updaet privacy script

parent 55d6aac3
......@@ -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)
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment