Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
116dee96
Commit
116dee96
authored
Mar 17, 2022
by
sheteng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h5返回
parent
7577d189
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
21 deletions
+30
-21
app/src/main/java/com/ccwangluo/accelerator/ui/home/AccelertorFragment.kt
...a/com/ccwangluo/accelerator/ui/home/AccelertorFragment.kt
+14
-14
app/src/main/java/com/ccwangluo/accelerator/ui/web/CommonWebViewFragment.kt
...com/ccwangluo/accelerator/ui/web/CommonWebViewFragment.kt
+12
-3
core/src/main/java/com/github/shadowsocks/http/HttpConfig.kt
core/src/main/java/com/github/shadowsocks/http/HttpConfig.kt
+4
-4
No files found.
app/src/main/java/com/ccwangluo/accelerator/ui/home/AccelertorFragment.kt
View file @
116dee96
...
@@ -237,20 +237,20 @@ class AccelertorFragment : XPageFragment() {
...
@@ -237,20 +237,20 @@ class AccelertorFragment : XPageFragment() {
AcceleratorUtils
.
getGameList
(
this
)
{
AcceleratorUtils
.
getGameList
(
this
)
{
if
(
it
)
{
if
(
it
)
{
//
//
//
AcceleratorUtils.game?.let {
AcceleratorUtils
.
game
?.
let
{
//
if (!SysUtils.isPackageInstall(requireContext(), it.packageName)) {
if
(!
SysUtils
.
isPackageInstall
(
requireContext
(),
it
.
packageName
))
{
//
binding.quickTopToast.visibility = View.VISIBLE
binding
.
quickTopToast
.
visibility
=
View
.
VISIBLE
//
binding.quickTopToastTx.setText("请先安装游戏后加速")
binding
.
quickTopToastTx
.
setText
(
"请先安装游戏后加速"
)
//
binding.quickTopToastTx.postDelayed({
binding
.
quickTopToastTx
.
postDelayed
({
//
binding.quickTopToast.visibility = View.GONE
binding
.
quickTopToast
.
visibility
=
View
.
GONE
//
}, 2000)
},
2000
)
//
DataRePortUtils.report(
DataRePortUtils
.
report
(
//
"st_speed_result",
"st_speed_result"
,
//
mapOf("result" to 0, "cause" to "1")
mapOf
(
"result"
to
0
,
"cause"
to
"1"
)
//
)
)
//
return@getGameList
return
@getGameList
//
}
}
//
}
}
//用户是否有使用时长
//用户是否有使用时长
LoginUtils
.
getUserHasTimer
(
this
@AccelertorFragment
)
{
LoginUtils
.
getUserHasTimer
(
this
@AccelertorFragment
)
{
if
(
it
)
{
if
(
it
)
{
...
...
app/src/main/java/com/ccwangluo/accelerator/ui/web/CommonWebViewFragment.kt
View file @
116dee96
...
@@ -10,6 +10,7 @@ import android.widget.FrameLayout
...
@@ -10,6 +10,7 @@ import android.widget.FrameLayout
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.Fragment
import
com.ccwangluo.accelerator.databinding.FragmentWebviewBinding
import
com.ccwangluo.accelerator.databinding.FragmentWebviewBinding
import
com.ccwangluo.accelerator.utils.LoginUtils
import
com.ccwangluo.accelerator.utils.LoginUtils
import
com.github.shadowsocks.http.HttpConfig
import
com.just.agentweb.core.AgentWeb
import
com.just.agentweb.core.AgentWeb
import
com.just.agentweb.core.client.DefaultWebClient
import
com.just.agentweb.core.client.DefaultWebClient
import
com.xuexiang.xpage.annotation.Page
import
com.xuexiang.xpage.annotation.Page
...
@@ -38,7 +39,7 @@ class CommonWebViewFragment : XPageFragment() {
...
@@ -38,7 +39,7 @@ class CommonWebViewFragment : XPageFragment() {
url
?.
let
{
url
?.
let
{
var
weburl
=
it
var
weburl
=
it
LoginUtils
.
token
?.
let
{
LoginUtils
.
token
?.
let
{
if
(
weburl
.
contains
(
"?"
)){
if
(
weburl
.
contains
(
"?"
))
{
weburl
=
weburl
+
"&token=$it"
weburl
=
weburl
+
"&token=$it"
}
else
{
}
else
{
weburl
=
weburl
+
"?token=$it"
weburl
=
weburl
+
"?token=$it"
...
@@ -112,11 +113,19 @@ class CommonWebViewFragment : XPageFragment() {
...
@@ -112,11 +113,19 @@ class CommonWebViewFragment : XPageFragment() {
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
?):
Boolean
{
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
?):
Boolean
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
agentWeb
?.
let
{
agentWeb
?.
let
{
it
.
webCreator
.
webView
.
url
?.
let
{
url
->
if
(
url
.
contains
(
HttpConfig
.
MEMBER_CENTER
))
{
it
.
getJsAccessEntrace
()
.
quickCallJs
(
"goback"
)
return
true
}
else
{
if
(
it
.
back
())
{
if
(
it
.
back
())
{
return
true
return
true
}
}
}
}
}
}
}
}
return
super
.
onKeyDown
(
keyCode
,
event
)
return
super
.
onKeyDown
(
keyCode
,
event
)
}
}
...
...
core/src/main/java/com/github/shadowsocks/http/HttpConfig.kt
View file @
116dee96
...
@@ -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 = "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://test-cc-tt-front.orangenet.org.cn/#" //测试
val
UI_MAIN_URL
=
"https://cc-tt-front.srccwl.com/#"
//生产
//隐私协议地址
//隐私协议地址
val
HTML_HOST_PRIVACY
=
"https://sdk-static.srccwl.com/tt_html/"
val
HTML_HOST_PRIVACY
=
"https://sdk-static.srccwl.com/tt_html/"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment