Commit eb752a18 authored by jianglx's avatar jianglx

2019-8-2 改bug

parent 47c4d8da
...@@ -75,7 +75,7 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> { ...@@ -75,7 +75,7 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
@Override @Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) { protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle(mActivity.getString(R.string.rv_city_list)); titleView.setTitle(mActivity.getString(R.string.rv_city_list));
titleView.setImageResource(R.id.iv_title_left, R.drawable.rv_common_icon_back_white); titleView.setImageResource(R.id.iv_title_left, R.drawable.rv_common_icon_back_dark);
cityListAdapter = new CityListAdapter(new ArrayList<MultiItemBean>(), listener, mNowCity); cityListAdapter = new CityListAdapter(new ArrayList<MultiItemBean>(), listener, mNowCity);
recyclerView.setLayoutManager(new GridLayoutManager(this, 6)); recyclerView.setLayoutManager(new GridLayoutManager(this, 6));
recyclerView.setAdapter(cityListAdapter); recyclerView.setAdapter(cityListAdapter);
......
...@@ -97,7 +97,7 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl ...@@ -97,7 +97,7 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
} else if (shopType == 2) { } else if (shopType == 2) {
titleView.setTitle("选择还车公司"); titleView.setTitle("选择还车公司");
} }
titleView.setImageResource(R.id.iv_title_left, R.drawable.rv_common_icon_back_white); titleView.setImageResource(R.id.iv_title_left, R.drawable.rv_common_icon_back_dark);
Drawable drawable = getResources().getDrawable(R.drawable.icon_position); Drawable drawable = getResources().getDrawable(R.drawable.icon_position);
drawable.setBounds(0, 0, DisplayUtil.dip2px(this, 12), DisplayUtil.dip2px(this, 15)); drawable.setBounds(0, 0, DisplayUtil.dip2px(this, 12), DisplayUtil.dip2px(this, 15));
tvCurrentCity.setCompoundDrawables(drawable, null, null, null); tvCurrentCity.setCompoundDrawables(drawable, null, null, null);
......
...@@ -6,17 +6,16 @@ ...@@ -6,17 +6,16 @@
android:background="@color/colorLine" android:background="@color/colorLine"
android:orientation="vertical"> android:orientation="vertical">
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout <com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/refresh" android:id="@+id/refresh"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.rv.component.utils.ObservableScrollView <com.rv.component.utils.ObservableScrollView
android:id="@+id/scrollview" android:id="@+id/scrollview"
android:scrollbars="none"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -608,7 +607,8 @@ ...@@ -608,7 +607,8 @@
android:drawableRight="@drawable/common_icon_rig_black_gray" android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_5" android:drawablePadding="@dimen/size_5"
android:text="全部" android:text="全部"
android:textSize="@dimen/text_10" /> android:textSize="@dimen/text_10"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
...@@ -1021,109 +1021,109 @@ ...@@ -1021,109 +1021,109 @@
</com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout> </com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout>
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView <com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:id="@+id/ll_item_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/ll_item_title"
android:orientation="vertical" android:orientation="vertical"
app:use_type="use_padding_top"> app:use_type="use_padding_top">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/travel_city_layout" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="@dimen/size_50"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_5"
android:clickable="true"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <LinearLayout
android:id="@+id/travel_city_text" android:id="@+id/travel_city_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/ui_dimen_common_small"
android:textColor="@color/colorWrite"
android:textSize="@dimen/_ui_text_size_h6" />
<ImageView
android:id="@+id/iv_travel_city_text_hint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:src="@drawable/rv_common_icon_up_arrow2" /> android:layout_marginLeft="@dimen/size_5"
</LinearLayout> android:clickable="true"
android:gravity="center"
<LinearLayout android:orientation="horizontal">
android:id="@+id/ll_item_search"
android:layout_width="0dp" <TextView
android:layout_height="match_parent" android:id="@+id/travel_city_text"
android:layout_margin="@dimen/ui_dimen_common" android:layout_width="wrap_content"
android:layout_weight="1" android:layout_height="wrap_content"
android:background="@drawable/shape_rv_textview_home_translucent" android:layout_marginRight="@dimen/ui_dimen_common_small"
android:gravity="center" android:textColor="@color/colorWrite"
android:orientation="horizontal"> android:textSize="@dimen/_ui_text_size_h6" />
<ImageView
android:id="@+id/iv_travel_city_text_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rv_common_icon_up_arrow2" />
</LinearLayout>
<ImageView <LinearLayout
android:id="@+id/iv_search_input_hint" android:id="@+id/ll_item_search"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
android:layout_marginRight="@dimen/ui_dimen_common_small"
android:src="@drawable/rv_common_icon_search2" />
<TextView
android:id="@+id/search_input"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="@dimen/ui_dimen_common"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@drawable/shape_rv_textview_home_translucent"
android:gravity="center_vertical" android:gravity="center"
android:hint="搜索目的地/旅游线" android:orientation="horizontal">
android:paddingLeft="@dimen/ui_dimen_common"
android:paddingRight="@dimen/ui_dimen_padding_h1"
android:textColor="@color/colorTextH1" <ImageView
android:textColorHint="@color/colorWrite" android:id="@+id/iv_search_input_hint"
android:textSize="@dimen/_ui_text_size_h7" /> android:layout_width="15dp"
</LinearLayout> android:layout_height="15dp"
android:layout_marginLeft="@dimen/ui_dimen_margin_h1"
<ImageView android:layout_marginRight="@dimen/ui_dimen_common_small"
android:id="@+id/travel_server_image" android:src="@drawable/rv_common_icon_search2" />
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30" <TextView
android:layout_marginRight="@dimen/size_5" android:id="@+id/search_input"
android:padding="@dimen/size_5" android:layout_width="0dp"
android:paddingRight="@dimen/ui_dimen_common" android:layout_height="match_parent"
android:scaleType="centerInside" android:layout_weight="1"
android:src="@drawable/rv_rentingcar_icon_service_white" /> android:background="@null"
android:gravity="center_vertical"
<LinearLayout android:hint="搜索目的地/旅游线"
android:id="@+id/ll_item_top" android:paddingLeft="@dimen/ui_dimen_common"
android:layout_width="wrap_content" android:paddingRight="@dimen/ui_dimen_padding_h1"
android:layout_height="wrap_content" android:textColor="@color/colorTextH1"
android:gravity="center_horizontal" android:textColorHint="@color/colorWrite"
android:orientation="vertical" android:textSize="@dimen/_ui_text_size_h7" />
android:paddingRight="@dimen/size_15" </LinearLayout>
android:visibility="gone">
<ImageView <ImageView
android:layout_width="@dimen/size_20" android:id="@+id/travel_server_image"
android:layout_height="@dimen/size_20" android:layout_width="@dimen/size_30"
android:padding="@dimen/size_2" android:layout_height="@dimen/size_30"
android:src="@drawable/common_icon_stick" /> android:layout_marginRight="@dimen/size_5"
android:padding="@dimen/size_5"
android:paddingRight="@dimen/ui_dimen_common"
android:scaleType="centerInside"
android:src="@drawable/rv_rentingcar_icon_service_white" />
<TextView <LinearLayout
android:id="@+id/ll_item_top"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="回顶部" android:gravity="center_horizontal"
android:textColor="@color/gray_FFB74B" android:orientation="vertical"
android:textSize="@dimen/text_8" /> android:paddingRight="@dimen/size_15"
android:visibility="gone">
<ImageView
android:layout_width="@dimen/size_20"
android:layout_height="@dimen/size_20"
android:padding="@dimen/size_2"
android:src="@drawable/common_icon_stick" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="回顶部"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_8" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView> </com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:background="@drawable/shape_rv_textview_home_search" android:background="@drawable/shape_rv_textview_home_search"
android:gravity="center" android:gravity="center"
android:hint="上海"
android:orientation="horizontal" android:orientation="horizontal"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:textColorHint="@color/colorMain" android:textColorHint="@color/colorMain"
......
...@@ -361,12 +361,13 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements ...@@ -361,12 +361,13 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
@Override @Override
public void OnBannerClick(int position) { public void OnBannerClick(int position) {
BeanTourismBanner.DataBean dataBean = banners.get(position); BeanTourismBanner.DataBean dataBean = banners.get(position);
ComponentName componentName = new ComponentName(getActivity(), "com.rv.share.WebViewActivity"); mPresenter.toTarget(getActivity(),dataBean.getUrl(),dataBean.getTitle());
Intent intent = new Intent(); // ComponentName componentName = new ComponentName(getActivity(), "com.rv.share.WebViewActivity");
intent.setComponent(componentName); // Intent intent = new Intent();
intent.putExtra("url", dataBean.getUrl()); // intent.setComponent(componentName);
intent.putExtra("title", dataBean.getTitle()); // intent.putExtra("url", dataBean.getUrl());
startActivity(intent); // intent.putExtra("title", dataBean.getTitle());
// startActivity(intent);
// BeanTourismBanner.DataBean dataBean = banners.get(position); // BeanTourismBanner.DataBean dataBean = banners.get(position);
// ARouter.getInstance() // ARouter.getInstance()
// .build(Constance.ACTIVITY_URL_TRAVELDETAILS) // .build(Constance.ACTIVITY_URL_TRAVELDETAILS)
......
...@@ -122,7 +122,7 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter> ...@@ -122,7 +122,7 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) { protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
showTitle(false); showTitle(false);
tvTitleCenter.setText("旅游详情"); tvTitleCenter.setText("旅游详情");
webUrl = "https://xxtest.upyuns.com/h5/appHtml/view/travelDetails.html?id=" + id; webUrl = RvFrameConfig.HOST + "/h5/appHtml/view/travelDetails.html?id=" + id;
initWeb(); initWeb();
initRxbus(); initRxbus();
initShare(webUrl+"&shareType=app", name, content, url); initShare(webUrl+"&shareType=app", name, content, url);
......
package com.rv.tourism.presenter; package com.rv.tourism.presenter;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.frame.rv.config.RvFrameConfig; import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.presenter.MvpPresenter; import com.ruiwenliu.wrapper.presenter.MvpPresenter;
...@@ -19,4 +24,45 @@ public class TourismPresenter extends MvpPresenter { ...@@ -19,4 +24,45 @@ public class TourismPresenter extends MvpPresenter {
public String getBaseUrl() { public String getBaseUrl() {
return RvFrameConfig.AUTH_POST; return RvFrameConfig.AUTH_POST;
} }
/******
* 打开目标页面
* @param context
* @param url
* @param title
*/
public void toTarget(Context context, String url, String title) {
if (url.startsWith("http")) {
ComponentName componentName = new ComponentName(context, "com.rv.share.WebViewActivity");
Intent intent = new Intent();
intent.setComponent(componentName);
intent.putExtra("url", url);
intent.putExtra("title", title);
context.startActivity(intent);
} else if (url.startsWith("app:")) {
String target = null;
String[] params = null;
if (url.contains("?")) {
target = url.substring(url.indexOf(":") + 1, url.indexOf("?"));
String paramsString = url.substring(url.indexOf("?") + 1);
params = paramsString.split("&");
} else {
target = url.substring(url.indexOf(":") + 1);
}
if (!TextUtils.isEmpty(target)) {
ComponentName componentName = new ComponentName(context, target);
Intent intent = new Intent();
intent.setComponent(componentName);
if (params != null && params.length > 0) {
for (String param : params) {
String[] values = param.split("=");
if (values.length == 2) {
intent.putExtra(values[0], values[1]);
}
}
}
context.startActivity(intent);
}
}
}
} }
...@@ -97,7 +97,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i ...@@ -97,7 +97,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i
// bodyMap.put("status", "3"); // bodyMap.put("status", "3");
bodyMap.put("hasMemberRight", 1); bodyMap.put("hasMemberRight", 1);
bodyMap.put("type", 1); bodyMap.put("type", 1);
bodyMap.put("multiStatus", "3,4,5,6"); // bodyMap.put("multiStatus", "3,4,5,6");
mPresenter.getData(RvFrameConfig.VEHICLE_ORDER, position, ApiConfig.HTTP_URL_ORDER_LIST, OrderListBean.class, bodyMap, headMap, mPage == 1 ? true : false); mPresenter.getData(RvFrameConfig.VEHICLE_ORDER, position, ApiConfig.HTTP_URL_ORDER_LIST, OrderListBean.class, bodyMap, headMap, mPage == 1 ? true : false);
} }
......
...@@ -34,10 +34,11 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat ...@@ -34,10 +34,11 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat
if (bean != null) { if (bean != null) {
if (!TextUtils.isEmpty(bean.getCrtTime())) { if (!TextUtils.isEmpty(bean.getCrtTime())) {
helper.setText(R.id.tv_consume_time, "下单时间: " + bean.getCrtTime()); helper.setText(R.id.tv_consume_time, "下单时间: " + bean.getCrtTime());
if (bean.getStatusX() == 3) { if(bean.getStatusX() == 2){
helper.setText(R.id.tv_state, "已取消");
} else if (bean.getStatusX() == 3) {
helper.setText(R.id.tv_state, "待支付"); helper.setText(R.id.tv_state, "待支付");
} } else if (bean.getStatusX() == 4) {
if (bean.getStatusX() == 4) {
helper.setText(R.id.tv_state, "待出行"); helper.setText(R.id.tv_state, "待出行");
} else if (bean.getStatusX() == 5) { } else if (bean.getStatusX() == 5) {
helper.setText(R.id.tv_state, "出行中"); helper.setText(R.id.tv_state, "出行中");
......
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