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
97c1896d
Commit
97c1896d
authored
Aug 01, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 展示我的消息,展示数字
parent
ca6144ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
15 deletions
+16
-15
MineFragment.kt
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
+10
-9
AppLocal.kt
m-user/src/main/java/com/yidianling/user/mine/data/AppLocal.kt
+2
-2
AppLocalImpl.kt
m-user/src/main/java/com/yidianling/user/mine/data/AppLocalImpl.kt
+4
-4
No files found.
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
View file @
97c1896d
...
...
@@ -212,28 +212,29 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
val
orderNum
=
response
.
data
?.
consultOrderNum
?:
0
if
(
orderNum
>
0
)
{
iv_order_tip
.
visibility
=
View
.
VISIBLE
if
(
orderNum
>
99
)
{
iv_order_tip
.
text
=
"99+"
var
numberStr
=
if
(
orderNum
>
99
)
{
"99+"
}
else
{
iv_order_tip
.
text
=
"$orderNum"
"$orderNum"
}
getLocal
().
setConsult
(
true
)
iv_order_tip
.
text
=
numberStr
getLocal
().
setConsult
(
orderNum
)
}
else
{
iv_order_tip
.
visibility
=
View
.
GONE
getLocal
().
setConsult
(
false
)
getLocal
().
setConsult
(
0
)
}
}
else
{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
getLocal
().
setConsult
(
0
)
}
}
else
{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
getLocal
().
setConsult
(
0
)
}
},{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
getLocal
().
setConsult
(
0
)
})
}
...
...
@@ -245,7 +246,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
private
fun
refreshCouponData
()
{
getLocal
().
setCoupon
(
false
)
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
getLocal
().
setConsult
(
0
)
val
userInfo
=
getUserInfo
()
...
...
m-user/src/main/java/com/yidianling/user/mine/data/AppLocal.kt
View file @
97c1896d
...
...
@@ -22,9 +22,9 @@ interface AppLocal {
fun
setCoupon
(
have
:
Boolean
)
fun
getConsult
():
Boolean
fun
getConsult
():
Int
fun
setConsult
(
have
:
Boolean
)
fun
setConsult
(
have
:
Int
)
fun
getConfide
():
Boolean
...
...
m-user/src/main/java/com/yidianling/user/mine/data/AppLocalImpl.kt
View file @
97c1896d
...
...
@@ -50,12 +50,12 @@ internal class AppLocalImpl private constructor(): AppLocal {
getAppSP
().
edit
().
putBoolean
(
COUPON
,
have
).
apply
()
}
override
fun
getConsult
():
Boolean
{
return
getAppSP
().
get
Boolean
(
CONSULT
,
false
)
override
fun
getConsult
():
Int
{
return
getAppSP
().
get
Int
(
CONSULT
,
0
)
}
override
fun
setConsult
(
have
:
Boolean
)
{
getAppSP
().
edit
().
put
Boolean
(
CONSULT
,
have
).
apply
()
override
fun
setConsult
(
have
:
Int
)
{
getAppSP
().
edit
().
put
Int
(
CONSULT
,
have
).
apply
()
}
override
fun
getConfide
():
Boolean
{
...
...
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