Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
a80f34e3
Commit
a80f34e3
authored
Nov 19, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-price' of
http://113.105.137.151:22280/lify/rvapp
into master-price-john
parents
64455269
fa3064af
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
856 additions
and
190 deletions
+856
-190
build.gradle
RvClient/build.gradle
+2
-2
AndroidManifest.xml
RvClient/src/main/AndroidManifest.xml
+13
-11
BaseWrapperFragment.java
.../java/com/ruiwenliu/wrapper/base/BaseWrapperFragment.java
+1
-1
BasePopupWindow.java
...in/java/com/ruiwenliu/wrapper/dialog/BasePopupWindow.java
+19
-16
dimens.xml
RvWrapper/src/main/res/values/dimens.xml
+1
-0
build.gradle
build.gradle
+1
-0
OrderPriceDetailPw.java
...main/java/com/rv/component/dialog/OrderPriceDetailPw.java
+8
-5
rv_pw_order_price_detail.xml
...t_dialog/src/main/res/layout/rv_pw_order_price_detail.xml
+22
-14
DateUtils.java
...utils/src/main/java/com/rv/component/utils/DateUtils.java
+47
-1
build.gradle
module_home/build.gradle
+2
-2
CarDetailActivity.java
...com/rv/home/rv/module/ui/main/home/CarDetailActivity.java
+10
-2
CarRentalListActivity.java
...rv/home/rv/module/ui/main/home/CarRentalListActivity.java
+24
-3
ConfirmOrderActivity.java
.../rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
+101
-45
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+20
-5
OrderCarPriceDetailAdapter.java
...dule/ui/main/home/adapter/OrderCarPriceDetailAdapter.java
+84
-0
OrderDayCarPriceDetailAdapter.java
...e/ui/main/home/adapter/OrderDayCarPriceDetailAdapter.java
+24
-0
OrderCalendarPriceBean.java
...e/rv/module/ui/main/home/bean/OrderCalendarPriceBean.java
+3
-43
OrderCarPriceBean.java
...v/home/rv/module/ui/main/home/bean/OrderCarPriceBean.java
+40
-0
OrderCarPriceDetailBean.java
.../rv/module/ui/main/home/bean/OrderCarPriceDetailBean.java
+98
-0
OrderCarPriceDetailPw.java
.../rv/module/ui/main/home/dialog/OrderCarPriceDetailPw.java
+97
-0
aa1.png
module_home/src/main/res/drawable-xhdpi/aa1.png
+0
-0
aa2.png
module_home/src/main/res/drawable-xhdpi/aa2.png
+0
-0
aa33.png
module_home/src/main/res/drawable-xhdpi/aa33.png
+0
-0
aa4.png
module_home/src/main/res/drawable-xhdpi/aa4.png
+0
-0
aa_icon_like.png
module_home/src/main/res/drawable-xhdpi/aa_icon_like.png
+0
-0
aa_ivava.png
module_home/src/main/res/drawable-xhdpi/aa_ivava.png
+0
-0
aaa1.png
module_home/src/main/res/drawable-xhdpi/aaa1.png
+0
-0
aaa2.png
module_home/src/main/res/drawable-xhdpi/aaa2.png
+0
-0
fragment_home.xml
module_home/src/main/res/layout/fragment_home.xml
+5
-5
rv_act_confim_order.xml
module_home/src/main/res/layout/rv_act_confim_order.xml
+76
-14
rv_item_order_car_price_detail.xml
...me/src/main/res/layout/rv_item_order_car_price_detail.xml
+71
-0
rv_item_order_day_car_price_detail.xml
...rc/main/res/layout/rv_item_order_day_car_price_detail.xml
+61
-0
rv_item_mine_collection_car_rental.xml
...rc/main/res/layout/rv_item_mine_collection_car_rental.xml
+1
-2
rv_item_mine_collection_travel.xml
...ne/src/main/res/layout/rv_item_mine_collection_travel.xml
+1
-2
BeanTourDetailData.java
...src/main/java/com/rv/tourism/bean/BeanTourDetailData.java
+3
-3
TravelBookingDialog.java
.../main/java/com/rv/tourism/dialog/TravelBookingDialog.java
+3
-2
TravelerConfirmOrderActivity.java
...va/com/rv/tourism/other/TravelerConfirmOrderActivity.java
+17
-12
WalletApi.java
...n_wallet/src/main/java/com/xxrv/wallet/api/WalletApi.java
+1
-0
No files found.
RvClient/build.gradle
View file @
a80f34e3
...
@@ -8,8 +8,8 @@ android {
...
@@ -8,8 +8,8 @@ android {
minSdkVersion
rootProject
.
ext
.
minSdkVersion
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
flavorDimensions
"default"
flavorDimensions
"default"
versionCode
15
3
versionCode
15
5
versionName
"1.5.
3
"
versionName
"1.5.
5
"
multiDexEnabled
true
multiDexEnabled
true
...
...
RvClient/src/main/AndroidManifest.xml
View file @
a80f34e3
...
@@ -171,9 +171,9 @@
...
@@ -171,9 +171,9 @@
<!-- QQ callback -->
<!-- QQ callback -->
<activity
<activity
android:name=
"com.tencent.tauth.AuthActivity"
android:name=
"com.tencent.tauth.AuthActivity"
android:screenOrientation=
"portrait"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:noHistory=
"true"
>
android:noHistory=
"true"
android:screenOrientation=
"portrait"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<action
android:name=
"android.intent.action.VIEW"
/>
...
@@ -198,10 +198,10 @@
...
@@ -198,10 +198,10 @@
<activity
<activity
android:name=
".MainActivity"
android:name=
".MainActivity"
android:screenOrientation=
"portrait"
android:excludeFromRecents=
"true"
android:excludeFromRecents=
"true"
android:exported=
"true"
android:exported=
"true"
android:launchMode=
"singleTask"
>
android:launchMode=
"singleTask"
android:screenOrientation=
"portrait"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
></action>
<action
android:name=
"android.intent.action.VIEW"
></action>
...
@@ -247,8 +247,9 @@
...
@@ -247,8 +247,9 @@
<activity
<activity
android:name=
"com.rv.home.rv.module.ui.login.ConfirmPwdActivity"
android:name=
"com.rv.home.rv.module.ui.login.ConfirmPwdActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
"com.rv.home.rv.module.ui.main.home.ShopShowActivity"
<activity
android:screenOrientation=
"portrait"
/>
android:name=
"com.rv.home.rv.module.ui.main.home.ShopShowActivity"
android:screenOrientation=
"portrait"
/>
<provider
<provider
android:name=
"com.rv.home.rv.until.ApkFileProvider"
android:name=
"com.rv.home.rv.until.ApkFileProvider"
...
@@ -339,8 +340,7 @@
...
@@ -339,8 +340,7 @@
<activity
<activity
android:name=
"com.base.utils.tools.exception.ExceptionCatchActivity"
android:name=
"com.base.utils.tools.exception.ExceptionCatchActivity"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:screenOrientation=
"landscape"
android:screenOrientation=
"landscape"
/>
<!-- 异常捕捉 -->
/>
<!-- 异常捕捉 -->
<!-- 客户端常驻的服务 -->
<!-- 客户端常驻的服务 -->
<service
<service
android:name=
"com.frame.base.server.MyFrameService"
android:name=
"com.frame.base.server.MyFrameService"
...
@@ -409,8 +409,9 @@
...
@@ -409,8 +409,9 @@
android:name=
"com.rv.camp.camp.CampShopShowActivity"
android:name=
"com.rv.camp.camp.CampShopShowActivity"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".WakeUpActivity"
<activity
android:screenOrientation=
"portrait"
>
android:name=
".WakeUpActivity"
android:screenOrientation=
"portrait"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<action
android:name=
"android.intent.action.VIEW"
/>
...
@@ -420,7 +421,8 @@
...
@@ -420,7 +421,8 @@
<data
android:scheme=
"@string/share_install_scheme"
/>
<data
android:scheme=
"@string/share_install_scheme"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
".GuideActivity"
<activity
android:name=
".GuideActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/base/BaseWrapperFragment.java
View file @
a80f34e3
...
@@ -38,7 +38,7 @@ public abstract class BaseWrapperFragment<P extends MvpPresenter> extends Suppor
...
@@ -38,7 +38,7 @@ public abstract class BaseWrapperFragment<P extends MvpPresenter> extends Suppor
protected
static
final
int
CODE_REQUEST_POISITION
=
101010
;
protected
static
final
int
CODE_REQUEST_POISITION
=
101010
;
protected
P
mPresenter
;
protected
P
mPresenter
;
private
LoadingDialog
mLoadingDialog
;
private
LoadingDialog
mLoadingDialog
;
p
rivate
View
contentView
;
p
ublic
View
contentView
;
private
Unbinder
unbinder
;
private
Unbinder
unbinder
;
protected
CompositeDisposable
disposable
;
protected
CompositeDisposable
disposable
;
private
boolean
isLoadData
=
false
;
private
boolean
isLoadData
=
false
;
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/dialog/BasePopupWindow.java
View file @
a80f34e3
...
@@ -2,7 +2,9 @@ package com.ruiwenliu.wrapper.dialog;
...
@@ -2,7 +2,9 @@ package com.ruiwenliu.wrapper.dialog;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.Rect
;
import
android.graphics.drawable.ColorDrawable
;
import
android.graphics.drawable.ColorDrawable
;
import
android.os.Build
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
...
@@ -27,8 +29,10 @@ import java.lang.ref.WeakReference;
...
@@ -27,8 +29,10 @@ import java.lang.ref.WeakReference;
public
abstract
class
BasePopupWindow
extends
PopupWindow
implements
OnViewHolder
{
public
abstract
class
BasePopupWindow
extends
PopupWindow
implements
OnViewHolder
{
private
WeakReference
<
Activity
>
viewReference
;
//MvpView的子类的弱引用
private
WeakReference
<
Activity
>
viewReference
;
//MvpView的子类的弱引用
protected
ViewHolder
helper
;
protected
ViewHolder
helper
;
// public boolean canDismiss=false;
// public boolean canDismiss=false;
WindowManager
.
LayoutParams
params
;
public
WindowManager
.
LayoutParams
params
;
public
View
view
;
public
BasePopupWindow
(
@NonNull
Activity
activity
)
{
public
BasePopupWindow
(
@NonNull
Activity
activity
)
{
viewReference
=
new
WeakReference
<>(
activity
);
viewReference
=
new
WeakReference
<>(
activity
);
...
@@ -36,13 +40,13 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
...
@@ -36,13 +40,13 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
setWidth
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
setWidth
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
setClippingEnabled
(
false
);
setClippingEnabled
(
false
);
setOutsideTouchable
(
false
);
setOutsideTouchable
(
false
);
setTouchable
(
true
);
setFocusable
(
false
);
setFocusable
(
false
);
setBackgroundDrawable
(
new
ColorDrawable
(
ContextCompat
.
getColor
(
getDialogContext
(),
R
.
color
.
gray_50ffffff
)));
setBackgroundDrawable
(
new
ColorDrawable
(
ContextCompat
.
getColor
(
getDialogContext
(),
R
.
color
.
gray_50ffffff
)));
setContentView
(
getHelperView
(
null
,
getViewLayout
(),
this
));
setContentView
(
getHelperView
(
null
,
getViewLayout
(),
this
));
}
}
public
abstract
int
getViewLayout
();
public
abstract
int
getViewLayout
();
/**
/**
...
@@ -54,7 +58,8 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
...
@@ -54,7 +58,8 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
* @return
* @return
*/
*/
protected
View
getHelperView
(
ViewGroup
group
,
int
layoutId
,
OnViewHolder
listener
)
{
protected
View
getHelperView
(
ViewGroup
group
,
int
layoutId
,
OnViewHolder
listener
)
{
helper
=
new
ViewHolder
(
LayoutInflater
.
from
(
getDialogContext
()).
inflate
(
layoutId
,
group
,
false
));
view
=
LayoutInflater
.
from
(
getDialogContext
()).
inflate
(
layoutId
,
group
,
false
);
helper
=
new
ViewHolder
(
view
);
if
(
listener
!=
null
)
{
if
(
listener
!=
null
)
{
listener
.
helper
(
helper
);
listener
.
helper
(
helper
);
}
}
...
@@ -62,8 +67,6 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
...
@@ -62,8 +67,6 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
}
}
@Override
@Override
public
void
helper
(
ViewHolder
helper
)
{
public
void
helper
(
ViewHolder
helper
)
{
...
@@ -84,15 +87,15 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
...
@@ -84,15 +87,15 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
/**
/**
* 关闭处理
* 关闭处理
*/
*/
public
void
onDestroy
()
{
public
void
onDestroy
()
{
if
(
viewReference
!=
null
)
{
if
(
viewReference
!=
null
)
{
viewReference
.
clear
();
viewReference
.
clear
();
viewReference
=
null
;
viewReference
=
null
;
}
}
dismiss
();
dismiss
();
}
}
public
void
closePopupWindow
()
{
public
void
closePopupWindow
()
{
if
(
this
.
isShowing
())
{
if
(
this
.
isShowing
())
{
this
.
dismiss
();
this
.
dismiss
();
setBgShadow
(
1
f
);
setBgShadow
(
1
f
);
...
@@ -102,11 +105,11 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
...
@@ -102,11 +105,11 @@ public abstract class BasePopupWindow extends PopupWindow implements OnViewHolde
/**
/**
* 设置阴影
* 设置阴影
*/
*/
public
void
setBgShadow
(
float
alpha
){
public
void
setBgShadow
(
float
alpha
)
{
if
(
params
==
null
)
{
if
(
params
==
null
)
{
params
=
getDialogContext
().
getWindow
().
getAttributes
();
params
=
getDialogContext
().
getWindow
().
getAttributes
();
}
}
params
.
alpha
=
alpha
;
params
.
alpha
=
alpha
;
getDialogContext
().
getWindow
().
setAttributes
(
params
);
getDialogContext
().
getWindow
().
setAttributes
(
params
);
}
}
...
...
RvWrapper/src/main/res/values/dimens.xml
View file @
a80f34e3
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
<dimen
name=
"size_130"
>
130dp
</dimen>
<dimen
name=
"size_130"
>
130dp
</dimen>
<dimen
name=
"size_140"
>
140dp
</dimen>
<dimen
name=
"size_140"
>
140dp
</dimen>
<dimen
name=
"size_150"
>
150dp
</dimen>
<dimen
name=
"size_150"
>
150dp
</dimen>
<dimen
name=
"size_160"
>
160dp
</dimen>
<dimen
name=
"size_170"
>
170dp
</dimen>
<dimen
name=
"size_170"
>
170dp
</dimen>
<dimen
name=
"size_180"
>
180dp
</dimen>
<dimen
name=
"size_180"
>
180dp
</dimen>
<dimen
name=
"size_190"
>
190dp
</dimen>
<dimen
name=
"size_190"
>
190dp
</dimen>
...
...
build.gradle
View file @
a80f34e3
...
@@ -8,6 +8,7 @@ buildscript {
...
@@ -8,6 +8,7 @@ buildscript {
maven
{
maven
{
url
"http://mvn.mob.com/android"
url
"http://mvn.mob.com/android"
}
}
maven
{
maven
{
url
'https://github.com/jitsi/jitsi-maven-repository/raw/master/releases'
url
'https://github.com/jitsi/jitsi-maven-repository/raw/master/releases'
}
}
...
...
component_dialog/src/main/java/com/rv/component/dialog/OrderPriceDetailPw.java
View file @
a80f34e3
...
@@ -6,11 +6,13 @@ import android.os.Build;
...
@@ -6,11 +6,13 @@ import android.os.Build;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
import
com.ruiwenliu.wrapper.dialog.BasePopupWindow
;
import
com.ruiwenliu.wrapper.dialog.BasePopupWindow
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.rv.component.dialog.adapter.OrderPriceDetailAdapter
;
import
com.rv.component.dialog.adapter.OrderPriceDetailAdapter
;
...
@@ -22,16 +24,17 @@ import com.rv.component.dialog.bean.OrderPriceDetailBean;
...
@@ -22,16 +24,17 @@ import com.rv.component.dialog.bean.OrderPriceDetailBean;
* Desc:订单价格明细
* Desc:订单价格明细
*/
*/
public
class
OrderPriceDetailPw
extends
Base
PopupWindow
{
public
class
OrderPriceDetailPw
extends
Base
Dialog
{
private
OrderPriceDetailAdapter
detailAdapter
;
private
OrderPriceDetailAdapter
detailAdapter
;
private
TextView
tvTitle
;
private
TextView
tvTitle
;
public
OrderPriceDetailPw
(
@NonNull
Activity
activity
)
{
public
OrderPriceDetailPw
(
@NonNull
Activity
activity
)
{
super
(
activity
);
super
(
activity
);
setClippingEnabled
(
true
);
// setClippingEnabled(true);
setOutsideTouchable
(
true
);
// setOutsideTouchable(true);
setFocusable
(
true
);
// setFocusable(true);
setHeight
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
// setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
setDialogParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
BOTTOM
);
}
}
@Override
@Override
...
...
component_dialog/src/main/res/layout/rv_pw_order_price_detail.xml
View file @
a80f34e3
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:
orientation=
"vertical
"
android:
layout_height=
"wrap_content
"
android:gravity=
"bottom"
android:gravity=
"bottom"
android:layout_height=
"wrap_content"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:layout_height=
"wrap_content"
>
android:orientation=
"vertical"
>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:visibility=
"gone"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"@color/bgAlpha"
android:background=
"@color/bgAlpha"
/>
android:visibility=
"gone"
/>
<TextView
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/size_15"
android:id=
"@+id/tv_title"
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/size_15"
android:textColor=
"@color/textMain"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
android:textSize=
"@dimen/text_16"
/>
/>
<include
layout=
"@layout/common_line"
/>
<include
layout=
"@layout/common_line"
/>
<android.support.v7.widget.RecyclerView
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:
id=
"@+id/recyclerView
"
android:
layout_height=
"wrap_content
"
android:
layout_height=
"wrap_content"
/
>
android:
maxHeight=
"@dimen/size_200"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
component_utils/src/main/java/com/rv/component/utils/DateUtils.java
View file @
a80f34e3
...
@@ -95,6 +95,12 @@ public class DateUtils {
...
@@ -95,6 +95,12 @@ public class DateUtils {
*/
*/
private
static
SimpleDateFormat
sdf16
=
new
SimpleDateFormat
(
"dd"
);
private
static
SimpleDateFormat
sdf16
=
new
SimpleDateFormat
(
"dd"
);
/**
* MM月dd日
*/
private
static
SimpleDateFormat
sdf17
=
new
SimpleDateFormat
(
"MM月dd日"
);
/**
/**
* 将yyyy-MM-dd HH:mm:ss转换 Date
* 将yyyy-MM-dd HH:mm:ss转换 Date
*
*
...
@@ -515,6 +521,23 @@ public class DateUtils {
...
@@ -515,6 +521,23 @@ public class DateUtils {
return
day
;
return
day
;
}
}
/**
* 将MM-dd格式成MM月dd日
*
* @param dateStr MM-dd
* @return MM月dd日
*/
public
static
String
formatDate14
(
String
dateStr
)
{
String
day
=
""
;
try
{
Date
date
=
sdf5
.
parse
(
dateStr
);
day
=
sdf17
.
format
(
date
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
day
;
}
/**
/**
* 将yyyy-MM-dd格式成yy-MM-dd
* 将yyyy-MM-dd格式成yy-MM-dd
*
*
...
@@ -731,7 +754,7 @@ public class DateUtils {
...
@@ -731,7 +754,7 @@ public class DateUtils {
}
}
/**
/**
*将yyyy-MM-dd HH:mm:ss格式成dd
*
将yyyy-MM-dd HH:mm:ss格式成dd
*
*
* @param dateStr yyyy-MM-dd HH:mm:ss
* @param dateStr yyyy-MM-dd HH:mm:ss
* @return dd
* @return dd
...
@@ -908,4 +931,27 @@ public class DateUtils {
...
@@ -908,4 +931,27 @@ public class DateUtils {
}
}
/**
* 秒转时分
* 28800 -> 08:00
* @param time
* @return
*/
public
static
String
secToTime
(
long
time
)
{
StringBuilder
stringBuilder
=
new
StringBuilder
();
long
hour
=
time
/
3600
;
long
minute
=
time
/
60
%
60
;
// Integer second = time % 60;
if
(
hour
<
10
){
stringBuilder
.
append
(
"0"
);
}
stringBuilder
.
append
(
hour
);
stringBuilder
.
append
(
":"
);
if
(
minute
<
10
){
stringBuilder
.
append
(
"0"
);
}
stringBuilder
.
append
(
minute
);
return
stringBuilder
.
toString
();
}
}
}
module_home/build.gradle
View file @
a80f34e3
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
}
}
}
}
compileOptions
{
compileOptions
{
sourceCompatibility
=
'1.8'
sourceCompatibility
=
"1.8"
targetCompatibility
=
'1.8'
targetCompatibility
=
"1.8"
}
}
}
}
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/CarDetailActivity.java
View file @
a80f34e3
...
@@ -4,6 +4,7 @@ import android.content.ClipData;
...
@@ -4,6 +4,7 @@ import android.content.ClipData;
import
android.content.ClipboardManager
;
import
android.content.ClipboardManager
;
import
android.content.ComponentName
;
import
android.content.ComponentName
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.res.Configuration
;
import
android.content.res.Configuration
;
import
android.os.Build
;
import
android.os.Build
;
...
@@ -132,6 +133,12 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -132,6 +133,12 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
if
(
checkPriceDialog
==
null
)
{
if
(
checkPriceDialog
==
null
)
{
checkPriceDialog
=
new
CheckPriceDialog
(
mActivity
);
checkPriceDialog
=
new
CheckPriceDialog
(
mActivity
);
checkPriceDialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
@Override
public
void
onDismiss
(
DialogInterface
dialog
)
{
mWebView
.
loadUrl
(
"JavaScript:showDailyPriceJs()"
);
// Android调用h5
}
});
}
}
}
}
...
@@ -332,6 +339,7 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -332,6 +339,7 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
}
}
private
void
initWeb
()
{
private
void
initWeb
()
{
WebSettings
webSettings
=
mWebView
.
getSettings
();
WebSettings
webSettings
=
mWebView
.
getSettings
();
if
(
webSettings
==
null
)
return
;
if
(
webSettings
==
null
)
return
;
...
@@ -524,8 +532,8 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -524,8 +532,8 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
if
(
OkGoUtil
.
getToken
()
!=
null
)
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"start"
,
DateUtils
.
formatDate16
(
begDate
)
);
map
.
put
(
"start"
,
begDate
);
map
.
put
(
"end"
,
DateUtils
.
formatDate16
(
endDate
)
);
map
.
put
(
"end"
,
endDate
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
2
,
ApiConfig
.
HTTP_URL_CALENDAR_PRICE
+
mCarBean
.
getVehicleModel
().
getId
(),
CarRentalPriceBean
.
class
,
map
,
headMap
,
false
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
2
,
ApiConfig
.
HTTP_URL_CALENDAR_PRICE
+
mCarBean
.
getVehicleModel
().
getId
(),
CarRentalPriceBean
.
class
,
map
,
headMap
,
false
);
}
}
}
}
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/CarRentalListActivity.java
View file @
a80f34e3
...
@@ -291,8 +291,8 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
...
@@ -291,8 +291,8 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
if
(
OkGoUtil
.
getToken
()
!=
null
)
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"start"
,
DateUtils
.
formatDate16
(
begDate
)
);
map
.
put
(
"start"
,
begDate
);
map
.
put
(
"end"
,
DateUtils
.
formatDate16
(
endDate
)
);
map
.
put
(
"end"
,
endDate
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
2
,
ApiConfig
.
HTTP_URL_CALENDAR_PRICE
+
id
,
CarRentalPriceBean
.
class
,
map
,
headMap
,
true
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
2
,
ApiConfig
.
HTTP_URL_CALENDAR_PRICE
+
id
,
CarRentalPriceBean
.
class
,
map
,
headMap
,
true
);
}
}
...
@@ -496,7 +496,7 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
...
@@ -496,7 +496,7 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
if
(
resultCode
==
200
&&
requestCode
==
109
)
{
if
(
resultCode
==
200
&&
requestCode
==
109
)
{
begDate
=
data
.
getStringExtra
(
"begDate"
);
begDate
=
data
.
getStringExtra
(
"begDate"
);
endDate
=
data
.
getStringExtra
(
"endDate"
);
endDate
=
data
.
getStringExtra
(
"endDate"
);
copyDay
=
DateUtils
.
compareDateDay
(
endDate
,
begDate
)
+
1
;
copyDay
=
getCountDay
(
begDate
,
endDate
);
//天数
tvGetDate
.
setText
(
"取"
+
DateUtils
.
formatDate66
(
begDate
));
tvGetDate
.
setText
(
"取"
+
DateUtils
.
formatDate66
(
begDate
));
tvOutDate
.
setText
(
"还"
+
DateUtils
.
formatDate66
(
endDate
));
tvOutDate
.
setText
(
"还"
+
DateUtils
.
formatDate66
(
endDate
));
dataBean
.
setDayNum
(
Integer
.
valueOf
(
copyDay
+
""
));
dataBean
.
setDayNum
(
Integer
.
valueOf
(
copyDay
+
""
));
...
@@ -518,6 +518,27 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
...
@@ -518,6 +518,27 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
}
}
}
}
/**
* 计算天数
*
* @param endDate2
* @param begDate2
* @return
*/
private
long
getCountDay
(
String
begDate2
,
String
endDate2
)
{
long
second
=
DateUtils
.
compareDateSecond3
(
endDate2
,
begDate2
);
//两个时间相差的秒数
long
day
=
(
long
)
second
/
86400
;
//天数
long
remainder
=
(
long
)
second
%
86400
;
//余数 秒
if
(
day
==
0
)
{
//不够24小时也算一天
day
=
day
+
1
;
}
else
if
(
remainder
>
14400
)
{
//4小时内天数不增加,否则加一
day
=
day
+
1
;
}
return
day
;
}
private
void
setRequestData
(
int
type
,
String
requestData
,
double
lat
,
double
lon
,
String
compangy
,
int
cityId
,
int
companyId
,
String
cityName
)
{
private
void
setRequestData
(
int
type
,
String
requestData
,
double
lat
,
double
lon
,
String
compangy
,
int
cityId
,
int
companyId
,
String
cityName
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
tvGetAddress
.
setText
(
compangy
);
tvGetAddress
.
setText
(
compangy
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
View file @
a80f34e3
...
@@ -43,24 +43,26 @@ import com.ruiwenliu.wrapper.util.glide.GlideManager;
...
@@ -43,24 +43,26 @@ import com.ruiwenliu.wrapper.util.glide.GlideManager;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.control.FlowLayout
;
import
com.rv.component.control.FlowLayout
;
import
com.rv.component.control.SwitchButton
;
import
com.rv.component.control.SwitchButton
;
import
com.rv.component.dialog.OrderPriceDetailPw
;
import
com.rv.component.dialog.PaymentTypeSelection
;
import
com.rv.component.dialog.PaymentTypeSelection
;
import
com.rv.component.dialog.bean.OrderPriceDetailBean
;
import
com.rv.component.utils.DisplayUtil
;
import
com.rv.component.utils.DisplayUtil
;
import
com.rv.home.R
;
import
com.rv.home.R
;
import
com.rv.home.R2
;
import
com.rv.home.R2
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.ui.main.home.adapter.SelectedItemAdapter
;
import
com.rv.home.rv.module.ui.main.home.adapter.SelectedItemAdapter
;
import
com.rv.home.rv.module.ui.main.home.bean.CarRentalPriceBean
;
import
com.rv.home.rv.module.ui.main.home.bean.CarTypeListBean
;
import
com.rv.home.rv.module.ui.main.home.bean.CarTypeListBean
;
import
com.rv.home.rv.module.ui.main.home.bean.ConfirmOrderBean
;
import
com.rv.home.rv.module.ui.main.home.bean.ConfirmOrderBean
;
import
com.rv.home.rv.module.ui.main.home.bean.DrivingListBean
;
import
com.rv.home.rv.module.ui.main.home.bean.DrivingListBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderAliPayBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderAliPayBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderCalendarPriceBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderCalendarPriceBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderCarPriceDetailBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderDataBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderDataBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderMemberBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderMemberBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderPayBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderPayBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderPriceBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderPriceBean
;
import
com.rv.home.rv.module.ui.main.home.bean.SelectItemBean
;
import
com.rv.home.rv.module.ui.main.home.bean.SelectItemBean
;
import
com.rv.home.rv.module.ui.main.home.dialog.CheckPriceDialog
;
import
com.rv.home.rv.module.ui.main.home.dialog.OrderCarPriceDetailPw
;
import
com.rv.home.rv.module.ui.main.home.order.OrderListActivity
;
import
com.rv.home.rv.module.ui.main.home.order.OrderListActivity
;
import
com.rv.home.rv.module.ui.main.home.other.SelectItemActivity
;
import
com.rv.home.rv.module.ui.main.home.other.SelectItemActivity
;
import
com.tencent.mm.opensdk.modelpay.PayReq
;
import
com.tencent.mm.opensdk.modelpay.PayReq
;
...
@@ -156,6 +158,9 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -156,6 +158,9 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
EditText
edtInviterPhone
;
EditText
edtInviterPhone
;
@BindView
(
R2
.
id
.
tv_mark
)
@BindView
(
R2
.
id
.
tv_mark
)
TextView
tvMark
;
TextView
tvMark
;
@BindView
(
R2
.
id
.
tv_day_price
)
TextView
tvDayPrice
;
private
final
int
TYPE_REQUEST_DRIVING
=
3
;
private
final
int
TYPE_REQUEST_DRIVING
=
3
;
...
@@ -166,8 +171,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -166,8 +171,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
private
CarTypeListBean
.
DataBeanX
.
DataBean
mCarBean
;
private
CarTypeListBean
.
DataBeanX
.
DataBean
mCarBean
;
private
DrivingListBean
.
DataBeanX
.
DataBean
drivingListBean
;
private
DrivingListBean
.
DataBeanX
.
DataBean
drivingListBean
;
private
int
drivingType
=
0
;
//驾驶证类型1、欣新驾驶员2、自驾
private
int
drivingType
=
0
;
//驾驶证类型1、欣新驾驶员2、自驾
private
OrderPriceDetailPw
detailPw
;
//显示订单价格明细弹窗
private
Order
Car
PriceDetailPw
detailPw
;
//显示订单价格明细弹窗
private
OrderPriceDetailBean
orderPriceDetailBean
;
//订单价格明细实体类
private
Order
Car
PriceDetailBean
orderPriceDetailBean
;
//订单价格明细实体类
private
IWXAPI
api
;
private
IWXAPI
api
;
private
int
payType
=
1
;
//选择支付类型
private
int
payType
=
1
;
//选择支付类型
private
OrderPriceBean
priceBean
;
private
OrderPriceBean
priceBean
;
...
@@ -191,6 +196,12 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -191,6 +196,12 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
private
OrderMemberBean
.
DataBean
memberData
;
private
OrderMemberBean
.
DataBean
memberData
;
private
OrderCalendarPriceBean
calendarPriceBean
;
private
OrderCalendarPriceBean
calendarPriceBean
;
private
String
begDate
;
private
String
endDate
;
private
CheckPriceDialog
checkPriceDialog
;
private
boolean
isDayPrice
;
public
static
Intent
getIntent
(
Context
context
,
OrderDataBean
bean
,
CarTypeListBean
.
DataBeanX
.
DataBean
carBean
,
String
startTime
,
String
endTime
,
OrderPriceBean
beanPrice
)
{
public
static
Intent
getIntent
(
Context
context
,
OrderDataBean
bean
,
CarTypeListBean
.
DataBeanX
.
DataBean
carBean
,
String
startTime
,
String
endTime
,
OrderPriceBean
beanPrice
)
{
return
new
Intent
(
context
,
ConfirmOrderActivity
.
class
)
return
new
Intent
(
context
,
ConfirmOrderActivity
.
class
)
.
putExtra
(
"bean"
,
bean
)
.
putExtra
(
"bean"
,
bean
)
...
@@ -212,6 +223,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -212,6 +223,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
dataBean
=
(
OrderDataBean
)
intent
.
getSerializableExtra
(
"bean"
);
dataBean
=
(
OrderDataBean
)
intent
.
getSerializableExtra
(
"bean"
);
mCarBean
=
(
CarTypeListBean
.
DataBeanX
.
DataBean
)
intent
.
getSerializableExtra
(
"carBean"
);
mCarBean
=
(
CarTypeListBean
.
DataBeanX
.
DataBean
)
intent
.
getSerializableExtra
(
"carBean"
);
priceBean
=
(
OrderPriceBean
)
intent
.
getSerializableExtra
(
"priceBean"
);
priceBean
=
(
OrderPriceBean
)
intent
.
getSerializableExtra
(
"priceBean"
);
begDate
=
getIntent
().
getStringExtra
(
"startTime"
);
endDate
=
getIntent
().
getStringExtra
(
"endTime"
);
intiView
();
intiView
();
initRxBus
();
initRxBus
();
...
@@ -317,6 +330,21 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -317,6 +330,21 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
getPayMoney
();
getPayMoney
();
// getOrderPrice();
// getOrderPrice();
break
;
break
;
case
7
:
checkPrice
((
CarRentalPriceBean
)
result
);
break
;
}
}
/**
* 设置价格日历
*
* @param result
*/
private
void
checkPrice
(
CarRentalPriceBean
result
)
{
if
(
checkPriceDialog
!=
null
)
{
checkPriceDialog
.
setNewData
(
result
.
getData
());
checkPriceDialog
.
show
();
}
}
}
}
...
@@ -379,8 +407,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -379,8 +407,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
@OnClick
({
R2
.
id
.
rl_goods
,
R2
.
id
.
tv_get_car_address
,
R2
.
id
.
tv_out_car_address
,
R2
.
id
.
iv_add_driving
,
@OnClick
({
R2
.
id
.
rl_goods
,
R2
.
id
.
tv_get_car_address
,
R2
.
id
.
tv_out_car_address
,
R2
.
id
.
iv_add_driving
,
R2
.
id
.
tv_detail
,
R2
.
id
.
tv_confirm_order
,
R2
.
id
.
tv_delete
,
R2
.
id
.
rb_xin_driving
,
R2
.
id
.
ll_item_xin_driving
,
R2
.
id
.
tv_detail
,
R2
.
id
.
tv_confirm_order
,
R2
.
id
.
tv_delete
,
R2
.
id
.
rb_xin_driving
,
R2
.
id
.
ll_item_xin_driving
,
R2
.
id
.
rb_user_driving
,
R2
.
id
.
tv_user_driving_hint
,
R2
.
id
.
tv_contract_agreement
,
R2
.
id
.
ll_item_service_fee
,
R2
.
id
.
ll_item_vehicle_cleaning_fee
,
R2
.
id
.
rb_user_driving
,
R2
.
id
.
tv_user_driving_hint
,
R2
.
id
.
tv_contract_agreement
,
R2
.
id
.
ll_item_service_fee
,
R2
.
id
.
ll_item_vehicle_cleaning_fee
,
R2
.
id
.
tv_lab3
,
R2
.
id
.
tv_deposit_hint
,
R2
.
id
.
rl_item_privilege_service_hint
,
R2
.
id
.
tv_booking_instructions_hint
,
R2
.
id
.
rl_item_select_coupon
,
R2
.
id
.
tv_lab3
,
R2
.
id
.
tv_deposit_hint
,
R2
.
id
.
tv_booking_instructions_hint
,
R2
.
id
.
rl_item_select_coupon
,
R2
.
id
.
tv_item_caritem
,
R2
.
id
.
tv_item_select_caritem
})
R2
.
id
.
tv_item_caritem
,
R2
.
id
.
tv_item_select_caritem
,
R2
.
id
.
tv_item_loook_price
,
R2
.
id
.
iv_lab3_hint
})
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
rl_goods
)
{
if
(
id
==
R
.
id
.
rl_goods
)
{
...
@@ -452,13 +480,6 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -452,13 +480,6 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withInt
(
"type"
,
4
)
.
withInt
(
"type"
,
4
)
.
navigation
();
.
navigation
();
}
else
if
(
id
==
R
.
id
.
rl_item_privilege_service_hint
)
{
//尊享服务
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
.
withString
(
"title"
,
"尊享服务"
)
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withInt
(
"type"
,
5
)
.
navigation
();
}
else
if
(
id
==
R
.
id
.
tv_booking_instructions_hint
)
{
}
else
if
(
id
==
R
.
id
.
tv_booking_instructions_hint
)
{
//预订须知
//预订须知
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
...
@@ -485,6 +506,18 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -485,6 +506,18 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
}
else
if
(
id
==
R
.
id
.
tv_item_select_caritem
)
{
}
else
if
(
id
==
R
.
id
.
tv_item_select_caritem
)
{
//选择随车物品
//选择随车物品
startActivityForResult
(
SelectItemActivity
.
getIntent
(
mActivity
,
JSON
.
toJSONString
(
selectItem
)),
134
);
startActivityForResult
(
SelectItemActivity
.
getIntent
(
mActivity
,
JSON
.
toJSONString
(
selectItem
)),
134
);
}
else
if
(
id
==
R
.
id
.
tv_item_loook_price
)
{
//查看每天价格
if
(
checkPriceDialog
==
null
)
{
checkPriceDialog
=
new
CheckPriceDialog
(
mActivity
);
}
getDailyPrice
();
}
else
if
(
id
==
R
.
id
.
iv_lab3_hint
)
{
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
.
withString
(
"title"
,
"车损免赔说明"
)
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withInt
(
"type"
,
5
)
.
navigation
();
}
}
}
}
...
@@ -510,7 +543,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -510,7 +543,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
// }
// }
if
(
tvPassengerKnow
.
isChecked
()
==
false
)
{
if
(
tvPassengerKnow
.
isChecked
()
==
false
)
{
showToast
(
"请
同意预定须知
"
);
showToast
(
"请
阅读并同意《租车合同协议》
"
);
return
;
return
;
}
}
String
inviterPhone
=
edtInviterPhone
.
getText
().
toString
().
trim
();
String
inviterPhone
=
edtInviterPhone
.
getText
().
toString
().
trim
();
...
@@ -551,6 +584,18 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -551,6 +584,18 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
}.
show
();
}.
show
();
}
}
/**
* 获取价格日历
*/
public
void
getDailyPrice
()
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"start"
,
begDate
);
map
.
put
(
"end"
,
endDate
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
7
,
ApiConfig
.
HTTP_URL_CALENDAR_PRICE
+
mCarBean
.
getVehicleModel
().
getId
(),
CarRentalPriceBean
.
class
,
map
,
headMap
,
false
);
}
/**
/**
* 获取每天价格
* 获取每天价格
...
@@ -677,6 +722,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -677,6 +722,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
tvActivityDay
.
setText
(
String
.
format
(
"%1$s%2$s"
,
dataBean
.
getDayNum
(),
mActivity
.
getString
(
R
.
string
.
rv_days
)));
tvActivityDay
.
setText
(
String
.
format
(
"%1$s%2$s"
,
dataBean
.
getDayNum
(),
mActivity
.
getString
(
R
.
string
.
rv_days
)));
tvGetCarAddress
.
setText
(
dataBean
.
getStartAddr
());
tvGetCarAddress
.
setText
(
dataBean
.
getStartAddr
());
tvOutCarAddress
.
setText
(
dataBean
.
getEndAddr
());
tvOutCarAddress
.
setText
(
dataBean
.
getEndAddr
());
tvDayPrice
.
setText
(
String
.
format
(
"¥%1$s%2$s"
,
mCarBean
.
getVehicleModel
().
getPrice
(),
"/天起"
));
// String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
// String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
// if (!TextUtil.isEmpty(spStringCode)) {
// if (!TextUtil.isEmpty(spStringCode)) {
...
@@ -740,30 +786,42 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -740,30 +786,42 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
});
});
}
}
/**
/**
* 支付价格计算
* 支付价格计算
*/
*/
private
void
getPayMoney
()
{
private
void
getPayMoney
()
{
if
(
priceBean
==
null
||
priceBean
.
getData
()
==
null
||
dataBean
==
null
||
calendarPriceBean
==
null
||
calendarPriceBean
.
getData
()
==
null
)
{
if
(
priceBean
==
null
||
priceBean
.
getData
()
==
null
||
dataBean
==
null
||
calendarPriceBean
==
null
||
calendarPriceBean
.
getData
()
==
null
||
calendarPriceBean
.
getData
().
size
()
<=
0
)
{
return
;
return
;
}
}
ArrayList
<
OrderPriceDetailBean
.
ChildrenBean
>
childrenBeanList
=
new
ArrayList
<>();
//费用明细
ArrayList
<
Order
Car
PriceDetailBean
.
ChildrenBean
>
childrenBeanList
=
new
ArrayList
<>();
//费用明细
double
payMoney
=
0.00
;
double
payMoney
=
0.00
;
// double dayPrice = mCarBean.getVehicleModel().getSum();
// double dayPrice = mCarBean.getVehicleModel().getSum();
double
totalCarPrice
=
0.00
;
//租车总价
double
totalCarPrice
=
0.00
;
//租车总价
double
totalMemberDays
=
0
;
//会员天数
double
totalMemberDays
=
0
;
//会员天数
for
(
int
i
=
0
;
i
<
calendarPriceBean
.
getData
().
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
calendarPriceBean
.
getData
().
size
();
i
++)
{
totalCarPrice
=
totalCarPrice
+
calendarPriceBean
.
getData
().
get
(
i
).
getPrice
();
totalCarPrice
=
totalCarPrice
+
calendarPriceBean
.
getData
().
get
(
i
).
getPrice
();
totalMemberDays
=
totalMemberDays
+
calendarPriceBean
.
getData
().
get
(
i
).
getFreeDays
();
totalMemberDays
=
totalMemberDays
+
calendarPriceBean
.
getData
().
get
(
i
).
getFreeDays
();
}
}
int
dayNum
=
dataBean
.
getDayNum
();
double
onePrice
=
calendarPriceBean
.
getData
().
get
(
0
).
getPrice
();
//取第一天价格,比较全部价格是否相同
for
(
int
i
=
0
;
i
<
calendarPriceBean
.
getData
().
size
();
i
++)
{
if
(
onePrice
!=
calendarPriceBean
.
getData
().
get
(
i
).
getPrice
())
{
isDayPrice
=
true
;
break
;
}
}
int
dayNum
=
this
.
dataBean
.
getDayNum
();
Order
PriceDetailBean
.
ChildrenBean
childrenBean2
=
new
Orde
rPriceDetailBean
.
ChildrenBean
();
Order
CarPriceDetailBean
.
ChildrenBean
childrenBean2
=
new
OrderCa
rPriceDetailBean
.
ChildrenBean
();
childrenBean2
.
setKey
(
"车辆租赁费"
);
childrenBean2
.
setKey
(
"车辆租赁费"
);
childrenBean2
.
setDetail
(
dayNum
+
"天"
);
childrenBean2
.
setDetail
(
dayNum
+
"天"
);
childrenBean2
.
setVal
(
"¥"
+
new
BigDecimal
(
totalCarPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBean2
.
setVal
(
"¥"
+
new
BigDecimal
(
totalCarPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBean2
.
setDataBean
(
calendarPriceBean
.
getData
());
childrenBean2
.
setDayPrice
(
isDayPrice
);
childrenBeanList
.
add
(
childrenBean2
);
childrenBeanList
.
add
(
childrenBean2
);
if
(
isMemberType
==
0
)
{
//是否使用会员 0 不使用
if
(
isMemberType
==
0
)
{
//是否使用会员 0 不使用
...
@@ -775,23 +833,23 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -775,23 +833,23 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
if
(
totalMemberDays
>
memberData
.
getRentFreeDays
())
{
//个人会员天数小于租车使用会员天数
if
(
totalMemberDays
>
memberData
.
getRentFreeDays
())
{
//个人会员天数小于租车使用会员天数
double
useTotalMemberPrice
=
0.00
;
double
useTotalMemberPrice
=
0.00
;
double
useTotalMemberDays
=
0
;
double
useTotalMemberDays
=
0
;
double
memberPrice
=
0
;
for
(
int
j
=
0
;
j
<
calendarPriceBean
.
getData
().
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
calendarPriceBean
.
getData
().
size
();
j
++)
{
if
(
useTotalMemberDays
<
memberData
.
getRentFreeDays
())
{
if
(
useTotalMemberDays
<
memberData
.
getRentFreeDays
())
{
useTotalMemberDays
=
useTotalMemberDays
+
calendarPriceBean
.
getData
().
get
(
j
).
getFreeDays
();
useTotalMemberDays
=
useTotalMemberDays
+
calendarPriceBean
.
getData
().
get
(
j
).
getFreeDays
();
useTotalMemberPrice
=
useTotalMemberPrice
+
calendarPriceBean
.
getData
().
get
(
j
).
getPrice
();
useTotalMemberPrice
=
useTotalMemberPrice
+
calendarPriceBean
.
getData
().
get
(
j
).
getPrice
();
memberPrice
=
calendarPriceBean
.
getData
().
get
(
j
).
getPrice
()
/
calendarPriceBean
.
getData
().
get
(
j
).
getFreeDays
();
//计算最后使用会员单价
}
else
{
}
else
{
double
memberPrice
=
calendarPriceBean
.
getData
().
get
(
j
-
1
).
getPrice
()
/
calendarPriceBean
.
getData
().
get
(
j
-
1
).
getFreeDays
();
//计算最后使用会员单价
useTotalMemberPrice
=
useTotalMemberPrice
-
(
useTotalMemberDays
-
memberData
.
getRentFreeDays
())
*
memberPrice
;
break
;
break
;
}
}
}
}
useTotalMemberPrice
=
useTotalMemberPrice
-
(
useTotalMemberDays
-
memberData
.
getRentFreeDays
())
*
memberPrice
;
payMoney
=
totalCarPrice
-
useTotalMemberPrice
+
priceBean
.
getData
().
getDeposit
();
payMoney
=
totalCarPrice
-
useTotalMemberPrice
+
priceBean
.
getData
().
getDeposit
();
carAmount
=
totalCarPrice
-
useTotalMemberPrice
;
carAmount
=
totalCarPrice
-
useTotalMemberPrice
;
// payMoney = dayPrice * (dayNum - memberData.getRentFreeDays()) + priceBean.getData().getDeposit();
// payMoney = dayPrice * (dayNum - memberData.getRentFreeDays()) + priceBean.getData().getDeposit();
Order
PriceDetailBean
.
ChildrenBean
childrenBean1
=
new
Orde
rPriceDetailBean
.
ChildrenBean
();
Order
CarPriceDetailBean
.
ChildrenBean
childrenBean1
=
new
OrderCa
rPriceDetailBean
.
ChildrenBean
();
childrenBean1
.
setKey
(
"免费天数"
);
childrenBean1
.
setKey
(
"免费天数"
);
childrenBean1
.
setDetail
(
"会员天数"
+
(
memberData
.
getRentFreeDays
())
+
"天"
);
childrenBean1
.
setDetail
(
"会员天数"
+
(
memberData
.
getRentFreeDays
())
+
"天"
);
childrenBean1
.
setVal
(
"-¥"
+
new
BigDecimal
(
useTotalMemberPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBean1
.
setVal
(
"-¥"
+
new
BigDecimal
(
useTotalMemberPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
...
@@ -800,7 +858,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -800,7 +858,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
payMoney
=
priceBean
.
getData
().
getDeposit
();
payMoney
=
priceBean
.
getData
().
getDeposit
();
carAmount
=
0
;
carAmount
=
0
;
Order
PriceDetailBean
.
ChildrenBean
childrenBean1
=
new
Orde
rPriceDetailBean
.
ChildrenBean
();
Order
CarPriceDetailBean
.
ChildrenBean
childrenBean1
=
new
OrderCa
rPriceDetailBean
.
ChildrenBean
();
childrenBean1
.
setKey
(
"免费天数"
);
childrenBean1
.
setKey
(
"免费天数"
);
childrenBean1
.
setDetail
(
"会员天数"
+
totalMemberDays
+
"天"
);
childrenBean1
.
setDetail
(
"会员天数"
+
totalMemberDays
+
"天"
);
childrenBean1
.
setVal
(
"-¥"
+
new
BigDecimal
(
totalCarPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBean1
.
setVal
(
"-¥"
+
new
BigDecimal
(
totalCarPrice
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
...
@@ -810,7 +868,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -810,7 +868,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
}
}
if
(
drivingType
==
1
)
{
if
(
drivingType
==
1
)
{
payMoney
=
payMoney
+
priceBean
.
getData
().
getDriverAmount
();
// + 专职司机
payMoney
=
payMoney
+
priceBean
.
getData
().
getDriverAmount
();
// + 专职司机
Order
PriceDetailBean
.
ChildrenBean
childrenBean3
=
new
Orde
rPriceDetailBean
.
ChildrenBean
();
Order
CarPriceDetailBean
.
ChildrenBean
childrenBean3
=
new
OrderCa
rPriceDetailBean
.
ChildrenBean
();
childrenBean3
.
setKey
(
"专职司机服务费"
);
childrenBean3
.
setKey
(
"专职司机服务费"
);
childrenBean3
.
setDetail
(
"¥"
+
priceBean
.
getData
().
getDriverPrice
()
+
"/天 *"
+
dayNum
+
"天"
);
childrenBean3
.
setDetail
(
"¥"
+
priceBean
.
getData
().
getDriverPrice
()
+
"/天 *"
+
dayNum
+
"天"
);
childrenBean3
.
setVal
(
"¥"
+
priceBean
.
getData
().
getDriverAmount
());
childrenBean3
.
setVal
(
"¥"
+
priceBean
.
getData
().
getDriverAmount
());
...
@@ -820,7 +878,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -820,7 +878,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
if
(
deductiblePriceType
==
1
)
{
if
(
deductiblePriceType
==
1
)
{
payMoney
=
payMoney
+
priceBean
.
getData
().
getDamageSafePrice
()
*
dayNum
;
//+免赔付价格
payMoney
=
payMoney
+
priceBean
.
getData
().
getDamageSafePrice
()
*
dayNum
;
//+免赔付价格
Order
PriceDetailBean
.
ChildrenBean
childrenBean4
=
new
Orde
rPriceDetailBean
.
ChildrenBean
();
Order
CarPriceDetailBean
.
ChildrenBean
childrenBean4
=
new
OrderCa
rPriceDetailBean
.
ChildrenBean
();
childrenBean4
.
setKey
(
"车损免赔费"
);
childrenBean4
.
setKey
(
"车损免赔费"
);
childrenBean4
.
setDetail
(
"¥"
+
priceBean
.
getData
().
getDamageSafePrice
()
+
"/天 *"
+
dayNum
+
"天"
);
childrenBean4
.
setDetail
(
"¥"
+
priceBean
.
getData
().
getDamageSafePrice
()
+
"/天 *"
+
dayNum
+
"天"
);
childrenBean4
.
setVal
(
"¥"
+
new
BigDecimal
(
priceBean
.
getData
().
getDamageSafePrice
()
*
dayNum
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBean4
.
setVal
(
"¥"
+
new
BigDecimal
(
priceBean
.
getData
().
getDamageSafePrice
()
*
dayNum
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
...
@@ -835,16 +893,16 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -835,16 +893,16 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
tvPayMoney
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
payMoney
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
tvPayMoney
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
payMoney
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
orderPriceDetailBean
=
new
OrderPriceDetailBean
();
orderPriceDetailBean
=
new
Order
Car
PriceDetailBean
();
orderPriceDetailBean
.
setKey
(
"费用明细"
);
orderPriceDetailBean
.
setKey
(
"费用明细"
);
Order
PriceDetailBean
.
ChildrenBean
childrenBean
=
new
Orde
rPriceDetailBean
.
ChildrenBean
();
Order
CarPriceDetailBean
.
ChildrenBean
childrenBean
=
new
OrderCa
rPriceDetailBean
.
ChildrenBean
();
childrenBean
.
setKey
(
"租房车押金"
);
childrenBean
.
setKey
(
"租房车押金"
);
childrenBean
.
setVal
(
"¥"
+
new
BigDecimal
(
priceBean
.
getData
().
getDeposit
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBean
.
setVal
(
"¥"
+
new
BigDecimal
(
priceBean
.
getData
().
getDeposit
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
childrenBeanList
.
add
(
childrenBean
);
childrenBeanList
.
add
(
childrenBean
);
if
(
couponAmount
>
0
)
{
if
(
couponAmount
>
0
)
{
Order
PriceDetailBean
.
ChildrenBean
childrenBean5
=
new
Orde
rPriceDetailBean
.
ChildrenBean
();
Order
CarPriceDetailBean
.
ChildrenBean
childrenBean5
=
new
OrderCa
rPriceDetailBean
.
ChildrenBean
();
childrenBean5
.
setKey
(
"优惠券"
);
childrenBean5
.
setKey
(
"优惠券"
);
childrenBean5
.
setVal
(
"-¥"
+
couponAmount
);
childrenBean5
.
setVal
(
"-¥"
+
couponAmount
);
childrenBeanList
.
add
(
childrenBean5
);
childrenBeanList
.
add
(
childrenBean5
);
...
@@ -880,40 +938,37 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -880,40 +938,37 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
* 显示价格明细弹窗
* 显示价格明细弹窗
*/
*/
private
void
showOrderDetail
(
final
View
view
)
{
private
void
showOrderDetail
(
final
View
view
)
{
if
(
orderPriceDetailBean
!=
null
)
{
if
(
orderPriceDetailBean
!=
null
)
{
if
(
detailPw
==
null
)
{
if
(
detailPw
==
null
)
{
detailPw
=
new
OrderPriceDetailPw
(
mActivity
)
{
detailPw
=
new
Order
Car
PriceDetailPw
(
mActivity
)
{
};
};
}
}
if
(
detailPw
!=
null
)
{
detailPw
.
setNewData
(
orderPriceDetailBean
);
detailPw
.
setNewData
(
orderPriceDetailBean
);
View
contentView
=
detailPw
.
getContentView
();
detailPw
.
show
();
}
/* View contentView = detailPw.getContentView();
//需要先测量,PopupWindow还未弹出时,宽高为0
//需要先测量,PopupWindow还未弹出时,宽高为0
contentView.measure(makeDropDownMeasureSpec(detailPw.getWidth()), makeDropDownMeasureSpec(detailPw.getHeight()));
contentView.measure(makeDropDownMeasureSpec(detailPw.getWidth()), makeDropDownMeasureSpec(detailPw.getHeight()));
// int[] location = new int[2];
detailPw.setHeight(detailPw.getContentView().getMeasuredHeight());
//
// view.getLocationOnScreen(location);
// int hh=location[1]-detailPw.getHeight();
// detailPw.showAtLocation(view, Gravity.NO_GRAVITY,
// location[0], hh);
// detailPw.showAsDropDown(view, 0,0, Gravity.NO_GRAVITY);
// int kk=detailPw.getContentView().getMeasuredHeight();
// int cc=view.getHeight();
int offsetX = Math.abs(detailPw.getContentView().getMeasuredWidth() - view.getWidth()) / 2;
int offsetX = Math.abs(detailPw.getContentView().getMeasuredWidth() - view.getWidth()) / 2;
int offsetY = -(detailPw.getContentView().getMeasuredHeight() + view.getHeight());
int offsetY = -(detailPw.getContentView().getMeasuredHeight() + view.getHeight());
PopupWindowCompat
.
showAsDropDown
(
detailPw
,
view
,
offsetX
,
offsetY
,
Gravity
.
START
);
PopupWindowCompat.showAsDropDown(detailPw, view, offsetX, offsetY, Gravity.START);
*/
/**
/**
* 点击popupWindow让背景变暗
* 点击popupWindow让背景变暗
*/
*/
final
WindowManager
.
LayoutParams
lp
=
getWindow
().
getAttributes
();
/*
final WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.alpha = 0.5f;//代表透明程度,范围为0 - 1.0f
lp.alpha = 0.5f;//代表透明程度,范围为0 - 1.0f
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().setAttributes(lp);
getWindow().setAttributes(lp);
/**
*/
/**
* 退出popupWindow时取消暗背景
* 退出popupWindow时取消暗背景
*/
*/
/*
detailPw.setOnDismissListener(new PopupWindow.OnDismissListener() {
detailPw.setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override
@Override
public void onDismiss() {
public void onDismiss() {
...
@@ -921,10 +976,11 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -921,10 +976,11 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().setAttributes(lp);
getWindow().setAttributes(lp);
}
}
});
});
*/
}
}
}
}
@SuppressWarnings
(
"ResourceType"
)
@SuppressWarnings
(
"ResourceType"
)
private
int
makeDropDownMeasureSpec
(
int
measureSpec
)
{
private
int
makeDropDownMeasureSpec
(
int
measureSpec
)
{
int
mode
;
int
mode
;
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
a80f34e3
...
@@ -14,13 +14,16 @@ import android.os.Build;
...
@@ -14,13 +14,16 @@ import android.os.Build;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.provider.Settings
;
import
android.provider.Settings
;
import
android.support.annotation.Nullable
;
import
android.support.annotation.Nullable
;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.StaggeredGridLayoutManager
;
import
android.support.v7.widget.StaggeredGridLayoutManager
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewTreeObserver
;
import
android.view.ViewTreeObserver
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
...
@@ -92,6 +95,7 @@ import java.util.List;
...
@@ -92,6 +95,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
butterknife.Unbinder
;
import
butterknife.Unbinder
;
...
@@ -99,7 +103,6 @@ import butterknife.Unbinder;
...
@@ -99,7 +103,6 @@ import butterknife.Unbinder;
* 首页
* 首页
*/
*/
public
class
HomeFragment
extends
BaseFragment
<
HomePresenter
>
implements
ObservableScrollView
.
ScrollViewListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
,
GpsManager
.
GpsChangeListener
{
public
class
HomeFragment
extends
BaseFragment
<
HomePresenter
>
implements
ObservableScrollView
.
ScrollViewListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
,
GpsManager
.
GpsChangeListener
{
Unbinder
unbinder
;
@BindView
(
R2
.
id
.
ll_layout_home_renting_a_car
)
@BindView
(
R2
.
id
.
ll_layout_home_renting_a_car
)
LinearLayout
llLayoutRentingACar
;
LinearLayout
llLayoutRentingACar
;
@BindView
(
R2
.
id
.
ll_layout_home_rv_tour
)
@BindView
(
R2
.
id
.
ll_layout_home_rv_tour
)
...
@@ -186,6 +189,7 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
...
@@ -186,6 +189,7 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
ImageView
ivTravelCityTextHint
;
ImageView
ivTravelCityTextHint
;
@BindView
(
R2
.
id
.
iv_home_search_input_hint
)
@BindView
(
R2
.
id
.
iv_home_search_input_hint
)
ImageView
ivSearchInputHint
;
ImageView
ivSearchInputHint
;
Unbinder
unbinder1
;
private
ArrayList
<
String
>
images
=
new
ArrayList
<>();
//图片(默认采用网络地址)
private
ArrayList
<
String
>
images
=
new
ArrayList
<>();
//图片(默认采用网络地址)
...
@@ -228,8 +232,8 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
...
@@ -228,8 +232,8 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
private
double
travelCityLatitude
=
0
;
//头城市
private
double
travelCityLatitude
=
0
;
//头城市
private
double
travelCityLongitude
=
0
;
private
double
travelCityLongitude
=
0
;
private
String
begDate
;
private
String
begDate
=
""
;
private
String
endDate
;
private
String
endDate
=
""
;
private
String
hotType
=
"2"
;
private
String
hotType
=
"2"
;
...
@@ -267,7 +271,6 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
...
@@ -267,7 +271,6 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
mSimpleRefreshLayout
.
setOnSimpleRefreshListener
(
this
);
mSimpleRefreshLayout
.
setOnSimpleRefreshListener
(
this
);
permissionProcess
();
permissionProcess
();
setBanner
();
setBanner
();
Drawable
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_day_times
);
Drawable
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_day_times
);
drawable
.
setBounds
(
0
,
0
,
DisplayUtil
.
dip2px
(
getContext
(),
25
),
DisplayUtil
.
dip2px
(
getContext
(),
5
));
drawable
.
setBounds
(
0
,
0
,
DisplayUtil
.
dip2px
(
getContext
(),
25
),
DisplayUtil
.
dip2px
(
getContext
(),
5
));
tvDay
.
setCompoundDrawables
(
null
,
null
,
null
,
drawable
);
tvDay
.
setCompoundDrawables
(
null
,
null
,
null
,
drawable
);
...
@@ -493,7 +496,6 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
...
@@ -493,7 +496,6 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
}
}
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
public
class
AbSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
int
space
;
private
int
space
;
public
AbSpacesItemDecoration
(
int
space
)
{
public
AbSpacesItemDecoration
(
int
space
)
{
...
@@ -966,6 +968,19 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
...
@@ -966,6 +968,19 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
permissionProcess
();
permissionProcess
();
return
;
return
;
}
}
List
<
Fragment
>
fragments
=
getChildFragmentManager
().
getFragments
();
ArrayList
<
HomeFragment
>
list
=
new
ArrayList
<>();
if
(
fragments
==
null
||
fragments
.
isEmpty
())
{
list
.
add
(
HomeFragment
.
getInstance
(
0
));
}
else
{
for
(
Fragment
fragment
:
fragments
)
{
if
(
fragment
instanceof
HomeFragment
)
{
list
.
add
((
HomeFragment
)
fragment
);
}
}
}
if
(
resultCode
==
RESULT_OK
)
{
if
(
resultCode
==
RESULT_OK
)
{
int
type
=
data
.
getIntExtra
(
"type"
,
1
);
int
type
=
data
.
getIntExtra
(
"type"
,
1
);
String
requestData
=
data
.
getStringExtra
(
"location"
);
String
requestData
=
data
.
getStringExtra
(
"location"
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/adapter/OrderCarPriceDetailAdapter.java
0 → 100644
View file @
a80f34e3
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
adapter
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.Display
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.WindowManager
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.rv.home.R
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderCarPriceBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderCarPriceDetailBean
;
import
com.rv.home.rv.module.ui.main.home.dialog.OrderCarPriceDetailPw
;
import
java.util.List
;
/**
* 租车订单价格明细
*/
public
class
OrderCarPriceDetailAdapter
extends
BaseQuickAdapter
<
OrderCarPriceDetailBean
.
ChildrenBean
,
BaseViewHolder
>
{
private
OrderDayCarPriceDetailAdapter
adapter
;
private
boolean
type
;
public
OrderCarPriceDetailAdapter
()
{
super
(
R
.
layout
.
rv_item_order_car_price_detail
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderCarPriceDetailBean
.
ChildrenBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_name
,
item
.
getKey
());
helper
.
setText
(
R
.
id
.
tv_price
,
item
.
getVal
());
if
(
"优惠券"
.
equals
(
item
.
getKey
()))
{
helper
.
setTextColor
(
R
.
id
.
tv_name
,
helper
.
itemView
.
getContext
().
getResources
().
getColor
(
R
.
color
.
colorAuxiliaryRed
));
helper
.
setTextColor
(
R
.
id
.
tv_price
,
helper
.
itemView
.
getContext
().
getResources
().
getColor
(
R
.
color
.
colorAuxiliaryRed
));
}
else
{
helper
.
setTextColor
(
R
.
id
.
tv_name
,
helper
.
itemView
.
getContext
().
getResources
().
getColor
(
R
.
color
.
textMain
));
helper
.
setTextColor
(
R
.
id
.
tv_price
,
helper
.
itemView
.
getContext
().
getResources
().
getColor
(
R
.
color
.
textMain
));
}
RecyclerView
rvDayPrice
=
helper
.
getView
(
R
.
id
.
rv_dayprice
);
rvDayPrice
.
setLayoutManager
(
new
LinearLayoutManager
(
helper
.
itemView
.
getContext
()));
adapter
=
new
OrderDayCarPriceDetailAdapter
();
rvDayPrice
.
setAdapter
(
adapter
);
List
<
OrderCarPriceBean
>
dataBean
=
item
.
getDataBean
();
if
(
dataBean
!=
null
&&
dataBean
.
size
()
>
0
)
{
if
(
item
.
isDayPrice
())
{
helper
.
setText
(
R
.
id
.
tv_attr
,
item
.
getDetail
());
helper
.
setGone
(
R
.
id
.
iv_hint
,
true
);
adapter
.
setNewData
(
dataBean
);
helper
.
setOnClickListener
(
R
.
id
.
ll_item_isshow_dayprice
,
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(!
type
)
{
rvDayPrice
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
rvDayPrice
.
setVisibility
(
View
.
GONE
);
}
type
=
!
type
;
}
});
}
else
{
helper
.
setGone
(
R
.
id
.
iv_hint
,
false
);
double
price
=
dataBean
.
get
(
0
).
getPrice
();
helper
.
setText
(
R
.
id
.
tv_attr
,
price
+
"/天*"
+
item
.
getDetail
());
}
}
else
{
helper
.
setGone
(
R
.
id
.
iv_hint
,
false
);
helper
.
setText
(
R
.
id
.
tv_attr
,
item
.
getDetail
());
}
if
(!
type
)
{
rvDayPrice
.
setVisibility
(
View
.
GONE
);
}
}
public
void
setType
(
boolean
b
)
{
type
=
b
;
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/adapter/OrderDayCarPriceDetailAdapter.java
0 → 100644
View file @
a80f34e3
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.rv.component.utils.DateUtils
;
import
com.rv.home.R
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderCarPriceBean
;
/**
* 租车订单价格明细
*/
public
class
OrderDayCarPriceDetailAdapter
extends
BaseQuickAdapter
<
OrderCarPriceBean
,
BaseViewHolder
>
{
public
OrderDayCarPriceDetailAdapter
()
{
super
(
R
.
layout
.
rv_item_order_day_car_price_detail
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderCarPriceBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_date
,
DateUtils
.
formatDate14
(
DateUtils
.
formatDate11
(
item
.
getDate
())));
helper
.
setText
(
R
.
id
.
tv_price
,
"¥"
+
item
.
getPrice
());
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/bean/OrderCalendarPriceBean.java
View file @
a80f34e3
...
@@ -12,14 +12,14 @@ import java.util.List;
...
@@ -12,14 +12,14 @@ import java.util.List;
public
class
OrderCalendarPriceBean
extends
BaseBean
implements
Serializable
{
public
class
OrderCalendarPriceBean
extends
BaseBean
implements
Serializable
{
private
List
<
Data
Bean
>
data
;
private
List
<
OrderCarPrice
Bean
>
data
;
private
boolean
rel
;
private
boolean
rel
;
public
List
<
Data
Bean
>
getData
()
{
public
List
<
OrderCarPrice
Bean
>
getData
()
{
return
data
;
return
data
;
}
}
public
void
setData
(
List
<
Data
Bean
>
data
)
{
public
void
setData
(
List
<
OrderCarPrice
Bean
>
data
)
{
this
.
data
=
data
;
this
.
data
=
data
;
}
}
...
@@ -30,44 +30,4 @@ public class OrderCalendarPriceBean extends BaseBean implements Serializable {
...
@@ -30,44 +30,4 @@ public class OrderCalendarPriceBean extends BaseBean implements Serializable {
public
void
setRel
(
boolean
rel
)
{
public
void
setRel
(
boolean
rel
)
{
this
.
rel
=
rel
;
this
.
rel
=
rel
;
}
}
public
static
class
DataBean
implements
Serializable
{
private
String
date
;
private
double
price
;
private
double
no_discount_price
;
private
double
freeDays
;
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
public
double
getPrice
()
{
return
price
;
}
public
void
setPrice
(
double
price
)
{
this
.
price
=
price
;
}
public
double
getNo_discount_price
()
{
return
no_discount_price
;
}
public
void
setNo_discount_price
(
double
no_discount_price
)
{
this
.
no_discount_price
=
no_discount_price
;
}
public
double
getFreeDays
()
{
return
freeDays
;
}
public
void
setFreeDays
(
double
freeDays
)
{
this
.
freeDays
=
freeDays
;
}
}
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/bean/OrderCarPriceBean.java
0 → 100644
View file @
a80f34e3
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
bean
;
public
class
OrderCarPriceBean
{
private
String
date
;
private
double
price
;
private
double
no_discount_price
;
private
double
freeDays
;
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
public
double
getPrice
()
{
return
price
;
}
public
void
setPrice
(
double
price
)
{
this
.
price
=
price
;
}
public
double
getNo_discount_price
()
{
return
no_discount_price
;
}
public
void
setNo_discount_price
(
double
no_discount_price
)
{
this
.
no_discount_price
=
no_discount_price
;
}
public
double
getFreeDays
()
{
return
freeDays
;
}
public
void
setFreeDays
(
double
freeDays
)
{
this
.
freeDays
=
freeDays
;
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/bean/OrderCarPriceDetailBean.java
0 → 100644
View file @
a80f34e3
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
bean
;
import
java.util.List
;
/**
* Desc:租车订单价格明细
*/
public
class
OrderCarPriceDetailBean
{
/**
* key : 费用明细
* val :
* children : [{"key":"车辆租赁费","detail":"¥35000.01/天×2天","val":"¥70000.02"},{"key":"专职司机服务费","detail":"¥600.00×1人×2天","val":"¥1200.00"},{"key":"租房车押金","detail":"","val":"¥20000.00"}]
*/
private
String
key
;
private
String
val
;
private
List
<
ChildrenBean
>
children
;
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getVal
()
{
return
val
;
}
public
void
setVal
(
String
val
)
{
this
.
val
=
val
;
}
public
List
<
ChildrenBean
>
getChildren
()
{
return
children
;
}
public
void
setChildren
(
List
<
ChildrenBean
>
children
)
{
this
.
children
=
children
;
}
public
static
class
ChildrenBean
{
/**
* key : 车辆租赁费
* detail : ¥35000.01/天×2天
* val : ¥70000.02
*/
private
String
key
;
private
String
detail
;
private
String
val
;
private
boolean
isDayPrice
;
private
List
<
OrderCarPriceBean
>
dataBean
;
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getDetail
()
{
return
detail
;
}
public
void
setDetail
(
String
detail
)
{
this
.
detail
=
detail
;
}
public
String
getVal
()
{
return
val
;
}
public
void
setVal
(
String
val
)
{
this
.
val
=
val
;
}
public
boolean
isDayPrice
()
{
return
isDayPrice
;
}
public
void
setDayPrice
(
boolean
dayPrice
)
{
isDayPrice
=
dayPrice
;
}
public
List
<
OrderCarPriceBean
>
getDataBean
()
{
return
dataBean
;
}
public
void
setDataBean
(
List
<
OrderCarPriceBean
>
dataBean
)
{
this
.
dataBean
=
dataBean
;
}
}
}
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/dialog/OrderCarPriceDetailPw.java
0 → 100644
View file @
a80f34e3
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
dialog
;
import
android.app.Activity
;
import
android.support.annotation.NonNull
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.util.DisplayMetrics
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.WindowManager
;
import
android.widget.FrameLayout
;
import
android.widget.LinearLayout
;
import
android.widget.PopupWindow
;
import
android.widget.TextView
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
import
com.ruiwenliu.wrapper.dialog.BasePopupWindow
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.rv.component.utils.DisplayUtil
;
import
com.rv.home.R
;
import
com.rv.home.rv.module.ui.main.home.adapter.OrderCarPriceDetailAdapter
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderCarPriceDetailBean
;
/**
* Desc:租车订单价格明细
*/
//public class OrderCarPriceDetailPw extends BasePopupWindow {
public
class
OrderCarPriceDetailPw
extends
BaseDialog
{
private
final
Activity
activity
;
private
OrderCarPriceDetailAdapter
detailAdapter
;
private
TextView
tvTitle
;
public
OrderCarPriceDetailPw
(
@NonNull
Activity
activity
)
{
super
(
activity
);
this
.
activity
=
activity
;
// setClippingEnabled(true);
// setOutsideTouchable(true);
// setFocusable(true);
// setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
setDialogParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
BOTTOM
);
// WindowManager wm = (WindowManager) activity.getSystemService(activity.WINDOW_SERVICE);
// DisplayMetrics metrics = new DisplayMetrics();
// wm.getDefaultDisplay().getMetrics(metrics);
// if (metrics.heightPixels < DisplayUtil.dip2px(activity, 450)) {
// setDialogParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM);
//
// } else {
// setDialogParams(ViewGroup.LayoutParams.MATCH_PARENT, DisplayUtil.dip2px(activity, 450), Gravity.BOTTOM);
// }
}
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
rv_pw_order_price_detail
;
}
@Override
public
void
helper
(
ViewHolder
helper
)
{
super
.
helper
(
helper
);
tvTitle
=
helper
.
getView
(
R
.
id
.
tv_title
);
RecyclerView
recyclerView
=
helper
.
getView
(
R
.
id
.
recyclerView
);
recyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getDialogContext
()));
detailAdapter
=
new
OrderCarPriceDetailAdapter
();
recyclerView
.
setAdapter
(
detailAdapter
);
}
public
void
setNewData
(
OrderCarPriceDetailBean
bean
)
{
if
(
detailAdapter
!=
null
&&
bean
!=
null
)
{
tvTitle
.
setText
(
bean
.
getKey
());
detailAdapter
.
setNewData
(
bean
.
getChildren
());
}
}
@Override
public
void
dismiss
()
{
detailAdapter
.
setType
(
false
);
super
.
dismiss
();
}
// @Override
// public void showAsDropDown(View parent, int xoff, int yoff, int gravity) {
// if (Build.VERSION.SDK_INT >= 24) {
// Rect visibleFrame = new Rect();
// parent.getGlobalVisibleRect(visibleFrame);
// int height = parent.getResources().getDisplayMetrics().heightPixels - visibleFrame.bottom;
//// int height = anchor.getResources().getDisplayMetrics().heightPixels;
// setHeight(height);
// }
// super.showAsDropDown(parent, xoff, yoff, gravity);
// }
}
module_home/src/main/res/drawable-xhdpi/aa1.png
deleted
100644 → 0
View file @
64455269
233 KB
module_home/src/main/res/drawable-xhdpi/aa2.png
deleted
100644 → 0
View file @
64455269
296 KB
module_home/src/main/res/drawable-xhdpi/aa33.png
deleted
100644 → 0
View file @
64455269
575 KB
module_home/src/main/res/drawable-xhdpi/aa4.png
deleted
100644 → 0
View file @
64455269
357 KB
module_home/src/main/res/drawable-xhdpi/aa_icon_like.png
deleted
100644 → 0
View file @
64455269
479 Bytes
module_home/src/main/res/drawable-xhdpi/aa_ivava.png
deleted
100644 → 0
View file @
64455269
40.8 KB
module_home/src/main/res/drawable-xhdpi/aaa1.png
deleted
100644 → 0
View file @
64455269
203 KB
module_home/src/main/res/drawable-xhdpi/aaa2.png
deleted
100644 → 0
View file @
64455269
318 KB
module_home/src/main/res/layout/fragment_home.xml
View file @
a80f34e3
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:text=
"
2019-22
"
android:text=
""
android:textColor=
"@color/colorMain"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
android:id=
"@+id/tv_home_get_week"
android:id=
"@+id/tv_home_get_week"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
周三
"
android:text=
""
android:textColor=
"@color/textGray"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
</LinearLayout>
</LinearLayout>
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:drawableBottom=
"@drawable/icon_day_times"
android:drawableBottom=
"@drawable/icon_day_times"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"
3天
"
android:text=
""
android:textSize=
"@dimen/text_14"
/>
android:textSize=
"@dimen/text_14"
/>
</RelativeLayout>
</RelativeLayout>
...
@@ -265,7 +265,7 @@
...
@@ -265,7 +265,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:text=
"
2019-22
"
android:text=
""
android:textColor=
"@color/colorMain"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
...
@@ -273,7 +273,7 @@
...
@@ -273,7 +273,7 @@
android:id=
"@+id/tv_home_out_week"
android:id=
"@+id/tv_home_out_week"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
周五
"
android:text=
""
android:textColor=
"@color/textGray"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
</LinearLayout>
</LinearLayout>
...
...
module_home/src/main/res/layout/rv_act_confim_order.xml
View file @
a80f34e3
...
@@ -23,8 +23,9 @@
...
@@ -23,8 +23,9 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:padding=
"@dimen/size_15"
android:paddingLeft=
"@dimen/size_15"
android:paddingTop=
"@dimen/size_15"
>
android:paddingTop=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<ImageView
<ImageView
android:id=
"@+id/iv_goods"
android:id=
"@+id/iv_goods"
...
@@ -105,12 +106,57 @@
...
@@ -105,12 +106,57 @@
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:paddingLeft=
"@dimen/size_160"
android:paddingRight=
"@dimen/size_15"
>
<include
layout=
"@layout/common_line"
/>
</RelativeLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginRight=
"@dimen/size_15"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_day_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
""
android:textColor=
"@color/colorAuxiliaryRed"
android:textSize=
"@dimen/text_14"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_item_loook_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableRight=
"@drawable/rv_common_icon_up_arrow"
android:drawablePadding=
"@dimen/size_5"
android:paddingLeft=
"@dimen/size_30"
android:paddingTop=
"@dimen/size_10"
android:paddingBottom=
"@dimen/size_10"
android:text=
"每日价格"
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_12"
/>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
...
@@ -342,7 +388,8 @@
...
@@ -342,7 +388,8 @@
android:drawableRight=
"@drawable/common_icon_rig_gray"
android:drawableRight=
"@drawable/common_icon_rig_gray"
android:drawablePadding=
"@dimen/size_5"
android:drawablePadding=
"@dimen/size_5"
android:textColor=
"@color/text_Gray"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_10"
/>
android:textSize=
"@dimen/text_10"
android:visibility=
"gone"
/>
</RelativeLayout>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
<include
layout=
"@layout/common_line"
/>
...
@@ -449,25 +496,41 @@
...
@@ -449,25 +496,41 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:padding=
"@dimen/size_15"
>
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<CheckBox
<CheckBox
android:id=
"@+id/tv_lab3"
android:id=
"@+id/tv_lab3"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:button=
"@drawable/selector_rv_check"
android:button=
"@drawable/selector_rv_check"
android:paddingLeft=
"@dimen/size_10"
android:paddingLeft=
"@dimen/size_10"
android:text=
"不计免赔服务"
android:paddingTop=
"@dimen/size_15"
android:paddingBottom=
"@dimen/size_15"
android:text=
"车损免赔"
android:textColor=
"@color/colorMain"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_14"
/>
android:textSize=
"@dimen/text_14"
/>
<ImageView
android:id=
"@+id/iv_lab3_hint"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_toRightOf=
"@+id/tv_lab3"
android:paddingLeft=
"@dimen/size_5"
android:paddingTop=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_25"
android:paddingBottom=
"@dimen/size_15"
android:src=
"@drawable/rv_common_icon_notice"
/>
<TextView
<TextView
android:id=
"@+id/tv_car_not_hurt_money"
android:id=
"@+id/tv_car_not_hurt_money"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:text=
"¥0/日"
android:text=
"¥0/日"
android:textColor=
"@color/colorBg"
android:textColor=
"@color/colorBg"
...
@@ -513,7 +576,7 @@
...
@@ -513,7 +576,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:text=
"
(剩余1天)
"
android:text=
""
android:textColor=
"@color/textGray"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
...
@@ -549,9 +612,9 @@
...
@@ -549,9 +612,9 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:text=
"暂无优惠券"
android:drawableRight=
"@drawable/common_icon_rig_gray"
android:drawableRight=
"@drawable/common_icon_rig_gray"
android:drawablePadding=
"@dimen/size_5"
android:drawablePadding=
"@dimen/size_5"
android:text=
"暂无优惠券"
android:textColor=
"@color/gray_FFB74B"
android:textColor=
"@color/gray_FFB74B"
android:textSize=
"@dimen/text_14"
/>
android:textSize=
"@dimen/text_14"
/>
</RelativeLayout>
</RelativeLayout>
...
@@ -792,12 +855,12 @@
...
@@ -792,12 +855,12 @@
<RelativeLayout
<RelativeLayout
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_15"
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:padding=
"@dimen/size_15"
>
android:padding=
"@dimen/size_15"
android:visibility=
"gone"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -809,8 +872,6 @@
...
@@ -809,8 +872,6 @@
android:textSize=
"@dimen/text_16"
/>
android:textSize=
"@dimen/text_16"
/>
<EditText
<EditText
android:inputType=
"phone"
android:maxLength=
"11"
android:id=
"@+id/edt_inviter_phone"
android:id=
"@+id/edt_inviter_phone"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -819,6 +880,8 @@
...
@@ -819,6 +880,8 @@
android:background=
"@color/colorWrite"
android:background=
"@color/colorWrite"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:hint=
"请输入邀请人手机号"
android:hint=
"请输入邀请人手机号"
android:inputType=
"phone"
android:maxLength=
"11"
android:textColor=
"@color/text_Gray"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
</RelativeLayout>
</RelativeLayout>
...
@@ -834,9 +897,8 @@
...
@@ -834,9 +897,8 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:button=
"@drawable/selector_rv_check"
android:button=
"@drawable/selector_rv_check"
android:checked=
"true"
android:paddingLeft=
"@dimen/size_10"
android:paddingLeft=
"@dimen/size_10"
android:text=
"
@string/rv_passenger_security
"
android:text=
"
已阅读并同意
"
android:textColor=
"@color/textLightGrey"
android:textColor=
"@color/textLightGrey"
android:textSize=
"@dimen/text_14"
/>
android:textSize=
"@dimen/text_14"
/>
...
@@ -844,7 +906,7 @@
...
@@ -844,7 +906,7 @@
android:id=
"@+id/tv_contract_agreement"
android:id=
"@+id/tv_contract_agreement"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
@string/rv_contract_agreement
"
android:text=
"
《租车合同协议》
"
android:textColor=
"@color/gray_FFB74B"
android:textColor=
"@color/gray_FFB74B"
android:textSize=
"@dimen/text_16"
/>
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
</LinearLayout>
...
...
module_home/src/main/res/layout/rv_item_order_car_price_detail.xml
0 → 100644
View file @
a80f34e3
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/size_8"
android:paddingBottom=
"@dimen/size_8"
>
<LinearLayout
android:id=
"@+id/ll_item_isshow_dayprice"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_14"
/>
<ImageView
android:id=
"@+id/iv_hint"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
android:layout_marginLeft=
"@dimen/size_5"
android:src=
"@drawable/rv_common_icon_notice"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_attr"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
""
android:textColor=
"@color/textLightGrey"
android:textSize=
"@dimen/text_14"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"right"
android:text=
""
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_dayprice"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
/>
</LinearLayout>
module_home/src/main/res/layout/rv_item_order_day_car_price_detail.xml
0 → 100644
View file @
a80f34e3
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/size_3"
android:paddingBottom=
"@dimen/size_3"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
""
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_14"
/>
<TextView
android:id=
"@+id/tv_date"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
""
android:textColor=
"@color/textLightGrey"
android:textSize=
"@dimen/text_14"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"right"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_half"
android:orientation=
"horizontal"
>
<View
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_half"
android:layout_weight=
"1"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_half"
android:layout_weight=
"2"
android:background=
"@color/colorLine"
/>
</LinearLayout>
</LinearLayout>
module_mine/src/main/res/layout/rv_item_mine_collection_car_rental.xml
View file @
a80f34e3
...
@@ -17,8 +17,7 @@
...
@@ -17,8 +17,7 @@
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:scaleType=
"centerCrop"
android:scaleType=
"centerCrop"
/>
android:src=
"@drawable/aa_ivava"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
module_mine/src/main/res/layout/rv_item_mine_collection_travel.xml
View file @
a80f34e3
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
android:layout_width=
"@dimen/size_120"
android:layout_width=
"@dimen/size_120"
android:layout_height=
"@dimen/size_80"
android:layout_height=
"@dimen/size_80"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginLeft=
"@dimen/size_15"
android:scaleType=
"centerCrop"
android:scaleType=
"centerCrop"
/>
android:src=
"@drawable/aa_ivava"
/>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
module_tourism/src/main/java/com/rv/tourism/bean/BeanTourDetailData.java
View file @
a80f34e3
...
@@ -235,7 +235,7 @@ public class BeanTourDetailData extends BaseBean {
...
@@ -235,7 +235,7 @@ public class BeanTourDetailData extends BaseBean {
private
String
provinceName
;
//": "广东省",
private
String
provinceName
;
//": "广东省",
private
String
city
;
//": 441900,
private
String
city
;
//": 441900,
private
String
cityName
;
//": "东莞市",
private
String
cityName
;
//": "东莞市",
private
Stri
ng
departTime
;
//": 30600,
private
lo
ng
departTime
;
//": 30600,
private
String
longitude
;
//": 113.9069685,
private
String
longitude
;
//": 113.9069685,
private
String
latitude
;
//": 23.0056826,
private
String
latitude
;
//": 23.0056826,
private
String
type
;
//": 0,
private
String
type
;
//": 0,
...
@@ -313,11 +313,11 @@ public class BeanTourDetailData extends BaseBean {
...
@@ -313,11 +313,11 @@ public class BeanTourDetailData extends BaseBean {
this
.
cityName
=
cityName
;
this
.
cityName
=
cityName
;
}
}
public
Stri
ng
getDepartTime
()
{
public
lo
ng
getDepartTime
()
{
return
departTime
;
return
departTime
;
}
}
public
void
setDepartTime
(
Stri
ng
departTime
)
{
public
void
setDepartTime
(
lo
ng
departTime
)
{
this
.
departTime
=
departTime
;
this
.
departTime
=
departTime
;
}
}
...
...
module_tourism/src/main/java/com/rv/tourism/dialog/TravelBookingDialog.java
View file @
a80f34e3
...
@@ -14,6 +14,7 @@ import android.widget.Toast;
...
@@ -14,6 +14,7 @@ import android.widget.Toast;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.rv.component.utils.DateUtils
;
import
com.rv.component.utils.DisplayUtil
;
import
com.rv.component.utils.DisplayUtil
;
import
com.rv.tourism.R
;
import
com.rv.tourism.R
;
import
com.rv.tourism.adapter.TravelBookingDepartureAdapter
;
import
com.rv.tourism.adapter.TravelBookingDepartureAdapter
;
...
@@ -130,7 +131,7 @@ public class TravelBookingDialog extends BaseDialog {
...
@@ -130,7 +131,7 @@ public class TravelBookingDialog extends BaseDialog {
List
<
BeanTourDetailData
.
DataBeanX
.
TourDepartVo
>
endDeparture
=
bean
.
getEndDeparture
();
List
<
BeanTourDetailData
.
DataBeanX
.
TourDepartVo
>
endDeparture
=
bean
.
getEndDeparture
();
if
(
listener
!=
null
&&
bean
!=
null
&&
endDeparture
!=
null
&&
tourDepartTimeVo
!=
null
&&
tourDepartVo
!=
null
)
{
if
(
listener
!=
null
&&
bean
!=
null
&&
endDeparture
!=
null
&&
tourDepartTimeVo
!=
null
&&
tourDepartVo
!=
null
)
{
BeanOrderParam
beanOrderParam
=
new
BeanOrderParam
();
BeanOrderParam
beanOrderParam
=
new
BeanOrderParam
();
beanOrderParam
.
setEndTime
(
tourDepartTimeVo
.
getEndTime
());
beanOrderParam
.
setEndTime
(
tourDepartTimeVo
.
getEndTime
()
+
" "
+
DateUtils
.
secToTime
(
tourDepartVo
.
getDepartTime
())
);
beanOrderParam
.
setGoodId
(
bean
.
getId
());
beanOrderParam
.
setGoodId
(
bean
.
getId
());
beanOrderParam
.
setPrice
(
bean
.
getPrice
());
beanOrderParam
.
setPrice
(
bean
.
getPrice
());
beanOrderParam
.
setChildPrice
(
bean
.
getChildPrice
());
beanOrderParam
.
setChildPrice
(
bean
.
getChildPrice
());
...
@@ -142,7 +143,7 @@ public class TravelBookingDialog extends BaseDialog {
...
@@ -142,7 +143,7 @@ public class TravelBookingDialog extends BaseDialog {
beanOrderParam
.
setEndAddr
(
endDeparture
.
get
(
0
).
getAddress
());
beanOrderParam
.
setEndAddr
(
endDeparture
.
get
(
0
).
getAddress
());
beanOrderParam
.
setStartAddr
(
tourDepartVo
.
getProvinceName
()
+
tourDepartVo
.
getCityName
()
+
tourDepartVo
.
getAddress
());
beanOrderParam
.
setStartAddr
(
tourDepartVo
.
getProvinceName
()
+
tourDepartVo
.
getCityName
()
+
tourDepartVo
.
getAddress
());
beanOrderParam
.
setStartTime
(
tourDepartTimeVo
.
getStartTime
());
beanOrderParam
.
setStartTime
(
tourDepartTimeVo
.
getStartTime
()
+
" "
+
DateUtils
.
secToTime
(
tourDepartVo
.
getDepartTime
())
);
beanOrderParam
.
setStartCompanyId
(
tourDepartVo
.
getCompanyId
());
beanOrderParam
.
setStartCompanyId
(
tourDepartVo
.
getCompanyId
());
beanOrderParam
.
setStartCompanyName
(
tourDepartVo
.
getName
());
beanOrderParam
.
setStartCompanyName
(
tourDepartVo
.
getName
());
beanOrderParam
.
setSiteId
(
tourDepartVo
.
getId
());
beanOrderParam
.
setSiteId
(
tourDepartVo
.
getId
());
...
...
module_tourism/src/main/java/com/rv/tourism/other/TravelerConfirmOrderActivity.java
View file @
a80f34e3
...
@@ -145,7 +145,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -145,7 +145,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
private
double
couponAmount
=
0
;
//优惠券金额
private
double
couponAmount
=
0
;
//优惠券金额
private
String
status
=
"1"
;
// 优惠券状态
private
String
status
=
"1"
;
// 优惠券状态
private
String
inviterPhone
;
private
String
inviterPhone
;
private
List
<
String
>
couponIdList
=
new
ArrayList
<>();
//选中优惠券
private
List
<
String
>
couponIdList
=
new
ArrayList
<>();
//选中优惠券
...
@@ -366,7 +366,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -366,7 +366,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
if
(
isInsuranceType
==
1
)
{
if
(
isInsuranceType
==
1
)
{
long
day
=
DateUtils
.
compareDateDay
(
dataBean
.
getEndTime
(),
dataBean
.
getStartTime
(
));
long
day
=
DateUtils
.
compareDateDay
(
DateUtils
.
formatDate16
(
dataBean
.
getEndTime
()),
DateUtils
.
formatDate16
(
dataBean
.
getStartTime
()
));
OrderPriceDetailBean
.
ChildrenBean
childrenBean3
=
new
OrderPriceDetailBean
.
ChildrenBean
();
OrderPriceDetailBean
.
ChildrenBean
childrenBean3
=
new
OrderPriceDetailBean
.
ChildrenBean
();
childrenBean3
.
setKey
(
"保险费用"
);
childrenBean3
.
setKey
(
"保险费用"
);
childrenBean3
.
setDetail
(
"¥"
+
info
.
getData
().
getInsurePrice
()
+
"/人 *"
+
(
adultNum
+
childNum
)
+
"人 *"
+
day
+
"天"
);
childrenBean3
.
setDetail
(
"¥"
+
info
.
getData
().
getInsurePrice
()
+
"/人 *"
+
(
adultNum
+
childNum
)
+
"人 *"
+
day
+
"天"
);
...
@@ -545,14 +545,14 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -545,14 +545,14 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
idList
.
add
(
bean
.
getId
());
idList
.
add
(
bean
.
getId
());
}
}
String
ids
=
idList
.
toString
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
);
String
ids
=
idList
.
toString
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
);
String
endTime
=
""
+
DateUtil
.
getDateByYYYYMMDD_java
(
dataBean
.
getEndTime
());
String
endTime
=
""
+
DateUtil
s
.
StringToTimeMillis2
(
dataBean
.
getEndTime
());
String
startTime
=
""
+
DateUtil
.
getDateByYYYYMMDD_java
(
dataBean
.
getStartTime
());
String
startTime
=
""
+
DateUtil
s
.
StringToTimeMillis2
(
dataBean
.
getStartTime
());
String
couponIds
=
couponIdList
.
toString
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
" "
,
""
);
String
couponIds
=
couponIdList
.
toString
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
" "
,
""
);
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
postBodyData
(
RvFrameConfig
.
ADMIN_POST
,
0
,
TourismApi
.
COMMIT_ORDER
,
BeanTourOrderResponse
.
class
,
new
Tourist
(
etMailbox
.
getText
().
toString
().
trim
(),
name
,
phone
,
dataBean
.
getEndAddr
(),
endTime
,
dataBean
.
getGoodId
(),
ids
,
dataBean
.
getSpePriceId
(),
dataBean
.
getStartAddr
(),
dataBean
.
getStartCompanyId
(),
startTime
,
dataBean
.
getSiteId
(),
isInsuranceType
,
couponIds
,
inviterPhone
),
headMap
,
true
);
mPresenter
.
postBodyData
(
RvFrameConfig
.
ADMIN_POST
,
0
,
TourismApi
.
COMMIT_ORDER
,
BeanTourOrderResponse
.
class
,
new
Tourist
(
etMailbox
.
getText
().
toString
().
trim
(),
name
,
phone
,
dataBean
.
getEndAddr
(),
endTime
,
dataBean
.
getGoodId
(),
ids
,
dataBean
.
getSpePriceId
(),
dataBean
.
getStartAddr
(),
dataBean
.
getStartCompanyId
(),
startTime
,
dataBean
.
getSiteId
(),
isInsuranceType
,
couponIds
,
inviterPhone
),
headMap
,
true
);
}
}
...
@@ -605,33 +605,38 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -605,33 +605,38 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
detailPw
=
new
OrderPriceDetailPw
(
mActivity
)
{
detailPw
=
new
OrderPriceDetailPw
(
mActivity
)
{
};
};
}
}
if
(
detailPw
!=
null
)
{
detailPw
.
setNewData
(
orderPriceDetailBean
);
detailPw
.
setNewData
(
orderPriceDetailBean
);
View
contentView
=
detailPw
.
getContentView
();
detailPw
.
show
();
}
/* View contentView = detailPw.getContentView();
//需要先测量,PopupWindow还未弹出时,宽高为0
//需要先测量,PopupWindow还未弹出时,宽高为0
contentView.measure(makeDropDownMeasureSpec(detailPw.getWidth()), makeDropDownMeasureSpec(detailPw.getHeight()));
contentView.measure(makeDropDownMeasureSpec(detailPw.getWidth()), makeDropDownMeasureSpec(detailPw.getHeight()));
int offsetX = Math.abs(detailPw.getContentView().getMeasuredWidth() - view.getWidth()) / 2;
int offsetX = Math.abs(detailPw.getContentView().getMeasuredWidth() - view.getWidth()) / 2;
int offsetY = -(detailPw.getContentView().getMeasuredHeight() + view.getHeight());
int offsetY = -(detailPw.getContentView().getMeasuredHeight() + view.getHeight());
PopupWindowCompat
.
showAsDropDown
(
detailPw
,
view
,
offsetX
,
offsetY
,
Gravity
.
START
);
PopupWindowCompat.showAsDropDown(detailPw, view, offsetX, offsetY, Gravity.START);
*/
/**
/**
* 点击popupWindow让背景变暗
* 点击popupWindow让背景变暗
*/
*/
final
WindowManager
.
LayoutParams
lp
=
getWindow
().
getAttributes
();
/*
final WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.alpha = 0.5f;//代表透明程度,范围为0 - 1.0f
lp.alpha = 0.5f;//代表透明程度,范围为0 - 1.0f
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow
().
setAttributes
(
lp
);
getWindow().setAttributes(lp);
*/
/**
/**
* 退出popupWindow时取消暗背景
* 退出popupWindow时取消暗背景
*/
*/
detailPw
.
setOnDismissListener
(
new
PopupWindow
.
OnDismissListener
()
{
/*
detailPw.setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override
@Override
public void onDismiss() {
public void onDismiss() {
lp.alpha = 1.0f;
lp.alpha = 1.0f;
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
getWindow().setAttributes(lp);
getWindow().setAttributes(lp);
}
}
});
});
*/
}
}
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/api/WalletApi.java
View file @
a80f34e3
...
@@ -39,4 +39,5 @@ public class WalletApi {
...
@@ -39,4 +39,5 @@ public class WalletApi {
//提现详情
//提现详情
public
static
String
HTTP_URL_WALLET_WITHDRAWDETAIL
=
RvFrameConfig
.
HOST_H5_DETAIL
+
"/h5/appHtml/view/withdrawDetail.html"
;
public
static
String
HTTP_URL_WALLET_WITHDRAWDETAIL
=
RvFrameConfig
.
HOST_H5_DETAIL
+
"/h5/appHtml/view/withdrawDetail.html"
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment