1.完成国内登录注册接口逻辑
2.剔除部分未使用字符串的key 3.不再支持 32 位 ,只支持'arm64-v8a', 'x86_64'
This commit is contained in:
@@ -15,6 +15,7 @@ import androidx.fragment.app.FragmentActivity
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.abbidot.baselibrary.util.LogUtil
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.util.Util
|
||||
import com.qmuiteam.qmui.alpha.QMUIAlphaButton
|
||||
@@ -114,6 +115,13 @@ abstract class BaseFragment<T : ViewBinding>(
|
||||
(activity as BaseActivity<*>).showToast(resIdString, isFinish, gravity)
|
||||
}
|
||||
|
||||
/**
|
||||
* 按钮开启/禁用点击
|
||||
*/
|
||||
fun setButtonEnabled(v: View, enabled: Int = ConstantInt.SpecialType) {
|
||||
(activity as BaseActivity<*>).setButtonEnabled(v, enabled)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置多个view的监听事件
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.abbidot.tracker.constant.ConstantInt
|
||||
data class UserBean(
|
||||
var userId: String,
|
||||
var email: String,
|
||||
var phone: String,
|
||||
var token: String,
|
||||
var userName: String,
|
||||
var wxId: String,
|
||||
@@ -22,5 +23,5 @@ data class UserBean(
|
||||
) {
|
||||
|
||||
//设置空的构造方法
|
||||
constructor() : this("", "", "", "", "", 0, 0, 0, 0, ConstantInt.Type1)
|
||||
constructor() : this("", "", "", "", "", "", 0, 0, 0, 0, ConstantInt.Type1)
|
||||
}
|
||||
|
||||
@@ -11,13 +11,11 @@ import androidx.lifecycle.lifecycleScope
|
||||
import com.abbidot.baselibrary.constant.EventName
|
||||
import com.abbidot.baselibrary.eventbus.XEventBus
|
||||
import com.abbidot.baselibrary.util.LogUtil
|
||||
import com.abbidot.baselibrary.util.Utils
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.alipay.PayResult
|
||||
import com.abbidot.tracker.base.BaseActivity
|
||||
import com.abbidot.tracker.bean.RechargeDeviceBean
|
||||
import com.abbidot.tracker.bean.SetMealBean
|
||||
import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.ConstantString
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.ActivityRechargeOrderDetailCnBinding
|
||||
@@ -73,7 +71,7 @@ class RechargeOrderDetailCNActivity : BaseActivity<ActivityRechargeOrderDetailCn
|
||||
|
||||
mViewBinding.apply {
|
||||
ViewUtil.instance.setShapeRadius(rechargeOrderDetailCnDevice.root, 6)
|
||||
ViewUtil.instance.setShapeRadius(rechargeOrderDetailCnAmount.root, 6)
|
||||
// ViewUtil.instance.setShapeRadius(rechargeOrderDetailCnAmount.root, 6)
|
||||
rechargeOrderDetailCnPayWay.let {
|
||||
it.text = getString(R.string.txt_select_payment_method)
|
||||
it.detailTextView.visibility = View.VISIBLE
|
||||
@@ -182,7 +180,7 @@ class RechargeOrderDetailCNActivity : BaseActivity<ActivityRechargeOrderDetailCn
|
||||
val asOfString = if (TextUtils.isEmpty(overdueDate)) {
|
||||
""
|
||||
} else {
|
||||
String.format(getString(R.string.txt_card_list_end), overdueDate)
|
||||
""
|
||||
}
|
||||
it.itemCardAsOf.text = asOfString
|
||||
|
||||
@@ -204,27 +202,27 @@ class RechargeOrderDetailCNActivity : BaseActivity<ActivityRechargeOrderDetailCn
|
||||
mSetMealBean?.apply {
|
||||
val str = getString(R.string.txt_month_until) + "\t$accountFee"
|
||||
mViewBinding.tvNeedPayMoneyCn.text = str
|
||||
mViewBinding.rechargeOrderDetailCnAmount.let {
|
||||
if (hotType == ConstantInt.Type1) {
|
||||
it.rechargeAmountNormalHotImage.visibility = View.VISIBLE
|
||||
} else {
|
||||
it.rechargeAmountNormalHotImage.visibility = View.GONE
|
||||
}
|
||||
it.rechargeAmountTwoMoney.text = accountFee.toString()
|
||||
|
||||
it.txtRechargeAmountName.text = name
|
||||
|
||||
val perMonth = ""
|
||||
it.rechargeAmountTwoTime.text = perMonth
|
||||
|
||||
// val subscriptionPlan =
|
||||
// String.format(getString(R.string.txt_pay_amount_detail1), subscriptionFee)
|
||||
it.txtSubscriptionPlanContent.text = "数量:x1"
|
||||
|
||||
val averageMonth = Utils.formatDecimal(accountFee / (12 * period), 2)
|
||||
val monthString = String.format(getString(R.string.txt_perMonth), averageMonth)
|
||||
it.rechargeAmountTwoDescription.text = monthString
|
||||
}
|
||||
// mViewBinding.rechargeOrderDetailCnAmount.let {
|
||||
// if (hotType == ConstantInt.Type1) {
|
||||
// it.rechargeAmountNormalHotImage.visibility = View.VISIBLE
|
||||
// } else {
|
||||
// it.rechargeAmountNormalHotImage.visibility = View.GONE
|
||||
// }
|
||||
// it.rechargeAmountTwoMoney.text = accountFee.toString()
|
||||
//
|
||||
// it.txtRechargeAmountName.text = name
|
||||
//
|
||||
// val perMonth = ""
|
||||
// it.rechargeAmountTwoTime.text = perMonth
|
||||
//
|
||||
//// val subscriptionPlan =
|
||||
//// String.format(getString(R.string.txt_pay_amount_detail1), subscriptionFee)
|
||||
// it.txtSubscriptionPlanContent.text = "数量:x1"
|
||||
//
|
||||
// val averageMonth = Utils.formatDecimal(accountFee / (12 * period), 2)
|
||||
// val monthString = String.format(getString(R.string.txt_perMonth), averageMonth)
|
||||
// it.rechargeAmountTwoDescription.text = monthString
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentForgetPasswordCnFinishBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.RegisterCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.RegisterCNViewModel
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -45,7 +45,7 @@ class ForgetPasswordCNFinishFragment : BaseFragment<FragmentForgetPasswordCnFini
|
||||
if (mType != ConstantInt.Close) {
|
||||
mViewBinding.setNewPasswordReturnLoginCn.visibility = View.GONE
|
||||
}
|
||||
setTopTitle(getString(R.string.txt_set_new_password))
|
||||
setTopTitle(getString(R.string.app_name))
|
||||
setTopContent("")
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentForgetPasswordCnStartBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.RegisterCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.RegisterCNViewModel
|
||||
import com.abbidot.tracker.vm.CountDownTimerViewModel
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@ class ForgetPasswordCNStartFragment : BaseFragment<FragmentForgetPasswordCnStart
|
||||
mCountDownTimerViewModel.mCountDownEndLiveData.observe(viewLifecycleOwner) {
|
||||
mViewBinding.llForgetPasswordGetCode.btnGetCode.apply {
|
||||
isEnabled = true
|
||||
text = getString(R.string.register_txt_get_code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentBindPhoneCnBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.LoginCNViewModel
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.RegisterCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.LoginCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.RegisterCNViewModel
|
||||
import com.abbidot.tracker.vm.CountDownTimerViewModel
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ class BindPhoneCNFragment :
|
||||
mCountDownTimerViewModel.mCountDownEndLiveData.observe(viewLifecycleOwner) {
|
||||
mViewBinding.llBindPhoneGetPhoneCode.btnGetCode.apply {
|
||||
isEnabled = true
|
||||
text = getString(R.string.register_txt_get_code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ import com.abbidot.tracker.bean.UserBean
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentLoginCnAccountBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.LoginCNViewModel
|
||||
import com.abbidot.tracker.util.ThirdPartyUtil
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
import com.abbidot.tracker.vm.cn.LoginCNViewModel
|
||||
|
||||
/**
|
||||
* 国内帐号登录
|
||||
@@ -117,7 +117,7 @@ class LoginCNAccountFragment :
|
||||
return
|
||||
}
|
||||
|
||||
mLoginCNViewModel.accountPasswordLogin(this, phone, pwd)
|
||||
// mLoginCNViewModel.accountPasswordLogin(this, phone, pwd)
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
|
||||
@@ -10,8 +10,8 @@ import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentLoginCnCodeBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.LoginCNViewModel
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.RegisterCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.LoginCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.RegisterCNViewModel
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
import com.abbidot.tracker.vm.CountDownTimerViewModel
|
||||
|
||||
@@ -70,7 +70,6 @@ class LoginCNCodeFragment :
|
||||
mCountDownTimerViewModel.mCountDownEndLiveData.observe(viewLifecycleOwner) {
|
||||
mViewBinding.llLoginCnCodeSendCode.btnGetCode.apply {
|
||||
isEnabled = true
|
||||
text = getString(R.string.register_txt_get_code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.abbidot.tracker.bean.UserBean
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentLoginCnFirstBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.LoginCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.LoginCNViewModel
|
||||
import com.abbidot.tracker.util.ThirdPartyUtil
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
|
||||
|
||||
@@ -3,13 +3,10 @@ package com.abbidot.tracker.deprecated.ui.fragment.register
|
||||
import android.content.Context
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentRegisterCnFinishBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.RegisterCNViewModel
|
||||
|
||||
|
||||
/**
|
||||
@@ -18,7 +15,7 @@ import com.abbidot.tracker.deprecated.ui.fragment.vm.RegisterCNViewModel
|
||||
class RegisterCNFinishFragment :
|
||||
BaseFragment<FragmentRegisterCnFinishBinding>(FragmentRegisterCnFinishBinding::inflate) {
|
||||
|
||||
private val mRegisterCNViewModel: RegisterCNViewModel by viewModels()
|
||||
// private val mRegisterCNViewModel: RegisterCNViewModel by viewModels()
|
||||
// private val mLoginCNViewModel: LoginCNViewModel by viewModels()
|
||||
|
||||
companion object {
|
||||
@@ -34,20 +31,20 @@ class RegisterCNFinishFragment :
|
||||
}
|
||||
|
||||
override fun liveDataObserve() {
|
||||
mRegisterCNViewModel.mPhoneRegisterResultLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
// val data = it.getOrNull()
|
||||
// data?.apply {
|
||||
// val activity = activity as LoginRegisterCNActivity
|
||||
// mLoginCNViewModel.loginSuccess(activity, this)
|
||||
// }
|
||||
showToast(R.string.txt_registered_successfully)
|
||||
val activity = activity as LoginRegisterCNActivity
|
||||
activity.switchFragment(LoginRegisterCNActivity.Fragment_Account_Login)
|
||||
}
|
||||
})
|
||||
}
|
||||
// mRegisterCNViewModel.mPhoneRegisterResultLiveData.observe(viewLifecycleOwner) {
|
||||
// dealRequestResult(it, object : GetResultCallback {
|
||||
// override fun onResult(any: Any) {
|
||||
//// val data = it.getOrNull()
|
||||
//// data?.apply {
|
||||
//// val activity = activity as LoginRegisterCNActivity
|
||||
//// mLoginCNViewModel.loginSuccess(activity, this)
|
||||
//// }
|
||||
// showToast(R.string.txt_registered_successfully)
|
||||
// val activity = activity as LoginRegisterCNActivity
|
||||
// activity.switchFragment(LoginRegisterCNActivity.Fragment_Account_Login)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +57,7 @@ class RegisterCNFinishFragment :
|
||||
return
|
||||
}
|
||||
val activity = activity as LoginRegisterCNActivity
|
||||
mRegisterCNViewModel.register(this, activity.mPhone, password)
|
||||
// mRegisterCNViewModel.register(this, activity.mPhone, password)
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
|
||||
@@ -10,9 +10,9 @@ import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentRegisterCnStartBinding
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.RegisterCNViewModel
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
import com.abbidot.tracker.vm.CountDownTimerViewModel
|
||||
import com.abbidot.tracker.vm.cn.RegisterCNViewModel
|
||||
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,6 @@ class RegisterCNStartFragment :
|
||||
mCountDownTimerViewModel.mCountDownEndLiveData.observe(viewLifecycleOwner) {
|
||||
mViewBinding.llRegisterCnGetPhoneCode.btnGetCode.apply {
|
||||
isEnabled = true
|
||||
text = getString(R.string.register_txt_get_code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,21 +123,12 @@ interface INetworkService {
|
||||
@POST("user$VERSION_NUMBER/register")
|
||||
suspend fun registerV2(
|
||||
@Field("email") email: String,
|
||||
@Field("phone") phone: String,
|
||||
@Field("password") password: String,
|
||||
@Field("userName") userName: String,
|
||||
@Field("countryCode") countryCode: String
|
||||
): BaseResponse<UserBean>
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("user/register")
|
||||
suspend fun register(
|
||||
@Field("email") email: String,
|
||||
@Field("password") password: String,
|
||||
@Field("userName") userName: String
|
||||
): BaseResponse<String>
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
@@ -1402,11 +1393,12 @@ interface INetworkService {
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
@GET("user/sendCode")
|
||||
suspend fun sendCode(
|
||||
@Query("phone") phone: String,
|
||||
//发送类型 1是验证码登录 2微信绑定 3注册 4忘记密码
|
||||
@Query("type") type: Int
|
||||
@FormUrlEncoded
|
||||
@POST("user/sendPhoneCode")
|
||||
suspend fun sendPhoneCode(
|
||||
@Field("phone") phone: String,
|
||||
//验证码类型 1是注册 2是忘记密码 3是验证码登录 4微信绑定
|
||||
@Field("type") type: Int
|
||||
): BaseResponse<String>
|
||||
|
||||
/**
|
||||
@@ -1422,7 +1414,7 @@ interface INetworkService {
|
||||
* 手机号验证码验证
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("user/validateCode")
|
||||
@POST("user/phoneValidateCode")
|
||||
suspend fun validatePhoneCode(
|
||||
@Field("phone") phone: String, @Field("code") code: String,
|
||||
//验证码类型 1是注册 2是忘记密码
|
||||
@@ -1433,20 +1425,11 @@ interface INetworkService {
|
||||
* 账号密码登录
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("user/accountPasswordLogin")
|
||||
@POST("user/login")
|
||||
suspend fun accountPasswordLogin(
|
||||
@Field("phone") phone: String, @Field("password") password: String
|
||||
): BaseResponse<UserBean>
|
||||
|
||||
/**
|
||||
* 用户注册
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("user/register")
|
||||
suspend fun register(
|
||||
@Field("phone") phone: String, @Field("password") password: String
|
||||
): BaseResponse<String>
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
|
||||
@@ -40,16 +40,10 @@ object NetworkApi : BaseNetworkApi<INetworkService>(INetworkService.BASE_URL) {
|
||||
/**
|
||||
* 注册/创建用户
|
||||
*/
|
||||
suspend fun registerV2(email: String, password: String, userName: String, countryCode: String) =
|
||||
getResult {
|
||||
service.registerV2(email, password, userName, countryCode)
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
suspend fun register(email: String, password: String, userName: String) = getResult {
|
||||
service.register(email, password, userName)
|
||||
suspend fun registerV2(
|
||||
email: String, phone: String, password: String, userName: String, countryCode: String
|
||||
) = getResult {
|
||||
service.registerV2(email, phone, password, userName, countryCode)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1304,8 +1298,8 @@ object NetworkApi : BaseNetworkApi<INetworkService>(INetworkService.BASE_URL) {
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
suspend fun sendCode(phone: String, type: Int) = getResult {
|
||||
service.sendCode(phone, type)
|
||||
suspend fun sendPhoneCode(phone: String, type: Int) = getResult {
|
||||
service.sendPhoneCode(phone, type)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1329,13 +1323,6 @@ object NetworkApi : BaseNetworkApi<INetworkService>(INetworkService.BASE_URL) {
|
||||
service.accountPasswordLogin(phone, password)
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户注册
|
||||
*/
|
||||
suspend fun register(phone: String, password: String) = getResult {
|
||||
service.register(phone, password)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
|
||||
@@ -206,7 +206,7 @@ class CreateAccountActivity :
|
||||
|
||||
password = Utils.get32Md5Value(password)
|
||||
mUserViewModel.registerV2(
|
||||
this@CreateAccountActivity, email, password, name, mCountryCommon.getCountryCode()
|
||||
this@CreateAccountActivity, email,"", password, name, mCountryCommon.getCountryCode()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,15 +4,32 @@ import android.content.Intent
|
||||
import android.graphics.Paint
|
||||
import android.text.InputFilter
|
||||
import android.text.InputType
|
||||
import android.text.TextUtils
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import androidx.activity.viewModels
|
||||
import com.abbidot.baselibrary.constant.EventName
|
||||
import com.abbidot.baselibrary.eventbus.XEventBus
|
||||
import com.abbidot.baselibrary.util.AppUtils
|
||||
import com.abbidot.baselibrary.util.Utils
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.base.BaseActivity
|
||||
import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.ActivityLoginV2CnBinding
|
||||
import com.abbidot.tracker.ui.activity.set.FirstPermissionsActivity
|
||||
import com.abbidot.tracker.util.Util
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
import com.abbidot.tracker.vm.cn.LoginCNViewModel
|
||||
|
||||
class LoginV2CNActivity :
|
||||
BaseActivity<ActivityLoginV2CnBinding>(ActivityLoginV2CnBinding::inflate) {
|
||||
|
||||
private val mLoginCNViewModel: LoginCNViewModel by viewModels()
|
||||
|
||||
private var isShowPassword = false
|
||||
private var isCurrentPostEven = false
|
||||
|
||||
override fun getTopBar() = mViewBinding.loginV2CnTopBar.titleTopBar
|
||||
|
||||
override fun initData() {
|
||||
@@ -24,7 +41,7 @@ class LoginV2CNActivity :
|
||||
ilLoginV2CnPhone.let {
|
||||
it.tvInputNameTitle.setText(R.string.login_txt_phone)
|
||||
it.etInputContent.setHint(R.string.login_txt_phone)
|
||||
it.etInputContent.inputType = InputType.TYPE_CLASS_PHONE
|
||||
it.etInputContent.inputType = InputType.TYPE_CLASS_NUMBER
|
||||
val filters = arrayOf<InputFilter>(InputFilter.LengthFilter(11))
|
||||
it.etInputContent.filters = filters
|
||||
ViewUtil.instance.setInputViewErrorHideClick(
|
||||
@@ -47,13 +64,51 @@ class LoginV2CNActivity :
|
||||
tvLoginV2CnForgotPassword.paintFlags = Paint.UNDERLINE_TEXT_FLAG
|
||||
|
||||
setOnClickListenerViews(
|
||||
tvLoginV2CnForgotPassword,
|
||||
tvLoginV2CnForgotPassword, btnLoginV2CnLogin,
|
||||
ilLoginV2CnPassword.ivInputRepresentImage,
|
||||
btnLoginV2CnLogin, btnLoginV2CnLoginCode
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun liveDataObserve() {
|
||||
XEventBus.observe(this, EventName.FinishActivity) {
|
||||
if (!isCurrentPostEven) finish()
|
||||
}
|
||||
mLoginCNViewModel.mAccountPwdLoginResultLiveData.observe(this) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
it.getOrNull()?.apply {
|
||||
isCurrentPostEven = true
|
||||
Util.dealLoginSuccessData(mContext, this)
|
||||
|
||||
showToast(R.string.txt_login_successful, gravity = Gravity.CENTER)
|
||||
loginSuccessGo()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setButtonEnabled(mViewBinding.btnLoginV2CnLogin, ConstantInt.Type1)
|
||||
}
|
||||
|
||||
override fun onInterceptCode() {
|
||||
setButtonEnabled(mViewBinding.btnLoginV2CnLogin, ConstantInt.Type1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun loginSuccessGo() {
|
||||
val hasPermissions = Util.checkNeedPermissionsEnabled(mContext)
|
||||
mViewBinding.btnLoginV2CnLogin.postDelayed({
|
||||
if (hasPermissions) {
|
||||
startActivityFinish(Util.checkBindDeviceAndPetGoActivity(mContext))
|
||||
} else {
|
||||
startActivityFinish(Intent(mContext, FirstPermissionsActivity::class.java))
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
private fun goForgotPassword() {
|
||||
Intent(mContext, ForgotPasswordCNActivity::class.java).apply {
|
||||
// val email = mViewBinding.ilLoginV2EmailAddress.etInputContent.text.toString()
|
||||
@@ -62,6 +117,39 @@ class LoginV2CNActivity :
|
||||
}
|
||||
}
|
||||
|
||||
private fun loginClick() {
|
||||
mViewBinding.apply {
|
||||
var phone = ilLoginV2CnPhone.etInputContent.text.toString()
|
||||
var password = ilLoginV2CnPassword.etInputContent.text.toString()
|
||||
var isSure = true
|
||||
|
||||
if (AppUtils.isDebug()) {
|
||||
if (TextUtils.equals("12", phone)) {
|
||||
phone = "13049437653"
|
||||
password = "123456"
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(phone) || phone.length < 11) {
|
||||
isSure = false
|
||||
ViewUtil.instance.setInputViewErrorShow(
|
||||
mContext, ilLoginV2CnPhone.rlEtInputLayout, tvPhoneErrorTipLoginCn
|
||||
)
|
||||
}
|
||||
if (TextUtils.isEmpty(password)) {
|
||||
isSure = false
|
||||
ViewUtil.instance.setInputViewErrorShow(
|
||||
mContext, ilLoginV2CnPassword.rlEtInputLayout, tvPasswordErrorTipLoginCn
|
||||
)
|
||||
}
|
||||
if (!isSure) return
|
||||
|
||||
setButtonEnabled(btnLoginV2CnLogin, ConstantInt.Type0)
|
||||
password = Utils.get32Md5Value(password)
|
||||
|
||||
mLoginCNViewModel.accountPasswordLogin(phone, password)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
mViewBinding.apply {
|
||||
when (v!!) {
|
||||
@@ -72,7 +160,17 @@ class LoginV2CNActivity :
|
||||
)
|
||||
)
|
||||
|
||||
ilLoginV2CnPassword.ivInputRepresentImage -> {
|
||||
isShowPassword = !isShowPassword
|
||||
ViewUtil.instance.showAndHidePasswordClick(
|
||||
ilLoginV2CnPassword.etInputContent,
|
||||
ilLoginV2CnPassword.ivInputRepresentImage,
|
||||
isShowPassword
|
||||
)
|
||||
}
|
||||
|
||||
tvLoginV2CnForgotPassword -> goForgotPassword()
|
||||
btnLoginV2CnLogin -> loginClick()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.view.View
|
||||
import androidx.activity.viewModels
|
||||
import com.abbidot.baselibrary.constant.EventName
|
||||
import com.abbidot.baselibrary.eventbus.XEventBus
|
||||
import com.abbidot.baselibrary.util.AppUtils
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.base.BaseActivity
|
||||
import com.abbidot.tracker.bean.FamilyBean
|
||||
@@ -12,6 +13,7 @@ import com.abbidot.tracker.constant.ConstantString
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.ActivityAddNewTracker1Binding
|
||||
import com.abbidot.tracker.ui.activity.account.LoginV2Activity
|
||||
import com.abbidot.tracker.ui.activity.account.cn.LoginV2CNActivity
|
||||
import com.abbidot.tracker.ui.activity.pet.ShowInviteDeviceActivity
|
||||
import com.abbidot.tracker.util.Util
|
||||
import com.abbidot.tracker.vm.FamilyViewModel
|
||||
@@ -103,11 +105,21 @@ class AddNewTracker1Activity :
|
||||
mViewBinding.apply {
|
||||
when (v!!) {
|
||||
btnChargePowerOnNext -> checkPermissions()
|
||||
tvChargePowerOnBackLoginBtn -> startActivityFinish(
|
||||
Intent(
|
||||
mContext, LoginV2Activity::class.java
|
||||
)
|
||||
)
|
||||
tvChargePowerOnBackLoginBtn -> {
|
||||
if (AppUtils.isChina()) {
|
||||
startActivityFinish(
|
||||
Intent(
|
||||
mContext, LoginV2CNActivity::class.java
|
||||
)
|
||||
)
|
||||
} else {
|
||||
startActivityFinish(
|
||||
Intent(
|
||||
mContext, LoginV2Activity::class.java
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,11 @@ import androidx.core.widget.addTextChangedListener
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.abbidot.baselibrary.list.BaseRecyclerAdapter
|
||||
import com.abbidot.baselibrary.util.AppUtils
|
||||
import com.abbidot.baselibrary.util.Utils
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentCreateAccountV2ThreeBinding
|
||||
import com.abbidot.tracker.ui.activity.account.AddEmailValidActivity
|
||||
@@ -20,6 +22,7 @@ import com.abbidot.tracker.ui.common.CountryCommon
|
||||
import com.abbidot.tracker.util.Util
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
import com.abbidot.tracker.vm.UserProfileViewModel
|
||||
import java.util.Locale
|
||||
|
||||
|
||||
/**
|
||||
@@ -141,6 +144,18 @@ class CreateAccountV2ThreeFragment : BaseFragment<FragmentCreateAccountV2ThreeBi
|
||||
ac.startActivityFinish(intent)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setButtonEnabled(
|
||||
mViewBinding.btnCreateAccountV2Signup, ConstantInt.Type1
|
||||
)
|
||||
}
|
||||
|
||||
override fun onInterceptCode() {
|
||||
setButtonEnabled(
|
||||
mViewBinding.btnCreateAccountV2Signup, ConstantInt.Type1
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -194,9 +209,16 @@ class CreateAccountV2ThreeFragment : BaseFragment<FragmentCreateAccountV2ThreeBi
|
||||
// }
|
||||
|
||||
password = Utils.get32Md5Value(password)
|
||||
mUserViewModel.registerV2(
|
||||
it, email, password, name, mCountryCommon.getCountryCode()
|
||||
)
|
||||
var e = ""
|
||||
var p = ""
|
||||
val locale = Locale.getDefault()
|
||||
if (AppUtils.isChina()) p = email
|
||||
else e = email
|
||||
// mUserViewModel.registerV2(
|
||||
// it, e, p, password, name, mCountryCommon.getCountryCode()
|
||||
// )
|
||||
setButtonEnabled(btnCreateAccountV2Signup, ConstantInt.Type0)
|
||||
mUserViewModel.registerV2(it, e, p, password, name, locale.country.uppercase())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,16 @@ import android.view.View.OnClickListener
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.abbidot.baselibrary.util.AppUtils
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.base.BaseActivity
|
||||
import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentBaseEmailValidBinding
|
||||
import com.abbidot.tracker.vm.CountDownTimerViewModel
|
||||
import com.abbidot.tracker.vm.UserProfileViewModel
|
||||
import com.abbidot.tracker.vm.cn.RegisterCNViewModel
|
||||
import com.daimajia.androidanimations.library.Techniques
|
||||
import com.daimajia.androidanimations.library.YoYo
|
||||
|
||||
@@ -31,13 +34,14 @@ open class EmailValidFragment : BaseFragment<FragmentBaseEmailValidBinding>(
|
||||
|
||||
private val mCountDownTimerViewModel: CountDownTimerViewModel by viewModels()
|
||||
private val mRegisterViewModel: UserProfileViewModel by viewModels()
|
||||
private val mRegisterCNViewModel: RegisterCNViewModel by viewModels()
|
||||
|
||||
private val mResendCodeTime = 5 * 60
|
||||
private var mEmail = ""
|
||||
private var mBtnString = ""
|
||||
private var mEmailCodeType = 0
|
||||
private var mVerifyCodeType = 0
|
||||
|
||||
private var mOnOkClickListener: OnClickListener?=null
|
||||
private var mOnOkClickListener: OnClickListener? = null
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@@ -49,7 +53,7 @@ open class EmailValidFragment : BaseFragment<FragmentBaseEmailValidBinding>(
|
||||
) = EmailValidFragment().apply {
|
||||
mContext = context
|
||||
mBtnString = btnString
|
||||
mEmailCodeType = emailCodeType
|
||||
mVerifyCodeType = emailCodeType
|
||||
mOnOkClickListener = okClickListener
|
||||
}
|
||||
}
|
||||
@@ -127,33 +131,83 @@ open class EmailValidFragment : BaseFragment<FragmentBaseEmailValidBinding>(
|
||||
}
|
||||
}
|
||||
|
||||
mRegisterViewModel.apply {
|
||||
mGetEmailCodeLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
it.getOrNull()?.apply {
|
||||
if (AppUtils.isChina()) {
|
||||
mRegisterCNViewModel.apply {
|
||||
mSendCodeResultLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
showToast(R.string.txt_code_success, gravity = Gravity.CENTER)
|
||||
mCountDownTimerViewModel.startCountDown(mResendCodeTime.toLong())
|
||||
}
|
||||
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setResendCodeBtnEnabled(true)
|
||||
}
|
||||
})
|
||||
}
|
||||
mValidateCodeResultLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
it.getOrNull()?.apply {
|
||||
mOnOkClickListener?.onClick(view)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onInterceptCode() {
|
||||
setButtonEnabled(
|
||||
mViewBinding.btnForgotPasswordV2TwoContinue, ConstantInt.Type1
|
||||
)
|
||||
}
|
||||
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setButtonEnabled(
|
||||
mViewBinding.btnForgotPasswordV2TwoContinue, ConstantInt.Type1
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mRegisterViewModel.apply {
|
||||
mGetEmailCodeLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
it.getOrNull()?.apply {
|
||||
showToast(R.string.txt_code_success, gravity = Gravity.CENTER)
|
||||
// mViewBinding.tvForgotPasswordV2CountdownTime.visibility = View.VISIBLE
|
||||
// mViewBinding.tvForgotPasswordV2TimeRemaining.visibility = View.VISIBLE
|
||||
// mViewBinding.tvForgotPasswordV2TimeSec.visibility = View.VISIBLE
|
||||
mCountDownTimerViewModel.startCountDown(mResendCodeTime.toLong())
|
||||
mCountDownTimerViewModel.startCountDown(mResendCodeTime.toLong())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setResendCodeBtnEnabled(true)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
mValidateCodeLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
it.getOrNull()?.apply {
|
||||
mOnOkClickListener?.onClick(view)
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setResendCodeBtnEnabled(true)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
mValidateCodeLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
it.getOrNull()?.apply {
|
||||
mOnOkClickListener?.onClick(view)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onInterceptCode() {
|
||||
setButtonEnabled(
|
||||
mViewBinding.btnForgotPasswordV2TwoContinue, ConstantInt.Type1
|
||||
)
|
||||
}
|
||||
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setButtonEnabled(
|
||||
mViewBinding.btnForgotPasswordV2TwoContinue, ConstantInt.Type1
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,9 +244,16 @@ open class EmailValidFragment : BaseFragment<FragmentBaseEmailValidBinding>(
|
||||
return
|
||||
}
|
||||
|
||||
mRegisterViewModel.validateCode(
|
||||
this@EmailValidFragment, mEmail, content, mEmailCodeType
|
||||
)
|
||||
setButtonEnabled(mViewBinding.btnForgotPasswordV2TwoContinue, ConstantInt.Type0)
|
||||
if (AppUtils.isChina()) {
|
||||
mRegisterCNViewModel.validatePhoneCode(
|
||||
this@EmailValidFragment, mEmail, content, mVerifyCodeType
|
||||
)
|
||||
} else {
|
||||
mRegisterViewModel.validateCode(
|
||||
this@EmailValidFragment, mEmail, content, mVerifyCodeType
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,9 +264,15 @@ open class EmailValidFragment : BaseFragment<FragmentBaseEmailValidBinding>(
|
||||
|
||||
tvForgotPasswordResendCodeBtn -> {
|
||||
setResendCodeBtnEnabled(false)
|
||||
mRegisterViewModel.getEmailCode(
|
||||
activity as BaseActivity<*>, mEmail, mEmailCodeType
|
||||
)
|
||||
if (AppUtils.isChina()) {
|
||||
mRegisterCNViewModel.sendCode(
|
||||
this@EmailValidFragment, mEmail, mVerifyCodeType
|
||||
)
|
||||
} else {
|
||||
mRegisterViewModel.getEmailCode(
|
||||
activity as BaseActivity<*>, mEmail, mVerifyCodeType
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,18 @@ package com.abbidot.tracker.ui.fragment.account.cn
|
||||
import android.content.Context
|
||||
import android.text.InputFilter
|
||||
import android.text.InputType
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.FragmentAccountCnPhoneBinding
|
||||
import com.abbidot.tracker.ui.activity.account.AddEmailValidActivity
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
import com.abbidot.tracker.vm.cn.RegisterCNViewModel
|
||||
|
||||
/**
|
||||
* A simple [Fragment] subclass.
|
||||
@@ -19,6 +24,8 @@ import com.abbidot.tracker.util.ViewUtil
|
||||
class AccountCnPhoneFragment :
|
||||
BaseFragment<FragmentAccountCnPhoneBinding>(FragmentAccountCnPhoneBinding::inflate) {
|
||||
|
||||
private val mRegisterCNViewModel: RegisterCNViewModel by viewModels()
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(context: Context) =
|
||||
@@ -35,7 +42,7 @@ class AccountCnPhoneFragment :
|
||||
it.etInputContent.setHint(R.string.login_txt_phone)
|
||||
val filters = arrayOf<InputFilter>(InputFilter.LengthFilter(11))
|
||||
it.etInputContent.filters = filters
|
||||
it.etInputContent.inputType = InputType.TYPE_CLASS_PHONE
|
||||
it.etInputContent.inputType = InputType.TYPE_CLASS_NUMBER
|
||||
ViewUtil.instance.setInputViewErrorHideClick(
|
||||
mContext!!, it.rlEtInputLayout, tvAccountCnPhoneErrorTip, it.etInputContent
|
||||
)
|
||||
@@ -44,12 +51,50 @@ class AccountCnPhoneFragment :
|
||||
}
|
||||
}
|
||||
|
||||
override fun liveDataObserve() {
|
||||
mRegisterCNViewModel.mSendCodeResultLiveData.observe(viewLifecycleOwner) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
showToast(R.string.txt_code_success)
|
||||
getHostActivity(AddEmailValidActivity::class.java)?.switchFragment(1)
|
||||
setButtonEnabled(mViewBinding.btnAccountCnPhoneContinue, ConstantInt.Type1)
|
||||
}
|
||||
|
||||
override fun onRequestError(exceptionCode: String?) {
|
||||
setButtonEnabled(mViewBinding.btnAccountCnPhoneContinue, ConstantInt.Type1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun registerCNPhoneContinue() {
|
||||
mViewBinding.apply {
|
||||
if (!ilAccountCnPhonePolicyTerms.cbLoginAgreePrivacyCheckbox.isChecked) {
|
||||
val tips = getString(R.string.register_txt_agree1) + getString(
|
||||
R.string.register_txt_policy
|
||||
) + getString(R.string.register_txt_agree2) + getString(
|
||||
R.string.register_txt_terms
|
||||
)
|
||||
showToast(tips)
|
||||
return
|
||||
}
|
||||
val phone = ilAccountCnPhoneEditLayout.etInputContent.text.toString()
|
||||
if (TextUtils.isEmpty(phone) || phone.length < 11) {
|
||||
ViewUtil.instance.setInputViewErrorShow(
|
||||
mContext!!, ilAccountCnPhoneEditLayout.rlEtInputLayout, tvAccountCnPhoneErrorTip
|
||||
)
|
||||
return
|
||||
}
|
||||
getHostActivity(AddEmailValidActivity::class.java)?.setToEmail(phone)
|
||||
setButtonEnabled(btnAccountCnPhoneContinue, ConstantInt.Type0)
|
||||
mRegisterCNViewModel.sendCode(this@AccountCnPhoneFragment, phone, 1)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
mViewBinding.apply {
|
||||
when (v!!) {
|
||||
btnAccountCnPhoneContinue -> getHostActivity(AddEmailValidActivity::class.java)?.switchFragment(
|
||||
1
|
||||
)
|
||||
btnAccountCnPhoneContinue -> registerCNPhoneContinue()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -556,6 +556,7 @@ class Util {
|
||||
userBean.apply {
|
||||
MMKVUtil.putString(MMKVKey.UserId, userId)
|
||||
MMKVUtil.putString(MMKVKey.Email, email)
|
||||
MMKVUtil.putString(MMKVKey.Phone, phone)
|
||||
MMKVUtil.putString(MMKVKey.Token, token)
|
||||
MMKVUtil.putString(MMKVKey.UserName, userName)
|
||||
MMKVUtil.putInt(MMKVKey.MeasureUnit, measurementUnitType)
|
||||
|
||||
@@ -23,7 +23,6 @@ class UserProfileViewModel : ViewModel() {
|
||||
|
||||
val mGetEmailCodeLiveData = MutableLiveData<Result<UserBean>>()
|
||||
val mValidateCodeLiveData = MutableLiveData<Result<String>>()
|
||||
private val mRegisterLiveData = MutableLiveData<Result<String>>()
|
||||
val mCountryCodeLiveData = MutableLiveData<Result<MutableList<CountryCodeBean>>>()
|
||||
val mRegisterV2LiveData = MutableLiveData<Result<UserBean>>()
|
||||
val mUpdateUserInfoLiveData = MutableLiveData<Result<String>>()
|
||||
@@ -55,17 +54,6 @@ class UserProfileViewModel : ViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
fun register(fragment: BaseFragment<*>, email: String, password: String, userName: String) {
|
||||
fragment.showLoading(true)
|
||||
viewModelScope.launch {
|
||||
val result = NetworkApi.register(email, password, userName)
|
||||
mRegisterLiveData.value = result
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取国家代码号
|
||||
*/
|
||||
@@ -83,13 +71,14 @@ class UserProfileViewModel : ViewModel() {
|
||||
fun registerV2(
|
||||
activity: BaseActivity<*>,
|
||||
email: String,
|
||||
phone: String,
|
||||
password: String,
|
||||
userName: String,
|
||||
countryCode: String
|
||||
) {
|
||||
activity.showLoading(true)
|
||||
viewModelScope.launch {
|
||||
val result = NetworkApi.registerV2(email, password, userName, countryCode)
|
||||
val result = NetworkApi.registerV2(email,phone, password, userName, countryCode)
|
||||
mRegisterV2LiveData.value = result
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.abbidot.tracker.deprecated.ui.fragment.vm
|
||||
package com.abbidot.tracker.vm.cn
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
@@ -9,17 +9,16 @@ import com.abbidot.baselibrary.constant.EventName
|
||||
import com.abbidot.baselibrary.constant.MMKVKey
|
||||
import com.abbidot.baselibrary.eventbus.XEventBus
|
||||
import com.abbidot.baselibrary.util.MMKVUtil
|
||||
import com.abbidot.baselibrary.util.Utils
|
||||
import com.abbidot.tracker.R
|
||||
import com.abbidot.tracker.base.BaseActivity
|
||||
import com.abbidot.tracker.base.BaseFragment
|
||||
import com.abbidot.tracker.bean.UserBean
|
||||
import com.abbidot.tracker.constant.ConstantInt
|
||||
import com.abbidot.tracker.retrofit2.NetworkApi
|
||||
import com.abbidot.tracker.deprecated.ui.activity.LoginRegisterCNActivity
|
||||
import com.abbidot.tracker.ui.activity.HomeV2Activity
|
||||
import dagger.hilt.android.scopes.ActivityRetainedScoped
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.*
|
||||
import java.util.Random
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
@@ -48,15 +47,17 @@ class LoginCNViewModel @Inject constructor() : ViewModel() {
|
||||
/**
|
||||
* 处理微信、登录成功返回
|
||||
*/
|
||||
fun loginSuccess(activity: LoginRegisterCNActivity,
|
||||
userBean: UserBean,
|
||||
tipRes: Int = R.string.txt_login_successful) {
|
||||
fun loginSuccess(
|
||||
activity: BaseActivity<*>,
|
||||
userBean: UserBean,
|
||||
tipRes: Int = R.string.txt_login_successful
|
||||
) {
|
||||
//判断有没有绑定手机号
|
||||
if (userBean.status == ConstantInt.Close) {
|
||||
activity.apply {
|
||||
mWXId = userBean.wxId
|
||||
switchFragment(LoginRegisterCNActivity.Fragment_Bind_Phone)
|
||||
}
|
||||
// activity.apply {
|
||||
// mWXId = userBean.wxId
|
||||
// switchFragment(LoginRegisterCNActivity.Fragment_Bind_Phone)
|
||||
// }
|
||||
} else {
|
||||
//通知欢迎页面关闭
|
||||
XEventBus.post(EventName.FinishActivity)
|
||||
@@ -104,13 +105,11 @@ class LoginCNViewModel @Inject constructor() : ViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证码登录
|
||||
* 密码登录
|
||||
*/
|
||||
fun accountPasswordLogin(fragment: BaseFragment<*>, phone: String, password: String) {
|
||||
fragment.showLoading(true)
|
||||
fun accountPasswordLogin(phone: String, password: String) {
|
||||
viewModelScope.launch {
|
||||
val pwd = Utils.get32Md5Value(password)
|
||||
val result = NetworkApi.accountPasswordLogin(phone, pwd)
|
||||
val result = NetworkApi.accountPasswordLogin(phone, password)
|
||||
mAccountPwdLoginResultLiveData.value = result
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.abbidot.tracker.deprecated.ui.fragment.vm
|
||||
package com.abbidot.tracker.vm.cn
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
@@ -16,17 +16,17 @@ import kotlinx.coroutines.launch
|
||||
class RegisterCNViewModel : ViewModel() {
|
||||
val mSendCodeResultLiveData = MutableLiveData<Result<String>>()
|
||||
val mValidateCodeResultLiveData = MutableLiveData<Result<String>>()
|
||||
val mPhoneRegisterResultLiveData = MutableLiveData<Result<String>>()
|
||||
// val mPhoneRegisterResultLiveData = MutableLiveData<Result<String>>()
|
||||
val mSetNewPasswordResultLiveData = MutableLiveData<Result<String>>()
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
* @param type 发送类型 1是验证码登录 2微信绑定 3注册 4忘记密码
|
||||
* @param type 验证码类型 1是注册 2是忘记密码 3是验证码登录 4微信绑定
|
||||
*/
|
||||
fun sendCode(fragment: BaseFragment<*>, phone: String, type: Int) {
|
||||
fragment.showLoading(true)
|
||||
viewModelScope.launch {
|
||||
val result = NetworkApi.sendCode(phone, type)
|
||||
val result = NetworkApi.sendPhoneCode(phone, type)
|
||||
mSendCodeResultLiveData.value = result
|
||||
}
|
||||
}
|
||||
@@ -42,18 +42,6 @@ class RegisterCNViewModel : ViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
fun register(fragment: BaseFragment<*>, phone: String, password: String) {
|
||||
fragment.showLoading(true)
|
||||
viewModelScope.launch {
|
||||
val pwd = Utils.get32Md5Value(password)
|
||||
val result = NetworkApi.register(phone, pwd)
|
||||
mPhoneRegisterResultLiveData.value = result
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@@ -3,7 +3,7 @@ package com.abbidot.tracker.wxapi
|
||||
import com.abbidot.baselibrary.constant.EventName
|
||||
import com.abbidot.baselibrary.eventbus.XEventBus
|
||||
import com.abbidot.baselibrary.util.LogUtil
|
||||
import com.abbidot.tracker.deprecated.ui.fragment.vm.LoginCNViewModel
|
||||
import com.abbidot.tracker.vm.cn.LoginCNViewModel
|
||||
import com.hjq.toast.Toaster
|
||||
import com.tencent.mm.opensdk.constants.ConstantsAPI
|
||||
import com.tencent.mm.opensdk.modelbase.BaseResp
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/history_data_address"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:text="@string/txt_show_track_point"
|
||||
android:textSize="@dimen/textSize16"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
|
||||
@@ -28,12 +28,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_130" />
|
||||
|
||||
<include
|
||||
android:id="@+id/recharge_order_detail_cn_amount"
|
||||
layout="@layout/item_recharge_amount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18" />
|
||||
|
||||
|
||||
<com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView
|
||||
android:id="@+id/recharge_order_detail_cn_pay_way"
|
||||
@@ -76,7 +71,6 @@
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:text="@string/txt_pay_order_off"
|
||||
android:textColor="@color/order_detail_color"
|
||||
android:textSize="@dimen/textSize14"
|
||||
android:visibility="gone"
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<include
|
||||
android:id="@+id/il_account_cn_phone_policy_terms"
|
||||
layout="@layout/layout_create_account_policy_terms"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape12_gray_white_bg">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/recharge_amount_bg_layout"
|
||||
android:layout_width="@dimen/dp_150"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/recharge_amount_normal_hot_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/ico_pay_hot" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/recharge_amount_two_time"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="@string/pet_managet_age"
|
||||
android:textSize="@dimen/textSize16"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/recharge_amount_two_time"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:background="@drawable/bg_pay_amount">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/recharge_amount_two_money"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/textSize28"
|
||||
app:typeface="@string/number_din_cond_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/recharge_amount_one_conform"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignBaseline="@id/recharge_amount_two_money"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:layout_toStartOf="@id/recharge_amount_two_money"
|
||||
android:text="@string/txt_month_until"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/textSize16"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/recharge_amount_two_description"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_below="@id/recharge_amount_two_money"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/txt_perMonth"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/textSize16"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_recharge_amount_name"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:layout_toEndOf="@id/recharge_amount_bg_layout"
|
||||
android:gravity="start"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_subscription_plan_content"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/txt_recharge_amount_name"
|
||||
android:layout_alignStart="@id/txt_recharge_amount_name"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_pay_amount_detail1"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</RelativeLayout>
|
||||
@@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_subscription_plan_title"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/txt_pay_order_detail_plan"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_subscription_plan_content"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_toEndOf="@id/txt_subscription_plan_title"
|
||||
android:text="@string/txt_pay_order_detail_plan_name"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_payment_interval_title"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/txt_subscription_plan_title"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="@string/txt_pay_order_detail_interval"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_payment_interval_content"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignStart="@id/txt_subscription_plan_content"
|
||||
android:layout_alignTop="@id/txt_payment_interval_title"
|
||||
android:layout_toEndOf="@id/txt_payment_interval_title"
|
||||
android:text="@string/pet_managet_age_1"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_expiration_date_title"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/txt_payment_interval_title"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="@string/txt_pay_order_detail_date"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_expiration_date_content"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignStart="@id/txt_subscription_plan_content"
|
||||
android:layout_alignTop="@id/txt_expiration_date_title"
|
||||
android:layout_toEndOf="@id/txt_expiration_date_title"
|
||||
android:text=" "
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/txt_detail_sub_content"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/txt_expiration_date_title"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="@string/txt_pay_order_detail_sub_on"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -44,47 +44,40 @@
|
||||
|
||||
<!--简体中文-Android-->
|
||||
<!-- diff -->
|
||||
<string name="register_txt_noreceive">还没有收到验证码?</string>
|
||||
|
||||
<string name="acccount_height_how_detail">从地面测量到宠物肩胛骨的最高点</string>
|
||||
<string name="tracker_manage_set_battery">电量:%s%%</string>
|
||||
<string name="pet_managet_age">%s年</string>
|
||||
<string name="pet_managet_age_1">%d年</string>
|
||||
<string name="pet_manage_weight">%d磅</string>
|
||||
<string name="pet_manage_detail_earned">%d/100 已获得</string>
|
||||
|
||||
<string name="map_current_update_time">更新时间:%s</string>
|
||||
<string name="txt_show_track_point">显示轨迹/点</string>
|
||||
<string name="txt_share_pet_tips">确定要分享\'%s\'的宠物数据</string>
|
||||
|
||||
|
||||
<string name="select_puzzle_photos">请选择2 \~ 9张照片</string>
|
||||
<string name="txt_pay_amount_detail1">此后以%.2f/年续订,可随时取消</string>
|
||||
<string name="txt_pay_order_off">已优惠%d</string>
|
||||
<string name="txt_pay_order_detail_plan_name">%d年连接订阅</string>
|
||||
<string name="txt_pay_order_detail_sub_on">订阅计划有效期至%s</string>
|
||||
<string name="txt_pay_order_detail_sub_off">自动续订已关闭,订阅计划将在%s之后不可用</string>
|
||||
<string name="txt_confirm_save_card">保存并确认</string>
|
||||
|
||||
<string name="txt_about_version">版本%s</string>
|
||||
<string name="txt_service_contract">服务协议</string>
|
||||
<string name="txt_read_and_accept">接受隐私政策与条款。</string>
|
||||
<string name="txt_device_has_bind">该设备已被%s绑定</string>
|
||||
<string name="txt_activity_goal">运动目标</string>
|
||||
<string name="txt_end_time">结束时间</string>
|
||||
<string name="txt_perMonth">$%s/月</string>
|
||||
|
||||
<string name="txt_fix_goal_tip">为宠物定制每日趣味活动,专注早晚互动,兼顾其需求、物种与品种</string>
|
||||
<string name="txt_invite">+\t邀请</string>
|
||||
<string name="txt_invite_family_tip">共享的家庭成员可查看宠物位置和日期,但无法编辑</string>
|
||||
<string name="txt_congratulations_tip">宠物信息设置成功,获得安全徽章!</string>
|
||||
|
||||
<string name="txt_otp_verification_tips">请输入发送至 %s 的4位数验证码</string>
|
||||
<string name="txt_time_remaining">剩余时间:\t</string>
|
||||
<string name="txt_create_account_terms1">注册即表示接受服务条款和隐私政策</string>
|
||||
|
||||
<string name="txt_pair_tracker_tip">确认6字符ID与追踪器背面一致</string>
|
||||
<string name="txt_input_id_tip">在设备背面找到6位数ID</string>
|
||||
<string name="txt_add_tracker_tip">设备ID错误,请核对后重试</string>
|
||||
<string name="txt_add_tracker_tip2">设备已被绑定,请核对后重试</string>
|
||||
|
||||
<string name="txt_success_paired">配对成功</string>
|
||||
<string name="txt_expires_on">有效期至</string>
|
||||
<string name="txt_renew_year1">(续订价</string>
|
||||
<string name="txt_is_pet_home">这是您宠物的常驻地吗?</string>
|
||||
<string name="txt_ft_unit">%s英尺 (ft)</string>
|
||||
<string name="txt_mph_unit">%s英里/小时 (mph)</string>
|
||||
|
||||
|
||||
<string name="txt_unassign_other">解绑 %s</string>
|
||||
<string name="txt_family_delete">您确定要删除家庭成员%s</string>
|
||||
<string name="txt_ble_permissions_tip">•\t 确保活动数据同步准确的必要条件。</string>
|
||||
@@ -95,10 +88,10 @@
|
||||
<string name="txt_tracker_battery_tip4">选择“宠物” > “追踪器” ,点击“GPS更新间隔” ,选择3/5/10/15分钟。</string>
|
||||
<string name="txt_tracker_battery_tip5">(更短的网络连接间隔会更快耗尽设备电量。默认情况下,网络每15分钟重新连接一次。)</string>
|
||||
<string name="txt_tracker_battery_tip6">当直播开启时,追踪器进入快速定位和联网状态,通常在15-20秒内完成。此模式耗电最快,因此最好仅在紧急情况下使用。</string>
|
||||
<string name="txt_create_fence_tip4">开启通知:前往“账户” > "设置"。点击"通知"并开启。</string>
|
||||
|
||||
<string name="txt_renewal_year1">续费:</string>
|
||||
<string name="txt_month_unit">/月 x%s</string>
|
||||
<string name="txt_year_unit">/%s 年</string>
|
||||
|
||||
<string name="txt_change_email_tip">将发送验证码至 %s</string>
|
||||
<string name="txt_upgrade_unlock">升级至高级版,解锁独家功能!</string>
|
||||
<string name="txt_new_firmware_version">检测到新固件版本:%s</string>
|
||||
@@ -122,7 +115,7 @@
|
||||
<string name="txt_package_permission2">1.设备1次更换\n2. 专属客户支持\n3. 年度保障服务</string>
|
||||
<string name="txt_package_permission3">1. VIP 优先支持\n2. 快速更换服务(含1次)\n3. 增强型保障\n4. 无忧宠物保护</string>
|
||||
<string name="txt_min_unit_lower">%s 分钟</string>
|
||||
<string name="txt_card_list_end">截止至%s</string>
|
||||
|
||||
<string name="txt_duration_min_unit">%s 分钟</string>
|
||||
<string name="txt_legal_info_content">欢迎使用爱彼宠物!为了更好地保障您的权益,我们将在本《隐私政策》声明中向您说明我们如何收集、使用、处理和保障您提供给我们的信息。请仔细阅读《隐私政策》和《服务条款》。</string>
|
||||
<string name="start_txt_yes">是的</string>
|
||||
@@ -198,20 +191,18 @@
|
||||
<string name="login_txt_fogot">忘记密码?</string>
|
||||
<string name="login_txt_login_wechat">微信登录</string>
|
||||
<string name="login_txt_login_code">验证码登录</string>
|
||||
<string name="login_txt_login_apple">Apple登录</string>
|
||||
<string name="login_txt_login_account">账号登录</string>
|
||||
<string name="txt_set_new_password">设置新密码</string>
|
||||
|
||||
|
||||
|
||||
<string name="txt_code_success">验证码已发送</string>
|
||||
<string name="login_txt_no_account">没有账号?</string>
|
||||
<string name="login_txt_login_password">密码登录</string>
|
||||
|
||||
<string name="login_txt_no_account_sign_up">注册</string>
|
||||
<string name="register_txt_hey">嗨,</string>
|
||||
|
||||
<string name="register_txt_back_login">返回登录</string>
|
||||
<string name="register_txt_set_password">设置密码</string>
|
||||
|
||||
<string name="register_txt_name">昵称</string>
|
||||
<string name="register_txt_get_code">获取</string>
|
||||
<string name="register_txt_sented_code">我们已将验证码发送到您的电子邮件</string>
|
||||
<string name="register_txt_verification">验证码</string>
|
||||
|
||||
<string name="register_txt_next">下一步</string>
|
||||
<string name="register_txt_resend">重新发送</string>
|
||||
<string name="register_txt_agree">同意《服务协议》和《隐私政策》</string>
|
||||
@@ -220,22 +211,22 @@
|
||||
<string name="register_txt_terms">《服务协议》</string>
|
||||
<string name="register_txt_policy">《隐私政策》</string>
|
||||
<string name="register_txt_submit">提交</string>
|
||||
<string name="register_txt_bind_phone">绑定</string>
|
||||
<string name="login_txt_login_finish">完成</string>
|
||||
<string name="system_txt_data">数据</string>
|
||||
|
||||
|
||||
|
||||
<string name="system_txt_map">地图</string>
|
||||
<string name="system_txt_profile">我的</string>
|
||||
<string name="txt_my_orders">我的订单</string>
|
||||
<string name="txt_help_center">帮助中心</string>
|
||||
|
||||
|
||||
<string name="txt_feedback">反馈中心</string>
|
||||
<string name="txt_setting">设置</string>
|
||||
<string name="txt_setting_title">设置</string>
|
||||
|
||||
<string name="txt_setting_notification">消息中心</string>
|
||||
<string name="txt_setting_language">语言</string>
|
||||
|
||||
<string name="txt_setting_account">帐户</string>
|
||||
<string name="txt_setting_about">关于</string>
|
||||
<string name="txt_setting_clear">清除缓存</string>
|
||||
<string name="txt_setting_logout">退出登录</string>
|
||||
|
||||
<string name="txt_feedback_title">反馈中心</string>
|
||||
<string name="txt_feedback_type">问题类型(必填)</string>
|
||||
<string name="txt_feedback_type_app">关于APP</string>
|
||||
@@ -246,48 +237,47 @@
|
||||
<string name="txt_feedback_email">请留下您的邮箱,以便我们更快地帮助您</string>
|
||||
<string name="acccount_img">上传图片</string>
|
||||
<string name="acccount_name">名称</string>
|
||||
<string name="acccount_gender">性别</string>
|
||||
|
||||
<string name="acccount_birthday">生日</string>
|
||||
<string name="acccount_location">地点</string>
|
||||
|
||||
<string name="acccount_email">邮箱</string>
|
||||
<string name="acccount_phone">手机</string>
|
||||
|
||||
<string name="acccount_breed">品种</string>
|
||||
<string name="acccount_weight">体重</string>
|
||||
<string name="acccount_height">肩高</string>
|
||||
<string name="acccount_height_how">如何测量身高</string>
|
||||
<string name="acccount_btn_save">保存</string>
|
||||
<string name="acccount_label">标签</string>
|
||||
<string name="tracker_enter_id">输入设备ID</string>
|
||||
|
||||
<string name="tracker_activate">激活</string>
|
||||
<string name="tracker_activate_cancel">激活并继续</string>
|
||||
|
||||
<string name="tracker_activate_no">不用了,谢谢</string>
|
||||
<string name="tracker_activate_yes">激活</string>
|
||||
|
||||
<string name="tracker_manage">我的设备</string>
|
||||
<string name="tracker_manage_title">设备</string>
|
||||
|
||||
<string name="tracker_manage_mine">我的设备</string>
|
||||
<string name="tracker_manage_authorized">被授权的</string>
|
||||
|
||||
<string name="tracker_manage_led">LED灯</string>
|
||||
<string name="tracker_manage_fence">围栏</string>
|
||||
<string name="tracker_manage_set">设置</string>
|
||||
|
||||
|
||||
<string name="tracker_manage_add_pet">新宠物</string>
|
||||
<string name="tracker_manage_set_unbind">解绑</string>
|
||||
<string name="tracker_manage_set_network">网络</string>
|
||||
<string name="tracker_manage_set_gps">GPS</string>
|
||||
<string name="tracker_manage_set_card_day">天</string>
|
||||
|
||||
<string name="tracker_manage_set_ble_connect">蓝牙已连接</string>
|
||||
<string name="tracker_manage_set_ble_unconnect">蓝牙未连接</string>
|
||||
<string name="tracker_manage_set_led">LED灯</string>
|
||||
<string name="tracker_manage_set_led_off">关</string>
|
||||
<string name="tracker_manage_set_led_on">开</string>
|
||||
<string name="tracker_manage_set_Fence">围栏</string>
|
||||
|
||||
<string name="tracker_manage_set_family">家人</string>
|
||||
<string name="tracker_manage_set_add_family">添加家人</string>
|
||||
<string name="tracker_manage_set_add_family_detail">邀请您的家人分享宠物的位置或活动。 家庭成员不能创建围栏或修改设置。</string>
|
||||
|
||||
<string name="tracker_manage_set_add_family_invite">邀请</string>
|
||||
<string name="tracker_manage_set_add_family_succ">发送成功</string>
|
||||
<string name="tracker_manage_set_add_family_back">返回</string>
|
||||
<string name="tracker_manage_set_duration">追踪间隔</string>
|
||||
<string name="tracker_manage_set_power">关机</string>
|
||||
|
||||
<string name="tracker_manage_set_fence_title">围栏</string>
|
||||
<string name="tracker_manage_set_fence_detail">围栏详情</string>
|
||||
<string name="tracker_manage_set_fence_name">名称</string>
|
||||
@@ -707,7 +697,7 @@
|
||||
<string name="txt_subscription_detail">订阅详情</string>
|
||||
<string name="txt_tracker_id">设备ID</string>
|
||||
<string name="txt_plan">套餐:</string>
|
||||
<string name="txt_renew_year2">/年)</string>
|
||||
|
||||
<string name="txt_renews_on">续订日期:</string>
|
||||
<string name="txt_power_saving_zone_tip">添加常驻地可提升电池续航并提供额外安全保障</string>
|
||||
<string name="txt_power_saving_zone">建立WiFi区域</string>
|
||||
@@ -757,8 +747,8 @@
|
||||
<string name="txt_no_member_yet">尚无成员</string>
|
||||
<string name="txt_invite_new">+邀请</string>
|
||||
<string name="txt_invite_members">邀请成员</string>
|
||||
<string name="txt_delete_pet_data1">这将从您的账户中永久删除所有</string>
|
||||
<string name="txt_delete_pet_data2">数据</string>
|
||||
|
||||
|
||||
<string name="txt_home">家</string>
|
||||
<string name="txt_live_duration">直播时长</string>
|
||||
<string name="txt_about_live_duration">关于直播时长</string>
|
||||
@@ -885,15 +875,14 @@
|
||||
<string name="txt_how_to_get">如何获取?</string>
|
||||
<string name="txt_family_invitation">邀请家人</string>
|
||||
<string name="txt_active_time1">活跃时长:</string>
|
||||
<string name="txt_family_invitation_dec1">您的朋友</string>
|
||||
<string name="txt_family_invitation_dec2">邀请您成为</string>
|
||||
<string name="txt_family_invitation_dec3">的家人。</string>
|
||||
|
||||
|
||||
<string name="txt_expires_on1">有效期至:</string>
|
||||
<string name="txt_expires_on2">过期于:</string>
|
||||
<string name="txt_years">年</string>
|
||||
<string name="txt_mouths">月</string>
|
||||
<string name="txt_days">天</string>
|
||||
<string name="txt_auto_renew1">自动续费</string>
|
||||
|
||||
|
||||
<string name="txt_subscription_history">订阅订单</string>
|
||||
<string name="txt_order_id">订单号:</string>
|
||||
<string name="txt_request_refund_dec">请输入您的退款原因</string>
|
||||
@@ -902,10 +891,8 @@
|
||||
<string name="txt_waiting">等待处理</string>
|
||||
<string name="txt_refunding">退款中</string>
|
||||
<string name="txt_refunded">已退款</string>
|
||||
<string name="txt_renewal_year2">/年,于</string>
|
||||
<string name="txt_renewal_month1">续费:</string>
|
||||
<string name="txt_renewal_month2">/月,于</string>
|
||||
<string name="txt_replace_guarantee">换新保障</string>
|
||||
|
||||
|
||||
<string name="txt_enter_discount_code">输入折扣码</string>
|
||||
<string name="txt_check">验证</string>
|
||||
<string name="txt_annual_care_text">年度护理</string>
|
||||
|
||||
Reference in New Issue
Block a user