Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_xunmi
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
android
android_xunmi
Commits
955aa303
Commit
955aa303
authored
Aug 13, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加客服电话
parent
9c5b2762
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
14 deletions
+28
-14
build.gradle
position/app/build.gradle
+2
-2
Constant.java
...on/app/src/main/java/com/mints/xunmi/common/Constant.java
+2
-0
MainFragmentPresenter.kt
...a/com/mints/xunmi/mvp/presenters/MainFragmentPresenter.kt
+1
-1
MyPresenter.kt
...c/main/java/com/mints/xunmi/mvp/presenters/MyPresenter.kt
+1
-1
MainFragmentView.kt
...c/main/java/com/mints/xunmi/mvp/views/MainFragmentView.kt
+1
-1
MyView.kt
...ion/app/src/main/java/com/mints/xunmi/mvp/views/MyView.kt
+1
-1
CallMeActivity.kt
.../main/java/com/mints/xunmi/ui/activitys/CallMeActivity.kt
+5
-0
MainFragment.kt
...src/main/java/com/mints/xunmi/ui/fragment/MainFragment.kt
+3
-1
MyFragment.kt
...p/src/main/java/com/mints/xunmi/ui/fragment/MyFragment.kt
+11
-6
activity_call_me.xml
position/app/src/main/res/layout/activity_call_me.xml
+1
-1
No files found.
position/app/build.gradle
View file @
955aa303
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.mints.xunmi"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
2
versionName
"1.0.
1
"
versionCode
3
versionName
"1.0.
2
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
position/app/src/main/java/com/mints/xunmi/common/Constant.java
View file @
955aa303
...
...
@@ -98,4 +98,6 @@ public interface Constant {
String
AGREEMENT_PRIVACY
=
"http://xunmi.mints-id.com/privacy.html"
;
//隐私协议
String
AGREEMENT_REGISTER
=
"http://xunmi.mints-id.com/register.html"
;
//注册协议
String
AGREEMENT_MEMBERS
=
"http://xunmi.mints-id.com/members.html"
;
//付费协议
String
USER_TELEPHONE
=
"user_telephone"
;
//客服电话
}
\ No newline at end of file
position/app/src/main/java/com/mints/xunmi/mvp/presenters/MainFragmentPresenter.kt
View file @
955aa303
...
...
@@ -99,7 +99,7 @@ class MainFragmentPresenter : BasePresenter<MainFragmentView>() {
when
(
code
)
{
200
->
{
if
(
baseResponse
.
data
!=
null
)
{
view
.
getSysBaseMsg
(
baseResponse
.
data
.
get
(
"msgNum"
).
asInt
,
baseResponse
.
data
.
get
(
"notifyNum"
).
asInt
)
view
.
getSysBaseMsg
(
baseResponse
.
data
.
get
(
"msgNum"
).
asInt
,
baseResponse
.
data
.
get
(
"notifyNum"
).
asInt
,
baseResponse
.
data
.
get
(
"telephone"
).
asString
)
}
}
}
...
...
position/app/src/main/java/com/mints/xunmi/mvp/presenters/MyPresenter.kt
View file @
955aa303
...
...
@@ -70,7 +70,7 @@ class MyPresenter : BasePresenter<MyView>() {
when
(
code
)
{
200
->
{
if
(
baseResponse
.
data
!=
null
)
{
view
.
getSysBaseMsg
(
baseResponse
.
data
.
get
(
"msgNum"
).
asInt
,
baseResponse
.
data
.
get
(
"notifyNum"
).
asInt
)
view
.
getSysBaseMsg
(
baseResponse
.
data
.
get
(
"msgNum"
).
asInt
,
baseResponse
.
data
.
get
(
"notifyNum"
).
asInt
,
baseResponse
.
data
.
get
(
"telephone"
).
asString
)
}
}
}
...
...
position/app/src/main/java/com/mints/xunmi/mvp/views/MainFragmentView.kt
View file @
955aa303
...
...
@@ -4,6 +4,6 @@ import com.mints.xunmi.mvp.model.MyCareBean
interface
MainFragmentView
:
BaseView
{
fun
getCares
(
data
:
MyCareBean
?)
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
)
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
,
phone
:
String
)
fun
checkProductType
(
type
:
Int
)
}
\ No newline at end of file
position/app/src/main/java/com/mints/xunmi/mvp/views/MyView.kt
View file @
955aa303
...
...
@@ -5,5 +5,5 @@ import com.mints.xunmi.mvp.model.UserBean
interface
MyView
:
BaseView
{
fun
getMyInfoSuc
(
data
:
UserBean
)
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
)
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
,
phone
:
String
)
}
\ No newline at end of file
position/app/src/main/java/com/mints/xunmi/ui/activitys/CallMeActivity.kt
View file @
955aa303
...
...
@@ -11,10 +11,12 @@ import cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.xunmi.R
import
com.mints.xunmi.common.Constant
import
com.mints.xunmi.manager.UserManager
import
com.mints.xunmi.ui.activitys.base.BaseActivity
import
com.mints.xunmi.ui.widgets.CustomDialogAsApple
import
com.mints.xunmi.ui.widgets.DialogListener
import
com.mints.xunmi.utils.SPUtil
import
kotlinx.android.synthetic.main.activity_call_me.*
import
kotlinx.android.synthetic.main.header_activity.*
...
...
@@ -27,6 +29,9 @@ class CallMeActivity : BaseActivity(), View.OnClickListener {
if
(
UserManager
.
getInstance
().
vipFlag
)
{
rlCallmeQQ
.
visibility
=
View
.
VISIBLE
val
phone
=
SPUtil
.
getInstance
(
context
).
getString
(
Constant
.
USER_TELEPHONE
)
tvCallPhone
.
text
=
phone
}
else
{
rlCallmeQQ
.
visibility
=
View
.
GONE
}
...
...
position/app/src/main/java/com/mints/xunmi/ui/fragment/MainFragment.kt
View file @
955aa303
...
...
@@ -148,7 +148,7 @@ class MainFragment : BaseFragment()
}
}
override
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
)
{
override
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
,
phone
:
String
)
{
if
(
activity
!=
null
&&
!
activity
!!
.
isFinishing
())
{
if
(
msgNum
>=
1
)
{
ivMyFragmentNofity
.
setImageResource
(
R
.
mipmap
.
ic_main_msg_enable
)
...
...
@@ -159,6 +159,8 @@ class MainFragment : BaseFragment()
if
(
notifyNum
>=
1
)
{
messageDialog
()
}
spUtil
?.
putString
(
Constant
.
USER_TELEPHONE
,
phone
)
}
}
...
...
position/app/src/main/java/com/mints/xunmi/ui/fragment/MyFragment.kt
View file @
955aa303
...
...
@@ -30,6 +30,7 @@ import com.mints.xunmi.ui.widgets.LegalrightDialog
import
com.mints.xunmi.ui.widgets.MessageDialog
import
com.mints.xunmi.utils.AppPackageUsageUtils
import
com.mints.xunmi.utils.ImageUtil
import
com.mints.xunmi.utils.SPUtil
import
com.mints.xunmi.utils.TimeRender
import
kotlinx.android.synthetic.main.fragment_main_my.*
import
me.shaohui.bottomdialog.BottomDialog
...
...
@@ -54,6 +55,7 @@ class MyFragment : BaseFragment()
private
var
userManager
:
UserManager
?
=
null
private
var
userBean
:
UserBean
?
=
null
private
var
spUtil
:
SPUtil
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_my
...
...
@@ -63,6 +65,7 @@ class MyFragment : BaseFragment()
}
myPresenter
.
attachView
(
this
)
spUtil
=
SPUtil
.
getInstance
(
context
)
userManager
=
UserManager
.
getInstance
()
drawable
=
activity
?.
let
{
ContextCompat
.
getDrawable
(
it
,
R
.
mipmap
.
ic_launcher
)
}
initListener
()
...
...
@@ -171,17 +174,19 @@ class MyFragment : BaseFragment()
}
}
override
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
)
{
override
fun
getSysBaseMsg
(
msgNum
:
Int
,
notifyNum
:
Int
,
phone
:
String
)
{
if
(
activity
!=
null
&&
!
activity
!!
.
isFinishing
())
{
if
(
msgNum
>=
1
)
{
ivMyFragmentNofity
.
setImageResource
(
R
.
mipmap
.
ic_main_msg_enable
)
}
else
{
ivMyFragmentNofity
.
setImageResource
(
R
.
mipmap
.
ic_main_msg
)
}
//
if (msgNum >= 1) {
//
ivMyFragmentNofity.setImageResource(R.mipmap.ic_main_msg_enable)
//
} else {
//
ivMyFragmentNofity.setImageResource(R.mipmap.ic_main_msg)
//
}
if
(
notifyNum
>=
1
)
{
messageDialog
()
}
spUtil
?.
putString
(
Constant
.
USER_TELEPHONE
,
phone
)
}
}
...
...
position/app/src/main/res/layout/activity_call_me.xml
View file @
955aa303
...
...
@@ -38,10 +38,10 @@
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tvCallPhone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10pt"
android:text=
"400-850-8068"
android:textColor=
"@color/authentic_none"
android:textSize=
"12sp"
/>
...
...
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