Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
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
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
bp
ShenghuoquanBusiness
Commits
ff018960
Commit
ff018960
authored
Jun 17, 2021
by
shiyuelong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 添加退出登录弹框
parent
ab460461
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
41 additions
and
48 deletions
+41
-48
ic_launcher.xml
...Lib/Common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+0
-5
ic_launcher_round.xml
...mmon/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+0
-5
MyStaffActivity.kt
.../shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
+8
-3
HintDialog.kt
...m/yidian/shenghuoquan/newscontent/ui/dialog/HintDialog.kt
+10
-2
SystemSettingActivity.kt
...nghuoquan/newscontent/ui/setting/SystemSettingActivity.kt
+20
-1
activity_system_setting.xml
...wscontent/src/main/res/layout/activity_system_setting.xml
+2
-2
ic_launcher.xml
...ewscontent/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+0
-5
ic_launcher_round.xml
...tent/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+0
-5
strings.xml
Components/newscontent/src/main/res/values/strings.xml
+1
-0
ic_launcher.xml
...s/userinfo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+0
-5
ic_launcher_round.xml
...info/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+0
-5
ic_launcher.xml
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+0
-5
ic_launcher_round.xml
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+0
-5
No files found.
CommonLib/Common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
CommonLib/Common/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
View file @
ff018960
package
com.yidian.shenghuoquan.newscontent.personnel.ui
package
com.yidian.shenghuoquan.newscontent.personnel.ui
import
android.os.Bundle
import
android.os.Bundle
import
com.orhanobut.hawk.Hawk
import
com.yidian.common.HawkConfig
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import
com.yidian.common.base.BaseActivity
import
com.yidian.common.base.BaseActivity
...
@@ -44,9 +46,12 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
...
@@ -44,9 +46,12 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
}
}
private
fun
requestAccountList
()
{
private
fun
requestAccountList
()
{
val
paramsMap
=
HashMap
<
String
,
String
?>()
val
lifeAccountId
=
Hawk
.
get
(
HawkConfig
.
LifeAccountId
,
""
)
paramsMap
[
"life_account_id"
]
=
"7470213157388289"
if
(
lifeAccountId
.
isNotBlank
())
{
PersonalRemoteDataSource
.
getAccountList
(
this
,
paramsMap
)
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"life_account_id"
]
=
lifeAccountId
PersonalRemoteDataSource
.
getAccountList
(
this
,
paramsMap
)
}
}
}
private
fun
initView
()
{
private
fun
initView
()
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/dialog/HintDialog.kt
View file @
ff018960
package
com.yidian.shenghuoquan.newscontent.ui.dialog
package
com.yidian.shenghuoquan.newscontent.ui.dialog
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.Context
import
android.os.Bundle
import
android.os.Bundle
import
android.view.View
import
android.view.View
...
@@ -26,10 +27,14 @@ class HintDialog(
...
@@ -26,10 +27,14 @@ class HintDialog(
val
callback
:
OnHintOptionCallback
?
val
callback
:
OnHintOptionCallback
?
)
:
BaseDialog
<
DialogHintBinding
>(
context
),
View
.
OnClickListener
{
)
:
BaseDialog
<
DialogHintBinding
>(
context
),
View
.
OnClickListener
{
private
var
leftBtnColor
:
Int
=
R
.
color
.
color_333333
private
var
rightBtnColor
:
Int
=
R
.
color
.
color_333333
override
fun
createViewBinding
():
DialogHintBinding
{
override
fun
createViewBinding
():
DialogHintBinding
{
return
DialogHintBinding
.
inflate
(
layoutInflater
)
return
DialogHintBinding
.
inflate
(
layoutInflater
)
}
}
@SuppressLint
(
"ResourceAsColor"
)
override
fun
initView
()
{
override
fun
initView
()
{
viewBinding
.
tvContent
.
text
=
content
viewBinding
.
tvContent
.
text
=
content
when
(
options
.
size
)
{
when
(
options
.
size
)
{
...
@@ -37,10 +42,13 @@ class HintDialog(
...
@@ -37,10 +42,13 @@ class HintDialog(
viewBinding
.
btnRight
.
text
=
options
[
0
].
option
viewBinding
.
btnRight
.
text
=
options
[
0
].
option
viewBinding
.
btnLeft
.
isVisible
=
false
viewBinding
.
btnLeft
.
isVisible
=
false
viewBinding
.
viewVerticalDivider
.
isVisible
=
false
viewBinding
.
viewVerticalDivider
.
isVisible
=
false
viewBinding
.
btnRight
.
setTextColor
(
rightBtnColor
)
}
}
2
->
{
2
->
{
viewBinding
.
btnLeft
.
text
=
options
[
0
].
option
viewBinding
.
btnLeft
.
text
=
options
[
0
].
option
viewBinding
.
btnRight
.
text
=
options
[
1
].
option
viewBinding
.
btnRight
.
text
=
options
[
1
].
option
viewBinding
.
btnLeft
.
setTextColor
(
leftBtnColor
)
viewBinding
.
btnRight
.
setTextColor
(
rightBtnColor
)
}
}
}
}
}
}
...
@@ -89,14 +97,14 @@ class HintDialog(
...
@@ -89,14 +97,14 @@ class HintDialog(
* 设置左侧按钮颜色
* 设置左侧按钮颜色
*/
*/
fun
setLeftBtnColor
(
@ColorInt
color
:
Int
)
{
fun
setLeftBtnColor
(
@ColorInt
color
:
Int
)
{
viewBinding
.
btnLeft
.
setTextColor
(
color
)
leftBtnColor
=
color
}
}
/***
/***
* 设置右侧按钮颜色
* 设置右侧按钮颜色
*/
*/
fun
setRightBtnColor
(
@ColorInt
color
:
Int
)
{
fun
setRightBtnColor
(
@ColorInt
color
:
Int
)
{
viewBinding
.
btnRight
.
setTextColor
(
color
)
rightBtnColor
=
color
}
}
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/setting/SystemSettingActivity.kt
View file @
ff018960
package
com.yidian.shenghuoquan.newscontent.ui.setting
package
com.yidian.shenghuoquan.newscontent.ui.setting
import
android.os.Bundle
import
android.os.Bundle
import
androidx.core.content.ContextCompat
import
com.orhanobut.hawk.Hawk
import
com.orhanobut.hawk.Hawk
import
com.yidian.common.HawkConfig
import
com.yidian.common.HawkConfig
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants
...
@@ -9,9 +10,11 @@ import com.yidian.common.base.BaseActivity
...
@@ -9,9 +10,11 @@ import com.yidian.common.base.BaseActivity
import
com.yidian.common.extensions.initTitleBar
import
com.yidian.common.extensions.initTitleBar
import
com.yidian.common.utils.SystemSettingUtils
import
com.yidian.common.utils.SystemSettingUtils
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.bean.HintOptionBean
import
com.yidian.shenghuoquan.newscontent.databinding.ActivitySystemSettingBinding
import
com.yidian.shenghuoquan.newscontent.databinding.ActivitySystemSettingBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IUserLogoutCallBack
import
com.yidian.shenghuoquan.newscontent.http.callback.IUserLogoutCallBack
import
com.yidian.shenghuoquan.newscontent.ui.dialog.HintDialog
import
com.yidian.shenghuoquan.newscontent.utils.SensitiveInfoUtil
import
com.yidian.shenghuoquan.newscontent.utils.SensitiveInfoUtil
import
com.yidian.utils.ToastUtil
import
com.yidian.utils.ToastUtil
import
com.yidian.xarc.xbase.utils.AppUtils
import
com.yidian.xarc.xbase.utils.AppUtils
...
@@ -53,10 +56,26 @@ class SystemSettingActivity : BaseActivity<ActivitySystemSettingBinding>() {
...
@@ -53,10 +56,26 @@ class SystemSettingActivity : BaseActivity<ActivitySystemSettingBinding>() {
}
}
// 退出登录
// 退出登录
viewBind
.
tvLogout
.
setOnClickListener
{
viewBind
.
tvLogout
.
setOnClickListener
{
ApiService
.
userLogout
(
logoutCallBack
)
showConfirmDialog
(
)
}
}
}
}
private
fun
showConfirmDialog
()
{
val
dialog
=
HintDialog
(
this
,
resources
.
getString
(
R
.
string
.
conform_logout
),
arrayListOf
(
HintOptionBean
(
"取消"
),
HintOptionBean
(
"确定"
)),
object
:
HintDialog
.
OnHintOptionCallback
{
override
fun
onLeftOption
()
{
}
override
fun
onRightOption
()
{
ApiService
.
userLogout
(
logoutCallBack
)
}
})
dialog
.
setRightBtnColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_FFFF3A3A
))
dialog
.
show
()
}
private
val
logoutCallBack
=
object
:
IUserLogoutCallBack
{
private
val
logoutCallBack
=
object
:
IUserLogoutCallBack
{
override
fun
userLogoutSuccess
()
{
override
fun
userLogoutSuccess
()
{
ToastUtil
.
showToast
(
this
@SystemSettingActivity
,
"退出登录成功"
)
ToastUtil
.
showToast
(
this
@SystemSettingActivity
,
"退出登录成功"
)
...
...
Components/newscontent/src/main/res/layout/activity_system_setting.xml
View file @
ff018960
...
@@ -117,9 +117,9 @@
...
@@ -117,9 +117,9 @@
android:layout_marginTop=
"@dimen/dp10"
android:layout_marginTop=
"@dimen/dp10"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"退出登录"
android:textColor=
"@color/color_333333"
android:textColor=
"@color/color_333333"
android:textSize=
"@dimen/sp16"
android:textSize=
"@dimen/sp16"
/>
tools:text=
"版本1.0.1"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Components/newscontent/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
Components/newscontent/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
Components/newscontent/src/main/res/values/strings.xml
View file @
ff018960
...
@@ -150,6 +150,7 @@
...
@@ -150,6 +150,7 @@
<string
name=
"manager_register_tips"
>
未注册生活圈的手机号,登录时将自动注册,且代表你已经同意《用户协议》《隐私政策》。
</string>
<string
name=
"manager_register_tips"
>
未注册生活圈的手机号,登录时将自动注册,且代表你已经同意《用户协议》《隐私政策》。
</string>
<string
name=
"dissolve_relationship"
>
解除关系后此账号将不再有权限管理企业信息,账号已产生内容仍属企业
</string>
<string
name=
"dissolve_relationship"
>
解除关系后此账号将不再有权限管理企业信息,账号已产生内容仍属企业
</string>
<string
name=
"setting"
>
设置
</string>
<string
name=
"setting"
>
设置
</string>
<string
name=
"conform_logout"
>
确定退出登录
</string>
<string
name=
"life_account_name"
>
名称
</string>
<string
name=
"life_account_name"
>
名称
</string>
<string
name=
"life_account_auth_info"
>
认证信息
</string>
<string
name=
"life_account_auth_info"
>
认证信息
</string>
<string
name=
"merchant_upgrade"
>
商户升级
</string>
<string
name=
"merchant_upgrade"
>
商户升级
</string>
...
...
Components/userinfo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
Components/userinfo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted
100644 → 0
View file @
ab460461
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ 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