Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c3fd65c0
authored
Mar 29, 2024
by
han xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
播放逻辑(第二次无法判断是否支付)
parent
ac53dc51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
userCenter/src/main/java/com/dayu/usercenter/ui/activity/BusinessDetailActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity/BusinessDetailActivity.java
View file @
c3fd65c0
package
com
.
dayu
.
usercenter
.
ui
.
activity
;
import
android.util.Log
;
import
android.view.View
;
import
androidx.core.content.ContextCompat
;
...
...
@@ -79,7 +80,11 @@ public class BusinessDetailActivity extends BaseActivity<BusinessDetailPresenter
if
(
success
){
mBind
.
jzVideo
.
startPreloading
();
//开始预加载,加载完等待播放
mBind
.
jzVideo
.
startVideoAfterPreloading
();
//如果预加载完会开始播放,如果未加载则开始加载
mBind
.
rlClick
.
setVisibility
(
View
.
GONE
);
mBind
.
rlClick
.
setVisibility
(
View
.
INVISIBLE
);
if
(
currendVideoData
.
getPlayStatus
()
!=
2
&&
currendVideoData
.
getPlayStatus
()
!=
3
)
studyCourse
(
currendVideoData
.
getId
(),
0
,
0
,
1
);
}
else
{
if
(
currentPrice
==
null
){
currentPrice
=
""
;
...
...
@@ -104,8 +109,8 @@ public class BusinessDetailActivity extends BaseActivity<BusinessDetailPresenter
@Override
public
void
onstart
()
{
if
(
currendVideoData
.
getPlayStatus
()
!=
2
&&
currendVideoData
.
getPlayStatus
()
!=
3
)
studyCourse
(
currendVideoData
.
getId
(),
0
,
0
,
1
);
//
if (currendVideoData.getPlayStatus() != 2 && currendVideoData.getPlayStatus() != 3)
//
studyCourse(currendVideoData.getId(), 0, 0, 1);
}
@Override
...
...
@@ -123,6 +128,8 @@ public class BusinessDetailActivity extends BaseActivity<BusinessDetailPresenter
public
void
onComplete
()
{
if
(
currendVideoData
.
getPlayStatus
()
!=
3
)
studyCourse
(
currendVideoData
.
getId
(),
100
,
mBind
.
jzVideo
.
getDuration
(),
3
);
mBind
.
rlClick
.
setVisibility
(
View
.
VISIBLE
);
}
});
...
...
@@ -289,10 +296,12 @@ public class BusinessDetailActivity extends BaseActivity<BusinessDetailPresenter
if
(
1
==
data
.
getLicenceStatus
()){
mBind
.
btnCommit
.
setText
(
"商家已认证"
);
mBind
.
btnCommit
.
setBackgroundColor
(
ContextCompat
.
getColor
(
mActivity
,
R
.
color
.
text_common_green
));
}
else
if
(
2
==
data
.
getLicenceStatus
()){
mBind
.
btnCommit
.
setClickable
(
true
);
mBind
.
btnCommit
.
setText
(
"申请商家认证"
);
mBind
.
btnCommit
.
setBackgroundColor
(
ContextCompat
.
getColor
(
mActivity
,
R
.
color
.
text_common_blue
));
mBind
.
btnCommit
.
setBackgroundColor
(
ContextCompat
.
getColor
(
mActivity
,
R
.
color
.
cl_receiving_order_item_data
));
mBind
.
btnCommit
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
...
...
@@ -304,7 +313,8 @@ public class BusinessDetailActivity extends BaseActivity<BusinessDetailPresenter
Api
.
getService
(
UserService2
.
class
).
finishedStudyApply
(
finishedStudyData
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
data
->
{
//TODO
//TODO 认证成功:刷新按钮 ( 变为商家已认证) 如果失败:弹出失败信息
}));
}
...
...
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