Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
M
magicbox
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
magicbox
Commits
2a4f013b
Commit
2a4f013b
authored
Apr 14, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :登录后置 [实现方案] :
parent
47d5eb81
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
125 additions
and
174 deletions
+125
-174
version.properties
app/version.properties
+2
-2
NetConfig.java
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
+9
-7
IHomeApi.kt
cms/src/main/java/com/zxhl/cms/net/api/IHomeApi.kt
+14
-0
OrderEntity.kt
cms/src/main/java/com/zxhl/cms/net/model/box/OrderEntity.kt
+2
-1
FaceBookLoginUtil.kt
cms/src/main/java/com/zxhl/cms/utils/FaceBookLoginUtil.kt
+1
-1
GoogleLoginUtil.kt
cms/src/main/java/com/zxhl/cms/utils/GoogleLoginUtil.kt
+1
-1
NewBoxGoodsDetailActivity.kt
.../com/zxhl/main/page/activity/NewBoxGoodsDetailActivity.kt
+15
-16
ShopGoodsDetailActivity.kt
...va/com/zxhl/main/page/activity/ShopGoodsDetailActivity.kt
+1
-15
AllFragment.kt
.../src/main/java/com/zxhl/main/page/fragment/AllFragment.kt
+15
-14
WareHouseFragment.kt
...ain/java/com/zxhl/main/page/fragment/WareHouseFragment.kt
+14
-14
SplashPresenter.kt
...main/java/com/zxhl/main/page/presenter/SplashPresenter.kt
+1
-8
FreeGoodsDialog.kt
.../src/main/java/com/zxhl/main/page/view/FreeGoodsDialog.kt
+13
-12
UserCenterFragment.kt
...main/java/com/zxhl/uc/page/fragment/UserCenterFragment.kt
+21
-82
fragment_user_center.xml
moduleUc/src/main/res/layout/fragment_user_center.xml
+16
-1
No files found.
app/version.properties
View file @
2a4f013b
PACKAGE_NAME
=
com.zhangxin.magicbox
PACKAGE_NAME
=
com.zhangxin.magicbox
VERSION_CODE
=
16
VERSION_CODE
=
17
VERSION_NAME
=
1.0.3.8
VERSION_NAME
=
1.0.3.9
\ No newline at end of file
\ No newline at end of file
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
View file @
2a4f013b
...
@@ -148,10 +148,12 @@ public class NetConfig {
...
@@ -148,10 +148,12 @@ public class NetConfig {
public
static
final
String
URL_VERSION
=
"app/v1/version"
;
public
static
final
String
URL_VERSION
=
"app/v1/version"
;
public
static
final
String
URL_AUTH_GOOGLE_LOGIN
=
"app/v1/auth/googleLogin"
;
//绑定谷歌登录
public
static
final
String
URL_AUTH_GOOGLE_LOGIN
=
"app/v1/auth/googleLogin"
;
//绑定谷歌登录
public
static
final
String
URL_AUTH_FACEBOOK_LOGIN
=
"app/v1/auth/facebookLogin"
;
//绑定FaceBook登录
public
static
final
String
URL_AUTH_FACEBOOK_LOGIN
=
"app/v1/auth/facebookLogin"
;
//绑定FaceBook登录
public
static
final
String
URL_AUTH_GOOGLE_BIND
=
"app/v1/auth/googleBind"
;
//绑定谷歌登录
public
static
final
String
URL_AUTH_FACEBOOK_BIND
=
"app/v1/auth/facebookBind"
;
//绑定FaceBook登录
///unifiedpay/gateway/google/替换包名/notify/order
///unifiedpay/gateway/google/替换包名/notify/order
public
static
final
String
URL_GOOGLE_NOTIFY
=
URL_PAY_BASE
+
"unifiedpay/gateway/google/com.zhangxin.magicbox/notify/order"
;
public
static
final
String
URL_GOOGLE_NOTIFY
=
URL_PAY_BASE
+
"unifiedpay/gateway/google/com.zhangxin.magicbox/notify/order"
;
}
}
...
@@ -200,15 +202,15 @@ public class NetConfig {
...
@@ -200,15 +202,15 @@ public class NetConfig {
}
}
public
static
class
H5
{
public
static
class
H5
{
public
static
String
WEB_URL_USER
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/userAgree.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_USER
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/userAgree.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_PRIVACY
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/privacy.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_PRIVACY
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/privacy.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_ABOUT_US
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/aboutMe.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_ABOUT_US
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/aboutMe.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_CUSTOMER_SERVICE
=
"https://1568685.s4.udesk.cn/im_client/?web_plugin_id=25351"
;
public
static
String
WEB_URL_CUSTOMER_SERVICE
=
"https://1568685.s4.udesk.cn/im_client/?web_plugin_id=25351"
;
public
static
String
WEB_URL_ZENGZHI_SERVICE
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/xymh_zz_server.html"
;
public
static
String
WEB_URL_ZENGZHI_SERVICE
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/xymh_zz_server.html"
;
public
static
String
WEB_URL_BUYER_KNOW
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/buyerKnow.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_BUYER_KNOW
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/buyerKnow.html?version="
+
Constant
.
Param
.
vn
+
"&appName=MagicBox&company=北京志信博文科技发展有限公司"
;
public
static
String
WEB_URL_RULE
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/hk/MagicBoxRules.html"
;
public
static
String
WEB_URL_RULE
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/hk/MagicBoxRules.html"
;
...
@@ -253,8 +255,8 @@ public class NetConfig {
...
@@ -253,8 +255,8 @@ public class NetConfig {
public
static
final
String
HOME_BOX_CARD_RE_PUMPING_FIVE
=
"app/v3/game/box/lotteryCardRePumpingFive"
;
//五连抽重抽
public
static
final
String
HOME_BOX_CARD_RE_PUMPING_FIVE
=
"app/v3/game/box/lotteryCardRePumpingFive"
;
//五连抽重抽
public
static
final
String
HOME_BOX_CASH_LOG
=
"app/v2/game/box/cashLog"
;
//魔币明细
public
static
final
String
HOME_BOX_CASH_LOG
=
"app/v2/game/box/cashLog"
;
//魔币明细
public
static
final
String
HOME_BOX_ORDER_SHOP
=
"app/v1/game/box/orderShop"
;
//商城 - 用户订单
public
static
final
String
HOME_BOX_ORDER_SHOP
=
"app/v1/game/box/orderShop"
;
//商城 - 用户订单
public
static
final
String
HOME_BOX_INFO_BOXLIST
=
"app/v1/game/box/boxList/info"
;
//个人中心 - 推荐
public
static
final
String
HOME_BOX_INFO_BOXLIST
=
"app/v1/game/box/boxList/info"
;
//个人中心 - 推荐
public
static
final
String
HOME_BOX_NOTICE
=
"app/v1/game/box/notice"
;
//公告
public
static
final
String
HOME_BOX_NOTICE
=
"app/v1/game/box/notice"
;
//公告
}
}
...
...
cms/src/main/java/com/zxhl/cms/net/api/IHomeApi.kt
View file @
2a4f013b
...
@@ -245,4 +245,18 @@ interface IHomeApi {
...
@@ -245,4 +245,18 @@ interface IHomeApi {
@Query
(
"nickname"
)
nickname
:
String
?,
@Query
(
"nickname"
)
nickname
:
String
?,
@Query
(
"picture"
)
picture
:
String
?
@Query
(
"picture"
)
picture
:
String
?
):
Observable
<
Response
<
WxBindEntity
?
>>
):
Observable
<
Response
<
WxBindEntity
?
>>
@POST
(
NetConfig
.
User
.
URL_AUTH_GOOGLE_BIND
)
fun
authGoogleBind
(
@Query
(
"userID"
)
userID
:
String
?,
@Query
(
"nickname"
)
nickname
:
String
?,
@Query
(
"picture"
)
picture
:
String
?
):
Observable
<
Response
<
WxBindEntity
?
>>
@POST
(
NetConfig
.
User
.
URL_AUTH_FACEBOOK_BIND
)
fun
authFaceBookBind
(
@Query
(
"userID"
)
userID
:
String
?,
@Query
(
"nickname"
)
nickname
:
String
?,
@Query
(
"picture"
)
picture
:
String
?
):
Observable
<
Response
<
WxBindEntity
?
>>
}
}
\ No newline at end of file
cms/src/main/java/com/zxhl/cms/net/model/box/OrderEntity.kt
View file @
2a4f013b
...
@@ -11,7 +11,8 @@ class OrderEntity {
...
@@ -11,7 +11,8 @@ class OrderEntity {
var
totalPrice
:
String
?=
""
var
totalPrice
:
String
?=
""
var
disCount
:
String
?=
""
var
disCount
:
String
?=
""
var
text
:
String
?=
""
var
text
:
String
?=
""
var
text2
:
String
?=
""
var
totalPrice2
:
String
?=
""
var
totalPrice2
:
String
?=
""
var
payGoodsId2
:
String
?=
""
var
payGoodsId2
:
String
?=
""
var
allHas
:
Int
?=
0
}
}
\ No newline at end of file
cms/src/main/java/com/zxhl/cms/utils/FaceBookLoginUtil.kt
View file @
2a4f013b
...
@@ -104,7 +104,7 @@ class FaceBookLoginUtil {
...
@@ -104,7 +104,7 @@ class FaceBookLoginUtil {
* faceBook 绑定后端服务器
* faceBook 绑定后端服务器
* */
* */
private
fun
bindFaceBookLogin
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
private
fun
bindFaceBookLogin
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
ApiClient
.
homeApi
.
authFaceBook
Login
(
userId
,
userName
,
picture
)
ApiClient
.
homeApi
.
authFaceBook
Bind
(
userId
,
userName
,
picture
)
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
WxBindEntity
>()
{
.
subscribe
(
object
:
BaseObserver
<
WxBindEntity
>()
{
override
fun
onSuccess
(
result
:
WxBindEntity
?)
{
override
fun
onSuccess
(
result
:
WxBindEntity
?)
{
...
...
cms/src/main/java/com/zxhl/cms/utils/GoogleLoginUtil.kt
View file @
2a4f013b
...
@@ -105,7 +105,7 @@ class GoogleLoginUtil {
...
@@ -105,7 +105,7 @@ class GoogleLoginUtil {
* 绑定后端服务器
* 绑定后端服务器
* */
* */
private
fun
bindGoogle
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
private
fun
bindGoogle
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
ApiClient
.
homeApi
.
authGoogle
Login
(
userId
,
userName
,
picture
)
ApiClient
.
homeApi
.
authGoogle
Bind
(
userId
,
userName
,
picture
)
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
WxBindEntity
>()
{
.
subscribe
(
object
:
BaseObserver
<
WxBindEntity
>()
{
override
fun
onSuccess
(
result
:
WxBindEntity
?)
{
override
fun
onSuccess
(
result
:
WxBindEntity
?)
{
...
...
moduleMain/src/main/java/com/zxhl/main/page/activity/NewBoxGoodsDetailActivity.kt
View file @
2a4f013b
...
@@ -60,7 +60,7 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...
@@ -60,7 +60,7 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
private
var
oneSellCoin
:
Double
=
0.0
private
var
oneSellCoin
:
Double
=
0.0
private
var
fiveSellCoin
:
Double
=
0.0
private
var
fiveSellCoin
:
Double
=
0.0
private
var
boxid
:
String
?
=
""
private
var
boxid
:
String
?
=
""
private
var
wechatutil
:
WeChatUtils
?
=
null
//
private var wechatutil: WeChatUtils? = null
private
var
mSwitchMainObservable
:
Observable
<
Int
>?
=
null
private
var
mSwitchMainObservable
:
Observable
<
Int
>?
=
null
private
var
price
:
String
?
=
""
private
var
price
:
String
?
=
""
private
var
mPayPresenter
:
PayContract
.
Presenter
?
=
null
private
var
mPayPresenter
:
PayContract
.
Presenter
?
=
null
...
@@ -85,8 +85,8 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...
@@ -85,8 +85,8 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
initPayCoing
()
initPayCoing
()
boxid
=
intent
?.
data
?.
getQueryParameter
(
"boxid"
)
?:
""
boxid
=
intent
?.
data
?.
getQueryParameter
(
"boxid"
)
?:
""
wechatutil
=
WeChatUtils
(
this
,
this
)
//
wechatutil = WeChatUtils(this, this)
wechatutil
?.
isWechatLogin
(
null
)
//
wechatutil?.isWechatLogin(null)
//返回
//返回
id_detail_img_back
?.
setOnClickListener
{
id_detail_img_back
?.
setOnClickListener
{
this
.
finish
()
this
.
finish
()
...
@@ -97,11 +97,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...
@@ -97,11 +97,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
}
}
//试玩
//试玩
id_detail_shiwan_rl
?.
setOnClickListener
{
id_detail_shiwan_rl
?.
setOnClickListener
{
if
(!
Constant
.
Switch
.
isLogin
){
// if (!Constant.Switch.isLogin){
JumpUtils
.
ThirdPardLoginJump
()
// JumpUtils.ThirdPardLoginJump()
return
@setOnClickListener
// return@setOnClickListener
}
// }
// JumpUtils.lotteryBoxJump(boxid, Constant.Key.TEST_LOTTERY, "")
BoxResultDialog
.
showTestLotteryResult
(
BoxResultDialog
.
showTestLotteryResult
(
this
,
this
,
boxid
?:
""
,
boxid
?:
""
,
...
@@ -112,10 +111,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...
@@ -112,10 +111,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
}
}
//五连抽
//五连抽
id_btn_five_lottery
?.
setOnClickListener
{
id_btn_five_lottery
?.
setOnClickListener
{
if
(!
Constant
.
Switch
.
isLogin
){
//
if (!Constant.Switch.isLogin){
JumpUtils
.
ThirdPardLoginJump
()
//
JumpUtils.ThirdPardLoginJump()
return
@setOnClickListener
//
return@setOnClickListener
}
//
}
EventUtils
.
onEvent
(
"five_lottery"
,
"5连抽"
)
EventUtils
.
onEvent
(
"five_lottery"
,
"5连抽"
)
EventUtils
.
onEvent
(
"five_lottery_boxid"
,
""
+
boxid
)
EventUtils
.
onEvent
(
"five_lottery_boxid"
,
""
+
boxid
)
// price = id_tv_five_price?.text.toString()
// price = id_tv_five_price?.text.toString()
...
@@ -137,10 +136,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...
@@ -137,10 +136,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
}
}
//单抽
//单抽
id_btn_one_lottery
?.
setOnClickListener
{
id_btn_one_lottery
?.
setOnClickListener
{
if
(!
Constant
.
Switch
.
isLogin
){
//
if (!Constant.Switch.isLogin){
JumpUtils
.
ThirdPardLoginJump
()
//
JumpUtils.ThirdPardLoginJump()
return
@setOnClickListener
//
return@setOnClickListener
}
//
}
EventUtils
.
onEvent
(
"one_lottery"
,
"单抽"
)
EventUtils
.
onEvent
(
"one_lottery"
,
"单抽"
)
EventUtils
.
onEvent
(
"one_lottery_boxid"
,
""
+
boxid
)
EventUtils
.
onEvent
(
"one_lottery_boxid"
,
""
+
boxid
)
clickType
=
Constant
.
Key
.
ONE_LOTTERY
clickType
=
Constant
.
Key
.
ONE_LOTTERY
...
...
moduleMain/src/main/java/com/zxhl/main/page/activity/ShopGoodsDetailActivity.kt
View file @
2a4f013b
...
@@ -70,21 +70,7 @@ class ShopGoodsDetailActivity : BaseActivity(), WeChatLoginSuccessCallBall {
...
@@ -70,21 +70,7 @@ class ShopGoodsDetailActivity : BaseActivity(), WeChatLoginSuccessCallBall {
}
}
id_bug_goods_btn
.
setOnClickListener
(
object
:
NoDoubleClickListener
()
{
id_bug_goods_btn
.
setOnClickListener
(
object
:
NoDoubleClickListener
()
{
override
fun
onNoDoubleClick
(
v
:
View
?)
{
override
fun
onNoDoubleClick
(
v
:
View
?)
{
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
gotoBuy
()
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
if
(
result
?.
status
.
equals
(
"0"
)){
JumpUtils
.
ThirdPardLoginJump
()
}
else
{
gotoBuy
()
}
}
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
}
})
})
}
}
...
...
moduleMain/src/main/java/com/zxhl/main/page/fragment/AllFragment.kt
View file @
2a4f013b
...
@@ -141,20 +141,21 @@ class AllFragment : BaseFragment, HomeContract.View,
...
@@ -141,20 +141,21 @@ class AllFragment : BaseFragment, HomeContract.View,
}
}
R
.
id
.
id_tv_one_lottery
->
{
R
.
id
.
id_tv_one_lottery
->
{
Log
.
e
(
"MXL"
,
"点击抽奖"
)
Log
.
e
(
"MXL"
,
"点击抽奖"
)
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
oneLottery
(
data
)
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
// wechatutil?.isWechatLogin(object : IsLoginCallBack<IsWeChatLoginEntity> {
if
(
result
?.
status
.
equals
(
"0"
))
{
// override fun onResult(result: IsWeChatLoginEntity?) {
JumpUtils
.
ThirdPardLoginJump
()
// if (result?.status.equals("0")) {
}
else
{
// JumpUtils.ThirdPardLoginJump()
oneLottery
(
data
)
// } else {
}
// oneLottery(data)
}
// }
// }
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
//
// override fun onError(code: String?, errorMsg: String?) {
}
//
// }
})
//
// })
}
}
}
}
...
...
moduleMain/src/main/java/com/zxhl/main/page/fragment/WareHouseFragment.kt
View file @
2a4f013b
...
@@ -65,20 +65,20 @@ class WareHouseFragment : BaseViewPagerFragment(), WeChatLoginSuccessCallBall {
...
@@ -65,20 +65,20 @@ class WareHouseFragment : BaseViewPagerFragment(), WeChatLoginSuccessCallBall {
override
fun
lazyLoad
()
{
override
fun
lazyLoad
()
{
super
.
lazyLoad
()
super
.
lazyLoad
()
if
(
isVisible
&&
isInitial
)
{
if
(
isVisible
&&
isInitial
)
{
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
//
wechatutil?.isWechatLogin(object : IsLoginCallBack<IsWeChatLoginEntity> {
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
//
override fun onResult(result: IsWeChatLoginEntity?) {
if
(
result
?.
status
.
equals
(
"0"
)){
//
if(result?.status.equals("0")){
JumpUtils
.
ThirdPardLoginJump
()
//
JumpUtils.ThirdPardLoginJump()
}
else
{
//
}else{
createFragments
[
viewPager
?.
currentItem
?:
0
].
userVisibleHint
=
true
//
createFragments[viewPager?.currentItem ?: 0].userVisibleHint = true
}
//
}
}
//
}
//
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
//
override fun onError(code: String?, errorMsg: String?) {
//
}
//
}
//
})
//
})
}
}
...
...
moduleMain/src/main/java/com/zxhl/main/page/presenter/SplashPresenter.kt
View file @
2a4f013b
...
@@ -90,14 +90,7 @@ class SplashPresenter : SplashContract.Presenter {
...
@@ -90,14 +90,7 @@ class SplashPresenter : SplashContract.Presenter {
val
user
=
SettingPreference
.
getUserInfoData
()
val
user
=
SettingPreference
.
getUserInfoData
()
val
token
=
SettingPreference
.
getUserToken
()
val
token
=
SettingPreference
.
getUserToken
()
if
(
user
==
null
&&
TextUtils
.
isEmpty
(
token
))
{
if
(
user
==
null
&&
TextUtils
.
isEmpty
(
token
))
{
if
(
TextUtils
.
equals
(
Utils
.
getChannel
(
AppContext
.
get
()),
"toutiao_h5"
))
{
deviceLogin
()
// deviceLogin()
getAds
()
}
else
{
deviceLogin
()
}
}
else
{
}
else
{
UserDataUtils
.
updateUserInfo
(
null
)
UserDataUtils
.
updateUserInfo
(
null
)
getAds
()
getAds
()
...
...
moduleMain/src/main/java/com/zxhl/main/page/view/FreeGoodsDialog.kt
View file @
2a4f013b
...
@@ -68,18 +68,19 @@ object FreeGoodsDialog {
...
@@ -68,18 +68,19 @@ object FreeGoodsDialog {
dialog_lottie_view
?.
setOnClickListener
{
dialog_lottie_view
?.
setOnClickListener
{
// JumpUtils.lotteryBoxJump("-2", Constant.Key.ONE_LOTTERY, "0")
// JumpUtils.lotteryBoxJump("-2", Constant.Key.ONE_LOTTERY, "0")
mDialog
?.
dismiss
()
mDialog
?.
dismiss
()
if
(
Constant
.
Switch
.
isLogin
)
{
EventUtils
.
onEvent
(
"free_box_for_new_users"
,
"新人免费盲盒弹窗点击成功"
)
EventUtils
.
onEvent
(
"free_box_for_new_users"
,
"新人免费盲盒弹窗点击成功"
)
BoxResultDialog
.
showOneLotteryResult
(
BoxResultDialog
.
showOneLotteryResult
(
context
as
Activity
,
context
as
Activity
,
"-2"
,
"-2"
,
0.0
,
0.0
,
0.0
,
0.0
,
0
0
)
)
// if (Constant.Switch.isLogin) {
}
else
{
//
JumpUtils
.
ThirdPardLoginJump
()
// } else {
}
// JumpUtils.ThirdPardLoginJump()
// }
}
}
mDialog
?.
setOnDismissListener
{
mDialog
?.
setOnDismissListener
{
...
...
moduleUc/src/main/java/com/zxhl/uc/page/fragment/UserCenterFragment.kt
View file @
2a4f013b
...
@@ -43,62 +43,19 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
...
@@ -43,62 +43,19 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
id_rl_tuijian_box
?.
adapter
=
mAdapter
id_rl_tuijian_box
?.
adapter
=
mAdapter
id_rl_address
?.
setOnClickListener
{
id_rl_address
?.
setOnClickListener
{
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
JumpUtils
.
ReceiveAddressReslutJump
(
"0"
)
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
if
(
result
?.
status
.
equals
(
"0"
))
{
JumpUtils
.
ThirdPardLoginJump
()
}
else
{
JumpUtils
.
ReceiveAddressReslutJump
(
"0"
)
}
}
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
}
id_ll_my_coin
?.
setOnClickListener
{
id_ll_my_coin
?.
setOnClickListener
{
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
JumpUtils
.
payJump
(
"0"
,
"0"
,
"0"
)
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
if
(
result
?.
status
.
equals
(
"0"
))
{
JumpUtils
.
ThirdPardLoginJump
()
}
else
{
JumpUtils
.
payJump
(
"0"
,
"0"
,
"0"
)
}
}
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
}
id_rl_logistics
?.
setOnClickListener
{
id_rl_logistics
?.
setOnClickListener
{
JumpUtils
.
LogisticsJump
()
JumpUtils
.
LogisticsJump
()
}
}
id_rl_jiyijan
?.
setOnClickListener
{
id_rl_jiyijan
?.
setOnClickListener
{
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
JumpUtils
.
webJump
(
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
mActivity
.
getString
(
R
.
string
.
customer_service
),
if
(
result
?.
status
.
equals
(
"0"
))
{
NetConfig
.
H5
.
WEB_URL_CUSTOMER_SERVICE
JumpUtils
.
ThirdPardLoginJump
()
)
}
else
{
JumpUtils
.
webJump
(
mActivity
.
getString
(
R
.
string
.
customer_service
),
NetConfig
.
H5
.
WEB_URL_CUSTOMER_SERVICE
)
}
}
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
}
id_rl_lianxikefu
?.
setOnClickListener
{
id_rl_lianxikefu
?.
setOnClickListener
{
JumpUtils
.
webJump
(
JumpUtils
.
webJump
(
...
@@ -131,41 +88,16 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
...
@@ -131,41 +88,16 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
}
}
id_ll_my_magic_coin
?.
setOnClickListener
{
id_ll_my_magic_coin
?.
setOnClickListener
{
//我的魔币
//我的魔币
JumpUtils
.
MyMagicCoinJump
()
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
if
(
result
?.
status
.
equals
(
"0"
))
{
JumpUtils
.
ThirdPardLoginJump
()
}
else
{
JumpUtils
.
MyMagicCoinJump
()
}
}
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
}
id_rl_my_order
?.
setOnClickListener
{
id_rl_my_order
?.
setOnClickListener
{
//我的订单
//我的订单
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
JumpUtils
.
MyOrderJump
()
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
if
(
result
?.
status
.
equals
(
"0"
))
{
JumpUtils
.
ThirdPardLoginJump
()
}
else
{
JumpUtils
.
MyOrderJump
()
}
}
override
fun
onError
(
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
}
id_login_btn
.
setOnClickListener
{
JumpUtils
.
ThirdPardLoginJump
()
}
isLogin
()
}
}
override
fun
data
()
{
override
fun
data
()
{
...
@@ -190,6 +122,11 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
...
@@ -190,6 +122,11 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
UserDataUtils
.
updateUserInfo
(
this
)
UserDataUtils
.
updateUserInfo
(
this
)
}
}
isPause
=
false
isPause
=
false
if
(
Constant
.
Switch
.
isLogin
){
id_login_btn
.
visibility
=
View
.
GONE
}
else
{
id_login_btn
.
visibility
=
View
.
VISIBLE
}
}
}
override
fun
lazyLoad
()
{
override
fun
lazyLoad
()
{
...
@@ -204,8 +141,10 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
...
@@ -204,8 +141,10 @@ class UserCenterFragment : BaseFragment(), AdCallback<String>, WeChatLoginSucces
fun
isLogin
()
{
fun
isLogin
()
{
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
wechatutil
?.
isWechatLogin
(
object
:
IsLoginCallBack
<
IsWeChatLoginEntity
>
{
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
override
fun
onResult
(
result
:
IsWeChatLoginEntity
?)
{
if
(
result
?.
status
.
equals
(
"1"
))
{
if
(
Constant
.
Switch
.
isLogin
){
id_login_btn
.
visibility
=
View
.
GONE
}
else
{
id_login_btn
.
visibility
=
View
.
VISIBLE
}
}
}
}
...
...
moduleUc/src/main/res/layout/fragment_user_center.xml
View file @
2a4f013b
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
android:textSize=
"15sp"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<TextView
<TextView
android:id=
"@+id/id_fragment_user_center_id"
android:id=
"@+id/id_fragment_user_center_id"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -111,6 +110,22 @@
...
@@ -111,6 +110,22 @@
android:textColor=
"@color/color_333333"
android:textColor=
"@color/color_333333"
android:textSize=
"18sp"
/>
android:textSize=
"18sp"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/id_login_btn"
android:layout_width=
"90dp"
android:layout_height=
"40dp"
android:layout_alignTop=
"@+id/id_fragment_user_center_photo"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"15dp"
android:background=
"@drawable/shape_pay_bg_4c84ff"
android:gravity=
"center"
android:text=
"Login"
android:textColor=
"@color/white"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
...
...
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