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
581b4841
Commit
581b4841
authored
Oct 16, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钱包优化
parent
cbddaf15
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
855 additions
and
146 deletions
+855
-146
rv_dialog_paymant_type_selection.xml
.../src/main/res/layout/rv_dialog_paymant_type_selection.xml
+1
-1
rv_dialog_verified_tips.xml
...nt_dialog/src/main/res/layout/rv_dialog_verified_tips.xml
+1
-1
common_icon_wallet_alipay.png
...src/main/res/drawable-xhdpi/common_icon_wallet_alipay.png
+0
-0
common_icon_wallet_alipay_small.png
...in/res/drawable-xhdpi/common_icon_wallet_alipay_small.png
+0
-0
common_icon_wallet_weiwx.png
.../src/main/res/drawable-xhdpi/common_icon_wallet_weiwx.png
+0
-0
common_icon_wallet_weiwx_small.png
...ain/res/drawable-xhdpi/common_icon_wallet_weiwx_small.png
+0
-0
activity_mine.xml
module_mine/src/dev/res/layout/activity_mine.xml
+1
-0
WalletActivity.java
...rc/main/java/com/xxrv/wallet/activity/WalletActivity.java
+125
-2
WithdrawActivity.java
.../main/java/com/xxrv/wallet/activity/WithdrawActivity.java
+109
-13
AccountTypeAdapter.java
...main/java/com/xxrv/wallet/adapter/AccountTypeAdapter.java
+28
-0
WalletApi.java
...n_wallet/src/main/java/com/xxrv/wallet/api/WalletApi.java
+11
-2
AccountNumberListBean.java
...main/java/com/xxrv/wallet/bean/AccountNumberListBean.java
+117
-0
AuthResult.java
...wallet/src/main/java/com/xxrv/wallet/bean/AuthResult.java
+1
-0
WalletAuthInfoBean.java
...rc/main/java/com/xxrv/wallet/bean/WalletAuthInfoBean.java
+25
-0
AccountTypeSelectionDialog.java
...va/com/xxrv/wallet/dialog/AccountTypeSelectionDialog.java
+37
-0
ThirdPartyBindingDialog.java
.../java/com/xxrv/wallet/dialog/ThirdPartyBindingDialog.java
+25
-0
common_icon_wallet_hint.png
.../src/main/res/drawable-xxhdpi/common_icon_wallet_hint.png
+0
-0
activity_wallet.xml
plugin_wallet/src/main/res/layout/activity_wallet.xml
+89
-91
activity_withdraw.xml
plugin_wallet/src/main/res/layout/activity_withdraw.xml
+45
-36
item_account_type.xml
plugin_wallet/src/main/res/layout/item_account_type.xml
+46
-0
rv_dialog_account_type_selection.xml
.../src/main/res/layout/rv_dialog_account_type_selection.xml
+90
-0
rv_dialog_third_party_binding.xml
...let/src/main/res/layout/rv_dialog_third_party_binding.xml
+104
-0
No files found.
component_dialog/src/main/res/layout/rv_dialog_paymant_type_selection.xml
View file @
581b4841
...
...
@@ -48,7 +48,7 @@
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/text_16"
android:textColor=
"@color/colorAuxiliaryRed"
android:text=
"¥
3290
0"
/>
android:text=
"¥0"
/>
</LinearLayout>
<LinearLayout
...
...
component_dialog/src/main/res/layout/rv_dialog_verified_tips.xml
View file @
581b4841
...
...
@@ -52,7 +52,7 @@
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"我
在
想想"
/>
android:text=
"我
再
想想"
/>
<View
android:layout_width=
"@dimen/size_half"
...
...
component_resource/src/main/res/drawable-xhdpi/common_icon_wallet_alipay.png
0 → 100644
View file @
581b4841
1.29 KB
component_resource/src/main/res/drawable-xhdpi/common_icon_wallet_alipay_small.png
0 → 100644
View file @
581b4841
1001 Bytes
component_resource/src/main/res/drawable-xhdpi/common_icon_wallet_weiwx.png
0 → 100644
View file @
581b4841
1016 Bytes
component_resource/src/main/res/drawable-xhdpi/common_icon_wallet_weiwx_small.png
0 → 100644
View file @
581b4841
910 Bytes
module_mine/src/dev/res/layout/activity_mine.xml
View file @
581b4841
...
...
@@ -293,6 +293,7 @@
</RelativeLayout>
<LinearLayout
android:id=
"@+id/ll_item_view_privileges"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_alignParentBottom=
"true"
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/activity/WalletActivity.java
View file @
581b4841
package
com
.
xxrv
.
wallet
.
activity
;
import
android.annotation.SuppressLint
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Message
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.alipay.sdk.app.AuthTask
;
import
com.frame.base.bus.IDCardCertificationEvent
;
import
com.frame.base.bus.Observer
;
import
com.frame.base.bus.RxBus
;
...
...
@@ -23,8 +28,12 @@ import com.rv.component.dialog.VerifiedTipsDialog;
import
com.xxrv.wallet.R
;
import
com.xxrv.wallet.R2
;
import
com.xxrv.wallet.api.WalletApi
;
import
com.xxrv.wallet.bean.AccountNumberListBean
;
import
com.xxrv.wallet.bean.AuthResult
;
import
com.xxrv.wallet.bean.WalletAuthInfoBean
;
import
com.xxrv.wallet.bean.WalletBean
;
import
com.xxrv.wallet.bean.WalletCheckPwdBean
;
import
com.xxrv.wallet.dialog.ThirdPartyBindingDialog
;
import
com.xxrv.wallet.event.SetPasswordSuccessEvent
;
import
com.xxrv.wallet.presenter.WalletPresenter
;
import
com.yuyife.okgo.OkGoUtil
;
...
...
@@ -54,7 +63,7 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
private
String
balance
;
private
BeanUserInfo
.
UserInfo
userInfo
;
private
static
final
int
SDK_AUTH_FLAG
=
2
;
@Override
...
...
@@ -113,6 +122,40 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
case
1
:
setCheckPwd
((
WalletCheckPwdBean
)
result
);
break
;
case
2
:
alipayAuthV2
((
WalletAuthInfoBean
)
result
);
break
;
case
4
:
isAccountNumber
((
AccountNumberListBean
)
result
);
break
;
}
}
private
void
isAccountNumber
(
AccountNumberListBean
result
)
{
if
(
result
!=
null
&&
result
.
getData
()
!=
null
&&
result
.
getData
().
size
()
>
0
)
{
startActivity
(
WithdrawActivity
.
getIntent
(
mActivity
,
balance
));
}
else
{
new
ThirdPartyBindingDialog
(
mActivity
)
{
@Override
public
void
helper
(
ViewHolder
helper
)
{
super
.
helper
(
helper
);
helper
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
int
id
=
v
.
getId
();
if
(
id
==
R
.
id
.
ll_item_alipay
)
{
//支付宝绑定
getAuthInfo
();
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_wechat
)
{
//微信绑定
dismiss
();
}
}
},
R
.
id
.
ll_item_alipay
,
R
.
id
.
ll_item_wechat
);
}
}.
show
();
}
}
...
...
@@ -208,10 +251,90 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
private
void
setCheckPwd
(
WalletCheckPwdBean
bean
)
{
if
(
bean
!=
null
)
{
if
(
bean
.
isData
())
{
//true-设置过;false-没有
startActivity
(
WithdrawActivity
.
getIntent
(
mActivity
,
balance
)
);
getAccountNumber
(
);
}
else
{
startActivity
(
SetPayPwdActivity
.
getIntent
(
mActivity
,
0
));
}
}
}
private
void
getAuthInfo
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"apiName"
,
"com.xinxin.rv"
);
map
.
put
(
"appName"
,
"滴房车"
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
2
,
WalletApi
.
HTTP_URL_WALLET_UNAUTH_GETPARAM
,
WalletAuthInfoBean
.
class
,
map
,
false
);
}
private
void
getAccountNumber
()
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
getDataHead
(
RvFrameConfig
.
HOST
,
4
,
WalletApi
.
HTTP_URL_WALLET_ACCOUNT_NUMBER
,
AccountNumberListBean
.
class
,
headMap
,
false
);
}
/**
* 支付宝授权
*/
private
void
alipayAuthV2
(
final
WalletAuthInfoBean
bean
)
{
Runnable
authRunnable
=
new
Runnable
()
{
@Override
public
void
run
()
{
// 构造AuthTask 对象
AuthTask
authTask
=
new
AuthTask
(
WalletActivity
.
this
);
// 调用授权接口,获取授权结果
Map
<
String
,
String
>
result
=
authTask
.
authV2
(
bean
.
getData
(),
true
);
Message
msg
=
new
Message
();
msg
.
what
=
SDK_AUTH_FLAG
;
msg
.
obj
=
result
;
mHandler
.
sendMessage
(
msg
);
}
};
// 必须异步调用
Thread
authThread
=
new
Thread
(
authRunnable
);
authThread
.
start
();
}
@SuppressLint
(
"HandlerLeak"
)
private
Handler
mHandler
=
new
Handler
()
{
@SuppressWarnings
(
"unused"
)
public
void
handleMessage
(
Message
msg
)
{
switch
(
msg
.
what
)
{
case
SDK_AUTH_FLAG:
{
@SuppressWarnings
(
"unchecked"
)
AuthResult
authResult
=
new
AuthResult
((
Map
<
String
,
String
>)
msg
.
obj
,
true
);
String
resultStatus
=
authResult
.
getResultStatus
();
// 判断resultStatus 为“9000”且result_code
// 为“200”则代表授权成功,具体状态码代表含义可参考授权接口文档
if
(
TextUtils
.
equals
(
resultStatus
,
"9000"
)
&&
TextUtils
.
equals
(
authResult
.
getResultCode
(),
"200"
))
{
// 传入,则支付账户为该授权账户
putAlipayCode
(
authResult
.
getAuthCode
());
showToast
(
authResult
.
toString
());
}
else
{
// 其他状态值则为授权失败
showToast
(
authResult
.
toString
());
}
break
;
}
default
:
break
;
}
}
};
private
void
putAlipayCode
(
String
code
)
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"code"
,
code
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
3
,
WalletApi
.
HTTP_URL_WALLET_ALIPAY_GETUSERINFO
,
BaseBean
.
class
,
map
,
headMap
,
false
);
}
}
plugin_wallet/src/main/java/com/xxrv/wallet/activity/WithdrawActivity.java
View file @
581b4841
...
...
@@ -6,10 +6,12 @@ import android.os.Bundle;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.frame.base.bus.RxBus
;
import
com.frame.base.bus.WithdrawSuccessEvent
;
import
com.frame.base.url.Constance
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -20,18 +22,20 @@ import com.rv.home.rv.module.ApiConfig;
import
com.xxrv.wallet.R
;
import
com.xxrv.wallet.R2
;
import
com.xxrv.wallet.api.WalletApi
;
import
com.xxrv.wallet.bean.AccountNumberListBean
;
import
com.xxrv.wallet.bean.AlipayListBean
;
import
com.xxrv.wallet.bean.CheckAmountBean
;
import
com.xxrv.wallet.bean.WithdrawBean
;
import
com.xxrv.wallet.bean.WithdrawalRulesBean
;
import
com.xxrv.wallet.dialog.AccountTypeSelectionDialog
;
import
com.xxrv.wallet.dialog.PayPassDialog
;
import
com.xxrv.wallet.dialog.VerifyAccountHintDialog
;
import
com.frame.base.bus.WithdrawSuccessEvent
;
import
com.xxrv.wallet.presenter.WalletPresenter
;
import
com.xxrv.wallet.view.PayPassView
;
import
com.yuyife.okgo.OkGoUtil
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
butterknife.BindView
;
...
...
@@ -43,15 +47,20 @@ import butterknife.OnClick;
*/
public
class
WithdrawActivity
extends
BaseStatusActivity
<
WalletPresenter
>
{
@BindView
(
R2
.
id
.
et_account_number
)
EditText
etAccountNumber
;
@BindView
(
R2
.
id
.
et_withdrawal_amount
)
EditText
etWithdrawalAmount
;
@BindView
(
R2
.
id
.
tv_hint
)
TextView
tvHint
;
@BindView
(
R2
.
id
.
iv_account_number_icon
)
ImageView
ivAccountNumberIcon
;
@BindView
(
R2
.
id
.
tv_account_number
)
TextView
tvAccountNumber
;
private
String
accountNumber
;
private
String
withdrawalAmount
;
private
List
<
AccountNumberListBean
.
DataBean
>
accountNumberList
;
private
AccountNumberListBean
.
DataBean
selectAccountNumber
;
public
static
Intent
getIntent
(
Context
context
,
String
balance
)
{
...
...
@@ -73,10 +82,19 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
@Override
protected
void
loadData
(
Bundle
savedInstanceState
,
Intent
intent
)
{
super
.
loadData
(
savedInstanceState
,
intent
);
getAliPayList
();
getAccountNumber
();
// getAliPayList();
getWithdrawalRules
();
}
private
void
getAccountNumber
()
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
getDataHead
(
RvFrameConfig
.
HOST
,
5
,
WalletApi
.
HTTP_URL_WALLET_ACCOUNT_NUMBER
,
AccountNumberListBean
.
class
,
headMap
,
false
);
}
/**
* 提现规则
*/
...
...
@@ -117,10 +135,35 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
finish
();
}
break
;
case
5
:
AccountNumberListBean
bean2
=
(
AccountNumberListBean
)
result
;
accountNumberList
=
bean2
.
getData
();
setAccountNumber
(
bean2
);
break
;
}
}
/**
* 设置帐号信息
*
* @param result
*/
private
void
setAccountNumber
(
AccountNumberListBean
result
)
{
if
(
result
!=
null
&&
result
.
getData
()
!=
null
&&
result
.
getData
().
size
()
>
0
)
{
AccountNumberListBean
.
DataBean
dataBean
=
result
.
getData
().
get
(
0
);
selectAccountNumber
=
dataBean
;
dataBean
.
setCheck
(
true
);
if
(
dataBean
.
getType
()
==
1
)
{
//1支付宝 2微信
ivAccountNumberIcon
.
setImageResource
(
R
.
drawable
.
common_icon_wallet_alipay_small
);
tvAccountNumber
.
setText
(
"支付宝余额("
+
dataBean
.
getNickname
()
+
")"
);
}
else
if
(
dataBean
.
getType
()
==
2
)
{
ivAccountNumberIcon
.
setImageResource
(
R
.
drawable
.
common_icon_wallet_weiwx_small
);
tvAccountNumber
.
setText
(
"微信零钱("
+
dataBean
.
getNickname
()
+
")"
);
}
}
}
/**
* 检查提现下一步操作
*
...
...
@@ -162,12 +205,12 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
private
void
getAlipay
(
AlipayListBean
bean
)
{
if
(
bean
.
getData
()
!=
null
&&
bean
.
getData
().
size
()
>
0
)
{
etAccountNumber
.
setText
(
bean
.
getData
().
get
(
0
).
getTxAlipay
());
etAccountNumber
.
setSelection
(
bean
.
getData
().
get
(
0
).
getTxAlipay
().
length
());
//
etAccountNumber.setText(bean.getData().get(0).getTxAlipay());
//
etAccountNumber.setSelection(bean.getData().get(0).getTxAlipay().length());
}
}
@OnClick
({
R2
.
id
.
tv_item_withdraw
,
R2
.
id
.
tv_item_withdrawal_rules
})
@OnClick
({
R2
.
id
.
tv_item_withdraw
,
R2
.
id
.
tv_item_withdrawal_rules
,
R2
.
id
.
ll_item_select_account_number
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
tv_item_withdraw
)
{
...
...
@@ -181,18 +224,71 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withInt
(
"type"
,
20
)
.
navigation
();
}
else
if
(
id
==
R
.
id
.
ll_item_select_account_number
)
{
selectShow
();
}
}
/**
* 选择帐号
*/
private
void
selectShow
()
{
new
AccountTypeSelectionDialog
(
mActivity
)
{
@Override
public
void
helper
(
final
ViewHolder
helper
)
{
super
.
helper
(
helper
);
if
(
accountNumberList
!=
null
&&
accountNumberList
.
size
()
>
0
)
{
AccountNumberListBean
.
DataBean
dataBean1
=
accountNumberList
.
get
(
0
);
if
(
dataBean1
.
getType
()
==
1
)
{
helper
.
setText
(
R
.
id
.
tv_name1
,
"支付宝余额("
+
dataBean1
.
getNickname
()
+
")"
);
helper
.
setImageResource
(
R
.
id
.
iv_icon1
,
R
.
drawable
.
common_icon_wallet_alipay
);
}
else
if
(
dataBean1
.
getType
()
==
2
)
{
helper
.
setText
(
R
.
id
.
tv_name1
,
"微信零钱("
+
dataBean1
.
getNickname
()
+
")"
);
helper
.
setImageResource
(
R
.
id
.
iv_icon1
,
R
.
drawable
.
common_icon_wallet_weiwx
);
}
ImageView
select
=
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_select1
);
if
(
dataBean1
.
getCheck
())
{
select
.
setSelected
(
true
);
}
else
{
select
.
setSelected
(
false
);
}
}
helper
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
int
id
=
v
.
getId
();
AccountNumberListBean
.
DataBean
dataBean
=
null
;
if
(
id
==
R
.
id
.
iv_close
)
{
dismiss
();
}
else
if
(
id
==
R
.
id
.
ll_item_select1
)
{
dataBean
=
accountNumberList
.
get
(
0
);
ImageView
select
=
(
ImageView
)
helper
.
getView
(
R
.
id
.
iv_select1
);
if
(
dataBean
.
getCheck
())
{
select
.
setSelected
(
true
);
}
else
{
select
.
setSelected
(
false
);
}
}
else
if
(
id
==
R
.
id
.
tv_ok
)
{
selectAccountNumber
=
dataBean
;
dismiss
();
}
}
},
R
.
id
.
iv_close
,
R
.
id
.
ll_item_select1
,
R
.
id
.
tv_ok
);
}
}.
show
();
}
/**
* 提现
*/
private
void
showHint
()
{
accountNumber
=
etAccountNumber
.
getText
().
toString
().
trim
();
if
(
TextUtils
.
isEmpty
(
accountNumber
))
{
showToast
(
"帐户不能为空!"
);
return
;
}
//
accountNumber = etAccountNumber.getText().toString().trim();
//
if (TextUtils.isEmpty(accountNumber)) {
//
showToast("帐户不能为空!");
//
return;
//
}
withdrawalAmount
=
etWithdrawalAmount
.
getText
().
toString
().
trim
();
if
(
TextUtils
.
isEmpty
(
withdrawalAmount
))
{
...
...
@@ -254,7 +350,7 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
postBodyData
(
RvFrameConfig
.
VEHICLE_ORDER
,
4
,
WalletApi
.
HTTP_URL_WALLET_APPLYCATH
,
WithdrawBean
.
class
,
new
Withdraw
(
withdrawalAmount
,
passContent
,
accountNumber
,
"1"
),
headMap
,
true
);
mPresenter
.
postBodyData
(
RvFrameConfig
.
VEHICLE_ORDER
,
4
,
WalletApi
.
HTTP_URL_WALLET_APPLYCATH
,
WithdrawBean
.
class
,
new
Withdraw
(
withdrawalAmount
,
passContent
,
selectAccountNumber
.
getId
()
,
"1"
),
headMap
,
true
);
}
@Override
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/adapter/AccountTypeAdapter.java
0 → 100644
View file @
581b4841
package
com
.
xxrv
.
wallet
.
adapter
;
import
android.graphics.Color
;
import
android.graphics.drawable.Drawable
;
import
android.support.annotation.Nullable
;
import
android.text.TextUtils
;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.rv.component.utils.DateUtils
;
import
com.rv.component.utils.DisplayUtil
;
import
com.xxrv.wallet.R
;
import
com.xxrv.wallet.bean.WalletcathListBean
;
import
java.util.List
;
public
class
AccountTypeAdapter
extends
BaseQuickAdapter
<
String
,
BaseViewHolder
>
{
public
AccountTypeAdapter
()
{
super
(
R
.
layout
.
item_account_type
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
}
}
plugin_wallet/src/main/java/com/xxrv/wallet/api/WalletApi.java
View file @
581b4841
...
...
@@ -28,6 +28,15 @@ public class WalletApi {
//提现检查提现下一步操作
public
static
String
HTTP_URL_WALLET_CHECKAMOUNT
=
RvFrameConfig
.
HOST
+
"/api/admin/wallet/checkAmount"
;
//获取支付宝授权信息authInfo
public
static
String
HTTP_URL_WALLET_UNAUTH_GETPARAM
=
RvFrameConfig
.
HOST
+
"/api/universal/info/app/unauth/getParam"
;
//提交支付宝code
public
static
String
HTTP_URL_WALLET_ALIPAY_GETUSERINFO
=
RvFrameConfig
.
HOST
+
"/api/admin/alipay/getUserInfo"
;
//获取帐号信息
public
static
String
HTTP_URL_WALLET_ACCOUNT_NUMBER
=
RvFrameConfig
.
HOST
+
"/api/admin/alipay/get"
;
//提现详情
public
static
String
HTTP_URL_WALLET_WITHDRAWDETAIL
=
RvFrameConfig
.
HOST_H5_DETAIL
+
"/h5/appHtml/view/withdrawDetail.html"
;
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/bean/AccountNumberListBean.java
0 → 100644
View file @
581b4841
package
com
.
xxrv
.
wallet
.
bean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 获取支付账号列表
*/
public
class
AccountNumberListBean
extends
BaseBean
{
private
List
<
DataBean
>
data
;
private
boolean
rel
;
public
List
<
DataBean
>
getData
()
{
return
data
;
}
public
void
setData
(
List
<
DataBean
>
data
)
{
this
.
data
=
data
;
}
public
boolean
isRel
()
{
return
rel
;
}
public
void
setRel
(
boolean
rel
)
{
this
.
rel
=
rel
;
}
public
static
class
DataBean
implements
Serializable
{
private
String
id
;
// ":6,
private
int
userId
;
//":75,
private
String
txAlipay
;
//":"2088212169302286",
private
int
isDefault
;
//":0,
private
long
crtTime
;
//":1571125067723,
private
int
isDel
;
//":0,
private
String
nickname
;
//":"PeakLin",
private
int
type
;
//":1
private
boolean
check
;
public
boolean
getCheck
()
{
return
check
;
}
public
void
setCheck
(
boolean
check
)
{
this
.
check
=
check
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
int
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
int
userId
)
{
this
.
userId
=
userId
;
}
public
String
getTxAlipay
()
{
return
txAlipay
;
}
public
void
setTxAlipay
(
String
txAlipay
)
{
this
.
txAlipay
=
txAlipay
;
}
public
int
getIsDefault
()
{
return
isDefault
;
}
public
void
setIsDefault
(
int
isDefault
)
{
this
.
isDefault
=
isDefault
;
}
public
long
getCrtTime
()
{
return
crtTime
;
}
public
void
setCrtTime
(
long
crtTime
)
{
this
.
crtTime
=
crtTime
;
}
public
int
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
int
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
}
}
plugin_wallet/src/main/java/com/xxrv/wallet/bean/AuthResult.java
0 → 100644
View file @
581b4841
package
com
.
xxrv
.
wallet
.
bean
;
import
java.util.Map
;
import
android.text.TextUtils
;
public
class
AuthResult
{
private
String
resultStatus
;
private
String
result
;
private
String
memo
;
private
String
resultCode
;
private
String
authCode
;
private
String
alipayOpenId
;
public
AuthResult
(
Map
<
String
,
String
>
rawResult
,
boolean
removeBrackets
)
{
if
(
rawResult
==
null
)
{
return
;
}
for
(
String
key
:
rawResult
.
keySet
())
{
if
(
TextUtils
.
equals
(
key
,
"resultStatus"
))
{
resultStatus
=
rawResult
.
get
(
key
);
}
else
if
(
TextUtils
.
equals
(
key
,
"result"
))
{
result
=
rawResult
.
get
(
key
);
}
else
if
(
TextUtils
.
equals
(
key
,
"memo"
))
{
memo
=
rawResult
.
get
(
key
);
}
}
String
[]
resultValue
=
result
.
split
(
"&"
);
for
(
String
value
:
resultValue
)
{
if
(
value
.
startsWith
(
"alipay_open_id"
))
{
alipayOpenId
=
removeBrackets
(
getValue
(
"alipay_open_id="
,
value
),
removeBrackets
);
continue
;
}
if
(
value
.
startsWith
(
"auth_code"
))
{
authCode
=
removeBrackets
(
getValue
(
"auth_code="
,
value
),
removeBrackets
);
continue
;
}
if
(
value
.
startsWith
(
"result_code"
))
{
resultCode
=
removeBrackets
(
getValue
(
"result_code="
,
value
),
removeBrackets
);
continue
;
}
}
}
private
String
removeBrackets
(
String
str
,
boolean
remove
)
{
if
(
remove
)
{
if
(!
TextUtils
.
isEmpty
(
str
))
{
if
(
str
.
startsWith
(
"\""
))
{
str
=
str
.
replaceFirst
(
"\""
,
""
);
}
if
(
str
.
endsWith
(
"\""
))
{
str
=
str
.
substring
(
0
,
str
.
length
()
-
1
);
}
}
}
return
str
;
}
@Override
public
String
toString
()
{
return
"authCode={"
+
authCode
+
"}; resultStatus={"
+
resultStatus
+
"}; memo={"
+
memo
+
"}; result={"
+
result
+
"}"
;
}
private
String
getValue
(
String
header
,
String
data
)
{
return
data
.
substring
(
header
.
length
(),
data
.
length
());
}
public
String
getResultStatus
()
{
return
resultStatus
;
}
public
String
getMemo
()
{
return
memo
;
}
public
String
getResult
()
{
return
result
;
}
public
String
getResultCode
()
{
return
resultCode
;
}
public
String
getAuthCode
()
{
return
authCode
;
}
public
String
getAlipayOpenId
()
{
return
alipayOpenId
;
}
}
\ No newline at end of file
plugin_wallet/src/main/java/com/xxrv/wallet/bean/WalletAuthInfoBean.java
0 → 100644
View file @
581b4841
package
com
.
xxrv
.
wallet
.
bean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
public
class
WalletAuthInfoBean
extends
BaseBean
{
private
String
data
;
private
boolean
rel
;
public
String
getData
()
{
return
data
;
}
public
void
setData
(
String
data
)
{
this
.
data
=
data
;
}
public
boolean
isRel
()
{
return
rel
;
}
public
void
setRel
(
boolean
rel
)
{
this
.
rel
=
rel
;
}
}
plugin_wallet/src/main/java/com/xxrv/wallet/dialog/AccountTypeSelectionDialog.java
0 → 100644
View file @
581b4841
package
com
.
xxrv
.
wallet
.
dialog
;
import
android.content.Context
;
import
android.support.annotation.NonNull
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.xxrv.wallet.R
;
import
com.xxrv.wallet.adapter.AccountTypeAdapter
;
/**
* 提现账户选择
*/
public
class
AccountTypeSelectionDialog
extends
BaseDialog
{
public
AccountTypeSelectionDialog
(
@NonNull
Context
context
)
{
super
(
context
);
setDialogParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
BOTTOM
);
}
@Override
public
void
helper
(
ViewHolder
helper
)
{
super
.
helper
(
helper
);
}
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
rv_dialog_account_type_selection
;
}
}
plugin_wallet/src/main/java/com/xxrv/wallet/dialog/ThirdPartyBindingDialog.java
0 → 100644
View file @
581b4841
package
com
.
xxrv
.
wallet
.
dialog
;
import
android.content.Context
;
import
android.support.annotation.NonNull
;
import
android.view.Gravity
;
import
android.view.ViewGroup
;
import
com.ruiwenliu.wrapper.dialog.BaseDialog
;
import
com.xxrv.wallet.R
;
/**
* 第三方提现绑定
*/
public
class
ThirdPartyBindingDialog
extends
BaseDialog
{
public
ThirdPartyBindingDialog
(
@NonNull
Context
context
)
{
super
(
context
);
setDialogParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
Gravity
.
CENTER
);
}
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
rv_dialog_third_party_binding
;
}
}
plugin_wallet/src/main/res/drawable-xxhdpi/common_icon_wallet_hint.png
0 → 100644
View file @
581b4841
1.12 KB
plugin_wallet/src/main/res/layout/activity_wallet.xml
View file @
581b4841
This diff is collapsed.
Click to expand it.
plugin_wallet/src/main/res/layout/activity_withdraw.xml
View file @
581b4841
...
...
@@ -14,38 +14,48 @@
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll_item_select_account_number"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:background=
"@color/colorGrayBg"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_15"
android:text=
"到帐 支付宝账户"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_16"
/>
android:text=
"到账"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_14"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_60"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_15"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_account_number_icon"
android:layout_width=
"@dimen/size_20"
android:layout_height=
"@dimen/size_20"
android:layout_marginLeft=
"@dimen/size_20"
/>
<EditText
android:id=
"@+id/et_account_number"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
<TextView
android:id=
"@+id/tv_account_number"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_8"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"left|center_vertical"
android:hint=
"请输入到帐支付宝帐号"
android:digits=
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
android:ellipsize=
"end"
android:singleLine=
"true"
android:text=
""
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_14"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/common_icon_rig_gray"
/>
<include
layout=
"@layout/common_line"
/>
</LinearLayout>
<TextView
...
...
@@ -68,7 +78,6 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_30"
android:text=
"¥"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_23"
/>
...
...
@@ -79,9 +88,9 @@
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_15"
android:background=
"@null"
android:inputType=
"numberDecimal"
android:gravity=
"left|center_vertical"
android:hint=
"提现金额至少10元,单笔限额5万"
android:inputType=
"numberDecimal"
android:text=
""
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
...
...
@@ -89,11 +98,11 @@
</LinearLayout>
<View
android:background=
"@color/colorLine"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_half"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginRight=
"@dimen/size_15"
android:
layout_height=
"@dimen/size_half"
/>
android:
background=
"@color/colorLine"
/>
<TextView
android:id=
"@+id/tv_hint"
...
...
@@ -109,14 +118,14 @@
android:id=
"@+id/tv_item_withdraw"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:background=
"@drawable/shape_rv_bg_shallow_dark_yellow_circle"
android:gravity=
"center"
android:layout_marginTop=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_50"
android:layout_marginRight=
"@dimen/size_20"
android:background=
"@drawable/shape_rv_bg_shallow_dark_yellow_circle"
android:gravity=
"center"
android:text=
"提现"
android:text
Size=
"@dimen/text_16
"
android:text
Color=
"@color/colorWrite
"
/>
android:text
Color=
"@color/colorWrite
"
android:text
Size=
"@dimen/text_16
"
/>
</LinearLayout>
...
...
@@ -131,11 +140,11 @@
android:id=
"@+id/tv_item_withdrawal_rules"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableRight=
"@drawable/common_icon_rig_gray"
android:drawablePadding=
"@dimen/size_5"
android:paddingLeft=
"@dimen/size_30"
android:paddingRight=
"@dimen/size_30"
android:text=
"提现规则"
android:drawablePadding=
"@dimen/size_5"
android:drawableRight=
"@drawable/common_icon_rig_gray"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/text_14"
/>
...
...
plugin_wallet/src/main/res/layout/item_account_type.xml
0 → 100644
View file @
581b4841
<?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:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll_item_wechat"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_70"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableLeft=
"@drawable/common_icon_wechat_pay"
android:drawablePadding=
"@dimen/size_8"
android:text=
"微信支付"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
<ImageView
android:id=
"@+id/iv_wx_select"
android:layout_width=
"@dimen/size_16"
android:layout_height=
"@dimen/size_16"
android:src=
"@drawable/selector_rv_icon_mark"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_half"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginRight=
"@dimen/size_15"
android:background=
"@color/colorLine"
/>
</LinearLayout>
plugin_wallet/src/main/res/layout/rv_dialog_account_type_selection.xml
0 → 100644
View file @
581b4841
<?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"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_60"
android:paddingRight=
"@dimen/size_15"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:text=
"提现到"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:id=
"@+id/iv_close"
android:layout_width=
"@dimen/size_30"
android:layout_height=
"@dimen/size_30"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:padding=
"@dimen/size_5"
android:src=
"@drawable/common_btn_close"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
<LinearLayout
android:id=
"@+id/ll_item_select1"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_60"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<ImageView
android:id=
"@+id/iv_icon1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
<TextView
android:id=
"@+id/tv_name1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_8"
android:text=
""
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
<ImageView
android:id=
"@+id/iv_select1"
android:layout_width=
"@dimen/size_16"
android:layout_height=
"@dimen/size_16"
android:src=
"@drawable/selector_rv_icon_mark"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_half"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginRight=
"@dimen/size_15"
android:background=
"@color/colorLine"
/>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:background=
"@drawable/shape_rv_bg_dark_yellow"
android:gravity=
"center"
android:text=
"确定"
android:textColor=
"@color/colorWrite"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
\ No newline at end of file
plugin_wallet/src/main/res/layout/rv_dialog_third_party_binding.xml
0 → 100644
View file @
581b4841
<?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:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_40"
android:layout_marginRight=
"@dimen/size_40"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_60"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"提现绑定"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_18"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginRight=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_26"
android:text=
"提现有2种方式,提现到微信零钱或支付宝余额。需至少绑定一种方式:"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/size_16"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<LinearLayout
android:id=
"@+id/ll_item_alipay"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_weight=
"1"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"支付宝"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:layout_width=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
android:layout_marginTop=
"@dimen/size_10"
android:src=
"@drawable/common_icon_wallet_alipay"
/>
</LinearLayout>
<View
android:layout_width=
"@dimen/size_half"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:background=
"@color/colorLine"
/>
<LinearLayout
android:id=
"@+id/ll_item_wechat"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"微信"
android:textColor=
"@color/textMain"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:layout_width=
"@dimen/size_50"
android:layout_height=
"@dimen/size_50"
android:layout_marginTop=
"@dimen/size_10"
android:src=
"@drawable/common_icon_wallet_weiwx"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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