Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
880c170f
Commit
880c170f
authored
Oct 16, 2020
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录名称显示错误修改
parent
868ee1e3
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
83 additions
and
76 deletions
+83
-76
UserManager.java
...rc/main/java/com/mints/goodmoney/manager/UserManager.java
+1
-1
UserBean.java
...src/main/java/com/mints/goodmoney/mvp/model/UserBean.java
+2
-2
DrawcashPresenter.java
...com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
+0
-7
LoginActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
+1
-3
SettingsActivity.kt
...java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
+39
-15
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+4
-4
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+17
-21
PanFragment.kt
.../main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
+12
-16
BannerView.java
.../main/java/com/mints/goodmoney/ui/widgets/BannerView.java
+2
-2
activity_settings.xml
GoodMoney/app/src/main/res/layout/activity_settings.xml
+2
-1
fragment_main_friends.xml
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
+1
-1
item_fragment_main_my_title.xml
...y/app/src/main/res/layout/item_fragment_main_my_title.xml
+2
-3
ic_my.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_my.png
+0
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/UserManager.java
View file @
880c170f
...
...
@@ -127,7 +127,7 @@ public class UserManager {
ps
.
putString
(
CODE_ID
,
user
.
getIdcode
());
ps
.
putString
(
MOBILE
,
mobile
);
// ps.putString(GAME_INFO, user.getGameInfo());
ps
.
putString
(
REAL_NAME
,
user
.
getReal_name
());
//
ps.putString(REAL_NAME, user.getReal_name());
ps
.
putString
(
ALIPAY_ACCOUNT
,
user
.
getAlipay_account
());
ps
.
putString
(
USER_GOLD
,
String
.
valueOf
(
user
.
getCoin
()));
ps
.
putString
(
USER_CASH
,
String
.
format
(
"%.2f"
,
user
.
getSurplus
()));
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/UserBean.java
View file @
880c170f
...
...
@@ -25,7 +25,7 @@ public class UserBean implements Serializable {
private
String
head
;
private
String
openid
;
private
String
nick
N
ame
;
private
String
nick
n
ame
;
private
String
mobile
;
private
String
real_name
;
private
String
alipay_account
;
...
...
@@ -45,7 +45,7 @@ public class UserBean implements Serializable {
}
public
String
getNickName
()
{
return
nick
N
ame
;
return
nick
n
ame
;
}
public
String
getMobile
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
View file @
880c170f
package
com
.
mints
.
goodmoney
.
mvp
.
presenters
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
com.google.gson.Gson
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.DeviceInfo
;
import
com.mints.goodmoney.manager.AppHttpManager
;
...
...
@@ -11,21 +9,16 @@ import com.mints.goodmoney.manager.ShumeiManager;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.model.DrawcashBean
;
import
com.mints.goodmoney.mvp.model.LocationBean
;
import
com.mints.goodmoney.mvp.model.UserBean
;
import
com.mints.goodmoney.mvp.views.DrawcashView
;
import
com.mints.goodmoney.utils.DeviceUuidFactory
;
import
com.mints.goodmoney.utils.SPUtil
;
import
com.mints.library.net.neterror.BaseSubscriber
;
import
com.mints.library.net.neterror.Throwable
;
import
com.mints.library.utils.json.JsonUtil
;
import
net.grandcentrix.tray.AppPreferences
;
import
java.util.HashMap
;
import
cn.jpush.android.api.JPushInterface
;
public
class
DrawcashPresenter
extends
BasePresenter
<
DrawcashView
>
{
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
View file @
880c170f
...
...
@@ -6,7 +6,6 @@ import android.text.TextUtils
import
android.view.View
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.login.LoginApi
...
...
@@ -169,7 +168,6 @@ class LoginActivity : BaseActivity()
progressDialog
.
dismiss
()
}
finish
()
}
...
...
@@ -204,7 +202,7 @@ class LoginActivity : BaseActivity()
}
BackInputUtil
.
phoneNumAddSpace
(
etLoginMobile
)
mobile
=
UserManager
.
getInstance
().
getMobile
()
mobile
=
UserManager
.
getInstance
().
mobile
if
(!
TextUtils
.
isEmpty
(
mobile
))
{
etLoginMobile
.
setText
(
mobile
)
etLoginMobile
.
setSelection
(
mobile
!!
.
length
+
2
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
View file @
880c170f
...
...
@@ -26,6 +26,22 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
initLayout
()
}
override
fun
onResume
()
{
super
.
onResume
()
if
(
userManager
.
mobile
.
isNotEmpty
())
{
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
userManager
.
mobile
}
else
{
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"未绑定"
}
// if (userManager.wxOpenid.isNotEmpty()) {
// item_wechat.findViewById<TextView>(R.id.tv_right).text = userManager.wxName
// } else {
// item_wechat.findViewById<TextView>(R.id.tv_right).text = "未授权"
// }
}
private
fun
initLayout
()
{
tv_title
.
text
=
"设置"
iv_left_icon
.
visibility
=
View
.
VISIBLE
...
...
@@ -47,19 +63,23 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
setCompoundDrawables
(
phone
,
null
,
null
,
null
)
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
VISIBLE
item_phone
.
findViewById
<
ImageView
>(
R
.
id
.
iv_right
).
visibility
=
View
.
GONE
if
(
userManager
.
userIsLogin
())
{
if
(
userManager
.
mobile
.
isNotEmpty
())
{
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
userManager
.
mobile
}
else
{
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"未绑定"
}
item_wechat
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
text
=
"微信号"
val
wechat
=
resources
.
getDrawable
(
R
.
mipmap
.
icon_settings_wechat
)
wechat
.
setBounds
(
0
,
0
,
56
,
56
)
item_wechat
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
setCompoundDrawables
(
wechat
,
null
,
null
,
null
)
item_wechat
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
VISIBLE
item_wechat
.
findViewById
<
ImageView
>(
R
.
id
.
iv_right
).
visibility
=
View
.
GONE
item_wechat
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"未授权"
// item_wechat.findViewById<TextView>(R.id.tv_title).text = "微信昵称"
// val wechat = resources.getDrawable(R.mipmap.icon_settings_wechat)
// wechat.setBounds(0, 0, 56, 56)
// item_wechat.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(wechat, null, null, null)
// item_wechat.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE
// item_wechat.findViewById<ImageView>(R.id.iv_right).visibility = View.GONE
// if (userManager.wxOpenid.isNotEmpty()) {
// item_wechat.findViewById<TextView>(R.id.tv_right).text = userManager.wxName
// } else {
// item_wechat.findViewById<TextView>(R.id.tv_right).text = "未授权"
// }
// item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "邀请码"
// val invitedCode = resources.getDrawable(R.mipmap.icon_settings_invite)
...
...
@@ -106,15 +126,19 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
item_phone
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
}
}
R
.
id
.
item_wechat
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
if
(
userManager
.
userIsLogin
()
&&
userManager
.
mobile
.
isEmpty
())
{
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
Constant
.
LOGIN_FLAG
,
true
)
readyGo
(
LoginActivity
::
class
.
java
,
bundle
)
}
}
// R.id.item_wechat -> {
// if (userManager.userIsLogin() && userManager.wxOpenid.isEmpty()) {
// val bundle = Bundle()
// bundle.putBoolean(Constant.LOGIN_FLAG, true)
// readyGo(LoginActivity::class.java)
// }
// }
R
.
id
.
item_invitedCode
->
{
submitInvitedCode
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
880c170f
...
...
@@ -127,11 +127,11 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, Platform
}
override
fun
onPageDown
()
{
bv_friends_task
.
stopAutoScroll
()
//
bv_friends_task.stopAutoScroll()
}
override
fun
onPageUp
()
{
bv_friends_task
.
startAutoScroll
()
//
bv_friends_task.startAutoScroll()
}
})
...
...
@@ -158,12 +158,12 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, Platform
friendsPresenter
.
getFriendsMsg
()
}
bv_friends_task
.
startAutoScroll
()
//
bv_friends_task.startAutoScroll()
}
override
fun
onPause
()
{
super
.
onPause
()
bv_friends_task
.
stopAutoScroll
()
//
bv_friends_task.stopAutoScroll()
}
override
fun
onDestroy
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
880c170f
...
...
@@ -25,7 +25,6 @@ import com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.presenters.MyPresenter
import
com.mints.goodmoney.mvp.views.MyView
import
com.mints.goodmoney.ui.activitys.*
import
com.mints.goodmoney.ui.adapter.GvMyAdapter
import
com.mints.goodmoney.ui.adapter.MainMyAdapter
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.utils.ImageUtil
...
...
@@ -63,7 +62,7 @@ class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListene
private
var
hotList
:
List
<
BannerBean
.
ListBean
>?
=
arrayListOf
()
// 当天签到金币
private
var
curSignCoin
=
5
private
var
curSignCoin
=
5
0
// 签到信息
private
var
signCardBean
:
SignCardBean
?
=
null
...
...
@@ -312,16 +311,13 @@ class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListene
private
fun
setUserLoginStatus
()
{
if
(
userConfig
!=
null
)
{
val
code
=
userConfig
!!
.
userMsg
.
idcode
if
(
code
.
isNotEmpty
())
{
item_title_invitecode
.
text
=
"邀请码:$code"
}
item_title_invitecode
.
text
=
"邀请码:"
+
userConfig
!!
.
userMsg
.
idcode
}
if
(
userManager
.
userIsLogin
())
{
// 已登录
if
(
userManager
.
wxOpenid
.
isNotEmpty
())
{
GlideUtils
.
loadImageView
(
context
,
userManager
.
wxHeader
,
item_title_avatar
)
GlideUtils
.
loadImageView
Loding
(
context
,
userManager
.
wxHeader
,
item_title_avatar
,
R
.
mipmap
.
ic_my
,
R
.
mipmap
.
ic_my
)
item_title_id
.
text
=
userManager
.
wxName
}
else
{
var
mobile
=
userManager
.
mobile
...
...
@@ -370,18 +366,18 @@ class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListene
progressStrInvited
=
"("
+
userConfig
!!
.
taskShareFriend
.
complete
+
"/"
+
userConfig
!!
.
taskShareFriend
.
max
+
")"
}
val
task2
=
TaskBean
(
R
.
mipmap
.
icon_my_invite
,
"邀好友,赚金币"
,
progressStrInvited
,
"去邀请"
,
2
)
// 看福利视频赚金币
var
progressStrVideo
=
""
if
(
userConfig
!=
null
)
{
progressStrVideo
=
"("
+
userConfig
!!
.
taskVeido
.
complete
+
"/"
+
userConfig
!!
.
taskVeido
.
max
+
")"
}
val
task3
=
TaskBean
(
R
.
mipmap
.
icon_my_video
,
"看福利视频赚金币"
,
progressStrVideo
,
"赚金币"
,
3
)
// 玩游戏,赚金币
val
task4
=
TaskBean
(
R
.
mipmap
.
icon_my_game
,
"玩游戏,赚金币"
,
""
,
"赚金币"
,
4
)
// 小说免费看,金币大家赚
val
task5
=
TaskBean
(
R
.
mipmap
.
icon_my_fiction
,
"小说免费看,金币大家赚"
,
""
,
"去阅读"
,
5
)
// 试玩平台
val
task6
=
TaskBean
(
R
.
mipmap
.
icon_my_demo
,
"试玩平台"
,
""
,
""
,
5
)
//
// 看福利视频赚金币
//
var progressStrVideo = ""
//
if (userConfig != null) {
//
progressStrVideo = "(" + userConfig!!.taskVeido.complete + "/" + userConfig!!.taskVeido.max + ")"
//
}
//
val task3 = TaskBean(R.mipmap.icon_my_video, "看福利视频赚金币", progressStrVideo, "赚金币", 3)
//
// 玩游戏,赚金币
//
val task4 = TaskBean(R.mipmap.icon_my_game, "玩游戏,赚金币", "", "赚金币", 4)
//
// 小说免费看,金币大家赚
//
val task5 = TaskBean(R.mipmap.icon_my_fiction, "小说免费看,金币大家赚", "", "去阅读", 5)
//
// 试玩平台
//
val task6 = TaskBean(R.mipmap.icon_my_demo, "试玩平台", "", "", 5)
dataList
.
add
(
task1
)
dataList
.
add
(
task2
)
// dataList.add(task3)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
View file @
880c170f
...
...
@@ -27,8 +27,7 @@ import net.grandcentrix.tray.AppPreferences
* 作者:孟崔广
* 时间:2020/9/20 17:30
*/
class
PanFragment
:
BaseFragment
()
,
PanView
{
class
PanFragment
:
BaseFragment
(),
PanView
{
private
val
panPresenter
by
lazy
{
PanPresenter
()
}
private
val
ps
by
lazy
{
AppPreferences
(
context
)
}
...
...
@@ -41,7 +40,6 @@ class PanFragment : BaseFragment()
override
fun
initViewsAndEvents
()
{
panPresenter
.
attachView
(
this
)
}
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
...
...
@@ -79,21 +77,19 @@ class PanFragment : BaseFragment()
private
fun
loadTurnUrl
()
{
getTurnUrl
()
blTurntableWebview
.
setDefaultHandler
(
DefaultHandler
())
blTurntableWebview
.
setWebChromeClient
(
WebChromeClient
()
)
blTurntableWebview
.
setOnLongClickListener
(
OnLongClickListener
{
true
})
blTurntableWebview
.
webChromeClient
=
WebChromeClient
(
)
blTurntableWebview
.
setOnLongClickListener
{
true
}
//注册监听方法当js中调用callHandler方法时会调用此方法(handlerName必须和js中相同)
blTurntableWebview
.
registerHandler
(
"getTurnResult"
,
object
:
BridgeHandler
{
override
fun
handler
(
data
:
String
,
function
:
CallBackFunction
)
{
blTurntableWebview
.
registerHandler
(
"getTurnResult"
)
{
data
,
function
->
val
turntableBean
:
TurntableBean
=
JsonUtil
.
parseJson
(
data
,
TurntableBean
::
class
.
java
)
if
(
turntableBean
!=
null
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
turntableBean
.
getCoin
()
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
turntableBean
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
carrierType
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
turntableBean
.
getKey
()
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
turntableBean
.
key
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
})
blTurntableWebview
.
setDefaultHandler
(
object
:
DefaultHandler
()
{
override
fun
handler
(
data
:
String
,
function
:
CallBackFunction
)
{
showToast
(
data
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/BannerView.java
View file @
880c170f
...
...
@@ -121,10 +121,10 @@ public class BannerView extends FrameLayout {
public
boolean
onTouch
(
View
view
,
MotionEvent
motionEvent
)
{
switch
(
motionEvent
.
getAction
())
{
case
MotionEvent
.
ACTION_DOWN
:
stopAutoScroll
();
if
(
isAutoScroll
)
stopAutoScroll
();
break
;
case
MotionEvent
.
ACTION_UP
:
startAutoScroll
();
if
(
isAutoScroll
)
startAutoScroll
();
break
;
}
return
false
;
...
...
GoodMoney/app/src/main/res/layout/activity_settings.xml
View file @
880c170f
...
...
@@ -12,7 +12,8 @@
<include
android:id=
"@+id/item_wechat"
layout=
"@layout/item_settings"
/>
layout=
"@layout/item_settings"
android:visibility=
"gone"
/>
<include
android:id=
"@+id/item_invitedCode"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_friends.xml
View file @
880c170f
...
...
@@ -63,7 +63,7 @@
android:id=
"@+id/img_invite"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"1
5
dp"
android:padding=
"1
0
dp"
android:scaleType=
"centerCrop"
android:src=
"@mipmap/bg_friends"
/>
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_title.xml
View file @
880c170f
...
...
@@ -16,8 +16,7 @@
<com.mints.goodmoney.ui.widgets.CircleImageView
android:id=
"@+id/item_title_avatar"
android:layout_width=
"70dp"
android:layout_height=
"70dp"
android:src=
"@mipmap/ic_launcher"
/>
android:layout_height=
"70dp"
/>
<LinearLayout
android:layout_width=
"0dp"
...
...
@@ -84,7 +83,7 @@
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"15dp"
android:background=
"@drawable/shape_gold_card"
android:elevation=
"
2
dip"
android:elevation=
"
1.5
dip"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingStart=
"15dp"
...
...
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_my.png
View replaced file @
868ee1e3
View file @
880c170f
9.6 KB
|
W:
|
H:
9.29 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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