Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
d6f4d297
Commit
d6f4d297
authored
Jul 11, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
82b81677
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
297 additions
and
274 deletions
+297
-274
TrackPresenter.java
.../com/mints/wisdomclean/mvp/presenters/TrackPresenter.java
+34
-0
OkHttpInterceptor.java
...ain/java/com/mints/wisdomclean/net/OkHttpInterceptor.java
+2
-1
SplashAdActivity.kt
...va/com/mints/wisdomclean/ui/activitys/SplashAdActivity.kt
+2
-1
MyFragment.kt
...main/java/com/mints/wisdomclean/ui/fragment/MyFragment.kt
+20
-4
AESUtils.java
...p/src/main/java/com/mints/wisdomclean/utils/AESUtils.java
+1
-1
DramaApiDetailActivity.kt
...ava/com/mints/wisdomclean/video/DramaApiDetailActivity.kt
+0
-18
fragment_main_my.xml
video/app/src/main/res/layout/fragment_main_my.xml
+238
-249
No files found.
video/app/src/main/java/com/mints/wisdomclean/mvp/presenters/TrackPresenter.java
View file @
d6f4d297
...
...
@@ -45,6 +45,33 @@ public class TrackPresenter extends BaseTrackPresenter {
});
}
public
void
getMyInfo
()
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"os"
,
"android"
);
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getMyInfo
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
UserBean
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
UserBean
>
baseResponse
)
{
switch
(
baseResponse
.
getStatus
())
{
case
200
:
{
UserManager
.
getInstance
().
saveUserInfo
(
baseResponse
.
getData
());
}
}
}
});
}
public
void
saveTerminalInfo
()
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
DeviceInfo
deviceInfo
=
DeviceInfo
.
Companion
.
getInstance
();
...
...
@@ -69,10 +96,17 @@ public class TrackPresenter extends BaseTrackPresenter {
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
switch
(
baseResponse
.
getStatus
())
{
case
200
:
{
getMyInfo
();
}
}
}
});
}
...
...
video/app/src/main/java/com/mints/wisdomclean/net/OkHttpInterceptor.java
View file @
d6f4d297
...
...
@@ -100,7 +100,8 @@ public class OkHttpInterceptor implements Interceptor {
return
request
.
newBuilder
().
addHeader
(
"version"
,
DeviceInfo
.
Companion
.
getInstance
().
getVersionName
()).
addHeader
(
"token"
,
tokenID
).
addHeader
(
"pkgName"
,
Constant
.
MINTS_PKG_NAME
).
// addHeader("pkgName", Constant.MINTS_PKG_NAME).
addHeader
(
"pkgName"
,
"com.xinfu.helivideo"
).
addHeader
(
"channel"
,
channel
).
addHeader
(
"new-session"
,
MD5
.
GetMD5Code
(
String
.
valueOf
(
time
))).
addHeader
(
"last-session"
,
Base64
.
encode
(
String
.
valueOf
(
time
).
getBytes
(
"UTF-8"
))).
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/SplashAdActivity.kt
View file @
d6f4d297
...
...
@@ -15,6 +15,7 @@ import com.mints.wisdomclean.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.mints.wisdomclean.utils.AppPreferencesManager
import
com.mints.wisdomclean.utils.LogUtil
import
kotlinx.android.synthetic.main.activity_gromore.*
import
java.util.HashMap
/**
* 描述:gromore广告
...
...
@@ -54,7 +55,7 @@ class SplashAdActivity : BaseActivity() {
goToMainActivity
()
}
override
fun
adClose
()
{
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?
)
{
goToMainActivity
()
}
})
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/MyFragment.kt
View file @
d6f4d297
...
...
@@ -82,14 +82,13 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener {
R
.
id
.
ll_my_setting
->
{
readyGo
(
SettingsActivity
::
class
.
java
)
}
R
.
id
.
tv_my_account
,
R
.
id
.
ll_my_login
->
{
R
.
id
.
tv_my_account
,
R
.
id
.
ll_my_login
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
MobileLoginActivity
::
class
.
java
)
}
}
R
.
id
.
ll_my_record
->
{
readyGo
(
WatchRecordActivity
::
class
.
java
)
}
R
.
id
.
ll_my_feed
->
{
readyGo
(
FeedbackActivity
::
class
.
java
)
...
...
@@ -108,7 +107,24 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener {
}
private
fun
loginStatus
(
consumer
:
UserBean
)
{
// 1-登录
// 1-匹配用户
if
(
consumer
.
activiteFlag
==
0
)
{
// 未匹配
ll_my_vip
.
visibility
=
View
.
GONE
ll_my_payrecord
.
visibility
=
View
.
GONE
ll_contactus
.
visibility
=
View
.
GONE
line_my_payrecord
.
visibility
=
View
.
GONE
line_my_contactus
.
visibility
=
View
.
GONE
}
else
{
// 匹配
ll_my_vip
.
visibility
=
View
.
VISIBLE
ll_my_payrecord
.
visibility
=
View
.
VISIBLE
ll_contactus
.
visibility
=
View
.
VISIBLE
line_my_payrecord
.
visibility
=
View
.
VISIBLE
line_my_contactus
.
visibility
=
View
.
VISIBLE
}
// 2-登录
if
(
userManager
.
userIsLogin
())
{
tv_my_account
.
text
=
"用户ID:"
+
consumer
.
idcode
iv_my_bind
.
visibility
=
View
.
GONE
...
...
@@ -118,7 +134,7 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener {
iv_my_bind
.
visibility
=
View
.
VISIBLE
}
//
2-是否
vip
//
3-
vip
if
(
consumer
.
expireTime
>
0
)
{
tv_my_vip
.
text
=
"VIP会员"
tv_my_btn
.
visibility
=
View
.
GONE
...
...
video/app/src/main/java/com/mints/wisdomclean/utils/AESUtils.java
View file @
d6f4d297
...
...
@@ -15,7 +15,7 @@ import Decoder.BASE64Encoder;
public
class
AESUtils
{
private
static
final
String
vis
=
MD5
.
GetMD5Code
(
"
bcurd_2022
"
).
substring
(
8
,
24
);
private
static
final
String
vis
=
MD5
.
GetMD5Code
(
"
helivideo_2023
"
).
substring
(
8
,
24
);
public
static
String
CIPHER_ALGORITHM
=
"AES/CBC/PKCS5Padding"
;
// optional value AES/DES/DESede
private
static
SecretKeySpec
getKey
(
String
strKey
)
throws
Exception
{
...
...
video/app/src/main/java/com/mints/wisdomclean/video/DramaApiDetailActivity.kt
View file @
d6f4d297
...
...
@@ -331,7 +331,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
""
,
object
:
AdStatusListener
{
override
fun
adSuccess
()
{
<<<<<<<
Updated
upstream
}
...
...
@@ -339,22 +338,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?)
{
val
hasUnlockList
:
MutableList
<
Int
>
=
mHasUnlockIndexMap
[
drama
.
id
]
?:
mutableListOf
()
hasUnlockList
.
add
(
widget
.
currentDramaIndex
)
mHasUnlockIndexMap
[
drama
.
id
]
=
hasUnlockList
blockView
?.
visibility
=
View
.
GONE
callback
?.
onDramaRewardArrived
()
// 解锁当前集
}
=======
}
override
fun
adFail
()
{
}
override
fun
adClose
()
{
val
hasUnlockList
:
MutableList
<
Int
>
=
mHasUnlockIndexMap
[
drama
.
id
]
?:
mutableListOf
()
hasUnlockList
.
add
(
widget
.
currentDramaIndex
)
...
...
@@ -363,7 +346,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
callback
?.
onDramaRewardArrived
()
// 解锁当前集
}
>>>>>>>
Stashed
changes
})
...
...
video/app/src/main/res/layout/fragment_main_my.xml
View file @
d6f4d297
<?xml version="1.0" encoding="utf-8"?>
<
Relativ
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Fram
eLayout
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:background=
"#F5F9FC"
android:orientation=
"vertical"
>
<com.mints.wisdomclean.ui.widgets.ElasticScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fadingEdge=
"none"
android:overScrollMode=
"never"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#F5F9FC"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"#F5F9FC"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"220dp"
...
...
@@ -32,9 +14,9 @@
<LinearLayout
android:id=
"@+id/ll_my_login"
android:layout_marginTop=
"56dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"56dp"
android:orientation=
"horizontal"
>
<com.mints.wisdomclean.ui.widgets.CircleImageView
...
...
@@ -56,10 +38,10 @@
<ImageView
android:id=
"@+id/iv_my_bind"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"10dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"10dp"
android:src=
"@mipmap/ic_my_bind"
></ImageView>
...
...
@@ -69,20 +51,28 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_marginTop=
"-70dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"150dp"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll_my_vip"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:paddingLeft=
"24
dp"
android:layout_marginBottom=
"20
dp"
android:background=
"@mipmap/bg_my_vip"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:paddingLeft=
"24dp"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/tv_my_vip"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"开通VIP会员"
android:layout_marginTop=
"20dp"
android:text=
"开通VIP会员"
android:textColor=
"#5B1500"
android:textSize=
"22sp"
android:textStyle=
"bold"
/>
...
...
@@ -107,13 +97,11 @@
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"14dp"
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"14dp"
android:background=
"@drawable/shape_bg_mobile"
android:orientation=
"vertical"
>
...
...
@@ -149,7 +137,6 @@
android:background=
"@color/my_color_gray"
/>
<LinearLayout
android:id=
"@+id/ll_my_feed"
android:layout_width=
"match_parent"
...
...
@@ -187,7 +174,8 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"20dp"
android:paddingEnd=
"20dp"
>
android:paddingEnd=
"20dp"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"0dp"
...
...
@@ -206,9 +194,11 @@
</LinearLayout>
<View
android:id=
"@+id/line_my_payrecord"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/my_color_gray"
/>
android:background=
"@color/my_color_gray"
android:visibility=
"gone"
/>
<LinearLayout
android:id=
"@+id/ll_contactus"
...
...
@@ -217,7 +207,8 @@
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"20dp"
android:paddingEnd=
"20dp"
>
android:paddingEnd=
"20dp"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/tv_contact"
...
...
@@ -236,9 +227,11 @@
</LinearLayout>
<View
android:id=
"@+id/line_my_contactus"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/my_color_gray"
/>
android:background=
"@color/my_color_gray"
android:visibility=
"gone"
/>
<LinearLayout
android:id=
"@+id/ll_my_setting"
...
...
@@ -266,11 +259,7 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"20dp"
/>
</LinearLayout>
</com.mints.wisdomclean.ui.widgets.ElasticScrollView>
</
Relativ
eLayout>
</
Fram
eLayout>
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