网络拦截器添加areacode参数、商城取消订单选项bug修复

This commit is contained in:
itgaojian 2023-02-20 17:36:14 +08:00
parent b759bf8ff6
commit 0be21e4bf0
10 changed files with 95 additions and 61 deletions

View File

@ -50,9 +50,10 @@ android {
} }
productFlavors { productFlavors {
sangzhuzi { sangzhuzi {
applicationId "com.tenlion.cultural" applicationId "com.tengshisoft.cultural"
dimension 'market' dimension 'market'
resValue "string", "APP_CHANNEL", "cultural" resValue("string", "CITY_CODE", "540200000000")
resValue("string", "CITY_ID", "640675")
manifestPlaceholders = [CHANNEL_VALUE: "cultural", manifestPlaceholders = [CHANNEL_VALUE: "cultural",
APP_LOGO : "@drawable/app_logo", APP_LOGO : "@drawable/app_logo",
CITY_ID : "640675", CITY_ID : "640675",

View File

@ -12,7 +12,9 @@ import com.baidu.mapapi.SDKInitializer;
import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.footer.ClassicsFooter; import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
import com.sucstepsoft.cm_utils.core.widget.refresh.CustomRefreshHeader; import com.sucstepsoft.cm_utils.core.widget.refresh.CustomRefreshHeader;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.cm_utils.utils.toast.ToastUtils; import com.sucstepsoft.cm_utils.utils.toast.ToastUtils;
import com.tengshisoft.cultural.R;
import cn.jiguang.share.android.api.JShareInterface; import cn.jiguang.share.android.api.JShareInterface;
import cn.leo.magic.screen.MagicScreenAdapter; import cn.leo.magic.screen.MagicScreenAdapter;
@ -46,6 +48,12 @@ public class BaseMyApplication extends Application {
ToastUtils.init(this); ToastUtils.init(this);
ToastUtils.setGravity(Gravity.TOP, 0, 80); ToastUtils.setGravity(Gravity.TOP, 0, 80);
getConfigCityCode();
}
private void getConfigCityCode() {
UserLgUtils.setCityCode(this.getResources().getString(R.string.CITY_CODE));
UserLgUtils.setCityId(this.getResources().getString(R.string.CITY_ID));
} }
private void initShare() { private void initShare() {

View File

@ -9,20 +9,15 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
*/ */
public class BaseUrlApi { public class BaseUrlApi {
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */ // public static final String IP = "https://www.xzszwhy.cn/usercenter/";/* 第一版正式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 BASE_SYSTEM_IP = "http://192.168.0.115:8082/"; public static final String IP_URL = "http://192.168.0.120.:8081/";/* 测试IP */
// public static final String BASE_SYSTEM_IP = "http://121.36.71.250:58050/xzszwhy/"; // public static final String IP_URL = "http://v3.xzszwhy.cn/";/* 正式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 BASE_SYSTEM_IP = "http://v3.xzszwhy.cn/xzszwhy/";
public static final String IP_URL = "http://v3.xzszwhy.cn/";/* 测试IP */ public static final String BASE_SYSTEM_IP = "http://192.168.0.120.:8081/xzszwhy/";/*测试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 BASE_SYSTEM_IP = "http://192.168.0.115:8082/";
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 IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
public static final String PROJECT_NAME = "app/"; public static final String PROJECT_NAME = "app/";
public static final String BASE_URL = BASE_SYSTEM_IP; public static final String BASE_URL = BASE_SYSTEM_IP;
public static final int PHOTO_REQUEST = 233; public static final int PHOTO_REQUEST = 233;

View File

@ -1,7 +1,6 @@
package com.sucstepsoft.cm_utils.core.retrofit_net.conver; package com.sucstepsoft.cm_utils.core.retrofit_net.conver;
import com.sucstepsoft.cm_utils.constant.PathConfig; import com.sucstepsoft.cm_utils.constant.PathConfig;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils; import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils; import com.sucstepsoft.cm_utils.utils.UserLgUtils;
@ -30,17 +29,13 @@ public class AreaInterceptor implements Interceptor {
if (cityLevel == -1) { if (cityLevel == -1) {
cityLevel = PathConfig.CITY_DEFAULT_LEVEL; cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
} }
String name = "area" + cityLevel;
String areaCode = UserLgUtils.getCityCode(); String areaCode = UserLgUtils.getCityCode();
// if (TextUtils.isEmpty(areaId)) {
// areaId = PathConfig.CITY_DEFAULT_CODE;
// }
// String cityId = UserLgUtils.getCityId();
//判断是否需要添加 //判断是否需要添加
List<String> baseUrlName = originalRequest.headers("is_need_area"); List<String> baseUrlName = originalRequest.headers("is_need_area");
LogUtils.e(baseUrlName); if (baseUrlName.size() > 0) {
if (baseUrlName.size() <= 0) {
//需要添加 //需要添加
//判断值是什么
if (Boolean.parseBoolean(baseUrlName.get(0))) {
HttpUrl modifiedUrl = originalRequest.url().newBuilder() HttpUrl modifiedUrl = originalRequest.url().newBuilder()
.addPathSegment(areaCode) .addPathSegment(areaCode)
.build(); .build();
@ -48,6 +43,9 @@ public class AreaInterceptor implements Interceptor {
} else { } else {
request = originalRequest; request = originalRequest;
} }
} else {
request = originalRequest;
}
return chain.proceed(request); return chain.proceed(request);
} }

View File

@ -56,7 +56,8 @@ public class BottomCancelOrderDialog extends Dialog {
private View view; private View view;
private List<BaseDictionaryBean> list; private List<BaseDictionaryBean> list;
private BottomCancelOrderDialog(Context context, boolean isCancelable, boolean isBackCancelable, int gravity, List<BaseDictionaryBean> list) { private BottomCancelOrderDialog(Context context, boolean isCancelable, boolean isBackCancelable, int gravity,
List<BaseDictionaryBean> list) {
super(context, R.style.dialog_full_screen); super(context, R.style.dialog_full_screen);
this.context = context; this.context = context;
this.gravity = gravity; this.gravity = gravity;
@ -76,8 +77,18 @@ public class BottomCancelOrderDialog extends Dialog {
rlvReason.setLayoutManager(new LinearLayoutManager(context)); rlvReason.setLayoutManager(new LinearLayoutManager(context));
DicSelAdapter adapter = new DicSelAdapter(context, list); DicSelAdapter adapter = new DicSelAdapter(context, list);
rlvReason.setAdapter(adapter); rlvReason.setAdapter(adapter);
if (list != null && list.size() > 0) {
list.get(0).setCheck(true);
}
adapter.addOnItemClickListener(baseDictionaryBean -> { adapter.addOnItemClickListener(baseDictionaryBean -> {
baseDictionaryBean.setCheck(!baseDictionaryBean.isCheck()); for (BaseDictionaryBean b : list) {
if (b.getDataId().equals(baseDictionaryBean.getDataId())) {
b.setCheck(true);
} else {
b.setCheck(false);
}
}
adapter.setData(list); adapter.setData(list);
}); });
tvCancel.setOnClickListener(v -> this.dismiss()); tvCancel.setOnClickListener(v -> this.dismiss());
@ -141,7 +152,8 @@ public class BottomCancelOrderDialog extends Dialog {
//请求获得焦点 //请求获得焦点
editText.requestFocus(); editText.requestFocus();
//调用系统输入法 //调用系统输入法
InputMethodManager inputManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); InputMethodManager inputManager =
(InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.showSoftInput(editText, 0); inputManager.showSoftInput(editText, 0);
} }
} }
@ -232,7 +244,8 @@ public class BottomCancelOrderDialog extends Dialog {
} }
public BottomCancelOrderDialog build() { public BottomCancelOrderDialog build() {
return new BottomCancelOrderDialog(this.mContext, this.isCancelable, this.mIsBackable, this.mGravity, this.list); return new BottomCancelOrderDialog(this.mContext, this.isCancelable, this.mIsBackable, this.mGravity,
this.list);
} }
} }

View File

@ -46,14 +46,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","is_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","is_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);
@ -62,7 +62,7 @@ public interface CulturalApi {
* GET /app/intangibledirectories/listztreeintangibledirectoriesrelease * GET /app/intangibledirectories/listztreeintangibledirectoriesrelease
* GET /app/intangiblelibrary/listpageintangiblelibraryrelease * GET /app/intangiblelibrary/listpageintangiblelibraryrelease
*/ */
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json","is_need_area:true"})
@GET("app/intangibledirectories/listztreeintangibledirectoriesrelease") @GET("app/intangibledirectories/listztreeintangibledirectoriesrelease")
Observable<List<LegacyListTypeBean>> getLegacyTypeList(@Query("id") String id); Observable<List<LegacyListTypeBean>> getLegacyTypeList(@Query("id") String id);

View File

@ -83,7 +83,7 @@ public class MainActivity extends BaseActivity {
mRlTitleBar1.setVisibility(View.VISIBLE); mRlTitleBar1.setVisibility(View.VISIBLE);
mFragments = new ArrayList<>(); mFragments = new ArrayList<>();
Fragment homefragment = FragmentUtils.getHomeFragment(); Fragment homefragment = FragmentUtils.getHomeFragment();
Fragment shopFragment = FragmentUtils.getShopFragment(); Fragment shopFragment = FragmentUtils.getActivityFragment();
Fragment placeFragment = FragmentUtils.getPlaceFragment(); Fragment placeFragment = FragmentUtils.getPlaceFragment();
Fragment culturalFragment = FragmentUtils.getCulturalFragment(); Fragment culturalFragment = FragmentUtils.getCulturalFragment();
Fragment mineMainFragment = FragmentUtils.getMineFragment(); Fragment mineMainFragment = FragmentUtils.getMineFragment();

View File

@ -9,6 +9,7 @@ import com.gyf.immersionbar.ImmersionBar;
import com.sucstepsoft.cm_utils.constant.PathConfig; import com.sucstepsoft.cm_utils.constant.PathConfig;
import com.sucstepsoft.cm_utils.constant.PermissionConstants; import com.sucstepsoft.cm_utils.constant.PermissionConstants;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity; import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.PermissionUtils; import com.sucstepsoft.cm_utils.utils.PermissionUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils; import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.cm_utils.utils.toast.ToastUtils; import com.sucstepsoft.cm_utils.utils.toast.ToastUtils;
@ -39,7 +40,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(); // getCityCode();
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
@ -95,6 +96,7 @@ public class SplashActivity extends BaseActivity {
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")); cityCode = String.valueOf(info.metaData.get("CITY_CODE"));
LogUtils.e(cityCode);
cityId = String.valueOf(info.metaData.get("CITY_ID")); cityId = String.valueOf(info.metaData.get("CITY_ID"));
UserLgUtils.setCityCode(cityCode); UserLgUtils.setCityCode(cityCode);
UserLgUtils.setCityId(cityId); UserLgUtils.setCityId(cityId);

View File

@ -56,7 +56,7 @@ public interface HomeApi {
* @param user * @param user
* @return * @return
*/ */
@Headers({"Content-Type: application/json", "Accept: application/json"}) @Headers({"Content-Type: application/json", "Accept: application/json", "is_need_area:false"})
@POST("app/sign/default") @POST("app/sign/default")
Observable<BaseUserBean> doLogin(@Body RequestBody user); Observable<BaseUserBean> doLogin(@Body RequestBody user);
@ -80,7 +80,7 @@ public interface HomeApi {
/** /**
* 获取非遗列表 * 获取非遗列表
*/ */
@Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:legacy", "Content-Type:application/json", "Accept:application/json", "is_need_area:true"})
@GET("app/intangiblelibrary/listpageintangiblelibraryrelease") @GET("app/intangiblelibrary/listpageintangiblelibraryrelease")
Observable<LegacyListBean> getLegacyList(@Query("page") String page, @Query("rows") String row); Observable<LegacyListBean> getLegacyList(@Query("page") String page, @Query("rows") String row);
@ -90,7 +90,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", "is_need_area" +
":true"})
@GET("app/activitylibrary/listpageactivitylibraryrelease") @GET("app/activitylibrary/listpageactivitylibraryrelease")
Observable<ActivityListBeans> getMainActivityList(@Query("page") String page, @Query("rows") String rows); Observable<ActivityListBeans> getMainActivityList(@Query("page") String page, @Query("rows") String rows);
@ -99,7 +100,7 @@ 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", "is_need_area:true"})
@GET("app/newsdirectories/listnewsdirectoriesrelease") @GET("app/newsdirectories/listnewsdirectoriesrelease")
Observable<List<NewsTabBean>> getNewsTabList(); Observable<List<NewsTabBean>> getNewsTabList();
@ -108,7 +109,7 @@ 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", "is_need_area:true"})
@GET("app/newsdirectories/listnewsdirectoriesrelease") @GET("app/newsdirectories/listnewsdirectoriesrelease")
Observable<List<NewsTabBean>> getNewsTabListByPid(@Query("directoriesParentId") String pid); Observable<List<NewsTabBean>> getNewsTabListByPid(@Query("directoriesParentId") String pid);
@ -117,16 +118,18 @@ 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", "is_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("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", "is_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);
/** /**
* 获取新闻评论数量,多个新闻ID用下划线隔开(id_id_id) * 获取新闻评论数量,多个新闻ID用下划线隔开(id_id_id)
@ -138,23 +141,26 @@ 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", "is_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", "is_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", "is_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);
/** /**
* 获取评论列表 * 获取评论列表
@ -169,7 +175,8 @@ public interface HomeApi {
*/ */
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
@GET("app/newscomment/listpagenewscomment") @GET("app/newscomment/listpagenewscomment")
Observable<CommentListBean> getCommentListByLogin(@Query("page") String page, @Query("newsContentId") String nId, @Header("token") String token); Observable<CommentListBean> getCommentListByLogin(@Query("page") String page, @Query("newsContentId") String nId,
@Header("token") String token);
/** /**
@ -177,7 +184,8 @@ public interface HomeApi {
*/ */
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
@GET("app/newscomment/listpagenewscommentrelease") @GET("app/newscomment/listpagenewscommentrelease")
Observable<CommentListBean> getCommentListByPId(@Query("page") String page, @Query("commentParentId") String pId, @Query("newsContentId") String nId); Observable<CommentListBean> getCommentListByPId(@Query("page") String page, @Query("commentParentId") String pId,
@Query("newsContentId") String nId);
/** /**
* 获取评论列表 * 获取评论列表
@ -185,7 +193,10 @@ public interface HomeApi {
*/ */
@Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:news", "Content-Type:application/json", "Accept:application/json"})
@GET("app/newscomment/listpagenewscomment") @GET("app/newscomment/listpagenewscomment")
Observable<CommentListBean> getCommentListByLoginByPid(@Query("page") String page, @Query("newsContentId") String nId, @Query("commentParentId") String pId, @Header("token") String token); Observable<CommentListBean> getCommentListByLoginByPid(@Query("page") String page,
@Query("newsContentId") String nId, @Query(
"commentParentId") String pId,
@Header("token") String token);
/** /**
* 保存评论 * 保存评论
@ -237,13 +248,14 @@ public interface HomeApi {
*/ */
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
@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);
/** /**
* 直播回放列表 * 直播回放列表
* 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", "is_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);
@ -265,5 +277,6 @@ public interface HomeApi {
*/ */
@Headers({"Content-Type:application/json", "Accept:application/json"}) @Headers({"Content-Type:application/json", "Accept:application/json"})
@GET("app/area/listpagearea") @GET("app/area/listpagearea")
Observable<SearchBean> doSearchByKeyword(@Query("page") int page, @Query("keywords") String key, @Header("token") String token); Observable<SearchBean> doSearchByKeyword(@Query("page") int page, @Query("keywords") String key,
@Header("token") String token);
} }

View File

@ -37,7 +37,8 @@ public interface ApiPlace {
*/ */
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
@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);
/** /**
* 获取场馆列表-根据类型 * 获取场馆列表-根据类型
@ -46,14 +47,16 @@ public interface ApiPlace {
*/ */
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
@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);
/** /**
* 获取场馆类型-全部 * 获取场馆类型-全部
* *
* @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", "is_need_area:true"})
@GET("app/venuedictionary/listvenuedictionarybyparentidrelease/{dictionaryParentId}") @GET("app/venuedictionary/listvenuedictionarybyparentidrelease/{dictionaryParentId}")
Observable<PlaceFuncBean> getPlaceTypeList(@Path("dictionaryParentId") String pId); Observable<PlaceFuncBean> getPlaceTypeList(@Path("dictionaryParentId") String pId);
@ -138,7 +141,8 @@ public interface ApiPlace {
*/ */
@Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"}) @Headers({"base_url_name:place", "Content-Type:application/json", "Accept:application/json"})
@DELETE("app/booking/removemyticketitem/{groundBookingId}/{bookingItemId}") @DELETE("app/booking/removemyticketitem/{groundBookingId}/{bookingItemId}")
Observable<BaseSuccessBean> deleteBookingItem(@Path("groundBookingId") String gId, @Path("bookingItemId") String id, @Header("token") String token); Observable<BaseSuccessBean> deleteBookingItem(@Path("groundBookingId") String gId,
@Path("bookingItemId") String id, @Header("token") String token);
/** /**
* 取消订单 * 取消订单