Commit 165fd975 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 9a6134c2
...@@ -131,13 +131,13 @@ android { ...@@ -131,13 +131,13 @@ android {
} }
productFlavors { productFlavors {
facai {} // facai {}
vivo {} // vivo {}
baidu {} // baidu {}
oppo {} // oppo {}
huawei {} // huawei {}
xiaomi {} // xiaomi {}
store360 {} // store360 {}
share_mints {} share_mints {}
} }
......
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
android:name=".ui.activitys.BasicUserProfileActivity" android:name=".ui.activitys.BasicUserProfileActivity"
android:configChanges="orientation|screenSize|keyboardHidden" android:configChanges="orientation|screenSize|keyboardHidden"
android:exported="false" android:exported="false"
android:launchMode="singleTop" android:launchMode="singleTask"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activitys.AlbumActivity" android:name=".ui.activitys.AlbumActivity"
......
...@@ -14,6 +14,7 @@ import com.duben.loveplayletd.common.Constant ...@@ -14,6 +14,7 @@ import com.duben.loveplayletd.common.Constant
import com.duben.loveplayletd.mvp.model.BaseResponse import com.duben.loveplayletd.mvp.model.BaseResponse
import com.duben.loveplayletd.ui.activitys.BasicUserProfileActivity import com.duben.loveplayletd.ui.activitys.BasicUserProfileActivity
import com.duben.loveplayletd.ui.widgets.RealAuthDialog import com.duben.loveplayletd.ui.widgets.RealAuthDialog
import com.duben.loveplayletd.utils.LogUtil
import com.duben.loveplayletd.utils.MateUtils import com.duben.loveplayletd.utils.MateUtils
import com.duben.loveplayletd.utils.ToastUtil import com.duben.loveplayletd.utils.ToastUtil
import com.google.gson.JsonObject import com.google.gson.JsonObject
...@@ -69,6 +70,7 @@ class UserHelper private constructor() { ...@@ -69,6 +70,7 @@ class UserHelper private constructor() {
COMMON_ERROR_CODE_BASIC_PROFILE -> { COMMON_ERROR_CODE_BASIC_PROFILE -> {
// 缺少基础资料 // 缺少基础资料
// ToastUtil.show(MintsApplication.getContext(), "缺少基础资料") // ToastUtil.show(MintsApplication.getContext(), "缺少基础资料")
LogUtil.d("mcg -->>>> COMMON_ERROR_CODE_BASIC_PROFILE"+AppConfig.basicUserProfileFlag)
if (AppConfig.basicUserProfileFlag) return if (AppConfig.basicUserProfileFlag) return
intent = Intent(appContext, BasicUserProfileActivity::class.java) intent = Intent(appContext, BasicUserProfileActivity::class.java)
......
...@@ -83,6 +83,7 @@ class BasicUserProfilePresenter : BasePresenter<BasicUserProfileView>() { ...@@ -83,6 +83,7 @@ class BasicUserProfilePresenter : BasePresenter<BasicUserProfileView>() {
fun initBasicInfo(birthday: String, nickName: String, sex: Int, headerUrl: String) { fun initBasicInfo(birthday: String, nickName: String, sex: Int, headerUrl: String) {
view.showLoading("加载中...")
val vo = HashMap<String, Any>() val vo = HashMap<String, Any>()
vo["birthday"] = birthday vo["birthday"] = birthday
vo["nickName"] = nickName vo["nickName"] = nickName
......
...@@ -23,6 +23,8 @@ import com.duben.loveplayletd.mvp.presenters.BasicUserProfilePresenter ...@@ -23,6 +23,8 @@ import com.duben.loveplayletd.mvp.presenters.BasicUserProfilePresenter
import com.duben.loveplayletd.mvp.views.BasicUserProfileView import com.duben.loveplayletd.mvp.views.BasicUserProfileView
import com.duben.loveplayletd.ui.widgets.pick.SinglePickDialog import com.duben.loveplayletd.ui.widgets.pick.SinglePickDialog
import com.duben.loveplayletd.utils.GlideEngine import com.duben.loveplayletd.utils.GlideEngine
import com.duben.loveplayletd.utils.LogUtil
import com.duben.loveplayletd.utils.ToastUtil
import com.duben.loveplayletd.utils.UcropUtils import com.duben.loveplayletd.utils.UcropUtils
import com.luck.picture.lib.PictureSelector import com.luck.picture.lib.PictureSelector
import com.luck.picture.lib.compress.Luban import com.luck.picture.lib.compress.Luban
...@@ -184,8 +186,12 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -184,8 +186,12 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
} }
override fun initBasicSuc() { override fun initBasicSuc() {
LogUtil.d("mcg -->>>> initBasicSuc"+true)
AppConfig.basicUserProfileFlag = true AppConfig.basicUserProfileFlag = true
ToastUtil.showLong(context,"填写完成")
Handler(Looper.getMainLooper()).postDelayed({
finish() finish()
}, 1000)
} }
override fun initBasicFail() {} override fun initBasicFail() {}
......
...@@ -2,6 +2,8 @@ package com.duben.loveplayletd.ui.activitys ...@@ -2,6 +2,8 @@ package com.duben.loveplayletd.ui.activitys
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.text.Editable import android.text.Editable
import android.text.TextUtils import android.text.TextUtils
import android.text.TextWatcher import android.text.TextWatcher
...@@ -17,6 +19,7 @@ import com.duben.loveplayletd.mvp.model.WxPayParamBean ...@@ -17,6 +19,7 @@ import com.duben.loveplayletd.mvp.model.WxPayParamBean
import com.duben.loveplayletd.mvp.presenters.DrawCashPresenter import com.duben.loveplayletd.mvp.presenters.DrawCashPresenter
import com.duben.loveplayletd.mvp.views.DrawCashView import com.duben.loveplayletd.mvp.views.DrawCashView
import com.duben.loveplayletd.ui.activitys.base.BaseActivity import com.duben.loveplayletd.ui.activitys.base.BaseActivity
import com.duben.loveplayletd.utils.ToastUtil
import kotlinx.android.synthetic.main.activity_drawcash.* import kotlinx.android.synthetic.main.activity_drawcash.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
import okhttp3.internal.notify import okhttp3.internal.notify
...@@ -165,8 +168,11 @@ class DrawCashActivity : BaseActivity(), View.OnClickListener, DrawCashView { ...@@ -165,8 +168,11 @@ class DrawCashActivity : BaseActivity(), View.OnClickListener, DrawCashView {
override fun getCashouBaseMsgFail() {} override fun getCashouBaseMsgFail() {}
override fun addCashoutReqSuc() { override fun addCashoutReqSuc() {
showToast("提现成功!") // showToast("提现成功!")
ToastUtil.showLong(context,"提现已申请,请耐心等待!")
Handler(Looper.getMainLooper()).postDelayed({
finish() finish()
}, 2500)
} }
override fun addCashoutReqFail() {} override fun addCashoutReqFail() {}
......
...@@ -554,7 +554,7 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { ...@@ -554,7 +554,7 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
override fun setWechatQRCodeSuc() { override fun setWechatQRCodeSuc() {
showToast("恭喜您完成真人认证!") showToast("恭喜您完成真人认证!")
readyGoThenKill(FollowWechatActivity::class.java) readyGo(FollowWechatActivity::class.java)
} }
override fun setWechatQRCodeFail() {} override fun setWechatQRCodeFail() {}
......
...@@ -52,13 +52,14 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -52,13 +52,14 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
private val bannerList = mutableListOf<Int>() private val bannerList = mutableListOf<Int>()
private val tabsData = mutableListOf<String>() private val tabsData = mutableListOf<String>()
private var vpAdapter: SquarePageAdapter? = null private var vpAdapter: SquarePageAdapter? = null
private var isShowLocationFlag = false
override fun getContentViewLayoutID() = R.layout.fragment_square override fun getContentViewLayoutID() = R.layout.fragment_square
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
initVp() initVp()
initBanner() initBanner()
initLocation() // initLocation()
tv_location.setOnClickListener(this) tv_location.setOnClickListener(this)
iv_share.setOnClickListener { iv_share.setOnClickListener {
...@@ -99,6 +100,10 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -99,6 +100,10 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
} else { } else {
TrackManager.getInstance().getBaseMsg() TrackManager.getInstance().getBaseMsg()
} }
if (AppConfig.basicUserProfileFlag||UserManager.getInstance().userHasBasic()) {
initLocation()
}
} }
} }
...@@ -175,6 +180,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -175,6 +180,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
} }
private fun initLocation() { private fun initLocation() {
this.isShowLocationFlag = true
val permissions: List<String> = if (Build.VERSION.SDK_INT >= 29) { val permissions: List<String> = if (Build.VERSION.SDK_INT >= 29) {
listOf( listOf(
Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION,
......
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