From f5e2e1d7f798556b1c11b8eae2b79e8b9614c3bd Mon Sep 17 00:00:00 2001 From: cyh Date: Wed, 7 Aug 2024 18:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=9B=BE=E5=BD=A2=E9=AA=8C=E8=AF=81=E7=A0=81=EF=BC=8C=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=91=E5=AE=9A=E8=B4=A6=E5=8F=B7=E5=90=8E?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=95=8C=E9=9D=A2=E8=B4=A6=E5=8F=B7=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/agreement.html | 28 +++++++++++++++++++ .../yingmao/clash/act/BandPhoneActivity.kt | 5 +++- .../com/yingmao/clash/act/LoginActivity.kt | 8 +++++- .../com/yingmao/clash/act/SplashActivity.kt | 7 +++-- .../com/yingmao/clash/conf/BZYConstants.kt | 2 ++ .../main/res/layout/activity_band_phone.xml | 5 ++-- 6 files changed, 48 insertions(+), 7 deletions(-) diff --git a/app/src/main/assets/agreement.html b/app/src/main/assets/agreement.html index 87f673a..44744db 100644 --- a/app/src/main/assets/agreement.html +++ b/app/src/main/assets/agreement.html @@ -23,6 +23,34 @@

服务条款


为维护双方利益,根据相关法律、法规的规定,双方在平等、自愿、公平、诚信的基础上,VPN科技(以下简称“VPN”)旗下产品VPN客户端(以下简称“VPN”)就用户购买跨境互联网虚拟专用网络服务(以下简称“服务”)的相关事宜达成如下协议,请您务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款、法律适用和争议解决条款,您应重点阅读。如您对协议有任何疑问,可向我方平台客服咨询,协议如下:

+ +

a) Our goal is to provide quality service to all customers. Please read these terms of service carefully before you access the site or the service.
+

+

b) These Terms of Service (“the Terms”) govern your use of the 影猫VPN and the associated website domains (the “Site”) and related service (the “Services”), which are owned and operated by the 影猫VPN Team (“影猫VPN,” “our”, “we” or “us”). The Terms constitute a legally binding agreement (the “Agreement”) between you and the 影猫 VPN Team.

+

+ 影猫VPN Service +

+

a) You understand that we are providing you with a virtual private network (or "VPN") service, which includes, but is not limited to, the use of servers, transport, routers, IP addresses and other equipment and protocols to transmit information over our network (the "System"). You agree to abide by the Terms with respect to your use of the Service.

+

+ Usage Policy +

+

a) BY USING 影猫 VPN SERVICE (the "Service") YOU AGREE:

+

a) NOT to use the system for sending spam, port scanning, scanning for open proxies or open relays, sending opt-in email, unsolicited email or any type or version of email sent in large quantities even if the email is ultimately sent off of another server.

+

b) NOT to launch any pop-ups from our service.

+

c) NOT to attack in any way shape or form any other computer or network while on our service.

+

d) NOT to use the service for things that could hurt our network or other people.

+

b) It is the user responsibility to know and comprehend any and all relevant laws related to any jurisdiction or venue that concerns you and your actions. 影猫 VPN is not liable in any way or form for actions done by its users including a criminal liability and a civil liability for harm executed or not executed beyond any money paid to 影猫 VPN for its services by a concrete individual.

+

c) Violations of this Usage Policy or the Terms may result in termination of your account, without any refund of amounts previously paid for the Service. Additionally, you may be held responsible for any and all damages incurred to 影猫 VPN, including any amounts charged by any outside entity due to said violation(s), including attorney’s fees and costs without limitation.

+

d) 影猫 VPN enables you to download software, software updates or patches, or other utilities and tools onto your mobile phones or Internet-enabled device. 影猫 VPN ("the Software") grants to you a nonexclusive, limited license to use the Software solely for the purpose stated by 影猫 VPN at the time the Software is made available to you and in accordance with these Terms. Modifying, distributing to unauthorized parties, reverse engineering, or otherwise using the Software in any way not expressly authorized by 影猫 VPN, is strictly prohibited.

+

+ Disclaimers +

+

a) We strive to prevent interruptions to the Site and the Service. However, these are provided on an “as is” and “as available” basis, and we do not warrant, either expressly or by implication, the accuracy of any materials or information provided through the Site or Service, or their suitability for any particular purpose.

+

b) Actual service coverage, speeds, locations and quality may vary. The Service will attempt to be available at all times except for limited periods for maintenance and repair. However the Service may be subject to unavailability for a variety of factors beyond our control including emergencies, third party service failures, transmission, equipment or network problems or limitations, interference, signal strength, and may be interrupted, refused, limited or curtailed.

+

c) We do not make any warranty that the Service will meet your requirements, or that it will be uninterrupted, timely, secure, or error free, or that defects, if any, will be corrected. You acknowledge that you access the Site and the Service at your own discretion and risk.

+

d) We are not responsible for data, messages or pages lost, not delivered, delayed or misdirected because of interruptions or performance issues with the Service or communications services or networks (e.g., T-1 lines or the Internet). We may impose usage or Service limits, suspend Service, or block certain kinds of usage in our sole discretion to protect users or the Service. Network speed is an estimate and is no indication of the speed at which your or the Service sends or receives data. Actual network speed will vary based on configuration, compression, network congestion and other factors. The accuracy and timeliness of data received is not guaranteed; delays or omissions may occur.

+

e) We do not log any user activity (sites visited, DNS lookups, emails etc.) We only log access attempts to our servers for the purposes of troubleshooting and improving the Services. We do not get involved in any form of censorship. We do not give your personal info to any third parties.

+

第一条 服务范围

diff --git a/app/src/main/java/com/yingmao/clash/act/BandPhoneActivity.kt b/app/src/main/java/com/yingmao/clash/act/BandPhoneActivity.kt index c25ff6b..a43d513 100644 --- a/app/src/main/java/com/yingmao/clash/act/BandPhoneActivity.kt +++ b/app/src/main/java/com/yingmao/clash/act/BandPhoneActivity.kt @@ -139,7 +139,10 @@ class BandPhoneActivity : BaseNotTitleActivity() { MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_PH_TOKEN) MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_TOKEN) MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_CURRENT_NODE) - startActivity(Intent(CommonUtils.getApp(), LoginActivity::class.java)) + var intent=Intent(CommonUtils.getApp(), LoginActivity::class.java) + + intent.putExtra(BZYConstants.EXTRA_Bind_Account,phoneNumber) + startActivity(intent) finish() } else { RxToast.warning("绑定失败:" + rsp.message) diff --git a/app/src/main/java/com/yingmao/clash/act/LoginActivity.kt b/app/src/main/java/com/yingmao/clash/act/LoginActivity.kt index d15510a..59ced79 100644 --- a/app/src/main/java/com/yingmao/clash/act/LoginActivity.kt +++ b/app/src/main/java/com/yingmao/clash/act/LoginActivity.kt @@ -5,6 +5,7 @@ import android.graphics.Color import android.os.Bundle import android.text.Spannable import android.text.SpannableStringBuilder +import android.text.TextUtils import android.text.method.HideReturnsTransformationMethod import android.text.method.LinkMovementMethod import android.text.style.BackgroundColorSpan @@ -168,7 +169,12 @@ class LoginActivity : BaseActivity(), View.OnClickListener { } private fun initViews() { - val username = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME) + var bindAccount = intent.getStringExtra(BZYConstants.EXTRA_Bind_Account); + var username = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME) + if (!TextUtils.isEmpty(bindAccount)) { + username = bindAccount + } + val password = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_PASSWORD) usernameEt = findViewById(R.id.et_username) usernameEt.setText(username) diff --git a/app/src/main/java/com/yingmao/clash/act/SplashActivity.kt b/app/src/main/java/com/yingmao/clash/act/SplashActivity.kt index 4268bd7..5c56edc 100644 --- a/app/src/main/java/com/yingmao/clash/act/SplashActivity.kt +++ b/app/src/main/java/com/yingmao/clash/act/SplashActivity.kt @@ -109,7 +109,7 @@ class SplashActivity : BaseActivity() { var si = signList[0] var ss1 = cb.getSS1(si) var ss2 = cb.getSS2(si) - com.yingmao.clash.common.log.Log.d("si==>${si}, ss1==>${ss1}, ss2==>${ss2}") +// com.yingmao.clash.common.log.Log.d("si==>${si}, ss1==>${ss1}, ss2==>${ss2}") AESUtil.KEY2 = ss1 AESUtil.IV2 = ss2 val routerSet = @@ -393,7 +393,10 @@ class SplashActivity : BaseActivity() { // } // } MMKV.defaultMMKV().encode(MMKV_KEY_REMEMBER_USERNAME, username) - graphicVerificationDialog() + val intent = Intent(this@SplashActivity, LoginActivity::class.java) + startActivity(intent) + finish() +// graphicVerificationDialog() } else { MaterialDialog(this@SplashActivity).show { message(text = "初始化失败") diff --git a/app/src/main/java/com/yingmao/clash/conf/BZYConstants.kt b/app/src/main/java/com/yingmao/clash/conf/BZYConstants.kt index 3d7907b..4eb5f33 100644 --- a/app/src/main/java/com/yingmao/clash/conf/BZYConstants.kt +++ b/app/src/main/java/com/yingmao/clash/conf/BZYConstants.kt @@ -75,6 +75,8 @@ class BZYConstants { const val EXTRA_KEY_WX_PAY_OUT_TRADE_NO = "wx_pay_outTradeNo" const val EXTRA_KEY_IS_RUNING = "vpn_is_runing" + //登录界面 + const val EXTRA_Bind_Account = "bind_account" const val EXTRA_KEY_AGREEMENT = "agreement" const val EXTRA_USER_AGREEMENT = "user_agreement" diff --git a/app/src/main/res/layout/activity_band_phone.xml b/app/src/main/res/layout/activity_band_phone.xml index 4a3e688..8d7645e 100644 --- a/app/src/main/res/layout/activity_band_phone.xml +++ b/app/src/main/res/layout/activity_band_phone.xml @@ -105,9 +105,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/layout_login_tv_login_start_margin" + android:layout_marginTop="40dp" android:layout_marginEnd="@dimen/layout_login_tv_login_end_margin" android:layout_marginBottom="@dimen/layout_login_tv_login_bottom_margin" - android:layout_marginTop="100dp" android:background="@drawable/login_btn_bg_selector" android:gravity="center" android:paddingTop="@dimen/layout_login_tv_login_top_padding" @@ -115,8 +115,7 @@ android:text="绑 定" android:textColor="@color/black" android:textSize="@dimen/layout_login_tv_login_textsize" - android:textStyle="bold" - /> + android:textStyle="bold" /> \ No newline at end of file