Commit f4e5b448 authored by liusheng's avatar liusheng

添加隐私政策和用户协议

parent d27ca493
......@@ -94,7 +94,7 @@
tools:replace="android:authorities"
android:authorities="com.ccwangluo.accelerator.ccwangluo.XGVIP_PUSH_AUTH"
android:exported="false" />
<activity android:name=".ui.web.BlankActivity"/>
<activity
android:name=".wxapi.WXEntryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
......
package com.ccwangluo.accelerator.ui.login
import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.core.widget.addTextChangedListener
import androidx.lifecycle.ViewModelProvider
import com.ccwangluo.accelerator.databinding.FragmentLoginPhoneBinding
import com.ccwangluo.accelerator.ui.web.BlankActivity
import com.ccwangluo.accelerator.ui.web.CommonWebViewFragment
import com.ccwangluo.accelerator.utils.AcceleratorUtils
import com.ccwangluo.accelerator.utils.LoginUtils
import com.github.shadowsocks.http.HttpConfig
import com.hjq.toast.ToastUtils
import com.xuexiang.xpage.annotation.Page
import com.xuexiang.xpage.base.XPageActivity
import com.xuexiang.xpage.core.PageOption
import com.xuexiang.xpage.enums.CoreAnim
import com.xuexiang.xutil.common.StringUtils
import java.util.regex.Pattern
......@@ -92,12 +98,16 @@ class PhoneLoginActivity : XPageActivity() {
fun initListeners() {
binding.privacyAggreement.setOnClickListener({
})
binding.privacyAggreement.setOnClickListener {
val intent = Intent(this, BlankActivity::class.java)
intent.putExtra(CommonWebViewFragment.WEBVIEW_URL_KEY, HttpConfig.url_privacy_policy)
startActivity(intent)
}
binding.userAggreement.setOnClickListener {
val intent = Intent(this,BlankActivity::class.java)
intent.putExtra(CommonWebViewFragment.WEBVIEW_URL_KEY, HttpConfig.url_user_agreement)
startActivity(intent)
}
binding.phoneClear.setOnClickListener {
......
......@@ -48,7 +48,7 @@ class NewsObjectModel : ViewModel() {
map.put("type", it)
}
if (LoginUtils.token == null) {
LoginUtils.login(xPageFragment,{})
xPageFragment.context?.let { LoginUtils.login(it,{}) }
return
}
viewModelScope.launch(Dispatchers.IO) {
......
package com.ccwangluo.accelerator.ui.web
import android.os.Bundle
import android.os.PersistableBundle
import com.github.shadowsocks.http.HttpConfig
import com.xuexiang.xpage.base.XPageActivity
import com.xuexiang.xpage.core.PageOption
class BlankActivity : XPageActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
intent?.let {
val url = it.getStringExtra(CommonWebViewFragment.WEBVIEW_URL_KEY)
val params = Bundle()
params.putString(CommonWebViewFragment.WEBVIEW_URL_KEY,url)
PageOption.to(CommonWebViewFragment::class.java).setBundle(params).open(this)
}
}
}
\ No newline at end of file
......@@ -22,7 +22,6 @@ import com.github.shadowsocks.bg.BaseService
import com.github.shadowsocks.database.Profile
import com.github.shadowsocks.database.ProfileManager
import com.github.shadowsocks.http.LineConfig
import com.github.shadowsocks.net.NetworkManager
import com.github.shadowsocks.preference.DataStore
import com.hjq.toast.ToastUtils
import com.tencent.mmkv.MMKV
......
......@@ -13,6 +13,8 @@ import com.github.shadowsocks.Core
import com.hjq.toast.ToastUtils
import com.tencent.mmkv.MMKV
import com.xuexiang.xpage.base.XPageFragment
import com.xuexiang.xpage.core.PageOption
import com.xuexiang.xutil.app.AppUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
......@@ -132,7 +134,7 @@ object LoginUtils {
context,
PhoneLoginActivity::class.java
)
intent.addFlags(FLAG_ACTIVITY_NEW_TASK )
// intent.addFlags(FLAG_ACTIVITY_NEW_TASK )
context.startActivity(
intent
)
......
......@@ -14,6 +14,7 @@ import com.ccwangluo.accelerator.ui.login.PhoneLoginActivity
import com.chuanglan.shanyan_sdk.OneKeyLoginManager
import com.chuanglan.shanyan_sdk.tool.ShanYanUIConfig
import com.github.shadowsocks.http.HttpConfig
import com.xuexiang.xpage.base.XPageFragment
import com.xuexiang.xpage.core.PageOption
import org.json.JSONObject
......@@ -158,11 +159,11 @@ object PhoneUtils {
)
.setAppPrivacyOne(
"《用户协议》",
"https://api.253.com/api_doc/yin-si-zheng-ce/wei-hu-wang-luo-an-quan-sheng-ming.html"
HttpConfig.url_user_agreement
)
.setAppPrivacyTwo(
"《隐私政策》",
"https://api.253.com/api_doc/yin-si-zheng-ce/ge-ren-xin-xi-bao-hu-sheng-ming.html"
HttpConfig.url_privacy_policy
) //设置隐私条款2名称和URL(名称,url)
//设置协议外部文字描述
.setPrivacyText("你已阅读并同意", "、", "和", "", "")
......
......@@ -16,7 +16,12 @@ object HttpConfig {
// val UI_MAIN_URL = "https://cc-tt-front.srccwl.com/#" //生产
//隐私协议地址
val privacy_url = "http:wwww.baidu.com"
val privacy_url = "https://sdk-static.srccwl.com/tt_html/index.html"
//用户协议
val url_user_agreement="https://sdk-static.srccwl.com/tt_html/service.html"
//隐私政策
val url_privacy_policy="https://sdk-static.srccwl.com/tt_html/private.html"
val UI_MESSAGE_URL = "/message"
......
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