Commit 0bc77652 authored by linfeng's avatar linfeng

bug修复

parent 344b53a0
...@@ -115,7 +115,7 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> { ...@@ -115,7 +115,7 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
webUrl = ApiConfig.HTTP_URL_CAR_TYPE_DETAIL + "?id=" + mCarBean.getVehicleModel().getId() + "&companyId=" + mCarBean.getCompany().getId(); webUrl = ApiConfig.HTTP_URL_CAR_TYPE_DETAIL + "?id=" + mCarBean.getVehicleModel().getId() + "&companyId=" + mCarBean.getCompany().getId();
initWeb(); initWeb();
initRxbus(); initRxbus();
initShare(webUrl + "&shareType=app", mCarBean.getVehicleModel().getName(), mCarBean.getCompany().getAddrDetail(), mCarBean.getVehicleModel().getIcon()); initShare(webUrl + "&shareType=app", mCarBean.getVehicleModel().getName(), mCarBean.getVehicleModel().getKeyword(), mCarBean.getVehicleModel().getIcon());
} }
private void initRxbus() { private void initRxbus() {
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
android:layout_marginRight="@dimen/size_8" android:layout_marginRight="@dimen/size_8"
android:padding="@dimen/size_8" android:padding="@dimen/size_8"
android:text="帮助" android:text="帮助"
android:visibility="gone"
android:textColor="@color/colorWrite" /> android:textColor="@color/colorWrite" />
</RelativeLayout> </RelativeLayout>
...@@ -214,7 +215,7 @@ ...@@ -214,7 +215,7 @@
android:layout_height="@dimen/size_30" android:layout_height="@dimen/size_30"
android:textSize="@dimen/text_12" android:textSize="@dimen/text_12"
android:gravity="center" android:gravity="center"
android:text="*欣新管家扫码验票完成后,才能上车哦!"/> android:text="*滴房车管家扫码验票完成后,才能上车哦!"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
android:layout_marginRight="@dimen/size_8" android:layout_marginRight="@dimen/size_8"
android:padding="@dimen/size_8" android:padding="@dimen/size_8"
android:text="帮助" android:text="帮助"
android:visibility="gone"
android:textColor="@color/colorWrite" /> android:textColor="@color/colorWrite" />
</RelativeLayout> </RelativeLayout>
...@@ -227,7 +228,7 @@ ...@@ -227,7 +228,7 @@
android:layout_height="@dimen/size_30" android:layout_height="@dimen/size_30"
android:textSize="@dimen/text_12" android:textSize="@dimen/text_12"
android:gravity="center" android:gravity="center"
android:text="*欣新管家扫码验证完成后,才能取车哦!"/> android:text="*滴房车管家扫码验证完成后,才能取车哦!"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -38,8 +38,6 @@ import com.ruiwenliu.wrapper.bean.BeanUserInfo; ...@@ -38,8 +38,6 @@ import com.ruiwenliu.wrapper.bean.BeanUserInfo;
import com.ruiwenliu.wrapper.util.um.CustomShareListener; import com.ruiwenliu.wrapper.util.um.CustomShareListener;
import com.ruiwenliu.wrapper.util.um.ShareManager; import com.ruiwenliu.wrapper.util.um.ShareManager;
import com.ruiwenliu.wrapper.weight.TitleView; import com.ruiwenliu.wrapper.weight.TitleView;
import com.ruiwenliu.wrapper.weight.refresh.IFooterWrapper;
import com.rv.component.control.ProgressWebView;
import com.rv.tourism.R; import com.rv.tourism.R;
import com.rv.tourism.R2; import com.rv.tourism.R2;
import com.rv.tourism.api.TourismApi; import com.rv.tourism.api.TourismApi;
...@@ -187,9 +185,9 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter> ...@@ -187,9 +185,9 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
// return; // return;
// } // }
// } // }
//
mWebView.loadUrl("JavaScript:openModal()"); // Android调用h5
mWebView.loadUrl("JavaScript:openModal()"); // Android调用h5
llItemBottom.setVisibility(View.GONE);
} }
} }
......
...@@ -69,45 +69,51 @@ ...@@ -69,45 +69,51 @@
android:layout_height="@dimen/size_3" android:layout_height="@dimen/size_3"
android:indeterminateOnly="false" android:indeterminateOnly="false"
android:max="100" android:max="100"
android:visibility="gone" android:progressDrawable="@drawable/shape_rv_bg_yellow_progress"
android:progressDrawable="@drawable/shape_rv_bg_yellow_progress" > android:visibility="gone"></ProgressBar>
</ProgressBar>
<WebView <WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/webView" android:id="@+id/webView"
/> android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<include layout="@layout/common_line" />
<LinearLayout <LinearLayout
android:id="@+id/ll_item_bottom" android:id="@+id/ll_item_bottom"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="vertical">
<TextView <include layout="@layout/common_line" />
android:id="@+id/tv_customer_service"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="联系客服"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
<TextView <LinearLayout
android:id="@+id/tv_appointment" android:layout_width="match_parent"
android:layout_width="0dp" android:layout_height="@dimen/size_50"
android:layout_height="match_parent" android:orientation="horizontal">
android:layout_weight="1"
android:background="@color/colorAuxiliaryYellow"
android:gravity="center" <TextView
android:text="立即预订" android:id="@+id/tv_customer_service"
android:textColor="@color/colorWrite" android:layout_width="0dp"
android:textSize="@dimen/text_14" /> android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="联系客服"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
<TextView
android:id="@+id/tv_appointment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/colorAuxiliaryYellow"
android:gravity="center"
android:text="立即预订"
android:textColor="@color/colorWrite"
android:textSize="@dimen/text_14" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -26,6 +26,7 @@ import com.rv.search.bean.BeanTravelSearch; ...@@ -26,6 +26,7 @@ import com.rv.search.bean.BeanTravelSearch;
import com.rv.search.presenter.SearchPresenter; import com.rv.search.presenter.SearchPresenter;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
...@@ -35,7 +36,7 @@ import butterknife.OnClick; ...@@ -35,7 +36,7 @@ import butterknife.OnClick;
* 旅游搜索 * 旅游搜索
*/ */
@Route(path = Constance.ACTIVITY_URL_TRAVELSEARCH) @Route(path = Constance.ACTIVITY_URL_TRAVELSEARCH)
public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> { public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> implements BaseQuickAdapter.RequestLoadMoreListener{
@BindView(R2.id.et_search) @BindView(R2.id.et_search)
EditText etSearch; EditText etSearch;
...@@ -52,6 +53,8 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> { ...@@ -52,6 +53,8 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> {
@Autowired() @Autowired()
String city; String city;
private String content;
private TravelSearchAdapter mTravelSearchAdapter; private TravelSearchAdapter mTravelSearchAdapter;
@Override @Override
...@@ -102,7 +105,7 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> { ...@@ -102,7 +105,7 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> {
if (id == R.id.iv_back){ if (id == R.id.iv_back){
finish(); finish();
}else if (id == R.id.tv_search){ }else if (id == R.id.tv_search){
String content = etSearch.getText().toString().trim(); content = etSearch.getText().toString().trim();
if (TextUtils.isEmpty(content)){ if (TextUtils.isEmpty(content)){
showToast("请输入搜索内容!"); showToast("请输入搜索内容!");
return; return;
...@@ -123,16 +126,12 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> { ...@@ -123,16 +126,12 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> {
private void setData(BeanTravelSearch data) { private void setData(BeanTravelSearch data) {
KeyboardUtil.hideKeyboard(mActivity); KeyboardUtil.hideKeyboard(mActivity);
if (mPage == 1) { if (mPage == 1) {
mTravelSearchAdapter.getData().clear(); countPage = data.getData().getTotalPage();
mTravelSearchAdapter.notifyDataSetChanged(); mTravelSearchAdapter.setNewData(data.getData().getData());
if (data.getData().getTotalCount() == 0) { if (data.getData().getTotalCount() == 0) {
mTravelSearchAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无数据!")); mTravelSearchAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无数据!"));
return; mTravelSearchAdapter.notifyDataSetChanged();
} }
countPage = data.getData().getTotalPage();
mTravelSearchAdapter.addNewData(data);
mTravelSearchAdapter.loadMoreComplete();
} else { } else {
mTravelSearchAdapter.addData(data.getData().getData()); mTravelSearchAdapter.addData(data.getData().getData());
mTravelSearchAdapter.loadMoreComplete(); mTravelSearchAdapter.loadMoreComplete();
...@@ -152,10 +151,18 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> { ...@@ -152,10 +151,18 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("query", search); map.put("query", search);
map.put("page", page); map.put("page", page);
map.put("limit", "10");
map.put("distance", 10.0);
map.put("latitude", latLatitude); map.put("latitude", latLatitude);
map.put("longitude", lonLongitude); map.put("longitude", lonLongitude);
mPresenter.getData(0, SearchApi.QUERY_RIM_LIST, BeanTravelSearch.class, map, true); mPresenter.getData(0, SearchApi.QUERY_RIM_LIST, BeanTravelSearch.class, map, true);
} }
@Override
public void onLoadMoreRequested() {
if (mPage >= countPage) {
mTravelSearchAdapter.loadMoreEnd();
} else {
mPage++;
getLoadTourAroundData(mPage,content);
}
}
} }
...@@ -22,10 +22,4 @@ public class TravelSearchAdapter extends BaseQuickAdapter<BeanTravelSearch.DataB ...@@ -22,10 +22,4 @@ public class TravelSearchAdapter extends BaseQuickAdapter<BeanTravelSearch.DataB
helper.setText(R.id.tv_name,item.getName()); helper.setText(R.id.tv_name,item.getName());
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(BeanTravelSearch 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