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
4be77c5d
Commit
4be77c5d
authored
Jun 27, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mine tips done
Took 24 minutes
parent
4cda1b91
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
7 deletions
+71
-7
config.gradle
config.gradle
+2
-2
MineFragment.kt
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
+28
-5
AppLocal.kt
m-user/src/main/java/com/yidianling/user/mine/data/AppLocal.kt
+13
-0
AppLocalImpl.kt
m-user/src/main/java/com/yidianling/user/mine/data/AppLocalImpl.kt
+28
-0
No files found.
config.gradle
View file @
4be77c5d
...
...
@@ -8,7 +8,7 @@ ext {
"m-confide"
:
"0.0.50.41"
,
"m-consultant"
:
"0.0.60.68"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.5
8
"
,
"m-user"
:
"0.0.62.5
9
"
,
"m-home"
:
"0.0.23.95"
,
"m-im"
:
"0.0.21.64"
,
"m-dynamic"
:
"0.0.7.74"
,
...
...
@@ -94,7 +94,7 @@ ext {
"m-confide"
:
"0.0.50.41"
,
"m-consultant"
:
"0.0.60.68"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.5
8
"
,
"m-user"
:
"0.0.62.5
9
"
,
"m-home"
:
"0.0.23.95"
,
"m-im"
:
"0.0.21.64"
,
"m-dynamic"
:
"0.0.7.74"
,
...
...
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
View file @
4be77c5d
...
...
@@ -43,6 +43,7 @@ import com.yidianling.user.api.event.RefreshRecentContactListEvent
import
com.yidianling.user.api.service.IAppService
import
com.yidianling.user.constants.UserBIConstants.UserMyPageEvent
import
com.yidianling.user.mine.bean.CouponNumBean
import
com.yidianling.user.mine.data.AppDataManager
import
com.yidianling.user.mine.data.AppDataManager.getHttp
import
com.yidianling.user.mine.data.AppDataManager.getLocal
import
com.yidianling.user.mine.http.MineHttpImpl
...
...
@@ -206,25 +207,37 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
MineHttpImpl
.
getInstance
().
getHasConfideOrder
(
uid
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
response
->
.
subscribe
(
{
response
->
if
(
"200"
==
response
.
code
)
{
if
(
response
.
data
!=
null
)
{
if
(
response
.
data
.
listenOrder
==
true
)
{
iv_confide_tip
.
visibility
=
View
.
VISIBLE
getLocal
().
setConfide
(
true
)
}
else
{
iv_confide_tip
.
visibility
=
View
.
GONE
getLocal
().
setConfide
(
false
)
}
if
(
response
.
data
.
consultOrder
==
true
)
{
iv_order_tip
.
visibility
=
View
.
VISIBLE
getLocal
().
setConsult
(
true
)
}
else
{
iv_order_tip
.
visibility
=
View
.
GONE
getLocal
().
setConfide
(
false
)
}
}
else
{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
}
}
else
{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
}
}
},{
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
})
}
...
...
@@ -233,6 +246,10 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
*/
@SuppressLint
(
"CheckResult"
)
private
fun
refreshCouponData
()
{
getLocal
().
setCoupon
(
false
)
getLocal
().
setConfide
(
false
)
getLocal
().
setConsult
(
false
)
val
userInfo
=
getUserInfo
()
?:
return
if
(
userInfo
.
uid
!=
null
)
{
...
...
@@ -248,11 +265,17 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
if
(
response
.
data
!=
null
)
{
if
(
response
.
data
?.
count
?:
0
>
0
)
{
view_new_coupon
.
visibility
=
View
.
VISIBLE
getLocal
().
setCoupon
(
true
)
}
else
{
view_new_coupon
.
visibility
=
View
.
INVISIBLE
view_new_coupon
.
visibility
=
View
.
GONE
getLocal
().
setCoupon
(
false
)
}
}
else
{
getLocal
().
setCoupon
(
false
)
}
})
{
throwable
:
Throwable
?
->
}
})
{
throwable
:
Throwable
?
->
getLocal
().
setCoupon
(
false
)
}
}
/**
...
...
m-user/src/main/java/com/yidianling/user/mine/data/AppLocal.kt
View file @
4be77c5d
...
...
@@ -18,4 +18,16 @@ interface AppLocal {
fun
putUpdate
(
update
:
Boolean
)
fun
getCoupon
():
Boolean
fun
setCoupon
(
have
:
Boolean
)
fun
getConsult
():
Boolean
fun
setConsult
(
have
:
Boolean
)
fun
getConfide
():
Boolean
fun
setConfide
(
have
:
Boolean
)
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/mine/data/AppLocalImpl.kt
View file @
4be77c5d
...
...
@@ -19,6 +19,10 @@ internal class AppLocalImpl private constructor(): AppLocal {
private
val
APP
=
"app"
private
val
RED_POCKET_TIME
=
"red_pocket_time"
private
val
UPDATE
=
"update"
private
val
CONFIDE
=
"confide"
private
val
CONSULT
=
"consult"
private
val
COUPON
=
"coupon"
}
...
...
@@ -38,6 +42,30 @@ internal class AppLocalImpl private constructor(): AppLocal {
getAppSP
().
edit
().
putBoolean
(
UPDATE
,
update
).
apply
()
}
override
fun
getCoupon
():
Boolean
{
return
getAppSP
().
getBoolean
(
COUPON
,
false
)
}
override
fun
setCoupon
(
have
:
Boolean
)
{
getAppSP
().
edit
().
putBoolean
(
COUPON
,
have
).
apply
()
}
override
fun
getConsult
():
Boolean
{
return
getAppSP
().
getBoolean
(
CONSULT
,
false
)
}
override
fun
setConsult
(
have
:
Boolean
)
{
getAppSP
().
edit
().
putBoolean
(
CONSULT
,
false
).
apply
()
}
override
fun
getConfide
():
Boolean
{
return
getAppSP
().
getBoolean
(
CONFIDE
,
false
)
}
override
fun
setConfide
(
have
:
Boolean
)
{
getAppSP
().
edit
().
putBoolean
(
CONFIDE
,
have
).
apply
()
}
private
fun
getAppSP
():
SharedPreferences
{
return
BaseApp
.
getApp
().
getSharedPreferences
(
APP
,
Context
.
MODE_PRIVATE
)
}
...
...
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