Commit 19c778c7 authored by linfeng's avatar linfeng

bug修复

parent f5372260
...@@ -205,7 +205,7 @@ public class MainActivity extends BaseActivity<CommonPresenter>{ ...@@ -205,7 +205,7 @@ public class MainActivity extends BaseActivity<CommonPresenter>{
} else if (id == R.id.rl_camp) { } else if (id == R.id.rl_camp) {
setCurrent(TYPE_CAMP); setCurrent(TYPE_CAMP);
} else if (id == R.id.rl_found) { } else if (id == R.id.rl_found) {
// setCurrent(TYPE_FOUND); setCurrent(TYPE_FOUND);
} else if (id == R.id.rl_mine) { } else if (id == R.id.rl_mine) {
setCurrent(TYPE_MINE); setCurrent(TYPE_MINE);
} }
...@@ -216,7 +216,7 @@ public class MainActivity extends BaseActivity<CommonPresenter>{ ...@@ -216,7 +216,7 @@ public class MainActivity extends BaseActivity<CommonPresenter>{
list.add(HomeFragment.getInstance(TYPE_HOME_PAGE)); list.add(HomeFragment.getInstance(TYPE_HOME_PAGE));
list.add(TourismFragment.getInstance(TYPE_TRAVEL)); list.add(TourismFragment.getInstance(TYPE_TRAVEL));
list.add(CampFragment.getInstance(TYPE_CAMP)); list.add(CampFragment.getInstance(TYPE_CAMP));
// list.add(DiscoveryFragment.getInstance(TYPE_FOUND)); list.add(DiscoveryFragment.getInstance(TYPE_FOUND));
list.add(MineFragment.getInstance(TYPE_MINE)); list.add(MineFragment.getInstance(TYPE_MINE));
return list; return list;
} }
......
...@@ -15,6 +15,7 @@ public interface RvFrameConfig extends RvFrameConstant { ...@@ -15,6 +15,7 @@ public interface RvFrameConfig extends RvFrameConstant {
// String HOST = "https://api.dfangche.com"; // String HOST = "https://api.dfangche.com";
String HOST = "https://mgmt.dfangche.com"; String HOST = "https://mgmt.dfangche.com";
String HOST_H5_DETAIL = "https://mgmt.dfangche.com"; String HOST_H5_DETAIL = "https://mgmt.dfangche.com";
// String HOST_H5_DETAIL = "https://dev.dfangche.com";
String ADMIN_POST = HOST + "/api/admin/"; String ADMIN_POST = HOST + "/api/admin/";
String AUTH_POST = HOST + "/api/auth/"; String AUTH_POST = HOST + "/api/auth/";
String VEHICLE_POST = HOST + "/vehicle/";//租车 String VEHICLE_POST = HOST + "/vehicle/";//租车
......
...@@ -121,5 +121,5 @@ public class ApiConfig { ...@@ -121,5 +121,5 @@ public class ApiConfig {
public static String HTTP_URL_WEBVIEW_CARGOODS = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/carGoods.html"; public static String HTTP_URL_WEBVIEW_CARGOODS = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/carGoods.html";
//押金退还进度 //押金退还进度
public static String HTTP_URL_WEBVIEW_REFUNDPROGRESS = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/refundProgress.html"; public static String HTTP_URL_WEBVIEW_REFUNDPROGRESS = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/depositProgress.html";
} }
...@@ -53,7 +53,7 @@ public class DepositefundProgressDetailsActivity extends BaseStatusActivity<Pick ...@@ -53,7 +53,7 @@ public class DepositefundProgressDetailsActivity extends BaseStatusActivity<Pick
titleView.setTitle("押金退还进度"); titleView.setTitle("押金退还进度");
String orderId = intent.getStringExtra("orderId"); String orderId = intent.getStringExtra("orderId");
webUrl = ApiConfig.HTTP_URL_WEBVIEW_REFUNDPROGRESS + "?orderId=" + orderId; webUrl = ApiConfig.HTTP_URL_WEBVIEW_REFUNDPROGRESS + "?orderNo=" + orderId;
initWeb(); initWeb();
} }
......
...@@ -181,11 +181,18 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S ...@@ -181,11 +181,18 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S
mTourAroundAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() { mTourAroundAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override @Override
public void onLoadMoreRequested() { public void onLoadMoreRequested() {
if (mPage >= countPage) { if (rvTourAround != null) {
mTourAroundAdapter.loadMoreEnd(); rvTourAround.postDelayed(new Runnable() {
} else { @Override
mPage++; public void run() {
getLoadTourAroundData(mPage); if (mPage >= countPage) {
mTourAroundAdapter.loadMoreEnd();
} else {
mPage++;
getLoadTourAroundData(mPage);
}
}
}, 200);
} }
} }
}, rvTourAround); }, rvTourAround);
...@@ -195,7 +202,6 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S ...@@ -195,7 +202,6 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S
protected void loadData(Bundle savedInstanceState) { protected void loadData(Bundle savedInstanceState) {
loadBannerData(); loadBannerData();
loadPopularBrigadeData(); loadPopularBrigadeData();
loadTourAroundData();
loadPopularBrigadeAllData(); loadPopularBrigadeAllData();
} }
...@@ -335,14 +341,19 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S ...@@ -335,14 +341,19 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S
if (mPage == 1) { if (mPage == 1) {
if (bean.getData().getTotalCount() == 0) { if (bean.getData().getTotalCount() == 0) {
// mTourAroundAdapter.setEmptyView(getEmptyView(recyclerView, -1, mActivity.getString(R.string.rv_driving_data_null))); // mTourAroundAdapter.setEmptyView(getEmptyView(recyclerView, -1, mActivity.getString(R.string.rv_driving_data_null)));
mTourAroundAdapter.notifyDataSetChanged();
return; return;
} }
countPage = bean.getData().getTotalPage(); countPage = bean.getData().getTotalPage();
mTourAroundAdapter.addNewData(bean); if (bean.getData().getData() != null) {
mTourAroundAdapter.setNewData(bean.getData().getData());
}
mTourAroundAdapter.loadMoreComplete(); mTourAroundAdapter.loadMoreComplete();
} else { } else {
mTourAroundAdapter.addData(bean.getData().getData()); if (bean.getData().getData() != null) {
mTourAroundAdapter.addData(bean.getData().getData());
}
mTourAroundAdapter.loadMoreComplete(); mTourAroundAdapter.loadMoreComplete();
} }
} }
...@@ -606,6 +617,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S ...@@ -606,6 +617,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S
latLatitude = location.getLatitude(); latLatitude = location.getLatitude();
lonLongitude = location.getLongitude(); lonLongitude = location.getLongitude();
mLatLng = new LatLng(location.getLatitude(), location.getLongitude()); mLatLng = new LatLng(location.getLatitude(), location.getLongitude());
loadTourAroundData();
if (!TextUtils.isEmpty(location.getCity())) if (!TextUtils.isEmpty(location.getCity()))
travelCityText.setText(location.getCity()); travelCityText.setText(location.getCity());
locationManager.stopLocation(); locationManager.stopLocation();
......
...@@ -24,10 +24,4 @@ public class TourAroundAdapter extends BaseQuickAdapter<BeanTourAround.DataBeanX ...@@ -24,10 +24,4 @@ public class TourAroundAdapter extends BaseQuickAdapter<BeanTourAround.DataBeanX
helper.setText(R.id.tv_people,item.getStock()); helper.setText(R.id.tv_people,item.getStock());
helper.setText(R.id.tv_price,String.format("¥%1$s%2$s",item.getPrice(),item.getUnit())); helper.setText(R.id.tv_price,String.format("¥%1$s%2$s",item.getPrice(),item.getUnit()));
} }
public void addNewData(BeanTourAround bean) {
mData.clear();
addData(bean.getData().getData());
notifyDataSetChanged();
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment