Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
杨凯
YDL-Component-Medical
Commits
e275670d
Commit
e275670d
authored
Jul 13, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加提现账号功能删除银行卡的方式
parent
a3c6a9df
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
158 additions
and
281 deletions
+158
-281
config.gradle
config.gradle
+2
-2
build.gradle
m-user/build.gradle
+3
-1
AndroidManifest.xml
m-user/src/main/AndroidManifest.xml
+2
-2
AddAccountActivity.kt
m-user/src/main/java/com/yidianling/user/mine/AddAccountActivity.kt
+57
-45
AddAliAccountFragment.kt
m-user/src/main/java/com/yidianling/user/mine/fragment/AddAliAccountFragment.kt
+0
-80
AddBankAccountFragment.kt
m-user/src/main/java/com/yidianling/user/mine/fragment/AddBankAccountFragment.kt
+0
-22
user_mine_img_yhk.jpg
m-user/src/main/res/drawable-xhdpi/user_mine_img_yhk.jpg
+0
-0
user_mine_activity_add_account.xml
m-user/src/main/res/layout/user_mine_activity_add_account.xml
+94
-12
user_mine_fragment_add_ali_account.xml
m-user/src/main/res/layout/user_mine_fragment_add_ali_account.xml
+0
-94
user_mine_fragment_add_bank_account.xml
m-user/src/main/res/layout/user_mine_fragment_add_bank_account.xml
+0
-23
No files found.
config.gradle
View file @
e275670d
ext
{
dev_mode
=
fals
e
//组件发布的时候需要设置为false
ydl2PublishVersion
=
"0.2.0.7"
dev_mode
=
tru
e
//组件发布的时候需要设置为false
ydl2PublishVersion
=
"0.2.0.7
-SNAPSHOT
"
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
...
...
m-user/build.gradle
View file @
e275670d
...
...
@@ -35,7 +35,9 @@ android {
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'proguard-rules.pro'
}
}
dataBinding
{
enabled
true
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
...
...
m-user/src/main/AndroidManifest.xml
View file @
e275670d
...
...
@@ -157,10 +157,10 @@
android:name=
".mine.EditAccountActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
<!--添加提现账号-->
<activity
android:name=
".mine.AddAccountActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".mine.RechargeResultActivity"
android:screenOrientation=
"portrait"
...
...
m-user/src/main/java/com/yidianling/user/mine/AddAccountActivity.kt
View file @
e275670d
package
com.yidianling.user.mine
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Intent
import
androidx.fragment.app.Fragment
import
androidx.viewpager.widget.ViewPager
import
android.view.View
import
com.ydl.ydlcommon.adapter.FragmentWithTabPagerAdapter
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.view.widgets.TopTabSelectLayout
import
android.os.Bundle
import
android.text.TextUtils
import
androidx.appcompat.app.AppCompatActivity
import
androidx.databinding.DataBindingUtil
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.utils.TransferCacheUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.R
import
com.yidianling.user.mine.fragment.AddAliAccountFragment
import
com.yidianling.user.mine.fragment.AddBankAccountFragment
import
com.yidianling.user.databinding.UserMineActivityAddAccountBinding
import
com.yidianling.user.mine.bean.AddAccountCmd
import
com.yidianling.user.mine.data.AppDataManager
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
kotlinx.android.synthetic.main.user_mine_activity_add_account.*
/**
* 添加提现帐号
*/
class
AddAccountActivity
:
BaseActivity
()
{
* @author liupeng
* 添加提现账号
* */
class
AddAccountActivity
:
AppCompatActivity
()
{
private
lateinit
var
binding
:
UserMineActivityAddAccountBinding
companion
object
{
fun
startForResult
(
activity
:
Activity
,
request
:
Int
)
{
...
...
@@ -26,46 +34,50 @@ class AddAccountActivity : BaseActivity() {
}
}
override
fun
getStatusViewOptions
():
StatusBarOptions
{
return
StatusBarOptions
(
true
,
true
)
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
binding
=
DataBindingUtil
.
setContentView
(
this
,
R
.
layout
.
user_mine_activity_add_account
)
btn_ensure
.
setOnClickListener
{
saveAccount
()
}
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
user_mine_activity_add_account
}
override
fun
initDataAndEvent
()
{
var
titles
=
mutableListOf
<
String
>()
titles
.
add
(
"支付宝"
)
titles
.
add
(
"银行卡"
)
var
fragments
=
mutableListOf
<
Fragment
>()
fragments
.
add
(
AddAliAccountFragment
())
fragments
.
add
(
AddBankAccountFragment
())
var
adapter
=
FragmentWithTabPagerAdapter
(
supportFragmentManager
,
titles
,
fragments
)
top_layout
.
setButtonTitle
(
"支付宝"
,
"银行卡"
)
top_layout
.
setSelectIndex
(
0
)
top_layout
.
setLineViewVisible
(
View
.
GONE
)
top_layout
.
setOnSelectTabClickListener
(
object
:
TopTabSelectLayout
.
OnSelectTabClickListener
{
override
fun
selectTabClickListener
(
index
:
Int
)
{
viewpager
.
currentItem
=
index
}
override
fun
onReturnClickListener
()
{
/**
* 保存支付宝帐号
*/
@SuppressLint
(
"CheckResult"
)
private
fun
saveAccount
()
{
var
account
=
et_account
.
text
.
trim
().
toString
()
if
(
TextUtils
.
isEmpty
(
account
))
{
ToastUtil
.
toastShort
(
"支付宝帐号不能为空"
)
return
}
})
viewpager
.
currentItem
=
0
viewpager
.
adapter
=
adapter
viewpager
.
addOnPageChangeListener
(
object
:
ViewPager
.
OnPageChangeListener
{
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
var
name
=
et_name
.
text
.
trim
().
toString
()
if
(
TextUtils
.
isEmpty
(
name
))
{
ToastUtil
.
toastShort
(
"姓名不能为空"
)
return
}
override
fun
onPageSelected
(
position
:
Int
)
{
top_layout
.
setSelectIndex
(
position
)
var
param
=
AddAccountCmd
(
name
,
account
,
"1"
)
AppDataManager
.
getHttp
().
addAccount
(
param
)
.
compose
(
RxUtils
.
resultData
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
if
(
it
==
null
)
{
ToastUtil
.
toastShort
(
"返回数据错误"
)
}
else
{
ToastUtil
.
toastShort
(
"添加帐号成功"
)
var
intent
=
Intent
()
TransferCacheUtils
.
putTransferData
(
ChooseAccountActivity
.
ADD_ACCOUNT_REQUEST_CODE
,
it
)
setResult
(
Activity
.
RESULT_OK
,
intent
)
finish
()
}
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
ToastUtil
.
toastShort
(
msg
)
}
})
}
...
...
m-user/src/main/java/com/yidianling/user/mine/fragment/AddAliAccountFragment.kt
deleted
100644 → 0
View file @
a3c6a9df
package
com.yidianling.user.mine.fragment
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Intent
import
android.text.TextUtils
import
com.yidianling.user.mine.ChooseAccountActivity
import
com.ydl.ydlcommon.base.BaseFragment
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.utils.TransferCacheUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.R
import
com.yidianling.user.mine.bean.AddAccountCmd
import
com.yidianling.user.mine.data.AppDataManager
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
kotlinx.android.synthetic.main.user_mine_fragment_add_ali_account.*
/**
* 添加支付宝帐号
*/
class
AddAliAccountFragment
:
BaseFragment
()
{
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
user_mine_fragment_add_ali_account
}
override
fun
initDataAndEvent
()
{
btn_ensure
.
setOnClickListener
{
saveAccount
()
}
}
/**
* 保存支付宝帐号
*/
@SuppressLint
(
"CheckResult"
)
private
fun
saveAccount
()
{
var
account
=
et_account
.
text
.
trim
().
toString
()
if
(
TextUtils
.
isEmpty
(
account
))
{
ToastUtil
.
toastShort
(
"支付宝帐号不能为空"
)
return
}
var
name
=
et_name
.
text
.
trim
().
toString
()
if
(
TextUtils
.
isEmpty
(
name
))
{
ToastUtil
.
toastShort
(
"姓名不能为空"
)
return
}
var
param
=
AddAccountCmd
(
name
,
account
,
"1"
)
// showProgressDialog("")
AppDataManager
.
getHttp
().
addAccount
(
param
)
.
compose
(
RxUtils
.
resultData
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
// dismissProgressDialog()
if
(
it
==
null
)
{
ToastUtil
.
toastShort
(
"返回数据错误"
)
}
else
{
ToastUtil
.
toastShort
(
"添加帐号成功"
)
var
intent
=
Intent
()
TransferCacheUtils
.
putTransferData
(
ChooseAccountActivity
.
ADD_ACCOUNT_REQUEST_CODE
,
it
)
activity
!!
.
setResult
(
Activity
.
RESULT_OK
,
intent
)
activity
!!
.
finish
()
}
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
// dismissProgressDialog()
ToastUtil
.
toastShort
(
msg
)
}
})
}
override
fun
initDataAndEventLazy
()
{
}
}
m-user/src/main/java/com/yidianling/user/mine/fragment/AddBankAccountFragment.kt
deleted
100644 → 0
View file @
a3c6a9df
package
com.yidianling.user.mine.fragment
import
com.ydl.ydlcommon.base.BaseFragment
import
com.yidianling.user.R
/**
* 添加银行卡(后续会增加添加银行卡功能,做成独立页面)
*/
class
AddBankAccountFragment
:
BaseFragment
()
{
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
user_mine_fragment_add_bank_account
}
override
fun
initDataAndEvent
()
{
}
override
fun
initDataAndEventLazy
()
{
}
}
m-user/src/main/res/drawable-xhdpi/user_mine_img_yhk.jpg
deleted
100644 → 0
View file @
a3c6a9df
12.3 KB
m-user/src/main/res/layout/user_mine_activity_add_account.xml
View file @
e275670d
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
"com.yidianling.user.mine.AddAccountActivity"
>
android:orientation=
"vertical"
>
<com.ydl.ydlcommon.view.TitleBar
android:id=
"@+id/title_bar"
...
...
@@ -21,15 +21,97 @@
android:background=
"#e5e5e5"
/>
<com.ydl.ydlcommon.view.widgets.TopTabSelectLayout
android:id=
"@+id/top_layout"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<View
style=
"@style/platform_viewline"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"111dp"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"支付宝帐号"
android:textColor=
"@color/black"
android:textSize=
"17sp"
/>
<EditText
android:id=
"@+id/et_account"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"@null"
android:inputType=
"textEmailAddress"
android:hint=
"请输入您的支付宝帐号"
android:textColor=
"@color/black"
android:textColorHint=
"@color/platform_color_999999"
android:textSize=
"17sp"
/>
</LinearLayout>
<View
style=
"@style/platform_viewline"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
/>
<androidx.viewpager.widget.ViewPager
android:id=
"@+id/viewpager"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
android:layout_height=
"50dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"111dp"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"姓名"
android:textColor=
"@color/black"
android:textSize=
"17sp"
/>
<EditText
android:id=
"@+id/et_name"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"@null"
android:hint=
"请输入您的姓名"
android:textColor=
"@color/black"
android:textColorHint=
"@color/platform_color_999999"
android:textSize=
"17sp"
/>
</LinearLayout>
<View
style=
"@style/platform_viewline"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
<com.ydl.ydlcommon.view.RoundCornerButton
android:id=
"@+id/btn_ensure"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginBottom=
"28dp"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:text=
"保存"
android:textColor=
"@color/white"
android:textSize=
"16sp"
app:pa_round_btn_bg=
"@color/platform_main_theme"
app:pa_round_btn_radio_size=
"4dp"
/>
</LinearLayout>
</LinearLayout>
</layout>
m-user/src/main/res/layout/user_mine_fragment_add_ali_account.xml
deleted
100644 → 0
View file @
a3c6a9df
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
"com.yidianling.user.mine.fragment.AddAliAccountFragment"
>
<View
style=
"@style/platform_viewline"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"111dp"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"支付宝帐号"
android:textColor=
"@color/black"
android:textSize=
"17sp"
/>
<EditText
android:id=
"@+id/et_account"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"@null"
android:inputType=
"textEmailAddress"
android:hint=
"请输入您的支付宝帐号"
android:textColor=
"@color/black"
android:textColorHint=
"@color/platform_color_999999"
android:textSize=
"17sp"
/>
</LinearLayout>
<View
style=
"@style/platform_viewline"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"111dp"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:text=
"姓名"
android:textColor=
"@color/black"
android:textSize=
"17sp"
/>
<EditText
android:id=
"@+id/et_name"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"@null"
android:hint=
"请输入您的姓名"
android:textColor=
"@color/black"
android:textColorHint=
"@color/platform_color_999999"
android:textSize=
"17sp"
/>
</LinearLayout>
<View
style=
"@style/platform_viewline"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
<com.ydl.ydlcommon.view.RoundCornerButton
android:id=
"@+id/btn_ensure"
style=
"?android:attr/borderlessButtonStyle"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginBottom=
"28dp"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:text=
"保存"
android:textColor=
"@color/white"
android:textSize=
"16sp"
app:pa_round_btn_bg=
"@color/platform_main_theme"
app:pa_round_btn_radio_size=
"4dp"
/>
</LinearLayout>
m-user/src/main/res/layout/user_mine_fragment_add_bank_account.xml
deleted
100644 → 0
View file @
a3c6a9df
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
tools:context=
"com.yidianling.user.mine.fragment.AddBankAccountFragment"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"100dp"
android:src=
"@drawable/user_mine_img_yhk"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"26dp"
android:text=
"近期会持续开通提现到银行卡,敬请期待......"
android:textColor=
"@color/platform_color_999999"
android:textSize=
"15sp"
/>
</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