新闻接口对接、去除直播
This commit is contained in:
parent
33c4777168
commit
ba54f69bdf
@ -16,10 +16,12 @@ public class BaseUrlApi {
|
|||||||
// public static final String BASE_SYSTEM_IP = "http://121.36.71.250:58050/xzszwhy/";
|
// public static final String BASE_SYSTEM_IP = "http://121.36.71.250:58050/xzszwhy/";
|
||||||
// public static final String IP = "http://49.233.36.36:58099/xzszwhy/";/* 测试IP */
|
// public static final String IP = "http://49.233.36.36:58099/xzszwhy/";/* 测试IP */
|
||||||
public static final String IP = "http://v3.xzszwhy.cn/xzszwhy/";/* 测试IP */
|
public static final String IP = "http://v3.xzszwhy.cn/xzszwhy/";/* 测试IP */
|
||||||
|
// public static final String IP = "http://192.168.0.120:8081/xzszwhy/";/* 测试IP */
|
||||||
public static final String IP_URL = "http://v3.xzszwhy.cn/";/* 测试IP */
|
public static final String IP_URL = "http://v3.xzszwhy.cn/";/* 测试IP */
|
||||||
|
// public static final String IP_URL = "http://192.168.0.120:8081/";/* 测试IP */
|
||||||
// public static final String IP = "https://www.wgink.ink/usercenter/";/* 正式IP */
|
// public static final String IP = "https://www.wgink.ink/usercenter/";/* 正式IP */
|
||||||
// public static final String IP = "https://www.xzszwhy.cn/usercenter/";/* 正式IP */
|
// public static final String IP = "https://www.xzszwhy.cn/usercenter/";/* 正式IP */
|
||||||
// public static final String BASE_SYSTEM_IP = "http://192.168.0.115:8082/";
|
// public static final String BASE_SYSTEM_IP = "http://192.168.0.120:8081/xzszwhy/";
|
||||||
public static final String BASE_SYSTEM_IP = "http://v3.xzszwhy.cn/xzszwhy/";
|
public static final String BASE_SYSTEM_IP = "http://v3.xzszwhy.cn/xzszwhy/";
|
||||||
// public static final String BASE_SYSTEM_IP = "https://www.xzszwhy.cn/";
|
// public static final String BASE_SYSTEM_IP = "https://www.xzszwhy.cn/";
|
||||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||||
@ -75,7 +77,7 @@ public class BaseUrlApi {
|
|||||||
// public static final String BASE_NEWS_DETAIL = "http://192.168.0.104/";//新闻
|
// public static final String BASE_NEWS_DETAIL = "http://192.168.0.104/";//新闻
|
||||||
|
|
||||||
|
|
||||||
public static final String BASE_NEWS_DETAIL = BASE_SYSTEM_IP;//新闻
|
public static final String BASE_NEWS_DETAIL = IP_URL;//新闻
|
||||||
// public static final String BASE_IMG_URL = BASE_IP + "route/file/download/true/";
|
// public static final String BASE_IMG_URL = BASE_IP + "route/file/download/true/";
|
||||||
// GET /app/appversion/downloadapp/{appVersionId}
|
// GET /app/appversion/downloadapp/{appVersionId}
|
||||||
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + PathConfig.APP_VERSION_ID;
|
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + PathConfig.APP_VERSION_ID;
|
||||||
|
@ -86,7 +86,7 @@ public interface BaseApiService {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"Content-Type: application/json", "Accept: application/json", "is_need_area:false"})
|
@Headers({"Content-Type: application/json", "Accept: application/json", "need_area:false"})
|
||||||
@GET("app/appversion/get-number/{appVersionId}")
|
@GET("app/appversion/get-number/{appVersionId}")
|
||||||
Observable<VersionBean> doCheckAppVersion(@Path("appVersionId") String appVersionId);
|
Observable<VersionBean> doCheckAppVersion(@Path("appVersionId") String appVersionId);
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ public interface BaseApiService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/dataarea/getareabyidrelease/{areaId}")
|
@GET("app/area/getrelease/{areaId}")
|
||||||
Observable<AreaBean> getAreaListByPid(@Path("areaId") String id);
|
Observable<AreaBean> getAreaListByPid(@Path("areaId") String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +36,7 @@ public class AreaInterceptor implements Interceptor {
|
|||||||
// }
|
// }
|
||||||
// String cityId = UserLgUtils.getCityId();
|
// String cityId = UserLgUtils.getCityId();
|
||||||
//判断是否需要添加
|
//判断是否需要添加
|
||||||
List<String> baseUrlName = originalRequest.headers("is_need_area");
|
List<String> baseUrlName = originalRequest.headers("need_area");
|
||||||
if (baseUrlName.size() > 0) {
|
if (baseUrlName.size() > 0) {
|
||||||
if(Boolean.parseBoolean(baseUrlName.get(0))){
|
if(Boolean.parseBoolean(baseUrlName.get(0))){
|
||||||
//需要添加
|
//需要添加
|
||||||
|
@ -34,7 +34,7 @@ public class BaseFunctionAdapter extends BaseRecyclerAdapter<UserLoginBean.UseAp
|
|||||||
public void bindHolder(BaseFunctionHolder holder, int i) {
|
public void bindHolder(BaseFunctionHolder holder, int i) {
|
||||||
if (!TextUtils.isEmpty(mData.get(i).getAppPhotoPath())) {
|
if (!TextUtils.isEmpty(mData.get(i).getAppPhotoPath())) {
|
||||||
Glide.with(mContext)
|
Glide.with(mContext)
|
||||||
.load(BaseUrlApi.BASE_URL + mData.get(i).getAppPhotoPath())
|
.load(BaseUrlApi.BASE_IMG_URL + mData.get(i).getAppPhotoPath())
|
||||||
.apply(new RequestOptions()
|
.apply(new RequestOptions()
|
||||||
.error(R.drawable.ic_party)
|
.error(R.drawable.ic_party)
|
||||||
.placeholder(R.drawable.ic_party)
|
.placeholder(R.drawable.ic_party)
|
||||||
|
@ -41,8 +41,7 @@ public interface ApiActivity {
|
|||||||
* @param page
|
* @param page
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:activity", "Content-Type:application/json", "Accept:application/json", "is_need_area" +
|
@Headers({"base_url_name:activity", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
":true"})
|
|
||||||
// @GET("app/activitylibrary/listpageactivitylibraryrelease") 原接口
|
// @GET("app/activitylibrary/listpageactivitylibraryrelease") 原接口
|
||||||
@GET("app/activitylibrary/listpageactivitylibraryfornetrelease")
|
@GET("app/activitylibrary/listpageactivitylibraryfornetrelease")
|
||||||
Observable<ActivityListBeans> getActivityListByType(@Query("activityType") String type, @Query("page") String page);
|
Observable<ActivityListBeans> getActivityListByType(@Query("activityType") String type, @Query("page") String page);
|
||||||
@ -62,7 +61,7 @@ public interface ApiActivity {
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:activity", "Content-Type:application/json", "Accept:application/json", "is_need_area" +
|
@Headers({"base_url_name:activity", "Content-Type:application/json", "Accept:application/json", "need_area" +
|
||||||
":false"})
|
":false"})
|
||||||
@GET("app/dictionaryself/listdictionarybyparentidrelease/{dictionaryParentId}")
|
@GET("app/dictionaryself/listdictionarybyparentidrelease/{dictionaryParentId}")
|
||||||
Observable<List<BaseDictionaryBean>> getActivityTypeList(@Path("dictionaryParentId") String id);
|
Observable<List<BaseDictionaryBean>> getActivityTypeList(@Path("dictionaryParentId") String id);
|
||||||
|
@ -1,22 +1,20 @@
|
|||||||
package com.tengshisoft.modulecultural.fragments;
|
package com.tengshisoft.modulecultural.fragments;
|
||||||
|
|
||||||
import android.net.MacAddress;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.ethanhua.skeleton.RecyclerViewSkeletonScreen;
|
import com.ethanhua.skeleton.RecyclerViewSkeletonScreen;
|
||||||
import com.ethanhua.skeleton.Skeleton;
|
import com.ethanhua.skeleton.Skeleton;
|
||||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
|
||||||
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
|
|
||||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||||
import com.sucstepsoft.cm_utils.core.beans.FuncBean;
|
import com.sucstepsoft.cm_utils.core.beans.FuncBean;
|
||||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
|
||||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||||
import com.tengshisoft.modulecultural.R;
|
import com.tengshisoft.modulecultural.R;
|
||||||
import com.tengshisoft.modulecultural.R2;
|
import com.tengshisoft.modulecultural.R2;
|
||||||
@ -28,9 +26,6 @@ import com.tengshisoft.modulecultural.net.CulturalApi;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
@ -60,8 +55,13 @@ public class CulturalMainFragment extends BaseFragment {
|
|||||||
private Disposable mD1;
|
private Disposable mD1;
|
||||||
private LegacyMainAdapter mMainAdapter;
|
private LegacyMainAdapter mMainAdapter;
|
||||||
private List<String> mFuncStr = new ArrayList<>();
|
private List<String> mFuncStr = new ArrayList<>();
|
||||||
private String[] mTitls = new String[]{"非物质文化遗产数据库", "文化直播", "文化分享"};
|
|
||||||
private int[] mIcons = new int[]{R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon};
|
// private String[] mTitls = new String[]{"非物质文化遗产数据库", "文化直播", "文化分享"};
|
||||||
|
// private int[] mIcons = new int[]{R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon};
|
||||||
|
|
||||||
|
private String[] mTitls = new String[]{"非物质文化遗产数据库", "文化分享"};
|
||||||
|
private int[] mIcons = new int[]{R.drawable.ic_cultural_icon, R.drawable.ic_cultural_icon};
|
||||||
|
|
||||||
private List<FuncBean> mFuncBeans = new ArrayList<>();
|
private List<FuncBean> mFuncBeans = new ArrayList<>();
|
||||||
private RecyclerViewSkeletonScreen mSkeleton;
|
private RecyclerViewSkeletonScreen mSkeleton;
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.tengshisoft.modulecultural.net;
|
package com.tengshisoft.modulecultural.net;
|
||||||
|
|
||||||
import com.sucstepsoft.cm_utils.core.beans.BaseDictionaryBean;
|
|
||||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
||||||
import com.sucstepsoft.cm_utils.core.beans.DictionaryBean;
|
import com.sucstepsoft.cm_utils.core.beans.DictionaryBean;
|
||||||
import com.tengshisoft.modulecultural.bean.ActivityLogBean;
|
import com.tengshisoft.modulecultural.bean.ActivityLogBean;
|
||||||
@ -46,14 +45,14 @@ public interface CulturalApi {
|
|||||||
/**
|
/**
|
||||||
* 获取非遗列表
|
* 获取非遗列表
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json","need_area:true"})
|
||||||
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
||||||
Observable<LegacyListBean> getLegacyList(@Query("page") String page);
|
Observable<LegacyListBean> getLegacyList(@Query("page") String page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取非遗列表
|
* 获取非遗列表
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json" ,"need_area:true"})
|
||||||
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
|
||||||
Observable<LegacyListBean> getLegacyListByType(@Query("page") String page, @Query("rows") String rows, @Query("libraryDirectoriesId") String id);
|
Observable<LegacyListBean> getLegacyListByType(@Query("page") String page, @Query("rows") String rows, @Query("libraryDirectoriesId") String id);
|
||||||
|
|
||||||
@ -234,7 +233,7 @@ public interface CulturalApi {
|
|||||||
* 志愿者活动列表
|
* 志愿者活动列表
|
||||||
* GET /app/volunteerservice/listpagevolunteerservicerelease
|
* GET /app/volunteerservice/listpagevolunteerservicerelease
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:volunteer", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:volunteer", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/volunteerservice/listpagevolunteerservicerelease")
|
@GET("app/volunteerservice/listpagevolunteerservicerelease")
|
||||||
Observable<VolunteerActivitybean> getVolunteerActivityList(@Query("rows") String rows, @Query("page") String page);
|
Observable<VolunteerActivitybean> getVolunteerActivityList(@Query("rows") String rows, @Query("page") String page);
|
||||||
|
|
||||||
@ -331,7 +330,7 @@ public interface CulturalApi {
|
|||||||
* 直播回放列表
|
* 直播回放列表
|
||||||
* http://192.168.0.104:8084/live/
|
* http://192.168.0.104:8084/live/
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json","is_need_area:false"})
|
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json", "need_area:false"})
|
||||||
@GET("app/liveplan/listpageliveplanrelease")
|
@GET("app/liveplan/listpageliveplanrelease")
|
||||||
Observable<CulturalLiveBean> getLiveRecord(@Query("page") String page);
|
Observable<CulturalLiveBean> getLiveRecord(@Query("page") String page);
|
||||||
|
|
||||||
@ -339,7 +338,7 @@ public interface CulturalApi {
|
|||||||
* 直播详情
|
* 直播详情
|
||||||
* http://192.168.0.104:8084/live/app/liveplan/listpageliveplanrelease
|
* http://192.168.0.104:8084/live/app/liveplan/listpageliveplanrelease
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json" ,"is_need_area:false"})
|
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json", "need_area:false"})
|
||||||
@GET("app/liveplan/getliveplanbyidrelease/{livePlanId}")
|
@GET("app/liveplan/getliveplanbyidrelease/{livePlanId}")
|
||||||
Observable<CulturalLiveDetailBean> getLiveDetail(@Path("livePlanId") String id);
|
Observable<CulturalLiveDetailBean> getLiveDetail(@Path("livePlanId") String id);
|
||||||
|
|
||||||
@ -347,7 +346,7 @@ public interface CulturalApi {
|
|||||||
* 直播回放文件
|
* 直播回放文件
|
||||||
* GET /app/liverecord/listpageliverecordrelease/{planId}
|
* GET /app/liverecord/listpageliverecordrelease/{planId}
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json" ,"is_need_area:false"})
|
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json", "need_area:false"})
|
||||||
@GET("app/liverecord/listpageliverecordrelease/{planId}")
|
@GET("app/liverecord/listpageliverecordrelease/{planId}")
|
||||||
Observable<LiveFilesBean> getLiveFiles(@Path("planId") String id, @Query("page") String page);
|
Observable<LiveFilesBean> getLiveFiles(@Path("planId") String id, @Query("page") String page);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public class SplashActivity extends BaseActivity {
|
|||||||
refreshView(STATE_LOAD_SUCCESS);
|
refreshView(STATE_LOAD_SUCCESS);
|
||||||
ImmersionBar.with(this).init();
|
ImmersionBar.with(this).init();
|
||||||
mRlTitleBar1.setVisibility(View.GONE);
|
mRlTitleBar1.setVisibility(View.GONE);
|
||||||
// getCityCode();
|
getConfigAppName();
|
||||||
PermissionUtils.permission(PermissionConstants.STORAGE, PermissionConstants.LOCATION, PermissionConstants.PHONE)
|
PermissionUtils.permission(PermissionConstants.STORAGE, PermissionConstants.LOCATION, PermissionConstants.PHONE)
|
||||||
.callback(new PermissionUtils.SimpleCallback() {
|
.callback(new PermissionUtils.SimpleCallback() {
|
||||||
@Override
|
@Override
|
||||||
@ -88,16 +88,10 @@ public class SplashActivity extends BaseActivity {
|
|||||||
/**
|
/**
|
||||||
* 获取城市代码
|
* 获取城市代码
|
||||||
*/
|
*/
|
||||||
private void getCityCode() {
|
private void getConfigAppName() {
|
||||||
String cityCode = "";
|
|
||||||
String cityId = "";
|
|
||||||
try {
|
try {
|
||||||
ApplicationInfo info = getPackageManager().getApplicationInfo(getPackageName(),
|
ApplicationInfo info = getPackageManager().getApplicationInfo(getPackageName(),
|
||||||
PackageManager.GET_META_DATA);
|
PackageManager.GET_META_DATA);
|
||||||
cityCode = String.valueOf(info.metaData.get("CITY_CODE"));
|
|
||||||
cityId = String.valueOf(info.metaData.get("CITY_ID"));
|
|
||||||
UserLgUtils.setCityCode(cityCode);
|
|
||||||
UserLgUtils.setCityId(cityId);
|
|
||||||
String appName = String.valueOf(info.metaData.get("APP_NAME"));
|
String appName = String.valueOf(info.metaData.get("APP_NAME"));
|
||||||
UserLgUtils.setAppName(appName);
|
UserLgUtils.setAppName(appName);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1092,4 +1092,4 @@ public class NewsDetailActivity extends BaseActivity {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,421 @@
|
|||||||
|
package com.tengshisoft.mudulemain.cultural.beans;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻详情
|
||||||
|
*/
|
||||||
|
public class NewsDetailBean {
|
||||||
|
|
||||||
|
private String contentCoverId;
|
||||||
|
private List<FileListBean> fileList;
|
||||||
|
private String gmtCreate;
|
||||||
|
private String newsContentAuthor;
|
||||||
|
private String newsContentCheckContent;
|
||||||
|
private String newsContentCheckStatus;
|
||||||
|
private String newsContentCheckTime;
|
||||||
|
private String newsContentCheckUser;
|
||||||
|
private String newsContentCheckUserId;
|
||||||
|
private int newsContentCollectionNumber;
|
||||||
|
private int newsContentCommentNumber;
|
||||||
|
private String newsContentContent;
|
||||||
|
private List<NewsContentCoverListBean> newsContentCoverList;
|
||||||
|
private int newsContentHotNumber;
|
||||||
|
private String newsContentId;
|
||||||
|
private String newsContentLabel;
|
||||||
|
private List<?> newsContentLabelList;
|
||||||
|
private int newsContentLikeNumber;
|
||||||
|
private String newsContentLink;
|
||||||
|
private String newsContentMusic;
|
||||||
|
private String newsContentPublishDepartment;
|
||||||
|
private String newsContentPublishStatus;
|
||||||
|
private String newsContentPublishTime;
|
||||||
|
private String newsContentResource;
|
||||||
|
private int newsContentScore;
|
||||||
|
private String newsContentSummary;
|
||||||
|
private String newsContentTitle;
|
||||||
|
private String newsContentType;
|
||||||
|
private int newsContentVisitNumber;
|
||||||
|
private String newsDirectoriesId;
|
||||||
|
private String newsDirectoriesName;
|
||||||
|
private String newsTypesettingId;
|
||||||
|
private String templateRecordUrl;
|
||||||
|
private String typesettingCode;
|
||||||
|
private String typesettingImage;
|
||||||
|
private String typesettingName;
|
||||||
|
|
||||||
|
public String getContentCoverId() {
|
||||||
|
return contentCoverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentCoverId(String contentCoverId) {
|
||||||
|
this.contentCoverId = contentCoverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<FileListBean> getFileList() {
|
||||||
|
return fileList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileList(List<FileListBean> fileList) {
|
||||||
|
this.fileList = fileList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentAuthor() {
|
||||||
|
return newsContentAuthor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentAuthor(String newsContentAuthor) {
|
||||||
|
this.newsContentAuthor = newsContentAuthor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentCheckContent() {
|
||||||
|
return newsContentCheckContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCheckContent(String newsContentCheckContent) {
|
||||||
|
this.newsContentCheckContent = newsContentCheckContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentCheckStatus() {
|
||||||
|
return newsContentCheckStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCheckStatus(String newsContentCheckStatus) {
|
||||||
|
this.newsContentCheckStatus = newsContentCheckStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentCheckTime() {
|
||||||
|
return newsContentCheckTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCheckTime(String newsContentCheckTime) {
|
||||||
|
this.newsContentCheckTime = newsContentCheckTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentCheckUser() {
|
||||||
|
return newsContentCheckUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCheckUser(String newsContentCheckUser) {
|
||||||
|
this.newsContentCheckUser = newsContentCheckUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentCheckUserId() {
|
||||||
|
return newsContentCheckUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCheckUserId(String newsContentCheckUserId) {
|
||||||
|
this.newsContentCheckUserId = newsContentCheckUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNewsContentCollectionNumber() {
|
||||||
|
return newsContentCollectionNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCollectionNumber(int newsContentCollectionNumber) {
|
||||||
|
this.newsContentCollectionNumber = newsContentCollectionNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNewsContentCommentNumber() {
|
||||||
|
return newsContentCommentNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCommentNumber(int newsContentCommentNumber) {
|
||||||
|
this.newsContentCommentNumber = newsContentCommentNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentContent() {
|
||||||
|
return newsContentContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentContent(String newsContentContent) {
|
||||||
|
this.newsContentContent = newsContentContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<NewsContentCoverListBean> getNewsContentCoverList() {
|
||||||
|
return newsContentCoverList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCoverList(List<NewsContentCoverListBean> newsContentCoverList) {
|
||||||
|
this.newsContentCoverList = newsContentCoverList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNewsContentHotNumber() {
|
||||||
|
return newsContentHotNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentHotNumber(int newsContentHotNumber) {
|
||||||
|
this.newsContentHotNumber = newsContentHotNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentId() {
|
||||||
|
return newsContentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentId(String newsContentId) {
|
||||||
|
this.newsContentId = newsContentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentLabel() {
|
||||||
|
return newsContentLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentLabel(String newsContentLabel) {
|
||||||
|
this.newsContentLabel = newsContentLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<?> getNewsContentLabelList() {
|
||||||
|
return newsContentLabelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentLabelList(List<?> newsContentLabelList) {
|
||||||
|
this.newsContentLabelList = newsContentLabelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNewsContentLikeNumber() {
|
||||||
|
return newsContentLikeNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentLikeNumber(int newsContentLikeNumber) {
|
||||||
|
this.newsContentLikeNumber = newsContentLikeNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentLink() {
|
||||||
|
return newsContentLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentLink(String newsContentLink) {
|
||||||
|
this.newsContentLink = newsContentLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentMusic() {
|
||||||
|
return newsContentMusic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentMusic(String newsContentMusic) {
|
||||||
|
this.newsContentMusic = newsContentMusic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentPublishDepartment() {
|
||||||
|
return newsContentPublishDepartment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentPublishDepartment(String newsContentPublishDepartment) {
|
||||||
|
this.newsContentPublishDepartment = newsContentPublishDepartment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentPublishStatus() {
|
||||||
|
return newsContentPublishStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentPublishStatus(String newsContentPublishStatus) {
|
||||||
|
this.newsContentPublishStatus = newsContentPublishStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentPublishTime() {
|
||||||
|
return newsContentPublishTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentPublishTime(String newsContentPublishTime) {
|
||||||
|
this.newsContentPublishTime = newsContentPublishTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentResource() {
|
||||||
|
return newsContentResource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentResource(String newsContentResource) {
|
||||||
|
this.newsContentResource = newsContentResource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNewsContentScore() {
|
||||||
|
return newsContentScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentScore(int newsContentScore) {
|
||||||
|
this.newsContentScore = newsContentScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentSummary() {
|
||||||
|
return newsContentSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentSummary(String newsContentSummary) {
|
||||||
|
this.newsContentSummary = newsContentSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentTitle() {
|
||||||
|
return newsContentTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentTitle(String newsContentTitle) {
|
||||||
|
this.newsContentTitle = newsContentTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentType() {
|
||||||
|
return newsContentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentType(String newsContentType) {
|
||||||
|
this.newsContentType = newsContentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNewsContentVisitNumber() {
|
||||||
|
return newsContentVisitNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentVisitNumber(int newsContentVisitNumber) {
|
||||||
|
this.newsContentVisitNumber = newsContentVisitNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsDirectoriesId() {
|
||||||
|
return newsDirectoriesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsDirectoriesId(String newsDirectoriesId) {
|
||||||
|
this.newsDirectoriesId = newsDirectoriesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsDirectoriesName() {
|
||||||
|
return newsDirectoriesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsDirectoriesName(String newsDirectoriesName) {
|
||||||
|
this.newsDirectoriesName = newsDirectoriesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsTypesettingId() {
|
||||||
|
return newsTypesettingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsTypesettingId(String newsTypesettingId) {
|
||||||
|
this.newsTypesettingId = newsTypesettingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTemplateRecordUrl() {
|
||||||
|
return templateRecordUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateRecordUrl(String templateRecordUrl) {
|
||||||
|
this.templateRecordUrl = templateRecordUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypesettingCode() {
|
||||||
|
return typesettingCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypesettingCode(String typesettingCode) {
|
||||||
|
this.typesettingCode = typesettingCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypesettingImage() {
|
||||||
|
return typesettingImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypesettingImage(String typesettingImage) {
|
||||||
|
this.typesettingImage = typesettingImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypesettingName() {
|
||||||
|
return typesettingName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypesettingName(String typesettingName) {
|
||||||
|
this.typesettingName = typesettingName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class FileListBean {
|
||||||
|
private String contentFileFileId;
|
||||||
|
private int contentFileOrder;
|
||||||
|
private String contentFileText;
|
||||||
|
private String newsContentFileId;
|
||||||
|
private String newsContentId;
|
||||||
|
|
||||||
|
public String getContentFileFileId() {
|
||||||
|
return contentFileFileId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentFileFileId(String contentFileFileId) {
|
||||||
|
this.contentFileFileId = contentFileFileId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getContentFileOrder() {
|
||||||
|
return contentFileOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentFileOrder(int contentFileOrder) {
|
||||||
|
this.contentFileOrder = contentFileOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContentFileText() {
|
||||||
|
return contentFileText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentFileText(String contentFileText) {
|
||||||
|
this.contentFileText = contentFileText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentFileId() {
|
||||||
|
return newsContentFileId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentFileId(String newsContentFileId) {
|
||||||
|
this.newsContentFileId = newsContentFileId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentId() {
|
||||||
|
return newsContentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentId(String newsContentId) {
|
||||||
|
this.newsContentId = newsContentId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class NewsContentCoverListBean {
|
||||||
|
private String contentCoverId;
|
||||||
|
private int contentCoverOrder;
|
||||||
|
private String newsContentCoverId;
|
||||||
|
private String newsContentId;
|
||||||
|
|
||||||
|
public String getContentCoverId() {
|
||||||
|
return contentCoverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentCoverId(String contentCoverId) {
|
||||||
|
this.contentCoverId = contentCoverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getContentCoverOrder() {
|
||||||
|
return contentCoverOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentCoverOrder(int contentCoverOrder) {
|
||||||
|
this.contentCoverOrder = contentCoverOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentCoverId() {
|
||||||
|
return newsContentCoverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentCoverId(String newsContentCoverId) {
|
||||||
|
this.newsContentCoverId = newsContentCoverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewsContentId() {
|
||||||
|
return newsContentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewsContentId(String newsContentId) {
|
||||||
|
this.newsContentId = newsContentId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -50,7 +50,6 @@ import com.youth.banner.transformer.ScaleInTransformer;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
@ -115,7 +114,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
mBind = ButterKnife.bind(this, dataView);
|
mBind = ButterKnife.bind(this, dataView);
|
||||||
setStateView(STATE_SUCCESS);
|
setStateView(STATE_SUCCESS);
|
||||||
mSrlView.setEnableLoadMore(false);
|
mSrlView.setEnableLoadMore(false);
|
||||||
mSrlView.setEnableRefresh(false);
|
mSrlView.setEnableRefresh(true);
|
||||||
// mLlMainNews.setOnClickListener(v -> ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_NEWS_MAIN)
|
// mLlMainNews.setOnClickListener(v -> ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_NEWS_MAIN)
|
||||||
// .navigation());
|
// .navigation());
|
||||||
mRlvMainNews.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false));
|
mRlvMainNews.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false));
|
||||||
@ -196,7 +195,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
buildMainFuncMenu();
|
buildMainFuncMenu();
|
||||||
buildBannerData();
|
buildBannerData();
|
||||||
getNewsList(null);
|
getNewsList(null);
|
||||||
getLiveList();
|
//TODO 县城一级无直播 getLiveList();
|
||||||
getMainCommendList();
|
getMainCommendList();
|
||||||
getBannerData();
|
getBannerData();
|
||||||
mBanner.setOnBannerListener((data, position) -> {
|
mBanner.setOnBannerListener((data, position) -> {
|
||||||
@ -229,7 +228,10 @@ public class HomeFragment extends BaseFragment {
|
|||||||
// .navigation());
|
// .navigation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取精彩推荐
|
||||||
|
* 3条场馆 3条活动
|
||||||
|
*/
|
||||||
private void getMainCommendList() {
|
private void getMainCommendList() {
|
||||||
Observable[] mObservales = new Observable[2];
|
Observable[] mObservales = new Observable[2];
|
||||||
Observable<PlaceListBean> hot = RetrofitManager.getInstance()
|
Observable<PlaceListBean> hot = RetrofitManager.getInstance()
|
||||||
@ -302,6 +304,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
mSrlView.finishRefresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -482,111 +485,113 @@ public class HomeFragment extends BaseFragment {
|
|||||||
private List<MainCommendBean> mMainCommendBeans = new ArrayList<>();
|
private List<MainCommendBean> mMainCommendBeans = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 获取新闻类型
|
||||||
|
// */
|
||||||
|
// private void getNewsTabs() {
|
||||||
|
// RetrofitManager.getInstance()
|
||||||
|
// .create(HomeApi.class)
|
||||||
|
// .getNewsTabListByPid(PathConfig.NEWS_ID)
|
||||||
|
// .subscribeOn(Schedulers.io())
|
||||||
|
// .observeOn(AndroidSchedulers.mainThread())
|
||||||
|
// .subscribe(new Observer<List<NewsTabBean>>() {
|
||||||
|
// @Override
|
||||||
|
// public void onSubscribe(Disposable d) {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onNext(List<NewsTabBean> newsTabBeans) {
|
||||||
|
// if (newsTabBeans != null && newsTabBeans.size() > 0) {
|
||||||
|
// mIvNewsEmpty.setVisibility(View.GONE);
|
||||||
|
// Random random = new Random();
|
||||||
|
// int i = random.nextInt(newsTabBeans.size());
|
||||||
|
// if (TextUtils.isEmpty(UserLgUtils.getToken())) {
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// getNewsListByToken(newsTabBeans.get(i));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// if (mNewsSkeleton != null) {
|
||||||
|
// mNewsSkeleton.hide();
|
||||||
|
// }
|
||||||
|
// mIvNewsEmpty.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onError(Throwable e) {
|
||||||
|
// if (mNewsSkeleton != null) {
|
||||||
|
// mNewsSkeleton.hide();
|
||||||
|
// }
|
||||||
|
// mIvNewsEmpty.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onComplete() {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// private void getNewsListByToken(NewsTabBean newsTabBean) {
|
||||||
|
// RetrofitManager.getInstance()
|
||||||
|
// .create(HomeApi.class)
|
||||||
|
// .getNewsMainListByToken(newsTabBean.getNewsDirectoriesId(), "5", "1", UserLgUtils.getToken())
|
||||||
|
// .subscribeOn(Schedulers.io())
|
||||||
|
// .observeOn(AndroidSchedulers.mainThread())
|
||||||
|
// .subscribe(new Observer<NewsItemBean>() {
|
||||||
|
// @Override
|
||||||
|
// public void onSubscribe(Disposable d) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onNext(NewsItemBean newsItemBean) {
|
||||||
|
// if (newsItemBean != null) {
|
||||||
|
// if (newsItemBean.getRows() != null) {
|
||||||
|
// if (newsItemBean.getRows().size() > 5) {
|
||||||
|
// mNewsBeans = newsItemBean.getRows().subList(0, 5);
|
||||||
|
// } else {
|
||||||
|
// mNewsBeans = newsItemBean.getRows();
|
||||||
|
// }
|
||||||
|
// if (newsItemBean.getRows().size() > 0) {
|
||||||
|
// mIvNewsEmpty.setVisibility(View.GONE);
|
||||||
|
// } else {
|
||||||
|
// mIvNewsEmpty.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// mIvNewsEmpty.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
// getCommentCount(1, newsItemBean);
|
||||||
|
//// TODO mMAdapter.setData(mNewsBeans);
|
||||||
|
// } else {
|
||||||
|
// mIvNewsEmpty.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
// if (mNewsSkeleton != null) {
|
||||||
|
// mNewsSkeleton.hide();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onError(Throwable e) {
|
||||||
|
// if (mNewsSkeleton != null) {
|
||||||
|
// mNewsSkeleton.hide();
|
||||||
|
// }
|
||||||
|
// mIvNewsEmpty.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onComplete() {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻类型
|
* 获取新闻
|
||||||
*/
|
*/
|
||||||
private void getNewsTabs() {
|
|
||||||
RetrofitManager.getInstance()
|
|
||||||
.create(HomeApi.class)
|
|
||||||
.getNewsTabListByPid(PathConfig.NEWS_ID)
|
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(new Observer<List<NewsTabBean>>() {
|
|
||||||
@Override
|
|
||||||
public void onSubscribe(Disposable d) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNext(List<NewsTabBean> newsTabBeans) {
|
|
||||||
if (newsTabBeans != null && newsTabBeans.size() > 0) {
|
|
||||||
mIvNewsEmpty.setVisibility(View.GONE);
|
|
||||||
Random random = new Random();
|
|
||||||
int i = random.nextInt(newsTabBeans.size());
|
|
||||||
if (TextUtils.isEmpty(UserLgUtils.getToken())) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
getNewsListByToken(newsTabBeans.get(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (mNewsSkeleton != null) {
|
|
||||||
mNewsSkeleton.hide();
|
|
||||||
}
|
|
||||||
mIvNewsEmpty.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Throwable e) {
|
|
||||||
if (mNewsSkeleton != null) {
|
|
||||||
mNewsSkeleton.hide();
|
|
||||||
}
|
|
||||||
mIvNewsEmpty.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onComplete() {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void getNewsListByToken(NewsTabBean newsTabBean) {
|
|
||||||
RetrofitManager.getInstance()
|
|
||||||
.create(HomeApi.class)
|
|
||||||
.getNewsMainListByToken(newsTabBean.getNewsDirectoriesId(), "5", "1", UserLgUtils.getToken())
|
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(new Observer<NewsItemBean>() {
|
|
||||||
@Override
|
|
||||||
public void onSubscribe(Disposable d) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNext(NewsItemBean newsItemBean) {
|
|
||||||
if (newsItemBean != null) {
|
|
||||||
if (newsItemBean.getRows() != null) {
|
|
||||||
if (newsItemBean.getRows().size() > 5) {
|
|
||||||
mNewsBeans = newsItemBean.getRows().subList(0, 5);
|
|
||||||
} else {
|
|
||||||
mNewsBeans = newsItemBean.getRows();
|
|
||||||
}
|
|
||||||
if (newsItemBean.getRows().size() > 0) {
|
|
||||||
mIvNewsEmpty.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
mIvNewsEmpty.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mIvNewsEmpty.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
getCommentCount(1, newsItemBean);
|
|
||||||
// TODO mMAdapter.setData(mNewsBeans);
|
|
||||||
} else {
|
|
||||||
mIvNewsEmpty.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
if (mNewsSkeleton != null) {
|
|
||||||
mNewsSkeleton.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Throwable e) {
|
|
||||||
if (mNewsSkeleton != null) {
|
|
||||||
mNewsSkeleton.hide();
|
|
||||||
}
|
|
||||||
mIvNewsEmpty.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onComplete() {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void getNewsList(NewsTabBean newsTabBean) {
|
private void getNewsList(NewsTabBean newsTabBean) {
|
||||||
//获取新闻
|
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(HomeApi.class)
|
.create(HomeApi.class)
|
||||||
.getNewsTabListByPid(PathConfig.NEWS_ID, "5", "1")
|
.getNewsTabListByPid(PathConfig.NEWS_ID, "5", "1")
|
||||||
@ -709,9 +714,9 @@ public class HomeFragment extends BaseFragment {
|
|||||||
MainFuncBean culturalBean = new MainFuncBean();
|
MainFuncBean culturalBean = new MainFuncBean();
|
||||||
culturalBean.setIconRes(R.drawable.ic_legacy_icon);
|
culturalBean.setIconRes(R.drawable.ic_legacy_icon);
|
||||||
culturalBean.setTitle("非遗文化");
|
culturalBean.setTitle("非遗文化");
|
||||||
MainFuncBean movieBean = new MainFuncBean();
|
// MainFuncBean movieBean = new MainFuncBean();
|
||||||
movieBean.setIconRes(R.drawable.ic_live_icon);
|
// movieBean.setIconRes(R.drawable.ic_live_icon);
|
||||||
movieBean.setTitle("直播点播");
|
// movieBean.setTitle("直播点播");
|
||||||
MainFuncBean volunBean = new MainFuncBean();
|
MainFuncBean volunBean = new MainFuncBean();
|
||||||
volunBean.setIconRes(R.drawable.ic_volunteer_icon);
|
volunBean.setIconRes(R.drawable.ic_volunteer_icon);
|
||||||
volunBean.setTitle("志愿者服务");
|
volunBean.setTitle("志愿者服务");
|
||||||
@ -740,7 +745,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
mFuncBeans.add(activityBean);
|
mFuncBeans.add(activityBean);
|
||||||
mFuncBeans.add(placeBean);
|
mFuncBeans.add(placeBean);
|
||||||
mFuncBeans.add(culturalBean);
|
mFuncBeans.add(culturalBean);
|
||||||
mFuncBeans.add(movieBean);
|
// mFuncBeans.add(movieBean);
|
||||||
|
|
||||||
MainFuncAdapter funcAdapter = new MainFuncAdapter(getActivity(), mFuncBeans);
|
MainFuncAdapter funcAdapter = new MainFuncAdapter(getActivity(), mFuncBeans);
|
||||||
LinearLayoutManager manager = new LinearLayoutManager(mActivity, LinearLayoutManager.HORIZONTAL, false);
|
LinearLayoutManager manager = new LinearLayoutManager(mActivity, LinearLayoutManager.HORIZONTAL, false);
|
||||||
@ -786,7 +791,6 @@ public class HomeFragment extends BaseFragment {
|
|||||||
ARouter.getInstance()
|
ARouter.getInstance()
|
||||||
.build(PathConfig.PATH_MODULEACTIVITY_ACTIVITY_MAIN)
|
.build(PathConfig.PATH_MODULEACTIVITY_ACTIVITY_MAIN)
|
||||||
.navigation();
|
.navigation();
|
||||||
// TODO mMainActivity.setCurrentPage(1, "活动");
|
|
||||||
} else if ("场馆导航".equals(mainFuncBean.getTitle())) {
|
} else if ("场馆导航".equals(mainFuncBean.getTitle())) {
|
||||||
mMainActivity.setCurrentPage(2, "场馆");
|
mMainActivity.setCurrentPage(2, "场馆");
|
||||||
} else if ("非遗文化".equals(mainFuncBean.getTitle())) {
|
} else if ("非遗文化".equals(mainFuncBean.getTitle())) {
|
||||||
@ -825,7 +829,12 @@ public class HomeFragment extends BaseFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void refreshView() {
|
protected void refreshView() {
|
||||||
mSrlView.finishRefresh();
|
mBannerList.clear();
|
||||||
|
mNewsBeans.clear();
|
||||||
|
mMainCommendBeans.clear();
|
||||||
|
getNewsList(null);
|
||||||
|
getBannerData();
|
||||||
|
getMainCommendList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -842,7 +851,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
mMainCommendBeans.clear();
|
mMainCommendBeans.clear();
|
||||||
buildBannerData();
|
buildBannerData();
|
||||||
getNewsList(null);
|
getNewsList(null);
|
||||||
getLiveList();
|
// getLiveList();
|
||||||
getMainCommendList();
|
getMainCommendList();
|
||||||
getBannerData();
|
getBannerData();
|
||||||
}
|
}
|
||||||
|
@ -111,6 +111,7 @@ public class NewsFragment extends BaseFragment {
|
|||||||
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
private void showNewsDetail(NewsItemBean.RowsBean rowsBean, int type) {
|
||||||
String url = "";
|
String url = "";
|
||||||
if ("6".equals(rowsBean.getNewsContentType())) {
|
if ("6".equals(rowsBean.getNewsContentType())) {
|
||||||
|
//链接新闻
|
||||||
ARouter.getInstance()
|
ARouter.getInstance()
|
||||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
.build(PathConfig.PATH_MODULE_MAIN_NEWS_WEB)
|
||||||
.withString("url", rowsBean.getNewsContentContent())
|
.withString("url", rowsBean.getNewsContentContent())
|
||||||
|
@ -9,6 +9,7 @@ import com.tengshisoft.mudulemain.cultural.beans.AreaListBean;
|
|||||||
import com.tengshisoft.mudulemain.cultural.beans.BaseUserBean;
|
import com.tengshisoft.mudulemain.cultural.beans.BaseUserBean;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.CommentListBean;
|
import com.tengshisoft.mudulemain.cultural.beans.CommentListBean;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.NewsCommentCount;
|
import com.tengshisoft.mudulemain.cultural.beans.NewsCommentCount;
|
||||||
|
import com.tengshisoft.mudulemain.cultural.beans.NewsDetailBean;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.NewsItemBean;
|
import com.tengshisoft.mudulemain.cultural.beans.NewsItemBean;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.NewsTabBean;
|
import com.tengshisoft.mudulemain.cultural.beans.NewsTabBean;
|
||||||
import com.tengshisoft.mudulemain.cultural.beans.SearchBean;
|
import com.tengshisoft.mudulemain.cultural.beans.SearchBean;
|
||||||
@ -90,8 +91,8 @@ public interface HomeApi {
|
|||||||
* @param page
|
* @param page
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:activity", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:activity", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/activitylibrary/listpageactivitylibraryrelease")
|
@GET("app/activitylibrary/listpageactivitylibraryfornetrelease")
|
||||||
Observable<ActivityListBeans> getMainActivityList(@Query("page") String page, @Query("rows") String rows);
|
Observable<ActivityListBeans> getMainActivityList(@Query("page") String page, @Query("rows") String rows);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,23 +109,25 @@ public interface HomeApi {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newsdirectories/listnewsdirectoriesrelease")
|
// @GET("app/newsdirectories/listnewsdirectoriesrelease")
|
||||||
Observable<List<NewsTabBean>> getNewsTabListByPid(@Query("directoriesParentId") String pid);
|
@GET("app/newsdirectories/listsub/areaauth/release/{newsDirectoriesId}")
|
||||||
|
Observable<List<NewsTabBean>> getNewsTabListByPid(@Query("newsDirectoriesId") String pid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻子类别
|
* 获取新闻子类别
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontentrelease")
|
@GET("app/newscontent/listpagenewscontentrelease")
|
||||||
Observable<NewsItemBean> getNewsTabListByPid(@Query("newsDirectoriesParentId") String pid, @Query("rows") String rows, @Query("page") String page);
|
Observable<NewsItemBean> getNewsTabListByPid(@Query("newsDirectoriesId") String pid, @Query("rows") String rows, @Query("page") String page);
|
||||||
|
// Observable<NewsItemBean> getNewsTabListByPid(@Query("newsDirectoriesParentId") String pid, @Query("rows") String rows, @Query("page") String page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻列表-不需要token
|
* 获取新闻列表-不需要token
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontentrelease")
|
@GET("app/newscontent/listpagenewscontentrelease")
|
||||||
Observable<NewsItemBean> getNewsList(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("page") String page);
|
Observable<NewsItemBean> getNewsList(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("page") String page);
|
||||||
|
|
||||||
@ -138,24 +141,32 @@ public interface HomeApi {
|
|||||||
/**
|
/**
|
||||||
* 获取新闻列表-不需要token
|
* 获取新闻列表-不需要token
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontentrelease")
|
@GET("app/newscontent/listpagenewscontentrelease")
|
||||||
Observable<NewsItemBean> getMainNewsList(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("rows") String rows, @Query("page") String page);
|
Observable<NewsItemBean> getMainNewsList(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("rows") String rows, @Query("page") String page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻列表-需要token
|
* 获取新闻列表-需要token
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontent")
|
@GET("app/newscontent/listpagenewscontent")
|
||||||
Observable<NewsItemBean> getNewsListByToken(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("page") String page, @Header("token") String token);
|
Observable<NewsItemBean> getNewsListByToken(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("page") String page, @Header("token") String token);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新闻列表-需要token
|
* 获取新闻列表-需要token
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/newscontent/listpagenewscontent")
|
@GET("app/newscontent/listpagenewscontent")
|
||||||
Observable<NewsItemBean> getNewsMainListByToken(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("rows") String rows, @Query("page") String page, @Header("token") String token);
|
Observable<NewsItemBean> getNewsMainListByToken(@Query("newsDirectoriesId") String newsDirectoriesId, @Query("rows") String rows, @Query("page") String page, @Header("token") String token);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取新闻详情
|
||||||
|
*/
|
||||||
|
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
|
||||||
|
@GET("app/newscontent/getnewscontentbyidrelease/{id}")
|
||||||
|
Observable<NewsDetailBean> getNewsDetail(@Path("id") String id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取评论列表
|
* 获取评论列表
|
||||||
*/
|
*/
|
||||||
@ -235,7 +246,7 @@ public interface HomeApi {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/venuesinfo/listpagevenuesinforelease")
|
@GET("app/venuesinfo/listpagevenuesinforelease")
|
||||||
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query("orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query("orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
||||||
|
|
||||||
@ -243,7 +254,7 @@ public interface HomeApi {
|
|||||||
* 直播回放列表
|
* 直播回放列表
|
||||||
* http://192.168.0.104:8084/live/
|
* http://192.168.0.104:8084/live/
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json","is_need_area:false"})
|
@Headers({"base_url_name:live", "Content-Type:application/json", "Accept:application/json", "need_area:false"})
|
||||||
@GET("app/liveplan/listpageliveplanrelease")
|
@GET("app/liveplan/listpageliveplanrelease")
|
||||||
Observable<CulturalLiveBean> getLiveRecord(@Query("page") String page, @Query("rows") String rows);
|
Observable<CulturalLiveBean> getLiveRecord(@Query("page") String page, @Query("rows") String rows);
|
||||||
|
|
||||||
@ -254,7 +265,7 @@ public interface HomeApi {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||||
@GET("app/area/listallbyparentidrelease/{areaParentId}")
|
@GET("app/area/listbyparentidrelease/{areaParentId}")
|
||||||
Observable<List<AreaListBean>> getAreaListByPid(@Path("areaParentId") String pId);
|
Observable<List<AreaListBean>> getAreaListByPid(@Path("areaParentId") String pId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -185,7 +185,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -213,11 +214,13 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/gray_line" />
|
android:background="@color/gray_line"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rlv_lives"
|
android:id="@+id/rlv_lives"
|
||||||
|
@ -35,7 +35,7 @@ public interface ApiPlace {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json", "need_area:true"})
|
||||||
@GET("app/venuesinfo/listpagevenuesinforelease")
|
@GET("app/venuesinfo/listpagevenuesinforelease")
|
||||||
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query("orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
Observable<PlaceListBean> getPlaceByOrder(@Query("latitude") String lat, @Query("longitude") String lng, @Query("orderKey") String order, @Query("page") String page, @Query("rows") String rows);
|
||||||
|
|
||||||
@ -44,9 +44,10 @@ public interface ApiPlace {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
|
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json","need_area:true"})
|
||||||
@GET("app/venuesinfo/listpagevenuesinforelease")
|
@GET("app/venuesinfo/listpagevenuesinforelease")
|
||||||
Observable<PlaceListBean> getPlaceByDictionId(@Query("latitude") String lat, @Query("longitude") String lng, @Query("venueType") String dId, @Query("page") String page, @Query("rows") String rows);
|
Observable<PlaceListBean> getPlaceByDictionId(@Query("latitude") String lat, @Query("longitude") String lng, @Query("venueType") String dId, @Query("page") String page,
|
||||||
|
@Query("rows") String rows);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取场馆类型-全部
|
* 获取场馆类型-全部
|
||||||
|
Loading…
Reference in New Issue
Block a user