Commit 955aa303 authored by mengcuiguang's avatar mengcuiguang

添加客服电话

parent 9c5b2762
......@@ -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的限制
......
......@@ -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
......@@ -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)
}
}
}
......
......@@ -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)
}
}
}
......
......@@ -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
......@@ -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
......@@ -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
}
......
......@@ -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)
}
}
......
......@@ -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)
}
}
......
......@@ -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" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment