# Heibai API
###### tags: `Work`
[TOC]
# Introduction
Main Response base for all api's response is:
```java=
public T data;
public int status;
public String message;
private int code;
private String msg;
private long time;
```
# SplashActivity
>[color=orange]
```flow
st=>start: SplashActivity
es=>end: SplashScreenActivity
em=>end: MainTwoActivity
fetchDomain=>operation: fetchDomainKeyValues Call
checkDomain=>condition: isSuccess?
isDomainEntityOk=>condition: isReponseComplete?
advertList=>operation: /api/advert/list sub_type:2
advertListSuccess=>condition: isSuccess?
splashAdvertList=>operation: httpDomain:httpPort+/api/advert/list
isSuccess=>condition: isSuccess?
domainNotNull=>condition: Domain != null
adDetail=>operation: /api/advert/detail
st->fetchDomain->checkDomain
checkDomain(yes)->isDomainEntityOk
checkDomain(no)->advertList
isSuccess(yes)->es
isSuccess(no)->domainNotNull
domainNotNull(yes)->splashAdvertList
domainNotNull(no)->advertList->advertListSuccess
advertListSuccess(yes)->es
advertListSuccess(no)->em
isDomainEntityOk(yes)->splashAdvertList->isSuccess
isDomainEntityOk(no)->adDetail
```
## SplashActivity: Logic
>[color=orange]
## 1. 取得網域: fetchDomainUrl
**Method within:** SplashPresenter
**URL:** https://hb-ali-oss-2.oss-cn-hongkong.aliyuncs.com/fetchDomainKeyValues_type_1_5.txt (value in base_url.xml as FetchHttpUrl)
**Code Success:** 1000
**Response:**
```java=
{
"code": 1000,
"data": {
"1": [{
"httpDomain": "https://appapi.heibaitiyu.com",
"httpPort": 443,
"wsDomain": "jim.heibaitiyu.com",
"wsPort": 443
}, ...
]
},
"msg": "success",
"time": 1601265243735
}
```
## 2.1 **廣告列表: httpDomain:httpPort+/api/advert/list**
**Method within:** SplashPresenter
**Info:** Calls all httpDomains from fetchDomainUrl till get one that is not onError.
>**Parameter:**
> type: "1"
> sub_type: int
> pkg: "wzhbzb"
> platform: "1"[color=lightblue]
**Format:** httpDomain:httpPort+/api/advert/list
**Success:** initHttp && calls advertList
**Fail:** Keep calling next one, if none can be used then **sub_type:2 is used as default**.
## 2.2 **廣告列表: /api/advert/list sub_type:2**
**Method within:** SplashPresenter
> **Parameter:**
> type: "1"
> sub_type: 2[color=lightblue]
**NOTE:** No data in response till now.
## 2.3 **廣告詳情: /api/advert/detail**
**Method within:** AdvertPresenter
Note: not used. (questDomain callback in SplashActivity)
## 3. **個人詳情: /api/member/detail**
**Method within:** UserPresenter
**Actions:** Set user details in UserInfo and sharepreference
# SplashScreenActivity
Counts down and jumps to MainTwoActivity.
## SplashScreenActivity: Logic
>[color=orange]
## 1. **其他分類: /api/index/other-category** (在此回傳目前沒有使用)
**Response:**
```java=
name : 热门
title : 热门直播|热门比分直播|直播吧|CCTV5在线直播-CCAV5直播
id : 0
keywords : 足球直播、足球比分直播、足球直播吧、英超直播、意甲直播、西甲直播、欧冠直播、中超直播、足球视频直播、足球直播网
description : CCAV5足球直播吧全程提供欧冠、英超、意甲、西甲、德甲、中超等足球视频直播和足球比分直播,实时更新CCTV5在线直播、上海体育、广东体育等足球直播频道。
url : soccer
vUrl : soccer
vName : 足球
```
**OnSuccess:** Nothing seems to happen...
# MainTwoActivity
>[color=orange]
## **Extra: 注册 OpenInstall: /api/user/back-reg**
**Method within:** EventUtils
**Called within:** MainTwoActivity > onCreate
**Code:**
Calls in wakeUpAdapter and onInstall.
```java=
OpenInstall.getWakeUp(getIntent(), wakeUpAdapter);
OpenInstall.getInstall(new AppInstallAdapter() {
@Override
public void onInstall(AppData appData) {
Log.d("OpenInstall", "AppInstallAdapter getInstall : installData = " + appData.toString());
openInstallHandle(appData.getData()); // call API
}
});
```
## 1. **获取长连接的接口的地址: /api/index/get-wsurl** (回傳目前沒有使用)
**Response:**
```java=
url : String
```
## 2. **廣告詳情: /api/advert/detail**
### advertDetail (存起來的參數無使用)
**Method within:** HomePresenter
**Called within:** MainTwoActivity > initView
>Note:
>目前回傳無使用。參數只用在RecommendFragment,使用在MainOneActivity,這目前沒有在使用中。 [color=red]
### initMainDialog
**Method within:** AdvertisementUtils
**Called within:** MainTwoActivity > initMainDialog
**Called condition:** 首页更新取消、或者无更新,会发这个事件
## 3. **预约ID列表: /api/member/subscribe-ids (需登入)**
>Note: Only called when user is in **login status**.[color=red]
**Method within:** MainPresenter
**Called within:** MainTwoActivity > initView
**Actions:** Save them up in ++AppleApplication.userOrder++
## 4. **屏蔽管理: /api/common/shield-list**
**Method within:** MainPresenter
**Actions:** Save data in ++ShieldListInfo's imgMap++
**Influence:** Decide whether ***主播 section icon*** is displayed or not.
## 5. **用户等级图片: /api/user/level-list**
**Method within:** MainPresenter
**Called within:** MainTwoActivity > initView && after login
**Actions:** Inside ++loadLevelList method++, it creates bitmap using ***mark && background_img** and save them up in ***AppleApplication.chatMsgBitmap (HashMap<String, Bitmap>)***.
**Data Structure:**
```java=
"level": [
{
"id": 46,
"level": 1,
"score": 0,
"mark": "https://pichb2.huoxinglaike.com/uploads/16040492822901820271.png",
"background_img": "https://pichb2.huoxinglaike.com/uploads/16037866479135026798.png",
"privileges": "3,1,5,4"
},
{
"id": 2,
"level": 2,
"score": 30,
"mark": "https://pichb2.huoxinglaike.com/uploads/16040493156654922265.png",
"background_img": "https://pichb2.huoxinglaike.com/uploads/16037868150028725914.png",
"privileges": "3,1,5,4"
}, ...
]
```
## 6. **等级特权: /api/anchor/level-list**
**Method within:** MainPresenter
**Called within:** MainTwoActivity > initView && after login
**Action:** Same as above's /api/user/level-list.
## 7. **关注的直播id: /api/member/follow-ids**
**Method within:** FollowIdInfo
**Called within:** MainTwoActivity > initView && after login
**Actions:** Save them up in ++AppleApplication.userFollow++
**What for?** userFollow is used as a boolean to decide whether to show **關注 button** or not.
## 8. **查看完成邀请注册任务次數: /api/task/invite/{userId} (需登入)**
>Note: Only called when user is in **login status**.[color=red]
**Method within:** MainPresenter
**Called within:** MainTwoActivity many times.
**Result:** If **can_receive == 1**, below dialog will be shown to user to receive prize.
>[color=pink]
## 9. **任务列表: /api/task/list (需登入)**
>Note: Only called when user is in **login status**.[color=red]
**Method within:** MainPresenter
**Called within:** MainTwoActivity right after login/initMainDialog (cancel update)
>**Note:**
>Type 1:签到 2:分享直播间 3:看直播领金币 4:邀请 5:注册 6:助力 7:学习
>**Actions:**
>Type 1 > Set task into signEntity in MainTwoActivity
>Type 3 > Record task in ***AppleApplication.watchTimeTask***
>Type 5 > Show Welcome dialog to user and further receive prize.[color=lightblue]
## 10. **数据埋点: /api/statistics/event**
**Method within:** EventUtils
**Called within:** MainTwoActivity
```java=
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_MAIN, EVENT_TYPE_VIEW, "首页打开");
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_DEFAULT, EVENT_TYPE_DOWNLOAD_OPEN, "首次打开的注册事件");
```
## 11. **领取奖励: /api/task/receive**
**Method within:** MainPresenter
**Called within:** MainTwoActivity
**Called condition:** First time registration and log in.
**Further detail:** Called after /api/task/list when type is 5(注册).
## 12. **第三方登录: /api/user/app-third-login**
**Method within:** MainPresenter
**Called within:** MainTwoActivity
**Called condition:** Log in from third party: weibo/qq/wechat
# MainTwoActivity - HomeFragment
>[color=orange]
## MainTwoActivity - HomeFragment API
>[color=orange]
## MainTwoActivity - HomeFragment onClick
>[color=orange]
## 1. **获取公告配置: /api/epidemic/notice-config (回傳參數目前沒有使用)**
**Method within:** HomePresenter
**Called within:** HomeFragment initView
**Parameter:** None
## 2. **获取推荐文章标题列表: /api/epidemic/title-list**
**Method within:** HomePresenter
**Called within:** HomeFragment initView
**Parameter:** None
**Actions:** In getTitleList in HomeFragment, it just retrieves the titles of the news and displays in notice section (公告).
>
>Uses czy1121:noticeview > https://github.com/czy1121/noticeview[color=lightblue]
## 3. **廣告詳情: /api/advert/detail**
**Method within:** HomePresenter
**Called within:** HomeFragment initView
**Parameter:** ad_type: 25 (fixed)
**Actions:** Decides whether the ad on right bottom corner is displayed or not. It will use the img from the ***response pic_url***.
>[color=lightblue]
## 4. **廣告列表: /api/advert/list sub_type:3**
**Method within:** HomePresenter
**Called within:** HomeFragment initData/ initview error retry/ onRefresh
**Parameter:** sub_type: 3 (fixed)
**Actions:** Whether show or not the Ad banner at the top && further fill ad data.
>
>Uses youth.banner > https://github.com/youth5201314/banner[color=lightblue]
## 5. **热点比赛: /api/index/live-hot**
**Method within:** HomePresenter
**Called within:** HomeFragment initData/ initview error retry/ onRefresh
**Parameter:** None
**Actions:** Fills matches' section data, and decides its visibility.
>[color=lightblue]
## 6. **廣告列表: /api/advert/list sub_type:24**
**Method within:** HomePresenter
**Called within:** HomeFragment initData/ initview error retry/ onRefresh
**Parameter:** isAnchor: true, anchor_id: item.getUser_id, match_id: “”, userhot: item.getHots
**Actions:** Fills event' section data, and decides its visibility.
>[color=lightblue]
## 7. **主播推荐: /api/anchor/hot-list**
**Method within:** HomePresenter
**Called within:** HomeFragment initData/ onRefresh
**Called if:** user is not a ***blocked** user (Checked in 屏蔽管理: /api/common/shield-list)
**Parameter:** None
**Actions:** Fills host' section data, and decides its visibility.
>[color=lightblue]
## 8. **预约/取消预约: /api/member/subscribe**
**Method within:** HomePresenter
**Called within:** HomeFragment
**Called if:** onClick match to 预约/取消预约
**Parameter:** live_id: item.getId
>[color=lightblue]
# MainTwoActivity - MatchFragment
>[color=orange]
## 1. **其他分類: /api/index/other-category**
**Method within:** SplashPresenter
**Called within:** MatchFragment > initView/ errorView
**Action:** Obtains different match categories, and uses each of them to produce a MatchItemFragment. (Note: id > matchId, extra information is send as bundle)
>[color=lightblue]
## MatchItemFragment
>[color=orange]
### 1. **賽事列表: /api/index/app-index (不在給的資料裡)**
**Method within:** MatchIndexPresenter
**Called within:** MatchItemFragment
> **Parameter:**
> class1: "matchId"
> page: 1 ~ depends on which page user is in
> size: "20" > fixed
> search_type: 1 or -1[color=lightblue]
### **Response Structure**
**daySeq** is used to decide whether the match belongs to same day. Negative means matches before today. Ex: -2 means two days before.
```java=
* homeLogo : https://heibaiz.cdns.ccav5.com.cn:82/static/images/team/JFEeKzgHxt9iw9qycEU.png
* awayLogo : https://heibaiz.cdns.ccav5.com.cn:82/static/images/team/c11DKzpaxNZixt6ydA.png
* eventName : 墨西乙
* startTime : 11:00
* id : 617311
* hots : 0
* isHot : 0
* event_id : 427
* homeName : 西玛罗雷斯索诺拉
* awayName : 哥达拿查拉大学
* class1Name : 足球
* class1 : 1
* gqId : 1738188
* playCode : [{"pCode":"rtmp://live7.cdn.duolazhihui.com/live/stream2787405?auth_key=1572758696-07b3bd7d61284fb5af7ddf4fdfa2304e-0-aa625e6f49541452dec5201e593d672a","name":"直播","lcOrd":20,"id":264727}]
* matchScore : 1:2
* pastTime : 完场
* pastStatus : 2
* daySeq : 0
* time : 1572710400
```
### **Base Flow**
```flow
start=>start: appindex response
searchOne=>condition: Deal page == 1?
searchOnePageOne=>operation: Type 1 Reset Flow
searchOnePageNotOne=>operation: Type 1 Future Flow
checkType=>condition: search_type == 1?
searchNotOne=>operation: Type -1 Flow (Prev Match)
start->checkType
checkType(yes)->searchOne
checkType(no)->searchNotOne
searchOne(yes)->searchOnePageOne
searchOne(no)->searchOnePageNotOne
```
### **Type 1 && Page 1 Reset Flow**
```flow
start=>start: Type 1 && Page amount == 1 (Reset Match)
end=>end: Set Updated Linkedlist to Adapter
startActionClear=>operation: Clear Match LinkedList
listSize=>condition: Match list size == 0?
addNew=>operation: new MatchContent & setHeader
addNewToList=>operation: Add to MatchLinkedList
checkAmount=>condition: dealt all matches?
futureMatchFlow=>operation: Future Match Flow
start->startActionClear->listSize
listSize(yes)->addNew->addNewToList->checkAmount
listSize(no)->futureMatchFlow
checkAmount(yes)->end
checkAmount(no)->listSize
```
### **Type 1 && Page > 1 Future Match Flow**
```flow
start=>start: Type 1 && Page amount > 1 (Future Match)
end=>end: Set Updated Linkedlist to Adapter
checkDayPrevSeq=>condition: same daySeq as header?
dayPrevSeqSame=>operation: MatchLinkedList.get[0]
daySeqSame=>operation: Add match to children
dayPrevSeqDifferent=>operation: new MatchContent & setHeader
daySeqDiffer=>operation: Add to MatchLinkedList
checkMore=>condition: match to deal == 0?
checkMoreSameDaySeq=>condition: match to deal == 0?
start->checkDayPrevSeq
checkDayPrevSeq(yes)->dayPrevSeqSame->daySeqSame->checkMoreSameDaySeq
checkDayPrevSeq(no)->dayPrevSeqDifferent->daySeqDiffer->checkMore
checkMore(yes)->end
checkMore(no)->checkDayPrevSeq
checkMoreSameDaySeq(yes)->end
checkMoreSameDaySeq(no)->checkDayPrevSeq
```
### **Type -1 Flow (Prev Match)**
```flow
start=>start: Type -1 Prev Matches before Today
end=>end: Set Updated Linkedlist to Adapter
checkDayPrevSeq=>condition: same daySeq as header?
dayPrevSeqSame=>operation: MatchLinkedList.get[0]
daySeqSame=>operation: Add match to children
dayPrevSeqDifferent=>operation: new MatchContent & setHeader
daySeqDiffer=>operation: addFirst to MatchLinkedList
checkMore=>condition: match to deal == 0?
checkMoreSameDaySeq=>condition: match to deal == 0?
start->checkDayPrevSeq
checkDayPrevSeq(yes)->dayPrevSeqSame->daySeqSame->checkMoreSameDaySeq
checkDayPrevSeq(no)->dayPrevSeqDifferent->daySeqDiffer->checkMore
checkMore(yes)->end
checkMore(no)->checkDayPrevSeq
checkMoreSameDaySeq(yes)->end
checkMoreSameDaySeq(no)->checkDayPrevSeq
```
## **预约/取消预约: /api/member/subscribe**
**Method within:** MatchIndexPresenter
**Called within:** MatchItemAdapter
**Action Requisite:** MatchItemAdapter onClick on icon
# MainTwoActivity - AnchorFragment
>[color=orange]
## MainTwoActivity - AnchorFragment UI Flow
>[color=orange]
## MainTwoActivity - AnchorFragment Logic
>[color=orange]
## **主播fragment页tab: /api/anchor/tab-list**
**Method within:** AnchorTabPresenter
**Called within:** AnchorFragment > initView
**Parameter:** platform: 1 (fixed)
**Actions:** Get the tab categories and set up tab layout. While setting tab, it will new the ***AnchorItemFragment*** for each category.
### **Response Format**
```java=
{
"status": 0,
"message": "获取成功",
"data": {
"list": [
{
"class1": -2,
"name": "关注"
},
{
"class1": 0,
"name": "全部"
},
{
"class1": -1,
"name": "热门"
},
{
"class1": 1,
"name": "足球"
},
{
"class1": 2,
"name": "篮球"
}
]
}
}
```
## AnchorItemFragment
>[color=orange]
### **主播列表: /api/anchor/display-list**
**Method within:** AnchorItemPresenter
**Called within:** AnchorItemFragment
**Parameter:** class1 = id, page(Int), size = 20 (fixed), user_id = UserInfo.getId
# MainTwoActivity - DiscoverFragment
>[color=orange]
## NewsFragment
No API call present, as it is a BaseH5Activity. All is reflected by webview.
## VideosFragment Logic
>[color=orange]
## VideosFragment - DisVideoListFragment
### **视频列表: /api/video/lists**
**Method within:** VideoListPresenter
**Called within:** DisVideoListFragment initData
**Parameter:** type: 2(集锦) || 1(录像), page, size: 20 (fixed)
### **点赞/api/video/like**
**Method within:** VideoListPresenter
**Called within:** DisVideoListFragment onClick
**Parameter:** video_id
# MainTwoActivity - UserFragment
>[color=orange]
## MainTwoActivity - UserFragment Logic
>[color=orange]
## **1. 个人详情: /api/member/detail (登入狀態)**
**Method within:** UserPresenter
**Called within:** UserFragment initData/onResume/after login
**Non used:** Daily sign up also calls it.
**Action:** Save up information in UserInfo and also keep it up in sharepreference. After that, update all information and ui shown using event bus/callback.
**Cases:** If it is in login status already, then initData and onResume will be called twice.
## **2. 数据埋点: /api/statistics/event**
**Method within:** EventUtils
**Called within:** UserFragment
**Places where it is called:**
```java=
//onResume
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_MINE, EVENT_TYPE_VIEW, "我的页面");
//onClick 任务中心
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_TASK_CENTER, EVENT_TYPE_CLICK, "我的页面任务中心按钮");
//onClick 邀请用户
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_MINE, EVENT_TYPE_CLICK, "我的页面打开邀请页点击事件");
```
# UserFragment - UserEditActivity
>
[color=orange]
## UserFragment - UserEditActivity Logic
>[color=orange]
## 1. **系统头像列表: /api/member/nickname-list**
**Method within:** UserEditPresenter
**Called within:** UserEditActivity
**Note:** Obtain default images that users can use in their profile.
## 2. **获取收货地址: /api/order/address-list**
**Method within:** UserEditPresenter
**Called within:** UserEditActivity
**Note:** Get User delivery address, if null just set up as 暂无收货地址.
## EditHeadDialog
## EditHeadDialog Logic
>[color=orange]
### **1. 修改用户信息: /api/user/edit-user (Note:修改使用者圖片)**
**Method within:** UserEditPresenter
**Called within:** UserEditActivity > EditHeadDialog callback
**Actions:** Pass a String path to update the image being displayed as profile.
### **2. 上傳多數圖片/照片: /api/common/upload-more-pic**
**Method within:** UserEditPresenter
**Called within:** UserEditActivity
**Parameter:** List <File>
**Call steps:** In EditHeadDialog, user either ***takes image with camera or selects gallery photo***, it will just start **startActivityForResult with CODE_GALLERY_REQUEST/CODE_CAMERA_REQUEST** by using ++PhotoUtils++. In onActivityResult, after dealing with both ResultCode, it crops the image and then send another startActivityForResult but this time using ***CODE_RESULT_REQUEST*** and uploads the images.
## ModifyNicknameActivity
### **1. 修改用户信息: /api/user/edit-user (Note:修改使用者匿名)**
**Method within:** UserEditPresenter
**Called within:** ModifyNicknameActivity
**Actions:** Edits the user nickname and updates it in UserInfo.
## ModifyPhoneActivity
### **1. 获取验证码: /api/user/send-code**
**Method within:** UserEditPresenter
**Called within:** ModifyPhoneActivity > GraphVerifyDialog callback
**What for?** It sends new phone, and GraphVerifyDialog string(amount:2) to first check if they are the same and send a verifying code to the phone being used.
### **2. 修改手机号: /api/member/edit-phone**
**Method within:** UserEditPresenter
**Called within:** ModifyPhoneActivity
**Actions:** Checks phone with the verifying code, updates user and UserInfo.
## SettingPwdActivity
### **1. 修改密码: /api/member/edit-password**
**Method within:** UserEditPresenter
**Called within:** SettingPwdActivity
# UserFragment - AnchorDisposeActivity (直播间配置)
**Entrance:**
1. UserFragment - 申請主播 (anchor_status: 2)
2. UserFragment - 直播間配置
>[color=orange]
## UserFragment - AnchorDisposeActivity(直播间配置) Logic
>[color=orange]
## **1. 直播房间详情: /api/anchor/room-detail**
**Method within:** AnchorDisposePresenter
**Called within:** AnchorDisposeActivity
### **1.1 其他分類: /api/index/other-category**
**Method within:** AnchorDisposePresenter
**Called within:** AnchorDisposeActivity > /api/anchor/room-detail onSuccess
**Actions:** Set up 直播分类 default.
## **2. 信号列表(主播预约): /api/anchor/live-list**
**Method within:** AnchorDisposePresenter
**Called within:** AnchorDisposeActivity
**Parameter:** class1: 0 (value fixed)
**Actions:** Set up an RV below 比赛选择。 Will only be shown if there is any data with ***is_scribe = 1***.
**Note:** It takes quite long to show up, as it itinerates throughout all response's data list.
## **3. 设置直播间: /api/anchor/edit-room**
**Method within:** AnchorDisposePresenter
**Called within:** AnchorDisposeActivity > onBackPressed
**Parameter:**
1. title: 直播间名称 input
2. notice: 直播间公告 input
3. cate_id: /api/anchor/room-detail response id
**Action:** Called when response' status 0 and closes up the activity.
## ChooseMatchActivity
**How to get there?** In AnchorDisposeActivity, press 比赛选择。
Note: Inside this activity, there are many ChooseMatchFragment for each of the tabs.
>[color=orange]
## **1. 信号分类(主播预约): /api/anchor/live-category**
**Method within:** ChooseMatchPresenter
**Called within:** ChooseMatchActivity > initView
**Action:** Set up the tabs and fragments(ChooseMatchFragment) by sending matchId(id from each category).
## **2. 信号列表(主播预约): /api/anchor/live-list**
**Method within:** ChooseMatchPresenter
**Called within:** ChooseMatchFragment
**Parameter:** class1: uses matchId provided by ChooseMatchActivity (id of the tab being seen).
**Actions:** Set matches to be shown in the ChooseMatchActivity.
## **3. 直播预约/取消: /api/anchor/subscribe**
**Method within:** ChooseMatchPresenter
**Called within:** ChooseMatchFragment
**Parameter:**
* live_id: /api/anchor/live-list response id for each item.
* type: if(is_scribe == "1"), then type is 0, else 1.
**Note:** is_scribe: 是否预约 1:已预约 0:未预约
**Action:** Refresh onSuccess.
# UserFragment - 申请主播
Depends on ***/api/member/detail anchor_status***.
**anchor_status:** 主播状态
* 0:未申请 > AnchorApplyActivity
* 1:申请中 > AnchorApplyExamineActivity
* 2:通过 > AnchorDisposeActivity
* 3:拒绝 > AnchorApplyRefuseActivity
## UserFragment - AnchorApplyActivity (Status 0)
>[color=orange]
## UserFragment - AnchorApplyActivity to AnchorApplyStepActivity
>[color=orange]
### AnchorApplyStepActivity
>[color=orange]
### UserFragment - AnchorApplyActivity to Logic
>[color=orange]
### **1. 其他分類: /api/index/other-category**
**Method within:** AnchorApplyStepPresenter
**Called within:** AnchorApplyStepActivity
### **2. 上傳多數圖片/照片: /api/common/upload-more-pic**
**Method within:** AnchorApplyStepPresenter
**Called within:** AnchorApplyStepActivity > when user is done with all steps.
**Note:** Upload all 3 pictures in step 3. (身份证人像面/身份证国徽面/手持身份证人像面)
### **3. 主播申请: /api/anchor/apply**
**Method within:** AnchorApplyStepPresenter
**Called within:** AnchorApplyStepActivity
## UserFragment - AnchorApplyExamineActivity (Status 1)
>[color=orange]
## UserFragment - AnchorDisposeActivity (Status 2)
Check UserFragment - AnchorDisposeActivity.
>[color=orange]
## UserFragment - AnchorApplyActivity (Status 3)
>[color=orange]
# TaskActivity
>
[color=orange]
## TaskActivity Logic
>[color=orange]
## **1. 数据埋点: /api/statistics/event**
**Method within:** EventUtils
**Called within:** TaskActivity
**Places where it is called:**
```java=
//initView
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_TASK_CENTER, EVENT_TYPE_VIEW, "任务中心页面访问");
//onClick Invite Action
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_TASK_CENTER, EVENT_TYPE_SHARE, "任务中心页面邀请");
```
## **2. 任务列表: /api/task/list**
**Method within:** TaskPresenter
**Called within:** TaskActivity onResume/ after completing daily sign in/ after receive prize
>**Notes:**
>**type:** //任务类型 1:签到 2:分享直播间 3:看直播领金币 4:邀请 5:注册 6:助力 7:学习
>**daily_type:** //1:日常 2:新手[color=lightblue]
## **3. 签到: /api/task/sign-in (onClick: 完成每天簽到)**
**Method within:** TaskPresenter
**Called within:** TaskActivity after clicking daily sign up.
**Actions:** Updates the data and also calls ***任务列表: /api/task/list*** to update Task information.
## **4. 领取奖励: /api/task/receive (onClick: 取得觀看Prize)**
**Method within:** TaskPresenter
**Called within:** TaskActivity after clicking watched time.
**Note:** Needs ***task_id*** in order to work, when it is done with its call, it also calls ***任务列表: /api/task/list*** to update Task information.
## HeidouDetailActivity
## HeidouDetailActivity Logic
>[color=orange]
### **1. 黑豆明细: api/payment/bill-list**
**Method within:** HeiDouPresenter
**Called within:** HeiDouActivity initData/error/onRefresh/loadMore
**Parameter:** page, size(fixed 40), uid (user id)
# MyLevelActivity
>[color=orange]
## MyLevelActivity Logic
>[color=orange]
## **1. 等级特权: /api/user/privileges (需登入)**
**Method within:** MyLevelPresenter
**Called within:** MyLevelActivity
**Actions:** Reorder the privileges from lowest level to highest.
# MyForecastActivity
>[color=orange]
## MyForecastActivity Logic
>[color=orange]
## InForecastFragment
### **1. 我的预测列表(预测和记录): /guess/user/fcList type:1 (不在給的資料裡)**
**Method within:** InForecastPresenter
**Called within:** InForecastFragment
**Parameter:** type 1(fixed), page, size 10(fixed)
**Actions:** Updates both InForecastFragment and ForecastActivity(EventBus).
## ForecastRecordFragment
### **1. 我的预测列表(预测和记录): /guess/user/fcList type:2 (不在給的資料裡)**
**Method within:** ForecastRecordPresenter
**Called within:** ForecastRecordFragment
# AppointmentFollowActivity
>[color=orange]
## AppointmentFollowActivity Logic
>[color=orange]
## AppointmentFragment (預約)
**Method within:** MyAppointmentPresenter
**Called within:** AppointmentFragment
### **1. 预约列表: /api/member/subscribe-list**
**Actions:** Obtains the list of matches being subscribed by the user.
### **2. 预约/取消预约: /api/member/subscribe**
**Actions:** Cancels subscription on match, updates same page by using ***/api/member/subscribe-list***.
**Parameter:** ***live_id*** comes from ***/api/member/subscribe-list***
**Note:**
It used event bus to send notice that the subscription was cancelled, but it is not updated properly as ***AppleApplication class has not updated userOrder***.
MatchFragment Item makes sure the match is Reserved(預約) by checking userOrder from Apple Application class.
## MyFollowFragment (關注)
### **1. 关注列表: /api/member/follow-list**
# SystemMessageActivity
>[color=orange]
## SystemMessageActivity Logic
>[color=orange]
## **1. 系统消息: /api/user/message-list**
**Method within:** SystemMessagePresenter
**Called within:** SystemMessageFragment
**Parameter:** page(Int), size = 10, user_id = UserInfo id.
# FeedbackActivity
>[color=orange]
## FeedbackActivity Logic
>[color=orange]
## **1. 意见类别: /api/user/report-category**
**Method within:** FeedbackPresenter
**Type 1 Called within:** FeedbackActivity
**Type 2 Called within:** MatchFeedbackActivity
**Actions:** Obtains all possible report categories for app report.
## **2. 上傳圖片: /api/common/upload-more-pic**
**Method within:** FeedbackPresenter
**Called within:** FeedbackActivity
**Actions:** Upload picture for app report.
## **3. 意见反馈: /api/user/report**
**Method within:** FeedbackPresenter
**Called within:** FeedbackActivity
**Actions:** Send report.
# MyInvitationActivity
>[color=orange]
## MyInvitationActivity Logic
>[color=orange]
## **1. 廣告列表: /api/advert/list sub_type:14**
**Method within:** AdvertPresenter
**Called within:** MyInvitationActivity
**Parameter:**
type: "1" / sub_type : 14 / pkg: "wzhbzb" / platform: "1"
All values are fixed.
**Actions:** Obtain a **custom image invitation to set as banner**, furthermore, by using api's response **jump_type** we can decide where we want to go after clicking this same banner in AdvertisementUtils.
## **2. 取得邀請文案: /api/advertis/detail**
>[color=lightblue]
**Method within:** MyInvitePresenter
**Called within:** MyInvitationActivity
**Parameter:** postion: "0", unique_name: "invite"
**Actions:** By stating the variable **unique_name** as invite, we can fetch documents and wording about this.
## **3. 邀请列表: /api/member/invite-list (需登入)**
**Method within:** MyInvitePresenter
**Called within:** MyInvitationActivity
## **4. 数据埋点: /api/statistics/event**
**Method within:** EventUtils
**Called within:** MyInvitationActivity > onClick MyInvitationActivity
```java=
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_MINE, EVENT_TYPE_CLICK, "我的页面打开邀请页点击事件");
```
## **5. 邀请中心分享按钮调用: /api/common/test**
**Method within:** EventUtils
**Called within:** MyInvitationActivity > getAppendUrl (EventUtils.getInstance().shareBtn();)
# StoreActivity
## StoreActivity Logic
>[color=orange]
## **1. 数据埋点: /api/statistics/event**
**Method within:** EventUtils
**Called within:** StoreActivity > initView
```java=
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_SHOPPING, EVENT_TYPE_VIEW, "商城页");
```
## **2. 商品列表: /api/goods/list (需登入)**
**Method within:** StorePresenter
**Called within:** StoreActivity
**Actions:** Obtain shop categories(as cate variable) and product list. By using **product cate_id**, it will match with the category id that has same number to know which products to list below which one.
## StoreActivity - 商城商品 BaseH5Activity Logic
>[color=orange]
# RankActivity
>[color=orange]
## RankActivity Logic
>[color=orange]
## **1. 榜单列表: guess/billboard/list (不在給的資料裡)**
**Method within:** IncomeRankPresenter
**Called within:** IncomeRankFragment
**Parameter:** type (1 收益榜, 2 天台榜), day (1 日榜, 2 周榜, 3 月榜)
**Response:**
>[color=lightblue]
# Setting Activity
>[color=orange]
**Onclick Actions:**
>[color=orange]
## **1. 修改用户信息: /api/user/edit-user** (Note:修改使用是否要開關注主播開播提醒)
**Method within:** UserEditPresenter
**Called within:** SettingActivity
**Parameter:** is_anchor_push (1 open / 0 close push notification)
**Actions:** Edits the user willingness to receive notifications when followed host start a live stream.
# LoginActivity
>[color=orange]
## LoginActivity - onClick
>[color=orange]
## LoginActivity - GraphVerifyDialog
>[color=orange]
***Note:*** Captcha is checked within ***/api/user/send-code***
## **1. 获取验证码: /api/user/send-code**
**Method within:** LoginPresenter
**Called within:** LoginActivity > GraphVerifyDialog callback
**What for?** It sends new phone, and GraphVerifyDialog string(amount:2) to first check if they are the same and send a verifying code to the phone being used.
## 2. Login API
**Actions:** After calling login, if it is succesful, then it will send an EventBus to **loginEvent(LoginInfoEntity entity)** updating: MainTwoActivity, DisVideoListFragment, UserFragment.
### **2.1 验证码登录: /api/user/app-login**
**Method within:** LoginPresenter
**Called within:** LoginActivity
**Parameter:** phone:String, code:String
### **2.2 密码登录: /api/user/app-pwd-login**
**Method within:** LoginPresenter
**Called within:** LoginActivity
**Parameter:** phone:String, password:String
***( Base64.encodeToString(RSAUtil.encrypt(pwd), Base64.DEFAULT))***
## 3. Third Party Log in (目前無法驗證)
### **3.1 第三方登录: /api/user/app-third-login**
### **3.2 微博登录: https://api.weibo.com/2/users/show.json**
# UserInfoActivity
This one is shown when login is success but no nickname detected, it is either null or empty.
>[color=orange]
## **1. 系统头像列表: /api/member/nickname-list**
**Method within:** UserInfoPresenter
**Called within:** UserInfoActivity
## **2. 上傳多數圖片/照片: /api/common/upload-more-pic**
**Method within:** UserInfoPresenter
**Called within:** UserInfoActivity
## **3. 修改用户信息: /api/user/edit-user (Note:修改使用者圖片&&匿名)**
**Method within:** UserEditPresenter
**Called within:** ModifyNicknameActivity
# MatchDetailActivity
## Pre-Read Flow
>[color=orange]
## **1. 直播详情页: /api/index/live (不在給的資料裡面)**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity
**Usages:**
* **Official Stream (官方直播) Case:** initData
* matchDetailPresenter.indexLive
* Get Essential information to display
* Start fragments
* matchDetailPresenter.unofficial
* StartCoundown to keep updating hot amount every 3 mins.
* **Official Stream (官方直播) Case:** initView
* ErrorViewRetryListener
## **2. 数据埋点: /api/statistics/event**
**Method within:** EventUtils
**Called within:** MatchDetailActivity
**Usages:**
* **Host Stream (主播直播) Case:** initData
```java=
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_MATCH_DETAIL, EVENT_TYPE_VIEW, "官方直播内页");
```
* **Official Stream (官方直播) Case:** initData
```java=
EventUtils.getInstance().event(REPORT_INVITATION, REFER_PAGE_ANCHOR, EVENT_TYPE_VIEW, "主播直播内页");
```
## **3. 浏览直播间: /api/common/view-live**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity
**Parameter:**
* **Host Stream (主播直播) Case:**
* **UUID:** anchorId(主播ID), **Type:** 1
* **Official Stream (官方直播) Case:**
* **UUID:** matchId(賽事ID), **Type:** 2
**Note:** 1:主播 2:比赛
## **4. 主播(或其他用户)详情: /api/member/info**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity
**Requisites:** Must be a Host Stream (主播直播) Case
**Parameter:** Used anchorId as user_id
**Actions:**
* Set up anchor related ui and data
* close_status
* == 2, user is banned and banned display will be shown
* == 1:
* Get can_open_guess to decide whether they can guess win/lose
* Calls ***/api/index/anchor-live-url***
**Response:**
```java=
{
"status": 0,
"message": "登录成功"
"data":{
"detail": {
"nickname": "老罗来了", //昵称
"close_status":1 //封禁状态 1:正常 2:封禁
"portrait": "", //头像
"anchor_url": "", //二维码分享地址
"is_anchor": 1, //是否主播 1:是 0:否
"title": "章总说", //直播间名称
"notice": "章总说", //直播间公告
"is_follow": 1,//是否关注 1:关注 0:未关注
"can_guess": 1, //1:可以竞猜 0:否
"can_open_guess": 1, //1:可以开竞猜 0:否
"handicap_id": 0, // 0:没有竞猜;非0:竞猜id
"follow_count": 1 //关注人数
"user_id":2 //用户ID
}
}
}
```
## **5. 更新主播直播间: /api/index/anchor-live-url (不在給的資料裡面)**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity
**Requisites:** Must be a Host Stream (主播直播) Case
**Parameter:** Used anchorId as user_id
**Additional Variable:** type :1 初次拉去, type 2 定时运行
**Actions:**
* **Type 1:** Request for first time
* State == 1
* Set EventBus EventBusEnum.MATCH_FIRST_OPEN_LIVE
* Call ***/signal-front/live/matchLiveInfoUseForAppClient***
* Start countdown to call ***/api/index/anchor-live-url*** every 3 mins
* State != 1
* No live UI is displayed.
* Class == 2 (Basketball)
* lsId != empty
* Calls ***/score/xq/common/getMatchId***
* lsId == empty
* initFragment
* Class == 1 (Football)
* GqId != empty
* Calls ***rollball-score/xueqiu/common/getMatchId***
* GqId == empty
* initFragment
* Else
* initFragment
* **Type 2:** Request every 3 mins.
## **6. Get Match**
### **6.1 获取Basketball比赛ID: /score/xq/common/getMatchId (不在給的資料裡面)**
**Method within:** BaBaseInfoPresenter
**Called within:** MatchDetailActivity
**Parameter:**
* sourceId: 1-球探,2-雷速
* resource: 2 (1-足球,2-篮球)
**Actions:**
* If response not null, it calls ***/score/xq/bb/matchInner/liveMatchData***
### **6.2 获取Football Match ID: /rollball-score/xueqiu/common/getMatchId (不在給的資料裡面)**
**Method within:** Football
**Called within:** MatchDetailActivity
**Parameter:**
* sourceId: 1-球探,2-雷速
* resource: 1 (1-足球,2-篮球)
**Actions:**
1. Set Football class matchId(mutable), it will automatically call ***rollball-score/xueqiu/fb/matchInner/liveMatchData***
2. Set value to mutableList
2.1. Setup liveId/ HomeTeamId/ AwayTeamId/ hot
2.2. Calls ***/api/match/help-detail***
2.3. initFragment
matchDetailPresenter.loadHelpInfo(helpVo.getLiveId(), helpVo.getHomeId(), helpVo.getAwayId());
## **7. 篮球内页的基础数据: /score/xq/bb/matchInner/liveMatchData**
**Method within:** BaBaseInfoPresenter
**Called within:** MatchDetailActivity > /score/xq/common/getMatchId callback
**Actions:** If response is null, then initFragment(-1), else it initFragment(response matchId)
## **8. 助力基础信息: /api/match/help-detail**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity > /rollball-score/xueqiu/common/getMatchId callback
## **9. 取得直播playUrl需要的資訊: /signal-front/live/matchLiveInfoUseForAppClient (不在給的資料裡面)**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity
**Usages:**
1. Called after ***/api/index/anchor-live-url*** callback
2. Called as indexM3u8LiveUrl when onMessageEvent(MATCH_BROWSE_SELECT) from LinkDialog. **(Need further check)**
>[color=lightblue]
**Actions:**
* Set up player using **Ds** && **Se** and startPlayLogic.
## **10. 任务列表: /api/task/list (需登入)**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity > on Resume in login mode
**Actions:** Check tasks that are done to show a TaskDialog, else it will add ++play video task++ into the list. Note: TaskDialog will likely call ***/api/task/receive***.
## **11. 领取奖励: /api/task/receive (需登入)**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity > TaskDialog
**Actions:** Collect prize and later calls ***/api/task/list*** again to check tasks.
## **12. 关注/取消关注: /api/member/follow-anchor (需登入)**
**Method within:** MatchDetailPresenter
**Called within:** MatchDetailActivity
**Usages:**
1. onClick btnFollow (View.GONE atm, it is not used)
2. onMessageEvent(MATCH_DETAIL_FOLLOW) called from MatchChatFragment/MatchAnchorIntroduceFragment
---
# MatchDetailActivity - MatchChatFragment
>[color=orange]
## **1. 任务列表: /api/task/list (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > loadTask
## **2. 用户发言颜色配置: /api/user/speech-color-list (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > loadSpeechColorList
**Actions:** Save up in ACache ***user_chat_speek_entity***
## **3. 聊天设置列表: /api/common/talk-set (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > mPresenter.loadTalkSetList();
**Actions:** If user is log in, it will call ***/chat/user/speak*** to send a welcome msg in chatroom.
## **4. 发送聊天消息: /chat/user/speak (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > sendTalk
**Actions:** Send msg into the chatroom, when being in login status.
## **5. 取得近10条聊天消息: /api/user/talk-message**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > loadMatchChatRecord
## **6. 图片列表: /api/common/image-list**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > loadImgList
**Action:** Keep image list saved up in aCache chat_img_data. Mostly passed to ChatDialog(Note: But it is not used inside it).
## **7. 聊天或者封禁文字模板列表: /api/common/talk-templete**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > loadTalkList
**Action:** Type 1 means chat is opened, else it is closed.
## **8. 获取礼物列表: /gift/giftMgt/list**
**Method within:** MatchChatPresenter
**Called within:**
1. MatchChatFragment > initData(loadGift)
2. MatchChatPresenter > loadUserInfo(onSuccess)
**Action:**
1. Gets Gift icon and information; and save it up in ***mGiftEntity variable***.
2. Set up ChatDialog and show it up if it was clicked.
## **9. 廣告詳情: /api/advert/detail**
**Method within:** AdvertPresenter
**Called within:** MatchChatFragment > initData
**Parameter:** ad_type:36, 28
**Actions:** Shows the Icon Ad on right bottom side if called succesful.
## **10. 禁言 與 屏蔽**
Appears after long click on msg, which will be either 禁言 or 屏蔽 depending on the user account you are logged in.
**Note:** "is_super": 0, //Whether is it a super account. 1:Yes
**禁言/屏蔽 is decided here:**
```java=
if (UserInfo.getInstance().getId() != messageBean.getUid()) {
if (UserInfo.getInstance().getIs_super() == 1 || matchId == UserInfo.getInstance().getId()) {
//封禁状态列表
showPopWindow(view, messageBean, 1);
} else {
//屏蔽
showPopWindow(view, messageBean, 2);
}
}
```
### **10.1 封禁状态列表: /api/user/colse-status (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > mPresenter.loadCloaseStatusList
**Actions:**
1. Will load talk list (/api/common/talk-templete) again, but this time it is of type 2 in onSuccess.
2. Leads to ChatStoppedListAccount, where you either:
1. Ban a user
2. Stop user talking:
1. isAnchor and is host: /api/anchor/stop-talk
2. isAnchor || NonAnchor: /api/user/set-status
### **10.2 封禁用户: /api/user/forbid-user (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > ChatStoppedListAccount callback (banUser)
### **10.3 主播禁言: /api/anchor/stop-talk (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > ChatStoppedListAccount callback (stopTalk type 1)
### **10.4 官方禁言: /api/user/set-status (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > ChatStoppedListAccount callback (stopTalk type 2)
### **10.4 屏蔽: /api/user/add-shield (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > mPresenter.addShield
### **10.5 屏蔽列表: /api/user/shield-list (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment > loginSuccess/ resultChatList Response
## **11. 个人详情: /api/member/detail (需登入)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment (loadUserInfo):
1. After Login Success
2. After Sending Gift
3. onResume
4. After sendChat
## **12. 聊天消息拉取: /api/user/talk-pull (目前無真正啟用)**
**Method within:** MatchChatPresenter
**Called within:** MatchChatFragment
**Requisites:** Need to use talkLoop (聊天轮询设置:/api/common/talk-loop)
## **13. 观看直播: /api/task/watch-live**
**Method within:** LiveTimeInfo (setTime)
**Called within:**
1. **Case 1:**
MatchChatFragment inside handler case 6. Only in ***scheduledExecutorService*** case 6 is called in a timerTask and this one is called to start in MatchDetailActivity onVideoPlay. It is stopped as soon as MatchChatFragment is called onStop.
2. **Case 2:**
In MatchDetailActivity OnBackPressed(showPlayWindow()) and need to show small playing window. This showPlayWindows will just build a FloatWindow and in FloatWindow.show will call IFloatWindowImpl.show(scheduledExecutorService).
---
# MatchDetailActivity - ForecastFragment
## **1. 预测列表: /guess/forecast/list (不在給的資料裡面)**
**Method within:** ForecastPresenter
**Called within:** ForecastFragment
**Requisites:** matchId && anchorId not zero or empty.
**Response Data Item Structure:**
```java=
{
"closeTime" : -69303
"content" : "来来来,猜一局,谁赢"
"handicapId" : 152
"itemVoList" : [
{"isRight":0,"itemContent":"主赢","itemId":108,"itemTotalBetPrice":200,"userBetPrice":200,"userWinPrice":0},
{"isRight":0,"itemContent":"客赢","itemId":109,"itemTotalBetPrice":0,"userBetPrice":0,"userWinPrice":0}]
"joinUsers" : 1
"leagueName" :""
"matchId" : 1026745
"matchStartTime" :
"openTime" :
"status" : 1 (4: 已结束, 5: 流局)
"title" : ""
}
```
**Actions:** Collect those matches that have finished and are displayed a list.
## **2. 投注信息: /guess/forecast/gotoBet (需登入) (不在給的資料裡面)**
**Method within:** ForecastPresenter
**Called within:** ForecastFragment
**Requisite:** List onclick, login status, anchorId != your own id && status == 1.
**Parameter:** ++handicapId++ obtained from the ***/guess/forecast/list*** list item.
>**Note:**
>Will **NEVER** be called, as the list only shows status 4 && 5. [color=red]
>
**Response:**
```java=
{
"betNumStr" : "num"
"unitPriceMax": double
"unitPriceMin": double
}
```
**Action:**
Calls a pop-up window, which UI seems like this:
>[color=lightblue]
If click **投注**, it will call below api.
## **3. 投注: /guess/forecast/bet (需登入) (不在給的資料裡面)**
**Method within:** ForecastPresenter
**Called within:** ForecastFragment > ForecastBettingPopup callback
**Parameter:**
1. "handicapId": handicapId
2. "itemId": handicapItemId
3. "betNum": 1 (fixed)
4. "price": heiDouNumber
**Response:** Will just show whether it was success or not.
**Action:**
1. Update HeiDou Balance in UserInfo by deducting original minus the amount spent.
2. Update shown info
## **4. 结算后获取用户信息: /guess/forecast/getUserFsData (不在給的資料裡面)**
**Method within:** ForecastFragment
**Called within:** JWebSocketClientService onMessage case 1(发送预测event)
**Parameter:** ++handicapId++
**Response Data:**
```java=
{
"itemId": 161,
"isRight": 1,
"userWinPrice": 1496
}
```
**Actions:** Update information.
---
# MatchDetailActivity - AnchorPredictionFragment (Pending)
>[color=orange]
## Note
**Status:**
1-可下注 2-封盘中 3-结算中 4-已结算 5-流局
## **1. 预测列表: /guess/forecast/list (不在給的資料裡面)**
**Method within:** PredictionRepository
**Called within:** AnchorPredictionFragment
**Requisites:** matchId && anchorId not zero or empty.
**Action:** Same as in ForecastFragment
## **2. 新建预测初始参数: /guess/anchor/getInitData (不在給的資料裡面)**
**Method within:** PredictionRepository
**Called within:** AnchorPredictionFragment > initView getPredictionParams
**Response Data Structure:**
```java=
{
"systemCloseTime" : "2020-12-12 00:12:00"
"systemTime" : "2020-12-11 23:54:50"
}
```
**Action:** Get difference between the time provided and display a countdown timer.
## 3. AnchorPrediction Item
>item display[color=lightblue]
### **3.1 结算预测: /guess/anchor/fsHandicap (不在給的資料裡面)**
**Method within:** PredictionRepository
**Called within:** AnchorPredictionFragment > PredictionAdapter.OnPredictionStopListener settle
**Parameter:** handicapId(int), itemId(int), isCancel(int)
**Response:** Just shows whether it is success or not.
### **3.2 继续预测: /guess/anchor/unlockHandicap (不在給的資料裡面)**
**Method within:** PredictionRepository
**Called within:** AnchorPredictionFragment > PredictionAdapter.OnPredictionStopListener goOn
**Parameter:** handicapId(int), closeTime(String)
### **3.3 停止预测: /guess/anchor/stopHandicap (不在給的資料裡面)**
**Method within:** PredictionRepository
**Called within:** AnchorPredictionFragment > PredictionAdapter.OnPredictionStopListener stop
**Parameter:** handicapId(int), closeTime(String)
### **3.4 投注信息: /guess/forecast/gotoBet (不在給的資料裡面)**
**Method within:** PredictionRepository
**Called within:** AnchorPredictionFragment > PredictionAdapter.OnPredictionStopListener betting
**Parameter:** handicapId(int)
**Action:** Same as ForecastFragment /guess/forecast/gotoBet.
### **3.5 投注: /guess/forecast/bet (不在給的資料裡面)**
**Action:** Same as ForecastFragment
## **4. 新建预测: /guess/anchor/openHandicap (不在給的資料裡面)**
**Method within:** PredictionRepository
**Called within:** AnchorPredictionFragment > onClick addPrediction
---
# MatchDetailActivity - MatchStatusFragment (足球/籃球 共用賽況)
>**Note:** initFragment(-1), no matchId available.[color=red]
## **1. 助力详情: /api/match/help-detail**
**Method within:** MatchHelpPresenter
**Called within:** MatchStatusFragment > initView
**Actions:**
Gets amount of like per team and whether it was liked before.
## **2. 助力: /api/task/help-live**
**Method within:** MatchHelpPresenter
**Called within:** MatchStatusFragment > When like is pressed below team img.
**Parameter:** live_id: Int, is_hot: Int, team_id: Int
# MatchDetailActivity - MatchResultFragment (足球賽況)
## MatchResultFragment Flow
>**Note:** matchId && matchIdLiveData are mutable variables.[color=red]
```flow
st=>start: Get FootballMatchId
em=>end: END
getMatchId=>operation: Api: /rollball-score/xueqiu/common/getMatchId
matchIdLiveDataUpdated=>condition: matchIdLiveData updated?
matchIdUpdate=>operation: set matchId Value
idLiveSetUp=>operation: initFragment(matchId) > Include MatchResultFragment
matchIdChanged=>operation: MatchResultFragment caught matchId changes
getMatchResultData=>operation: 获取基础赛况数据: rollball-score/xueqiu/fb/matchInner/liveMatchData
getMatchResultDataSuccess=>condition: onSuccess?
callApi=>operation: call API: 事件直播&文字直播
st->getMatchId->matchIdLiveDataUpdated
matchIdLiveDataUpdated(yes)->matchIdUpdate
matchIdLiveDataUpdated(no)->idLiveSetUp->matchIdUpdate->matchIdChanged->getMatchResultData->getMatchResultDataSuccess
getMatchResultDataSuccess(yes)->callApi
```
## MatchResultFragment UI
>[color=lightblue]
## 1. 获取基础赛况数据: rollball-score/xueqiu/fb/matchInner/liveMatchData (給的資料裡面沒有)
**Method within:** MatchResultRepository
**Called within:** MatchResultViewModel > after updating matchId in MatchResultFragment
**Action:** Obtains Basic Football Match Data to later deal with the following two api:
1. 事件直播: rollball-score/xueqiu/fb/match/matchEventData
2. 文字直播: rollball-score/xueqiu/fb/matchAnalysis/getMatchTextLive (給的資料裡面沒有)
## 2. 事件直播: rollball-score/xueqiu/fb/match/matchEventData (給的資料裡面沒有)
**Method within:** MatchResultRepository
**Called within:** MatchResultRepository > ***rollball-score/xueqiu/fb/matchInner/liveMatchData*** onSuccess call.
### Field Analysis - 欄位解析
**Status:** 0. 开场 1. 中场 2. 完场
**Content:** Action Description
**Kind:** 1. HomeTeam 2. AwayTeam
**Type:**
1. Goal (入球)
2. Red Card (红牌)
3. Yellow Card (黄牌)
4. Touched Ball (点球)
5. OG 'Own Goal' (乌龙)
6. Two Yellow Cards into red card (两黄变红)
7. Player Change (PlayerCnShort 换下 OtherPlayerCnShort)
8. Action no count (无效)
9. Corner Kick (角球)
### Data Dealing - 處理資料
```flow
st=>start: Action Data (MatchEventDto)
em=>end: MainTwoActivity
isTypeZero=>condition: type != 0?
addItemTypeNo=>operation: addItemType = 1
addItemTypeYes=>operation: addItemType = 2
addActionType=>operation: addItemType = type
addActionTime=>operation: addActionTime = happenTime
isKindOne=>condition: kind == 1?
useHomeNameCn=>operation: Home Team action
useAwayNameCn=>operation: Away Team action
getActionInfo=>end: Decide Action From Type
isStatusZero=>condition: status == 0?
statusStarted=>operation: Started (开场)
isStatusOne=>condition: status == 1?
statusHalfTime=>operation: Half-Time (开场)
statusEnded=>operation: Ended (开场)
getActionContent=>end: Get Action Content
st->isTypeZero
isTypeZero(yes)->addItemTypeYes->addActionType->addActionTime->isKindOne
isTypeZero(no)->addItemTypeNo->isStatusZero
isKindOne(yes)->useHomeNameCn->getActionInfo
isKindOne(no)->useAwayNameCn->getActionInfo
isStatusZero(yes)->statusStarted->getActionContent
isStatusZero(no)->isStatusOne
isStatusOne(yes)->statusHalfTime->getActionContent
isStatusOne(no)->statusEnded->getActionContent
```
## 3. 文字直播: rollball-score/xueqiu/fb/matchAnalysis/getMatchTextLive (給的資料裡面沒有)
**Method within:** MatchResultRepository
**Called within:** MatchResultRepository > ***rollball-score/xueqiu/fb/matchInner/liveMatchData*** onSuccess call.
---
# MatchDetailActivity - MatchAnalysisFragment (足球分析)
>[color=orange]
## **1. 足球分析: rollball-score/xueqiu/fb/matchAnalysis/analysisList (給的資料裡面沒有)**
**Method within:** MatchAnalysisRepository
**Called within:** MatchAnalysisFragment > MatchAnalysisViewModel.getData
**Success code:** 1000
**Response Structure:**
```java=
{
"code": 1000,
"data": {
"headToHeadList": [...]
"histMatchData": {
"homeHistMatchDataList":[...],
"awayHistMatchDataList":[...]
},
"awayTeamFuture":[...],
"homeMatchScore":[...],
"homeTeamFuture":[...],
"fbTeamLeagueRankVO": {
"awayTeamLeagueRank":[...],
"homeTeamLeagueRank":[...]
}
"msg": "成功",
"time": 1630043658833
}
```
**Actions:** The response is used mainly in viewmodel to just fill data into UI directly. Must be aware that the values below come from MatchStatusFragment:
>1. viewModel.awayHeadUrl.setValue(matchResultVo.getAwayTeamLogo());
>2. viewModel.homeHeadUrl.setValue(matchResultVo.getHomeTeamLogo());
>3. viewModel.homeName.setValue(matchResultVo.getHomeNameCn());
>4. viewModel.awayName.setValue(matchResultVo.getAwayNameCn());
>5. viewModel.location.setValue(matchResultVo.getLocationCn() + "");
>[color=lightblue]
>**Note:** They just provide team location, name and image.
---
# MatchDetailActivity - MatchIndexFragment (足球指數)
>[color=orange]
## **1. 比赛指数列表: rollball-score/xueqiu/fb/odds/oneMatchList (給的資料裡面沒有)**
**Method within:** MatchIndexRepository
**Called within:** MatchIndexFragment
**Success code:** 1000
**Response Structure:**
Only **asiaOddsList(让分)**, **europeOddsList(欧指)**, **bsOddsList(总分)** are used.
```java=
{
"code": 1000,
"data": {
"asiaOddsList": [...],
"bsOddsList": [...],
"europeMoreOddsList": [...],
"europeOddsList": [...],
"jcrqOddsList": [...]
}
"msg": "成功",
"time": 1630043658833
}
```
**Action:**
1. Set each list ViewType **asiaOddsList(让分 = 1)**, **europeOddsList(欧指 = 2)**, **bsOddsList(总分 = 3)**, according to the tab they are in.
2. Call ***广告接口: api/advert/list (sub_type:15, type:1)***
### **1.1. 广告接口: api/advert/list (sub_type:15, type:1) (給的資料裡面沒有 sub_type 15 情況解釋)**
**Method within:** MatchIndexRepository
**Called within:** MatchIndexRepository > after 比赛指数列表 api onSuccess
**Action:** If status = 0, call 复制虚拟赔率公司接口 api.
### **1.2. 复制虚拟赔率公司接口: rollball-score/xueqiu/common/copyVirtualBetComp (給的資料裡面沒有)**
**Method within:** MatchIndexRepository
**Called within:** MatchIndexRepository > after ***广告接口: api/advert/list (sub_type:15, type:1)***
**Action:** Still do not know
---
# MatchDetailActivity - MatchLineUpFragment (足球陣容)
>[color=orange]
## **1. 获取基础赛况数据: rollball-score/xueqiu/fb/matchInner/liveMatchData (給的資料裡面沒有)**
**Method within:** MatchLineupRepository
**Called within:** MatchLineupViewModel > getMatchResultVoLiveData
**Parameter:** matchId
**Action:** Set Value and call 比赛阵容 API.
## **2. 比赛阵容: rollball-score/xueqiu/fb/matchAnalysis/getMatchTeamPlayer (給的資料裡面沒有)**
**Method within:** MatchLineupRepository
**Called within:** MatchLineupRepository > after 获取基础赛况数据 api onSuccess
**Parameter:** matchId, resource = 1
**Reponse Structure:**
```java=
{
"code": 1000,
"data": {
"awayTeamFormation": "4-4-2",
"awayTeamInjuryList": [...],
"awayTeamLineUp": [...],
"awayTeamSubLineUp": [...],
"homeTeamFormation": "4-1-4-1",
"homeTeamInjuryList": [...],
"homeTeamLineUp": [...],
"homeTeamSubLineUp": [...],
}
"msg": "成功",
"time": 1630043658833
}
```
**Importance:** This one will decide whether to show no info or not.
---
# MatchDetailActivity - BaMatchStatusFragment (籃球賽況)
## Note (注意事項)
All parameters passed in Fragment come from **MatchDetailActivity** API, value differ according whether its hosted by official or not.
**entity variable:**
```flow
st=>start: MatchDetailActivity
em=>end: Entity passed as Parameter
when fragment is init.
isAnchor=>condition: isAnchor?
isAnchorYes=>operation: 主播(或其他用户)详情:
/api/member/info
isAnchorApi=>operation: 更新主播直播间:
/api/index/anchor-live-url
(matchAnchorLiveEntity)
isAnchorNo=>operation: 直播详情页:
/api/index/live
(entity)
responseEntity=>operation: Response is used as entity
st->isAnchor
isAnchor(yes)->isAnchorYes->isAnchorApi->responseEntity->em
isAnchor(no)->isAnchorNo->responseEntity
```
**infobean variable:**
This one is obtained from ***/score/xq/bb/matchInner/liveMatchData***
## **1. 篮球内页的文字直播: https://basic.heibai588.com/score/xq/bb/matchInner/textLiveData (給的資料裡面沒有)**
**Method within:** BaMatchStatusPresenter
**Called within:** BaMatchStatusFragment
**Parameter:** matchId
**Reponse Structure:**
```java=
{
"code": 1000,
"data": [
{
"eventExplain": "比赛结束",
"eventTime": "0.0",
"eventTimeSeconds": 0,
"kind": 0,
"matchId": 43769,
"nodeCount": 4,
"score": "75-76",
"teamId": 0
},
...
],
"msg": "成功",
"time": 1630295798095
}
```
**UI show up:**
>[color=lightblue]
>**Note:** They did not deal what to do with kind 0.
## **2. 助力基础信息: /api/match/help-detail**
**Method within:** BaMatchStatusPresenter
**Called within:** BaMatchStatusFragment
**Response Structure:**
1. is_help: means you have press liked (0: No, 1:Yes).
2. help_team_id: represents the teams being pressed liked.
3. home/away_count: represents each team amount of like.
```java=
{
"status": 0,
"message": "获取成功",
"data": {
"detail": {
"is_help": 0,
"help_team_id": 0,
"home_count": 0,
"away_count": 0
}
}
}
```
## **3. 助力: /api/task/help-live (需要登入)**
**Method within:** BaMatchStatusPresenter
**Called within:** BaMatchStatusFragment
**Requsite:** Called when pressed like in either team; and updates the amount shown.
---
# MatchDetailActivity - BaTotalFragment (籃球统计)
**infobean variable:**
This one is obtained from ***/score/xq/bb/matchInner/liveMatchData***
## **1. 篮球内页的统计: https://basic.heibai588.com/score/xq/bb/matchInner/statisticData (給的資料裡面沒有)**
**Method within:** BaTotalPresenter
**Called within:** BaTotalFragment
**Response Structure:**
```java=
{
"code": 1000,
"data": {
"awayPlayerStatistic": [...],
"homePlayerStatistic": [...],
"homeStatistic": {...},
"awayStatistic": {...}
}
"msg": "成功",
"time": 1630303310580
}
```
**Actions:**
**本场最佳:** homeStatistic && awayStatistic
**球员统计:** homePlayerStatistic && awayPlayerStatistic
---
# MatchDetailActivity - BaAnalysisDataFragment (籃球分析)
## **1. 篮球内页的分析: https://basic.heibai588.com/score/xq/bb/matchInner/analysisData (給的資料裡面沒有)**
**Method within:** BaAnalysisPresenter
**Called within:** BaAnalysisFragment
**Parameter:** matchId
**Reponse Structure:**
1. commonAnalysis: Provides us all matches that these two teams have been through.
2. homeAnalysis
3. awayAnalysis
```java=
{
"code": 1000,
"data": {
"commonAnalysis": [...],
"homeAnalysis": [...],
"awayAnalysis": [...]
}
"msg": "成功",
"time": 1630043658833
}
```
**Actions:**
1. **交锋往绩**
Get the win matches from one team to show img below.
**Note:** Uses ***commonAnalysis*** to get the info, as the team might be either home/away team in that specific match, so you might need to check it throughly whether the winner id(homeId/awayId) is same as the teamId(obtain through ***value parameter*** from matchDetailActivity).
```java=
if(awayTeamWins){
//check if awayTeamId is the same TeamId
}
if(homeTeamWins){
//check if homeTeamId is the same TeamId
}
```
2. Set up all adapters.
**Value Parameter:**
>[color=lightblue]
---
# MatchDetailActivity - BaPointFragment (籃球指数)
## **1.1. 广告接口: api/advert/list (sub_type:15, type:1) (給的資料裡面沒有 sub_type 15 情況解釋)**
**Method within:** BaPointPresenter
**Called within:** BaPointFragment > init
>**Action:** Keeps value as ***detailEntity***. Its usage is not checked still.[color=red]
## **1.2 篮球的内页指数让分: https://basic.heibai588.com/score/xq/bb/matchInner/oddsData (給的資料裡面沒有)**
**Method within:** BaPointPresenter
**Called within:** BaPointFragment > init
**Parameter:** matchId
**Response Structure:**
```java=
{
"code": 1000,
"data": {
"europeOddsList": [...],
"bsOddsList": [...],
"asiaOddsList": [...]
}
"msg": "成功",
"time": 1630043658833
}
```
**Actions:** OnSuccess calls 虚拟赔率公司行为 API.
## **1.3 虚拟赔率公司行为: https://basic.heibai588.com/score/xq/common/copyVirtualBetComp (給的資料裡面沒有)**
**Method within:** BaPointPresenter
**Called within:** BaPointFragment > init
**Parameter:** Apart from matchId, the other 2 are fixed value.
1. matchId
2. channel: 4 (1-xx 2-xx 3-xx 4-黑白)
3. class1: 2 (体育项目分类 1-足球; 2-篮球 3-高尔夫)
**Response Structure:**
```java=
{
"code": 1000,
"data": {
"asianCompBetList": [...],
"europeanCompBetList": [...],
"totalScoreCompBetList": [...]
}
"msg": "成功",
"time": 1630043658833
}
```
**Actions:**
Need to use **广告接口: api/advert/list (sub_type:15, type:1)** response, if this data is null, then it will not proceed.
>**Note:** Cannot check process because 广告接口: api/advert/list (sub_type:15, type:1) keeps giving null data.[color=red]
---
# HistoryPredictionActivity
Note: Can be reached from onclicking AnchorPredictionFragment's 历史预测.
>[color=lightblue]
## **1. 历史预测: /guess/forecast/getAnchorHistFcList (給的資料裡面沒有)**
**Method within:** PredictionRepository
**Called within:** HistoryPredictionActivity onCreate (viewModel.getHistoryList(null);)
**Parameter:** time: String if present, else just go without param.
# SearchActivity
## SearchActivity UI
>[color=orange]
## SearchActivity Logic
>[color=orange]
## **1. 关注的直播id: /api/member/follow-ids**
**Method within:** SearchPresenter
**Called within:** SearchActivity initView
**Actions:** Called right over when starting the activity when the user is logged in.
## **2. 搜索: /api/anchor/video-list**
**Method within:** SearchPresenter
**Called within:** SearchActivity
**Actions:**
1. 主播: Anchors
2. 比賽: Lives
3. 直播: AnchorsRooms
# UpdateAppManager - App 更新
>[color=orange]
## UpdateAppManager - App 更新 Logic
>[color=orange]
## **1. 版本更新: api/common/version-upgrade**
**Method within:** UpdateAppManager
**Called within:** MainTwoActivity
**Ex:** https://appapi.heibai588.com/api/common/version-upgrade?client_version=2.2.3&pkg=wzhbzb&channelid=android_heibai18M&platform=1
**Parameter:**
1. channelid: "android_" + AppleApplication.chanelName
2. platform: 1 (fixed)
3. pkg: "wzhbzb" (fixed)
4. client_version: AppleApplication.clientVersion
**Response:**
```java=
{
"status": 0,
"message": "获取成功",
"data": {
"detail": {
"id": 99,
"platform": 1,
"version_code": "2.3.3",
"describe": "优化部分问题",
"flag": false,
"url": "https://hb-ali-oss-2.oss-cn-hongkong.aliyuncs.com/apk/latest/app_hh_release.apk",
"remark": "",
"version_name": "2.3.3",
"title": "安卓最新包",
"type": 1,
"cate": 3,
"is_open": 1
}
}
}
```
Notes:
* flag: true (強更), false(小更)
**Actions:**
If response's detail data is available, then it shows UpdateDialogFragment
# VideoDetailsActivity
>[color=orange]
Accesible from DisVideoListFragment. There are no APIs used, when going to this activity, data is transferred also.
# VideoDetailActivity
>
>Accesible only from ***UserFragment > SystemMessageActivity > onClick item with JumpType 4***
>Note: 目前還沒成功看到畫面。[color=orange]
## **1. 视频详情页: /api/video/detail**
**Method within:** VideoDetailPresenter
**Called within:** VideoDetailActivity > initData loadVideo
**Parameter:** videoId
**Response Example:**
```java=
{
"id" : 447353
"vTitle" : "伊利契奇双响戈麦斯传射 亚特兰大5-0大胜帕尔马" //标题
"name" : "比赛集锦"
"preImg" : "http://p1.img.cctvpic.com/fmspic/2020/01/07/282c207b1e4942bca8d8ac82e8520881-190.jpg" //封面
"videoUrl" : "https://newcntv.qcloudcdn.com/asp/hls/main/0303000a/3/default/282c207b1e4942bca8d8ac82e8520881/main.m3u8?maxbr=2048" //视频播放地址
"event_id" : 241
"startTime" : "2020-01-06 22:00:00"
"class1" : 1
"is_like" : 0 //1:已点赞 0:未
"like_count" : 1 //点赞数
"view_count" : 1 //浏览数量
"event_name" : "意甲" //联赛名
}
```
**Actions:** Set video details and player.
### **1.1 视频推荐列表: /api/video/recommend-list**
**Method within:** VideoDetailPresenter
**Called within:** VideoDetailActivity > /api/video/detail callback
**Parameter:** videoId
**Action:** Show recommended list. Each of the list item can be liked, but cannot be unliked.
## **2. 观看视频: /api/video/view (需登入)**
**Method within:** VideoDetailPresenter
**Called within:** VideoDetailActivity > initData watchVideo
**Parameter:** videoId
**Action:** None.
## **3. 点赞: /api/video/like (需登入)**
**Method within:** VideoDetailPresenter
**Called within:** VideoDetailActivity > onClick laylike
**Note:** Only when is_like 0, this means it ***cannot remove the like state***.
**Parameter:** videoId
**Action:** None.
# Feedback
## **1. 意见类别: /api/user/report-category/**
**Method within:** FeedbackPresenter
**Called within:**
1. MatchFeedbackActivity: Entrance shown at MatchDetailActivity Player's Feedback Icon.
1. FeedbackActivity: Entrance in MatchFragment(not shown anymore) && UserFragment.
**Parameter:** id (MatchFeedbackActivity: id=2, FeedbackActivity: id=1)
**Action:** Obtains all feedback categories.
# Share
## **1. 分享: /api/task/share-live**
**Method within:** EmptyShareDialog(Not used), MatchLandShareDialog(MatchDetail Landscape)/ ShareDialog(MatchDetail Portrait)
**Called within:** Ex: MatchDetailActivity > onVideoShare (MatchLandShareDialog/ShareDialog)
# Non-used API
Cannot find usage or used place is not used.
1. **判断是否有竞猜: /api/match/guess**
1. **直播地址: /api/index/live-url**
1. **绑定手机号: /api/user/bind-phone**
**Called place:** After logging other third party account but failed, which leads to an activity (BindPhoneActivity), where you can actually bind your phone.
1. **绑定/换绑支付宝: /api/member/bind-zfb**
**Called place:** BindAliActivity, though this activity is not used.
1. **热门推荐: /api/match/recommend-list**
1. **今日焦点: /api/match/focus-list**
1. **m3u8直播地址: /api/index/m3u8-live-url**
1. **直播按钮显示: /api/index/live-config**
1. **获取视频显示配置: /api/common/switch-channel**
1. **足球的赛季列表: /api/match/league-list**
1. **推荐热门视频: /api/video/demand-list**
1. **推荐热门直播: /api/anchor/recommend-list**
1. **商品详情: /api/goods/detail**
1. **验证图形验证码: /api/user/check-pic-code**
1. **首页活动: /api/activity/list**
1. **主播列表: /api/match/list**
**Called place:** MatchAnchorlFragment, though this fragment is not used.
1. **视频列表: /api/video/list**
**Called place:** VideoListFragment, though this the fragment that uses this(VideoTypeFragment) is not used.
# 缺少文件的API:
**MatchItemFragment**
1. 賽事列表: /api/index/app-index
**MyForecastActivity**
**InForecastFragment**
1. 我的预测列表(预测和记录): /guess/user/fcList
**RankActivity**
1. 榜单列表: guess/billboard/list
**MatchDetailActivity(直播間)**
1. 直播详情页: /api/index/live
2. 更新主播直播间: /api/index/anchor-live-url
3. 取得賽事matchId:
3.1 获取Basketball比赛ID: /score/xq/common/getMatchId
3.2 获取Football Match ID: /rollball-score/xueqiu/common/getMatchId
4. 篮球内页的基础数据: /score/xq/bb/matchInner/liveMatchData
5. 取得直播playUrl需要的資訊: /signal-front/live/matchLiveInfoUseForAppClient
**ForecastFragment**
1. 预测列表: /guess/forecast/list
2. 投注信息: /guess/forecast/gotoBet
3. 投注: /guess/forecast/bet
4. 结算后获取用户信息: /guess/forecast/getUserFsData
**AnchorPredictionFragment**
1. 预测列表: /guess/forecast/list
2. 新建预测初始参数: /guess/anchor/getInitData
3. AnchorPrediction Item
3.1 结算预测: /guess/anchor/fsHandicap
3.2 继续预测: /guess/anchor/unlockHandicap
3.3 停止预测: /guess/anchor/stopHandicap
3.4 投注信息: /guess/forecast/gotoBet
3.5 投注: /guess/forecast/bet
4. 新建预测: /guess/anchor/openHandicap
**MatchResultFragment(足球賽況)**
1. 获取基础赛况数据: rollball-score/xueqiu/fb/matchInner/liveMatchData
2. 事件直播: rollball-score/xueqiu/fb/match/matchEventData
3. 文字直播: rollball-score/xueqiu/fb/matchAnalysis/getMatchTextLive
**MatchAnalysisFragment (足球分析)**
1. 足球分析: rollball-score/xueqiu/fb/matchAnalysis/analysisList
2. 广告接口: api/advert/list (sub_type:15, type:1) (給的資料裡面沒有 sub_type 15 情況解釋)
3. 复制虚拟赔率公司接口: rollball-score/xueqiu/common/copyVirtualBetComp
**MatchLineUpFragment (足球陣容)**
1. 获取基础赛况数据: rollball-score/xueqiu/fb/matchInner/liveMatchData
2. 比赛阵容: rollball-score/xueqiu/fb/matchAnalysis/getMatchTeamPlayer
**BaStatusFragment (籃球賽況)**
1. 篮球内页的文字直播: https://basic.heibai588.com/score/xq/bb/matchInner/textLiveData
**BaTotalFragment (籃球統計)**
1. 篮球内页的统计: https://basic.heibai588.com/score/xq/bb/matchInner/statisticData
**BaAnalysisDataFragment (籃球分析)**
1. 篮球内页的分析: https://basic.heibai588.com/score/xq/bb/matchInner/analysisData
**BaTotalFragment (籃球指数)**
1. 篮球的内页指数让分: https://basic.heibai588.com/score/xq/bb/matchInner/oddsData
2. 虚拟赔率公司行为: https://basic.heibai588.com/score/xq/common/copyVirtualBetComp
**HistoryPredictionActivity**
1. 历史预测: /guess/forecast/getAnchorHistFcList
# **文件有的API,Android APP 不使用:**
**activity**
首页活动: /api/activity/list
**anchor**
直播间推荐列表: /api/anchor/recommend-list
**common**
渠道屏蔽开关/获取视频显示配置: /api/common/switch-channel
聊天轮询设置: /api/common/talk-loop
**goods**
商品详情: /api/goods/detail
**match**
今日焦点: /api/match/focus-list
比赛是否有竞猜: /api/match/guess
热门推荐: /api/match/recommend-list
联赛列表(足球的赛季列表): /api/match/league-list
**user**
验证图形验证码: /api/user/check-pic-code
**video**
视频列表: /api/video/list
推荐热门视频: /api/video/demand-list
# **文件有的API,Android APP 沒出現:**
**advert**
广告位置列表: /api/advert/type-list
**advertis**
文案列表: /api/advertis/list
文案详情: /api/advertis/detail (Parameter: id, unique_name) (App uses postion: 0, unique_name: invite)
**agent**
礼物壳接口: /api/agent/common/{controller}/{action}
**anchor**
主播特权等级: /api/anchor/privileges
主播申请编辑: /api/anchor/edit-apply
主播申请详情: /api/anchor/apply-detail
房间举报: /api/anchor/report
**api**
事件记录: /api/log/click
**atest**
透传参数说明: /api/common/tou
**common**
APP端IDFA激活: /api/common/device-activate
H5体育版本列表: /api/common/h5-tyulrs
H5版本列表: /api/common/h5-ulrs
IDFA排重: /api/common/query-idfa
IDFA激活: /api/common/active-idfa
IDFA点击: /api/common/click-idfa
上传图片: /api/common/upload-pic
修改主播信号排序: /api/common/edit-anchor-sort
修改比赛位置: /api/common/edit-place
修改比赛状态: /api/common/edit-live
获取位置列表: /api/common/live-recommend
黑白体育版本更新: /api/common/version-ty-upgrade
**community**
添加新闻: /api/community/add
添加社区评论: /api/community/add-comment
社区列表: api/community/list
社区新闻点赞: /api/community/like
社区评论点赞: /api/community/like-comment
社区详情: /api/community/detail
**epidemic**
文章列表: /api/epidemic/article-list
文章详情: /api/epidemic/article-detail
点击文章: /api/epidemic/click-article
疫情列表: /api/epidemic/list
**guess**
竞猜排名: /api/guess/user-rank
竞猜比赛列表: /api/guess/lives
竞猜用户信息: /api/guess/user
竞猜预测: /api/guess/forecast
预测: /api/guess/hot-live
**index**
比赛列表(竞猜使用): /api/index/lives
**match**
推荐位配置: /api/match/config
根据比赛获取主播列表: /api/common/anchor-list
篮球分析: /api/match/basketball-detail
篮球数据: /api/match/basketball-match
篮球文字直播(第一次获取): /api/match/basketball-textlive
篮球球员列表: /api/match/basketball-player
篮球球队详情: /api/match/basketball-team
篮球积分榜: /api/match/basketball-rankings
篮球赛程: /api/match/basketball-schedule
篮球阵容: /api/match/basketball-lineup
赛季列表: /api/match/season-list
足球分析: /api/match/football-detail
足球射手榜: /api/match/football-topscore
足球数据: /api/match/football-matchinfo
足球文字直播(第一次获取): /api/match/football-textlive
足球球员列表: /api/match/football-player
足球球队详情: /api/match/football-team
足球积分榜: /api/match/football-standing
足球联赛赛程: /api/match/football-league-schedule
足球赛程: /api/match/football-schedule
足球阵容: /api/match/football-lineup
**member**
APP修改用户信息 (下面字段都是选填): /api/member/edit-info
关注详情: /api/member/follow-detail
提现要求详情: /api/member/withdraw-require
提现设置: /api/member/withdraw-config
绑定/换绑支付宝: /api/member/bind-zfb
问题列表: /api/member/problem-list
**notice**
点击通知回调: /api/notice/callback
**order**
创建兑换订单: /api/order/create-order
添加收货地址: /api/order/add-address
编辑收货地址: /api/order/edit-address
获取我的兑换列表: /api/order/list
订单反馈: /api/order/feedback
**payment**
提现: /api/payment/withdraw
提现明细: /api/payment/withdraw-list
金币列表: /api/payment/gold-list
**task**
PC观看直播: /api/task/watch-pc-live
学习任务: /api/task/study
每日签到: /api/task/sign-in-m
**topic**
添加话题: /api/topic/add
添加话题评论: /api/topic/add-comment
话题列表: /api/topic/list
话题点赞: /api/topic/like
**user**
APP绑定手机号: /api/user/bind-phone
M站密码登录: /api/user/mobile-pwd-login
M站登录: /api/user/mobile-login
pc手机验证码登录: /api/user/code-login
修改密码: /api/user/edit-password
判断手机号是否注册: /api/user/check-phone
判断短信验证码: /api/user/check-sms-code
判断验证码: /api/user/check-code
注册: /api/user/reg
滑动验证: /api/user/check-ali-code
用户等级列表: /api/user/level-privilege
登录: /api/user/login
获取用户信息: /api/user/info
退出: /api/user/get-out
**version**
版本号列表: /api/common/version-list
---
Not used Views:
VideoListFragment (VideoTypeFragment not used)
RecommendFragment (HotFragment > MainOne not used)