Commit 90a7b17a by 徐健

backup

parent 0d8e4013
......@@ -45,7 +45,7 @@ ext {
"m-confide" : "0.0.43",
"m-consultant" : "0.0.53",
"m-fm" : "0.0.25",
"m-user" : "0.0.44.2",
"m-user" : "0.0.44.6",
"m-home" : "0.0.16",
"m-im" : "0.0.9",
"m-dynamic" : "0.0.3",
......@@ -72,7 +72,7 @@ ext {
"ydl-platform" : "0.0.33.4",
//第二步 若干
"ydl-webview" : "0.0.32.3",
"ydl-webview" : "0.0.32.4",
"ydl-media" : "0.0.16",
"ydl-pay" : "0.0.13",
"m-audioim" : "0.0.42",
......
......@@ -244,6 +244,8 @@
<ImageView
android:layout_width="16dp"
android:layout_height="8dp"
android:layout_gravity="top"
android:layout_marginTop="20dp"
android:src="@drawable/im_expert_service_to_right_icon"/>
<LinearLayout
android:layout_width="0dp"
......@@ -267,6 +269,8 @@
<ImageView
android:layout_width="16dp"
android:layout_height="8dp"
android:layout_gravity="top"
android:layout_marginTop="20dp"
android:src="@drawable/im_expert_service_to_right_icon"/>
<LinearLayout
android:layout_width="0dp"
......@@ -290,6 +294,8 @@
<ImageView
android:layout_width="16dp"
android:layout_height="8dp"
android:layout_gravity="top"
android:layout_marginTop="20dp"
android:src="@drawable/im_expert_service_to_right_icon"/>
<LinearLayout
android:layout_width="0dp"
......
......@@ -176,5 +176,5 @@ interface UserApi {
//获取隐私政策数据
@GET("site/get-privacy-content")
fun getSecretData(): Observable<BaseResponse<String>>
fun getSecretData(): Observable<BaseResponse<SecretResponse>>
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ import com.yidianling.user.http.request.*
import com.yidianling.user.http.response.CheckPassword
import com.yidianling.user.http.response.CountryResponse
import com.yidianling.user.http.response.ExistResponse
import com.yidianling.user.http.response.SecretResponse
import io.reactivex.Observable
/**
......@@ -62,5 +63,5 @@ interface UserHttp {
fun unBindThirdLogin(param: UnBindThirdLoginParam): Observable<BaseResponse<Any>>
fun getSecretData(): Observable<BaseResponse<String>>
fun getSecretData(): Observable<BaseResponse<SecretResponse>>
}
\ No newline at end of file
......@@ -19,6 +19,7 @@ import com.yidianling.user.http.request.*
import com.yidianling.user.http.response.CheckPassword
import com.yidianling.user.http.response.CountryResponse
import com.yidianling.user.http.response.ExistResponse
import com.yidianling.user.http.response.SecretResponse
import com.yidianling.user.rxlogin.LoginObservable
import io.reactivex.Observable
import io.reactivex.schedulers.Schedulers
......@@ -190,7 +191,7 @@ class UserHttpImpl private constructor() : UserHttp {
return getUserApi().unBindThirdLogin(body)
}
override fun getSecretData(): Observable<BaseResponse<String>> {
override fun getSecretData(): Observable<BaseResponse<SecretResponse>> {
return getUserApi().getSecretData()
}
......
package com.yidianling.user.http.response;
/**
* is_open 弹窗开关
* 返回值:1开启;2关闭
*
* data.content 隐私内容
*/
public class SecretResponse {
int is_open = 2;
String content = "";
public int getIs_open() {
return is_open;
}
public void setContent(String content) {
this.content = content;
}
public String getContent() {
return content;
}
public void setIs_open(int is_open) {
this.is_open = is_open;
}
}
package com.yidianling.user.ui.login
import android.Manifest
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.graphics.Color
......@@ -25,6 +26,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions
import com.umeng.socialize.UMShareAPI
import com.umeng.socialize.UMShareConfig
import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.ActivityManager
......@@ -41,6 +43,7 @@ import com.yidianling.user.UserHelper
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.AliAuthBean
import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.UserHttpImpl
import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.http.request.PhoneLoginAutoParam
import com.yidianling.user.http.response.ChcekPhoneResponeBean
......@@ -51,6 +54,8 @@ import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.CountryListActivity
import com.yidianling.user.ui.login.contract.ILoginContract
import com.yidianling.user.ui.login.presenter.LoginPresenterImpl
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.user_activity_register_and_login.*
/**
......@@ -80,6 +85,8 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
private var handler: Handler? = null
private var isFromGuide = false//是否来自启动页
private var isActivityStop: Boolean = false
companion object {
private var BIND_PHONE = "bind_phone"//用于判断时候是绑定手机号
private var IS_FROM_GUIDE = "isFromGuide"//是否来自启动页
......@@ -130,13 +137,35 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
judgeSecretPage()
}
override fun onResume() {
super.onResume()
isActivityStop = false
}
override fun onStop() {
super.onStop()
isActivityStop = true
}
/**
* 判定是否展示隐私弹窗页面
*/
@SuppressLint("CheckResult")
private fun judgeSecretPage() {
var hasAgreeSecret: String = SharedPreferencesEditor.getString("hasAgreeSecret")
if (isFromGuide && hasAgreeSecret == "") {
startActivity(Intent(this, SecretActivity::class.java))
UserHttpImpl.getInstance().getSecretData()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
if (it.code == 0 && !isActivityStop) {
if (it.data.is_open == 1) {
SecretActivity.startProtocol(this, it.data.content)
}
}
}, {
ToastUtil.toastShort(R.string.platform_network_error)
})
}
}
......
package com.yidianling.user.ui.login
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Handler
import android.text.Html
......@@ -27,21 +29,39 @@ import kotlin.system.exitProcess
class SecretActivity : BaseActivity() {
private var secretDialog: SecretDialog? = null
private var mSecretProtocolString: String = ""
companion object {
val SECRET_PROTOCOL:String = "secret_protocol"
fun startProtocol(context: Context, secretProtocolString: String) {
val intent = Intent(context, SecretActivity::class.java)
intent.putExtra(SECRET_PROTOCOL, secretProtocolString)
context.startActivity(intent)
}
}
override fun layoutResId(): Int {
return R.layout.user_activity_secret
}
override fun initDataAndEvent() {
getParam()
initView()
}
private fun getParam() {
mSecretProtocolString = intent.getStringExtra(SECRET_PROTOCOL)?:""
if (null != user_secret_desc) {
user_secret_desc.text = Html.fromHtml(mSecretProtocolString)
}
}
private fun initView() {
initStatus()
initData()
user_secret_no_agree.setOnClickListener {
if (null == secretDialog) {
secretDialog = SecretDialog(this, object : SecretDialog.OnSecretDialogListener {
......@@ -76,26 +96,6 @@ class SecretActivity : BaseActivity() {
}
}
@SuppressLint("CheckResult")
private fun initData() {
UserHttpImpl.getInstance().getSecretData()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnSubscribe { (this as BaseActivity).showProgressDialog() }
.doAfterTerminate {
(this as BaseActivity).dismissProgressDialog()
}
.subscribe({
if (it.code == 0) {
if (null != user_secret_desc) {
user_secret_desc.text = Html.fromHtml(it.data)
}
}
}, {
ToastUtil.toastShort(R.string.platform_network_error)
})
}
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return false
......
......@@ -42,9 +42,10 @@
<ScrollView
android:layout_below="@+id/user_top_rl"
android:layout_alignBottom="@+id/secret_bottom_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="100dp">
android:layout_marginBottom="42dp">
<LinearLayout
android:layout_width="match_parent"
......@@ -63,15 +64,22 @@
我们深知个人隐私的重要性,为了您更好的使用本APP,希望您着重关注:\n\n1. 为向您提供交易相关基本功能,我们会收集、使用必要的信息;\n
2. 基于您的明示授权,我们可能会获取您的位置(为您提供附近的咨询师等)、设备号信息(以保障您账号与交易安全)等信息,您有权拒绝或取消授权;\n
3. 我们会采业界先进的安全措施保护您的信息安全;\n
4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\n5. 您可以查询、更正、删除您的个人信息。"
4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\n
5. 您可以查询、更正、删除您的个人信息。"
android:textColor="#444444"
android:textSize="14dp" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/secret_bottom_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:orientation="horizontal">
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_marginBottom="185dp"
android:layout_marginLeft="@dimen/platform_dp_25">
<TextView
android:layout_width="wrap_content"
......@@ -104,9 +112,6 @@
android:textSize="14dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -1250,6 +1250,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public void onSure() {
hideJavaTitleBar();
testQuestionsPageReturnDialog.dismiss();
}
}).setTitle("你确定要退出测试吗?")
......
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