Commit b5a2cffc authored by sheteng's avatar sheteng

打点和权限说明

parent a5e8f6c8
...@@ -44,7 +44,7 @@ class App : Application(), androidx.work.Configuration.Provider by Core { ...@@ -44,7 +44,7 @@ class App : Application(), androidx.work.Configuration.Provider by Core {
// 微信设置 // 微信设置
PlatformConfig.setWeixin("wx9271931475fae8ce","8f8686adb87efa476af92f2ccd196dad"); PlatformConfig.setWeixin("wx9271931475fae8ce","8f8686adb87efa476af92f2ccd196dad");
PlatformConfig.setWXFileProvider("com.ccwangluo.accelerator.fileprovider"); PlatformConfig.setWXFileProvider("com.ccwangluo.accelerator.fileprovider");
// QQ设置 // QQ设置
PlatformConfig.setQQZone("101994779","7c34e16cadc3040bb3e8fa900c8a9c0f"); PlatformConfig.setQQZone("101994779","7c34e16cadc3040bb3e8fa900c8a9c0f");
PlatformConfig.setQQFileProvider("com.tencent.sample2.fileprovider"); PlatformConfig.setQQFileProvider("com.tencent.sample2.fileprovider");
} }
......
...@@ -63,6 +63,7 @@ class MainActivity() : XPageActivity(), TencentLocationListener { ...@@ -63,6 +63,7 @@ class MainActivity() : XPageActivity(), TencentLocationListener {
System.currentTimeMillis() - SettingSPUtils.lastAPPOpenReportTime > 30 * 60 * 1000 System.currentTimeMillis() - SettingSPUtils.lastAPPOpenReportTime > 30 * 60 * 1000
) { ) {
DataRePortUtils.report("start_app") DataRePortUtils.report("start_app")
SettingSPUtils.lastAPPOpenReportTime = System.currentTimeMillis()
} }
initPhoneUtils() initPhoneUtils()
PageOption.to(SplashFragment::class.java).open(this) PageOption.to(SplashFragment::class.java).open(this)
...@@ -100,8 +101,7 @@ class MainActivity() : XPageActivity(), TencentLocationListener { ...@@ -100,8 +101,7 @@ class MainActivity() : XPageActivity(), TencentLocationListener {
Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_PHONE_STATE,
Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION
Manifest.permission.CAMERA
) )
.withListener(object : MultiplePermissionsListener { .withListener(object : MultiplePermissionsListener {
override fun onPermissionsChecked(p0: MultiplePermissionsReport?) { override fun onPermissionsChecked(p0: MultiplePermissionsReport?) {
......
...@@ -153,7 +153,7 @@ class AccelertorFragment : XPageFragment() { ...@@ -153,7 +153,7 @@ class AccelertorFragment : XPageFragment() {
openToWebview(HttpConfig.UI_MESSAGE_URL) openToWebview(HttpConfig.UI_MESSAGE_URL)
} }
binding.accShare.setOnClickListener { binding.accShare.setOnClickListener {
DataRePortUtils.report("st_share_clk") DataRePortUtils.report("st_share_clk", mapOf("scene" to "3"))
activity?.let { it1 -> ShareUtils().share(it1) } activity?.let { it1 -> ShareUtils().share(it1) }
} }
......
...@@ -93,14 +93,14 @@ class NewsFragment : XPageFragment() { ...@@ -93,14 +93,14 @@ class NewsFragment : XPageFragment() {
if (itemData.type == 1) { if (itemData.type == 1) {
itemData.url?.let { itemData.url?.let {
DataRePortUtils.report("st_qq_clk", mapOf("scene" to 3)) DataRePortUtils.report("st_qq_clk", mapOf("scene" to "3"))
context?.let { it1 -> SysUtils.joinQQGroup(it1) } context?.let { it1 -> SysUtils.joinQQGroup(it1) }
} }
} }
if (itemData.type == 2) { if (itemData.type == 2) {
itemData.url?.let { itemData.url?.let {
DataRePortUtils.report("st_google_clk", mapOf("scene" to 3)) DataRePortUtils.report("st_google_clk", mapOf("scene" to "3"))
openToWebview(it) openToWebview(it)
} }
} }
......
...@@ -26,6 +26,7 @@ import fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard ...@@ -26,6 +26,7 @@ import fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard
import com.ccwangluo.accelerator.model.NewsModel import com.ccwangluo.accelerator.model.NewsModel
import com.ccwangluo.accelerator.ui.view.RatingBar import com.ccwangluo.accelerator.ui.view.RatingBar
import com.ccwangluo.accelerator.ui.web.CommonWebViewFragment import com.ccwangluo.accelerator.ui.web.CommonWebViewFragment
import com.ccwangluo.accelerator.utils.dataReport.DataRePortUtils
import com.github.shadowsocks.http.HttpConfig import com.github.shadowsocks.http.HttpConfig
import com.hjq.toast.ToastUtils import com.hjq.toast.ToastUtils
...@@ -79,17 +80,18 @@ class NewsObjectFragment : XPageFragment() { ...@@ -79,17 +80,18 @@ class NewsObjectFragment : XPageFragment() {
itemData.title?.let { itemData.title?.let {
itemView.findViewById<TextView>(R.id.title).visibility = View.VISIBLE itemView.findViewById<TextView>(R.id.title).visibility = View.VISIBLE
itemView.findViewById<TextView>(R.id.title).setText(it) itemView.findViewById<TextView>(R.id.title).setText(it)
} ?: let { itemView.findViewById<TextView>(R.id.title).visibility = View.GONE } }
?: let { itemView.findViewById<TextView>(R.id.title).visibility = View.GONE }
if (itemData.type == 5){ if (itemData.type == 5) {
itemData.content?.let { itemData.content?.let {
itemView.findViewById<TextView>(R.id.abbrContent).visibility = View.VISIBLE itemView.findViewById<TextView>(R.id.abbrContent).visibility = View.VISIBLE
itemView.findViewById<TextView>(R.id.abbrContent).setText(it) itemView.findViewById<TextView>(R.id.abbrContent).setText(it)
} ?: let { } ?: let {
itemView.findViewById<TextView>(R.id.abbrContent).visibility = View.GONE itemView.findViewById<TextView>(R.id.abbrContent).visibility = View.GONE
} }
}else{ } else {
itemData.abbrContent?.let { itemData.abbrContent?.let {
itemView.findViewById<TextView>(R.id.abbrContent).visibility = View.VISIBLE itemView.findViewById<TextView>(R.id.abbrContent).visibility = View.VISIBLE
itemView.findViewById<TextView>(R.id.abbrContent).setText(it) itemView.findViewById<TextView>(R.id.abbrContent).setText(it)
...@@ -147,7 +149,10 @@ class NewsObjectFragment : XPageFragment() { ...@@ -147,7 +149,10 @@ class NewsObjectFragment : XPageFragment() {
} }
itemView.findViewById<ImageView>(R.id.great_img).setOnClickListener { itemView.findViewById<ImageView>(R.id.great_img).setOnClickListener {
itemData.isGreat?.let { itemData.isGreat?.let {
newsViewModel?.greate(this@NewsObjectFragment,itemData.type, gameId, itemData.id,it) { if (!it) {
DataRePortUtils.report("st_like_clk")
}
newsViewModel?.greate(this@NewsObjectFragment, itemData.type, gameId, itemData.id, it) {
if (!it) { if (!it) {
ToastUtils.show("点赞成功") ToastUtils.show("点赞成功")
itemData.isGreat = true itemData.isGreat = true
......
...@@ -341,12 +341,13 @@ class AndroidInterface(val xPageFragment: XPageFragment, val agentWeb: AgentWeb) ...@@ -341,12 +341,13 @@ class AndroidInterface(val xPageFragment: XPageFragment, val agentWeb: AgentWeb)
@JavascriptInterface @JavascriptInterface
fun dataReport(event: String, data: String) { fun dataReport(event: String, data: String) {
DataRePortUtils.report(event, data) DataRePortUtils.report(event, if (data.isBlank()) null else data)
} }
@JavascriptInterface @JavascriptInterface
fun share() { fun share() {
xPageFragment.activity?.let { xPageFragment.activity?.let {
DataRePortUtils.report("st_share_clk", mapOf("scene" to "4"))
ShareUtils().share(it) ShareUtils().share(it)
} }
} }
......
package com.ccwangluo.accelerator.utils package com.ccwangluo.accelerator.utils
import android.R.attr.thumb
import android.app.Activity import android.app.Activity
import android.content.Context
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.ccwangluo.accelerator.R import com.ccwangluo.accelerator.R
......
...@@ -13,7 +13,7 @@ data class BaseData( ...@@ -13,7 +13,7 @@ data class BaseData(
var did: String? = SysUtils.getDeviceUUID(), var did: String? = SysUtils.getDeviceUUID(),
var ds: String = LocalDateTime.now().toString(), var ds: String = LocalDateTime.now().toString(),
var event: String = "", var event: String = "",
var ouid: String? = LoginUtils.uid, var ouid: String = if (LoginUtils.uid == null) "" else LoginUtils.uid!!,
var platform: Int = 1, var platform: Int = 1,
var role_id: String = "0", var role_id: String = "0",
var server: Int = 0, var server: Int = 0,
......
...@@ -4,16 +4,16 @@ object HttpConfig { ...@@ -4,16 +4,16 @@ object HttpConfig {
//app后端 //app后端
//val baseUrl = "http://10.16.1.98:9002" //val baseUrl = "http://10.16.1.98:9002"
val baseUrl = "https://test-cc-tt-api.orangenet.org.cn" //测试 // val baseUrl = "https://test-cc-tt-api.orangenet.org.cn" //测试
// val baseUrl = "https://cc-tt-front.srccwl.com" //生产 val baseUrl = "https://cc-tt-front.srccwl.com" //生产
/** /**
* 主页h5 * 主页h5
*/ */
val UI_MAIN_URL = "https://test-cc-tt-front.orangenet.org.cn/#" //测试 // val UI_MAIN_URL = "https://test-cc-tt-front.orangenet.org.cn/#" //测试
// val UI_MAIN_URL = "http://10.3.64.200:8080/#" // val UI_MAIN_URL = "http://10.3.64.200:8080/#"
// val UI_MAIN_URL = "https://cc-tt-front.srccwl.com/#" //生产 val UI_MAIN_URL = "https://cc-tt-front.srccwl.com/#" //生产
//隐私协议地址 //隐私协议地址
......
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