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
5c3ed8de
Commit
5c3ed8de
authored
Oct 17, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单添加出促成人
parent
56b007ae
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
318 additions
and
20 deletions
+318
-20
ConfirmOrderActivity.java
.../rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
+9
-0
OrderDataBean.java
...om/rv/home/rv/module/ui/main/home/bean/OrderDataBean.java
+9
-0
rv_act_confim_order.xml
module_home/src/main/res/layout/rv_act_confim_order.xml
+40
-8
strings.xml
module_home/src/main/res/values/strings.xml
+2
-0
TravelerConfirmOrderActivity.java
...va/com/rv/tourism/other/TravelerConfirmOrderActivity.java
+28
-3
activity_confirm_order_travel.xml
...ism/src/main/res/layout/activity_confirm_order_travel.xml
+31
-0
MemberCenterActivity.java
...ber/src/main/java/com/rv.member/MemberCenterActivity.java
+3
-3
MemberOrderPostBodyBean.java
...main/java/com/rv.member/bean/MemberOrderPostBodyBean.java
+11
-1
MemberPresenter.java
...rc/main/java/com/rv.member/presenter/MemberPresenter.java
+2
-2
InviterPhoneDialog.java
.../src/main/java/com/rv.member/view/InviterPhoneDialog.java
+65
-0
MemberTopView.java
...ember/src/main/java/com/rv.member/view/MemberTopView.java
+23
-2
icon_member_close.png
..._member/src/main/res/drawable-xhdpi/icon_member_close.png
+0
-0
dialog_member_content_bg.xml
...member/src/main/res/drawable/dialog_member_content_bg.xml
+8
-0
shape_rv_bg_inviter_phone.xml
...ember/src/main/res/drawable/shape_rv_bg_inviter_phone.xml
+7
-0
dialog_inviter_phone.xml
plugin_member/src/main/res/layout/dialog_inviter_phone.xml
+63
-0
view_member_privilege.xml
plugin_member/src/main/res/layout/view_member_privilege.xml
+17
-1
No files found.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
View file @
5c3ed8de
...
@@ -17,6 +17,7 @@ import android.view.View;
...
@@ -17,6 +17,7 @@ import android.view.View;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.widget.CheckBox
;
import
android.widget.CheckBox
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.PopupWindow
;
import
android.widget.PopupWindow
;
...
@@ -157,6 +158,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -157,6 +158,8 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
TextView
tvCouponAmount
;
TextView
tvCouponAmount
;
@BindView
(
R2
.
id
.
rv_content_select
)
@BindView
(
R2
.
id
.
rv_content_select
)
FlowLayout
rvContentSelect
;
FlowLayout
rvContentSelect
;
@BindView
(
R2
.
id
.
edt_inviter_phone
)
EditText
edtInviterPhone
;
private
final
int
TYPE_REQUEST_DRIVING
=
3
;
private
final
int
TYPE_REQUEST_DRIVING
=
3
;
...
@@ -512,6 +515,12 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
...
@@ -512,6 +515,12 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
showToast
(
"请同意预定须知"
);
showToast
(
"请同意预定须知"
);
return
;
return
;
}
}
String
inviterPhone
=
edtInviterPhone
.
getText
().
toString
().
trim
()
;
if
(!
TextUtils
.
isEmpty
(
inviterPhone
)
&&
inviterPhone
.
length
()
!=
11
){
showToast
(
"请输入正确的邀请人手机号"
);
return
;
}
dataBean
.
setFacilitatePhone
(
inviterPhone
);
payType
=
1
;
payType
=
1
;
new
PaymentTypeSelection
(
mActivity
)
{
new
PaymentTypeSelection
(
mActivity
)
{
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/bean/OrderDataBean.java
View file @
5c3ed8de
...
@@ -51,6 +51,7 @@ public class OrderDataBean implements Serializable{
...
@@ -51,6 +51,7 @@ public class OrderDataBean implements Serializable{
private
int
damageSafe
;
//是否购买免赔 1--是 0--否
private
int
damageSafe
;
//是否购买免赔 1--是 0--否
private
int
rentFreeDay
;
//是否使用出租免费天数 1--是 0--否
private
int
rentFreeDay
;
//是否使用出租免费天数 1--是 0--否
private
String
tickerNos
;
//优惠券ids,逗号分割
private
String
tickerNos
;
//优惠券ids,逗号分割
private
String
facilitatePhone
;
// 促成人手机号
private
List
<
String
>
accompanyStrs
;
//随车物品参数
private
List
<
String
>
accompanyStrs
;
//随车物品参数
public
int
getDayNum
()
{
public
int
getDayNum
()
{
...
@@ -199,6 +200,14 @@ public class OrderDataBean implements Serializable{
...
@@ -199,6 +200,14 @@ public class OrderDataBean implements Serializable{
this
.
accompanyStrs
=
accompanyStrs
;
this
.
accompanyStrs
=
accompanyStrs
;
}
}
public
String
getFacilitatePhone
()
{
return
facilitatePhone
;
}
public
void
setFacilitatePhone
(
String
facilitatePhone
)
{
this
.
facilitatePhone
=
facilitatePhone
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"OrderDataBean{"
+
return
"OrderDataBean{"
+
...
...
module_home/src/main/res/layout/rv_act_confim_order.xml
View file @
5c3ed8de
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
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
Top
=
"@dimen/size_15"
android:padding=
"@dimen/size_15"
android:padding=
"@dimen/size_15"
>
android:padding
Top
=
"@dimen/size_15"
>
<ImageView
<ImageView
android:id=
"@+id/iv_goods"
android:id=
"@+id/iv_goods"
...
@@ -757,10 +757,10 @@
...
@@ -757,10 +757,10 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<TextView
<TextView
android:id=
"@+id/tv_item_caritem"
android:id=
"@+id/tv_item_caritem"
...
@@ -778,11 +778,11 @@
...
@@ -778,11 +778,11 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginLeft=
"@dimen/size_10"
android:paddingTop=
"@dimen/size_15"
android:paddingBottom=
"@dimen/size_15"
android:gravity=
"right"
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:gravity=
"right"
android:paddingTop=
"@dimen/size_15"
android:paddingBottom=
"@dimen/size_15"
android:text=
"选择"
android:text=
"选择"
android:textColor=
"@color/text_Gray"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_10"
/>
android:textSize=
"@dimen/text_10"
/>
...
@@ -824,6 +824,38 @@
...
@@ -824,6 +824,38 @@
android:textSize=
"@dimen/text_10"
/>
android:textSize=
"@dimen/text_10"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_15"
android:background=
"@color/colorWrite"
android:padding=
"@dimen/size_15"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_weight=
"1"
android:text=
"@string/rv_inviter_phone"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<EditText
android:inputType=
"phone"
android:maxLength=
"11"
android:id=
"@+id/edt_inviter_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:background=
"@color/colorWrite"
android:gravity=
"center_vertical"
android:hint=
"请输入邀请人手机号"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_12"
/>
</RelativeLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
module_home/src/main/res/values/strings.xml
View file @
5c3ed8de
...
@@ -93,6 +93,8 @@
...
@@ -93,6 +93,8 @@
<string
name=
"rv_passenger_security"
>
乘客座位保障
</string>
<string
name=
"rv_passenger_security"
>
乘客座位保障
</string>
<string
name=
"rv_personal_safety"
>
保人身安全
</string>
<string
name=
"rv_personal_safety"
>
保人身安全
</string>
<string
name=
"rv_reservation_know"
>
预定须知
</string>
<string
name=
"rv_reservation_know"
>
预定须知
</string>
<string
name=
"rv_inviter_phone"
>
邀请人
</string>
<string
name=
"rv_agreed_reservation_know"
>
同意预定须知和
</string>
<string
name=
"rv_agreed_reservation_know"
>
同意预定须知和
</string>
<string
name=
"rv_contract_agreement"
>
《合同协议》
</string>
<string
name=
"rv_contract_agreement"
>
《合同协议》
</string>
<string
name=
"rv_driving"
>
驾驶人
</string>
<string
name=
"rv_driving"
>
驾驶人
</string>
...
...
module_tourism/src/main/java/com/rv/tourism/other/TravelerConfirmOrderActivity.java
View file @
5c3ed8de
...
@@ -120,6 +120,8 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -120,6 +120,8 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
LinearLayout
llBottom
;
LinearLayout
llBottom
;
@BindView
(
R2
.
id
.
tv_coupon_amount
)
@BindView
(
R2
.
id
.
tv_coupon_amount
)
TextView
tvCouponAmount
;
TextView
tvCouponAmount
;
@BindView
(
R2
.
id
.
edt_inviter_phone
)
EditText
edtInviterPhone
;
private
static
final
int
SDK_ALI_PAY_FLAG
=
11
;
private
static
final
int
SDK_ALI_PAY_FLAG
=
11
;
private
BeanOrderParam
dataBean
;
private
BeanOrderParam
dataBean
;
...
@@ -143,6 +145,8 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -143,6 +145,8 @@ 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
List
<
String
>
couponIdList
=
new
ArrayList
<>();
//选中优惠券
private
List
<
String
>
couponIdList
=
new
ArrayList
<>();
//选中优惠券
...
@@ -419,7 +423,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -419,7 +423,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
.
withSerializable
(
"selectCoupon"
,
JSON
.
toJSONString
(
selectCouponList
))
.
withSerializable
(
"selectCoupon"
,
JSON
.
toJSONString
(
selectCouponList
))
.
navigation
(
this
,
134
);
.
navigation
(
this
,
134
);
}
}
}
else
if
(
id
==
R
.
id
.
iv_item_insurance_information
)
{
}
else
if
(
id
==
R
.
id
.
iv_item_insurance_information
)
{
//保险说明
//保险说明
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
.
withString
(
"title"
,
"保险说明"
)
.
withString
(
"title"
,
"保险说明"
)
...
@@ -491,6 +495,17 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -491,6 +495,17 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
return
;
return
;
}
}
inviterPhone
=
edtInviterPhone
.
getText
().
toString
().
trim
();
if
(!
TextUtils
.
isEmpty
(
inviterPhone
)
&&
inviterPhone
.
length
()
!=
11
)
{
showToast
(
"请输入正确的邀请人手机号"
);
edtInviterPhone
.
setFocusable
(
true
);
edtInviterPhone
.
setFocusableInTouchMode
(
true
);
edtInviterPhone
.
requestFocus
();
getWindow
().
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_ALWAYS_VISIBLE
);
edtInviterPhone
.
setSelection
(
inviterPhone
.
length
());
return
;
}
payType
=
1
;
payType
=
1
;
new
PaymentTypeSelection
(
mActivity
)
{
new
PaymentTypeSelection
(
mActivity
)
{
@Override
@Override
...
@@ -537,7 +552,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -537,7 +552,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
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
),
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
);
}
}
...
@@ -739,8 +754,9 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -739,8 +754,9 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
private
String
siteId
;
private
String
siteId
;
private
int
hasInsure
;
private
int
hasInsure
;
private
String
tickerNos
;
private
String
tickerNos
;
private
String
facilitatePhone
;
public
Tourist
(
String
contactEmail
,
String
contactMan
,
String
contactPhone
,
String
endAddr
,
String
endTime
,
String
goodId
,
String
tourUserIds
,
String
spePriceId
,
String
startAddr
,
String
startCompanyId
,
String
startTime
,
String
siteId
,
int
hasInsure
,
String
tickerNos
)
{
public
Tourist
(
String
contactEmail
,
String
contactMan
,
String
contactPhone
,
String
endAddr
,
String
endTime
,
String
goodId
,
String
tourUserIds
,
String
spePriceId
,
String
startAddr
,
String
startCompanyId
,
String
startTime
,
String
siteId
,
int
hasInsure
,
String
tickerNos
,
String
facilitatePhone
)
{
this
.
contactEmail
=
contactEmail
;
this
.
contactEmail
=
contactEmail
;
this
.
contactMan
=
contactMan
;
this
.
contactMan
=
contactMan
;
this
.
contactPhone
=
contactPhone
;
this
.
contactPhone
=
contactPhone
;
...
@@ -755,6 +771,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -755,6 +771,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
this
.
siteId
=
siteId
;
this
.
siteId
=
siteId
;
this
.
hasInsure
=
hasInsure
;
this
.
hasInsure
=
hasInsure
;
this
.
tickerNos
=
tickerNos
;
this
.
tickerNos
=
tickerNos
;
this
.
facilitatePhone
=
facilitatePhone
;
}
}
public
String
getContactEmail
()
{
public
String
getContactEmail
()
{
...
@@ -868,6 +885,14 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -868,6 +885,14 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
public
void
setTickerNos
(
String
tickerNos
)
{
public
void
setTickerNos
(
String
tickerNos
)
{
this
.
tickerNos
=
tickerNos
;
this
.
tickerNos
=
tickerNos
;
}
}
public
String
getFacilitatePhone
()
{
return
facilitatePhone
;
}
public
void
setFacilitatePhone
(
String
facilitatePhone
)
{
this
.
facilitatePhone
=
facilitatePhone
;
}
}
}
public
class
payBody
{
public
class
payBody
{
...
...
module_tourism/src/main/res/layout/activity_confirm_order_travel.xml
View file @
5c3ed8de
...
@@ -457,6 +457,37 @@
...
@@ -457,6 +457,37 @@
android:src=
"@drawable/tourism_rv_common_icon_notice"
/>
android:src=
"@drawable/tourism_rv_common_icon_notice"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_15"
android:background=
"@color/colorWrite"
android:padding=
"@dimen/size_15"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_weight=
"1"
android:text=
"邀请人"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<EditText
android:inputType=
"phone"
android:maxLength=
"11"
android:id=
"@+id/edt_inviter_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:background=
"@color/colorWrite"
android:gravity=
"center_vertical"
android:hint=
"请输入邀请人手机号"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_12"
/>
</RelativeLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_40"
android:layout_height=
"@dimen/size_40"
...
...
plugin_member/src/main/java/com/rv.member/MemberCenterActivity.java
View file @
5c3ed8de
...
@@ -260,7 +260,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
...
@@ -260,7 +260,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
private
int
payType
=
1
;
private
int
payType
=
1
;
private
PayListener
payListener
=
new
PayListener
()
{
private
PayListener
payListener
=
new
PayListener
()
{
@Override
@Override
public
void
pay
(
final
MemberListBean
.
MemberCard
card
)
{
public
void
pay
(
final
MemberListBean
.
MemberCard
card
,
final
String
phone
)
{
if
(!
isLogin
())
return
;
if
(!
isLogin
())
return
;
new
PaymentTypeSelection
(
MemberCenterActivity
.
this
)
{
new
PaymentTypeSelection
(
MemberCenterActivity
.
this
)
{
@Override
@Override
...
@@ -284,7 +284,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
...
@@ -284,7 +284,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
}
else
if
(
i
==
R
.
id
.
tv_pay_immediately
)
{
dismiss
();
dismiss
();
mPresenter
.
createOrder
(
card
,
2
);
mPresenter
.
createOrder
(
card
,
phone
,
2
);
}
}
}
}
},
R
.
id
.
iv_close
,
R
.
id
.
ll_item_wechat
,
R
.
id
.
ll_item_alipay
,
R
.
id
.
tv_pay_immediately
);
},
R
.
id
.
iv_close
,
R
.
id
.
ll_item_wechat
,
R
.
id
.
ll_item_alipay
,
R
.
id
.
tv_pay_immediately
);
...
@@ -309,7 +309,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
...
@@ -309,7 +309,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
public
interface
PayListener
{
public
interface
PayListener
{
void
pay
(
MemberListBean
.
MemberCard
card
);
void
pay
(
MemberListBean
.
MemberCard
card
,
String
phone
);
void
checkAgreement
(
boolean
hasAgree
);
void
checkAgreement
(
boolean
hasAgree
);
}
}
...
...
plugin_member/src/main/java/com/rv.member/bean/MemberOrderPostBodyBean.java
View file @
5c3ed8de
...
@@ -8,6 +8,7 @@ public class MemberOrderPostBodyBean {
...
@@ -8,6 +8,7 @@ public class MemberOrderPostBodyBean {
private
String
couponIds
;
private
String
couponIds
;
private
int
memberLevel
;
private
int
memberLevel
;
private
int
memberLevelId
;
private
int
memberLevelId
;
private
String
facilitatePhone
;
public
String
getCouponIds
()
{
public
String
getCouponIds
()
{
return
couponIds
;
return
couponIds
;
...
@@ -33,10 +34,19 @@ public class MemberOrderPostBodyBean {
...
@@ -33,10 +34,19 @@ public class MemberOrderPostBodyBean {
this
.
memberLevelId
=
memberLevelId
;
this
.
memberLevelId
=
memberLevelId
;
}
}
public
MemberOrderPostBodyBean
(
String
couponIds
,
int
memberLevel
,
int
memberLevelId
)
{
public
String
getFacilitatePhone
()
{
return
facilitatePhone
;
}
public
void
setFacilitatePhone
(
String
facilitatePhone
)
{
this
.
facilitatePhone
=
facilitatePhone
;
}
public
MemberOrderPostBodyBean
(
String
couponIds
,
int
memberLevel
,
int
memberLevelId
,
String
inviterPhone
)
{
this
.
couponIds
=
couponIds
;
this
.
couponIds
=
couponIds
;
this
.
memberLevel
=
memberLevel
;
this
.
memberLevel
=
memberLevel
;
this
.
memberLevelId
=
memberLevelId
;
this
.
memberLevelId
=
memberLevelId
;
this
.
facilitatePhone
=
inviterPhone
;
}
}
public
MemberOrderPostBodyBean
()
{
public
MemberOrderPostBodyBean
()
{
...
...
plugin_member/src/main/java/com/rv.member/presenter/MemberPresenter.java
View file @
5c3ed8de
...
@@ -52,9 +52,9 @@ public class MemberPresenter extends CommonPresenter {
...
@@ -52,9 +52,9 @@ public class MemberPresenter extends CommonPresenter {
}
}
}
}
public
void
createOrder
(
MemberListBean
.
MemberCard
card
,
int
position
)
{
public
void
createOrder
(
MemberListBean
.
MemberCard
card
,
String
phone
,
int
position
)
{
MemberOrderPostBodyBean
memberOrderPostBodyBean
=
new
MemberOrderPostBodyBean
(
""
,
card
.
getLevel
(),
card
.
getId
());
MemberOrderPostBodyBean
memberOrderPostBodyBean
=
new
MemberOrderPostBodyBean
(
""
,
card
.
getLevel
(),
card
.
getId
()
,
phone
);
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
());
...
...
plugin_member/src/main/java/com/rv.member/view/InviterPhoneDialog.java
0 → 100644
View file @
5c3ed8de
package
com
.
rv
.
member
.
view
;
import
android.content.Context
;
import
android.support.annotation.NonNull
;
import
android.text.TextUtils
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.Toast
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
import
com.ruiwenliu.wrapper.weight.ToastView
;
import
com.rv.member.R
;
public
class
InviterPhoneDialog
extends
BaseDialog
{
private
EditText
edtInviterPhone
;
private
Button
btnConfirm
;
private
ImageView
ivClose
;
public
InviterPhoneDialog
(
@NonNull
final
Context
context
,
String
phone
,
final
InputListener
listener
)
{
super
(
context
);
setDialogParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
CENTER
);
edtInviterPhone
=
findViewById
(
R
.
id
.
edt_inviter_phone
);
ivClose
=
findViewById
(
R
.
id
.
iv_close
);
if
(!
TextUtils
.
isEmpty
(
phone
))
{
edtInviterPhone
.
setText
(
phone
);
edtInviterPhone
.
setSelection
(
phone
.
length
());
}
btnConfirm
=
findViewById
(
R
.
id
.
btn_confirm
);
ivClose
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
dismiss
();
}
});
btnConfirm
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
String
phone
=
edtInviterPhone
.
getText
().
toString
().
trim
();
if
(!
TextUtils
.
isEmpty
(
phone
)
&&
phone
.
length
()
!=
11
)
{
ToastView
.
getInstance
(
context
).
showToastContent
(
"请输入正确的手机号"
,
Toast
.
LENGTH_SHORT
);
return
;
}
if
(
listener
!=
null
)
{
listener
.
input
(
phone
);
}
dismiss
();
}
});
}
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
dialog_inviter_phone
;
}
public
interface
InputListener
{
void
input
(
String
phone
);
}
}
plugin_member/src/main/java/com/rv.member/view/MemberTopView.java
View file @
5c3ed8de
...
@@ -50,6 +50,9 @@ public class MemberTopView extends LinearLayout {
...
@@ -50,6 +50,9 @@ public class MemberTopView extends LinearLayout {
private
GridView
gridview
;
private
GridView
gridview
;
private
MemberListBean
bean
;
private
MemberListBean
bean
;
private
View
viewLine
;
private
View
viewLine
;
private
TextView
tvInviterPhone
;
private
String
inviterPhone
;
private
MemberListBean
.
MemberCard
selectCard
;
private
MemberListBean
.
MemberCard
selectCard
;
...
@@ -66,6 +69,8 @@ public class MemberTopView extends LinearLayout {
...
@@ -66,6 +69,8 @@ public class MemberTopView extends LinearLayout {
private
OnClickListener
clickListener
;
private
OnClickListener
clickListener
;
private
InviterPhoneDialog
dialog
;
public
MemberTopView
(
Context
context
)
{
public
MemberTopView
(
Context
context
)
{
super
(
context
);
super
(
context
);
}
}
...
@@ -109,6 +114,7 @@ public class MemberTopView extends LinearLayout {
...
@@ -109,6 +114,7 @@ public class MemberTopView extends LinearLayout {
imgFreeTop
=
view
.
findViewById
(
R
.
id
.
img_free_top
);
imgFreeTop
=
view
.
findViewById
(
R
.
id
.
img_free_top
);
tvFreeTop
=
view
.
findViewById
(
R
.
id
.
tv_free_top
);
tvFreeTop
=
view
.
findViewById
(
R
.
id
.
tv_free_top
);
viewLine
=
view
.
findViewById
(
R
.
id
.
view_line
);
viewLine
=
view
.
findViewById
(
R
.
id
.
view_line
);
tvInviterPhone
=
view
.
findViewById
(
R
.
id
.
tv_inviter_phone
);
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
unlogin_view
.
setVisibility
(
View
.
VISIBLE
);
unlogin_view
.
setVisibility
(
View
.
VISIBLE
);
logined_view
.
setVisibility
(
View
.
GONE
);
logined_view
.
setVisibility
(
View
.
GONE
);
...
@@ -119,6 +125,21 @@ public class MemberTopView extends LinearLayout {
...
@@ -119,6 +125,21 @@ public class MemberTopView extends LinearLayout {
}
}
}
}
tvInviterPhone
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
dialog
==
null
)
{
dialog
=
new
InviterPhoneDialog
(
getContext
(),
inviterPhone
,
new
InviterPhoneDialog
.
InputListener
()
{
@Override
public
void
input
(
String
phone
)
{
inviterPhone
=
phone
;
}
});
}
dialog
.
show
();
}
});
addView
(
view
);
addView
(
view
);
}
}
...
@@ -174,7 +195,7 @@ public class MemberTopView extends LinearLayout {
...
@@ -174,7 +195,7 @@ public class MemberTopView extends LinearLayout {
return
;
return
;
}
}
if
(
listener
!=
null
)
{
if
(
listener
!=
null
)
{
listener
.
pay
(
selectCard
);
listener
.
pay
(
selectCard
,
inviterPhone
);
}
}
}
}
});
});
...
@@ -234,7 +255,7 @@ public class MemberTopView extends LinearLayout {
...
@@ -234,7 +255,7 @@ public class MemberTopView extends LinearLayout {
unlogin_view
.
setVisibility
(
View
.
GONE
);
unlogin_view
.
setVisibility
(
View
.
GONE
);
logined_view
.
setData
(
infoBean
);
logined_view
.
setData
(
infoBean
);
logined_view
.
setVisibility
(
View
.
VISIBLE
);
logined_view
.
setVisibility
(
View
.
VISIBLE
);
freeUseDay
=
infoBean
.
getData
().
getRentFreeDays
()
;
freeUseDay
=
infoBean
.
getData
().
getRentFreeDays
();
tvFreedayTop
.
setText
(
"免费用车"
+
freeUseDay
+
"天"
);
tvFreedayTop
.
setText
(
"免费用车"
+
freeUseDay
+
"天"
);
if
(
info
.
getIsMember
()
==
0
)
{
if
(
info
.
getIsMember
()
==
0
)
{
memberLevel
=
0
;
memberLevel
=
0
;
...
...
plugin_member/src/main/res/drawable-xhdpi/icon_member_close.png
0 → 100644
View file @
5c3ed8de
385 Bytes
plugin_member/src/main/res/drawable/dialog_member_content_bg.xml
0 → 100644
View file @
5c3ed8de
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!--背景颜色-->
<solid
android:color=
"#ffffff"
/>
<!--设置圆角的角度-->
<corners
android:radius=
"10dp"
/>
</shape>
plugin_member/src/main/res/drawable/shape_rv_bg_inviter_phone.xml
0 → 100644
View file @
5c3ed8de
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!--背景颜色-->
<solid
android:color=
"#F2F2F2"
/>
<!--设置圆角的角度-->
<corners
android:radius=
"3dp"
/>
</shape>
plugin_member/src/main/res/layout/dialog_inviter_phone.xml
0 → 100644
View file @
5c3ed8de
<?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"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_25"
android:layout_marginRight=
"@dimen/size_25"
android:background=
"@drawable/dialog_member_content_bg"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
android:paddingLeft=
"13dp"
android:paddingRight=
"13dp"
>
<ImageView
android:id=
"@+id/iv_close"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"13dp"
android:src=
"@drawable/icon_member_close"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"邀请人手机号"
android:textColor=
"#171413"
android:textSize=
"@dimen/text_20"
/>
<EditText
android:id=
"@+id/edt_inviter_phone"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_45"
android:layout_marginTop=
"@dimen/size_22"
android:background=
"@drawable/shape_rv_bg_inviter_phone"
android:gravity=
"left|center_vertical"
android:hint=
"请输入邀请人手机号"
android:inputType=
"phone"
android:maxLength=
"11"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
android:textColorHint=
"#CCCCCC"
android:textSize=
"@dimen/sp_14"
/>
<Button
android:id=
"@+id/btn_confirm"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_40"
android:layout_marginTop=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:background=
"@drawable/shape_rv_bg_shallow_dark_yellow_circle"
android:gravity=
"center"
android:text=
"确定"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
plugin_member/src/main/res/layout/view_member_privilege.xml
View file @
5c3ed8de
...
@@ -148,6 +148,7 @@
...
@@ -148,6 +148,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"7dp"
android:layout_marginTop=
"7dp"
android:layout_marginLeft=
"@dimen/size_5"
android:layout_marginLeft=
"@dimen/size_5"
android:layout_marginRight=
"@dimen/size_15"
android:gravity=
"center_vertical|left"
android:gravity=
"center_vertical|left"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -162,13 +163,28 @@
...
@@ -162,13 +163,28 @@
<TextView
<TextView
android:id=
"@+id/tv_agreement"
android:id=
"@+id/tv_agreement"
android:layout_width=
"wrap_content"
android:layout_weight=
"1"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_30"
android:layout_height=
"@dimen/size_30"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
android:text=
"@string/tv_agreement"
android:text=
"@string/tv_agreement"
android:textSize=
"@dimen/sp_12"
/>
android:textSize=
"@dimen/sp_12"
/>
<TextView
android:inputType=
"phone"
android:maxLength=
"11"
android:id=
"@+id/tv_inviter_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:background=
"@color/colorWrite"
android:gravity=
"center_vertical"
android:text=
"请填写邀请人"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_12"
/>
</LinearLayout>
</LinearLayout>
...
...
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