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
9ecfede9
Commit
9ecfede9
authored
Apr 08, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :调整新人魔盒 [实现方案] :
parent
8f9f7ef7
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
135 additions
and
80 deletions
+135
-80
MainActivity.java
...ain/java/com/zhangxin/magicbox/activity/MainActivity.java
+3
-1
GooglePayHelper.kt
cms/src/main/java/com/zxhl/cms/googlepay/GooglePayHelper.kt
+1
-0
PayAdapter.kt
cms/src/main/java/com/zxhl/cms/pay/PayAdapter.kt
+1
-1
WeChatUtils.kt
cms/src/main/java/com/zxhl/cms/utils/WeChatUtils.kt
+53
-53
strings.xml
cms/src/main/res/values/strings.xml
+1
-1
ThirdpartyLoginActivity.kt
...va/com/zxhl/main/page/activity/ThirdpartyLoginActivity.kt
+3
-0
BoxAdapter.kt
...in/src/main/java/com/zxhl/main/page/adapter/BoxAdapter.kt
+7
-7
PickUpAdapter.kt
...src/main/java/com/zxhl/main/page/adapter/PickUpAdapter.kt
+6
-5
AllFragment.kt
.../src/main/java/com/zxhl/main/page/fragment/AllFragment.kt
+20
-0
HomeFragment.kt
...src/main/java/com/zxhl/main/page/fragment/HomeFragment.kt
+11
-1
BoxResultDialog.kt
.../src/main/java/com/zxhl/main/page/view/BoxResultDialog.kt
+1
-1
FreeGoodsDialog.kt
.../src/main/java/com/zxhl/main/page/view/FreeGoodsDialog.kt
+15
-2
RecycleDialog.kt
...in/src/main/java/com/zxhl/main/page/view/RecycleDialog.kt
+1
-1
biaoqian_baozhang.png
moduleMain/src/main/res/drawable-xhdpi/biaoqian_baozhang.png
+0
-0
biaoqian_xianshi.png
moduleMain/src/main/res/drawable-xhdpi/biaoqian_xianshi.png
+0
-0
biaoqianxinren.png
moduleMain/src/main/res/drawable-xhdpi/biaoqianxinren.png
+0
-0
icon_box_item_label.9.png
...ain/src/main/res/drawable-xhdpi/icon_box_item_label.9.png
+0
-0
activity_layout_order_detail.xml
...Main/src/main/res/layout/activity_layout_order_detail.xml
+1
-1
dialog_layout_box_result.xml
moduleMain/src/main/res/layout/dialog_layout_box_result.xml
+1
-1
fragment_layout_other.xml
moduleMain/src/main/res/layout/fragment_layout_other.xml
+1
-1
item_layout_new_box.xml
moduleMain/src/main/res/layout/item_layout_new_box.xml
+9
-4
No files found.
app/src/main/java/com/zhangxin/magicbox/activity/MainActivity.java
View file @
9ecfede9
...
@@ -233,12 +233,14 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
...
@@ -233,12 +233,14 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
}
else
{
}
else
{
DiscountDialog
.
INSTANCE
.
showDiscountDialog
(
mActivity
);
DiscountDialog
.
INSTANCE
.
showDiscountDialog
(
mActivity
);
}
}
}
else
{
exitActivity
();
}
}
}
}
@Override
@Override
public
void
onFailure
(
Throwable
e
,
String
code
,
String
errorMsg
)
{
public
void
onFailure
(
Throwable
e
,
String
code
,
String
errorMsg
)
{
exitActivity
();
}
}
});
});
}
}
...
...
cms/src/main/java/com/zxhl/cms/googlepay/GooglePayHelper.kt
View file @
9ecfede9
...
@@ -583,6 +583,7 @@ class GooglePayHelper {
...
@@ -583,6 +583,7 @@ class GooglePayHelper {
EventUtils
.
onEvent
(
"GooglePayGetOrderIdE"
,
"获取订单号_成功"
)
EventUtils
.
onEvent
(
"GooglePayGetOrderIdE"
,
"获取订单号_成功"
)
var
sku
=
goodsId
.
replace
(
"-"
,
"_"
)
var
sku
=
goodsId
.
replace
(
"-"
,
"_"
)
Log
.
e
(
TAG
,
"SKU${sku}"
)
purchase
(
"xymh_$sku"
,
result
.
outTradeNo
?:
""
)
purchase
(
"xymh_$sku"
,
result
.
outTradeNo
?:
""
)
}
else
{
}
else
{
...
...
cms/src/main/java/com/zxhl/cms/pay/PayAdapter.kt
View file @
9ecfede9
...
@@ -88,7 +88,7 @@ class PayAdapter : BaseRecyclerAdapter<MemberEntity.ProductDetail, PayAdapter.Me
...
@@ -88,7 +88,7 @@ class PayAdapter : BaseRecyclerAdapter<MemberEntity.ProductDetail, PayAdapter.Me
// holder.mTitle.text = data.name
// holder.mTitle.text = data.name
holder
.
mPrice
.
text
=
data
.
title
holder
.
mPrice
.
text
=
data
.
title
holder
.
mPriceMoney
.
text
=
holder
.
mPriceMoney
.
text
=
AppContext
.
get
().
resources
.
getString
(
R
.
string
.
box_detail_open_box_money_unit
)
+
data
.
titl
e
AppContext
.
get
().
resources
.
getString
(
R
.
string
.
box_detail_open_box_money_unit
)
+
data
.
nam
e
// if (pos == 2) {
// if (pos == 2) {
// holder.mTips.visibility = View.VISIBLE
// holder.mTips.visibility = View.VISIBLE
// } else {
// } else {
...
...
cms/src/main/java/com/zxhl/cms/utils/WeChatUtils.kt
View file @
9ecfede9
...
@@ -17,13 +17,13 @@ import java.util.*
...
@@ -17,13 +17,13 @@ import java.util.*
class
WeChatUtils
{
class
WeChatUtils
{
private
var
callBack
:
WeChatLoginSuccessCallBall
private
var
callBack
:
WeChatLoginSuccessCallBall
?
private
var
isLogin
:
Boolean
?
=
false
private
var
isLogin
:
Boolean
?
=
false
private
var
mContext
:
Context
?
=
null
private
var
mContext
:
Context
?
=
null
private
var
lottery
:
String
?
=
""
private
var
lottery
:
String
?
=
""
constructor
(
context
:
Context
,
mCallBack
:
WeChatLoginSuccessCallBall
)
:
super
()
{
constructor
(
context
:
Context
,
mCallBack
:
WeChatLoginSuccessCallBall
?
)
:
super
()
{
mContext
=
context
mContext
=
context
this
.
callBack
=
mCallBack
this
.
callBack
=
mCallBack
...
@@ -130,21 +130,21 @@ class WeChatUtils {
...
@@ -130,21 +130,21 @@ class WeChatUtils {
fun
bindWx
(
accesstoken
:
String
,
opid
:
String
,
str
:
String
)
{
fun
bindWx
(
accesstoken
:
String
,
opid
:
String
,
str
:
String
)
{
//执行微信绑定
//执行微信绑定
//成功后调
//成功后调
ApiClient
.
homeApi
.
bindWx
(
opid
,
accesstoken
)
//
ApiClient.homeApi.bindWx(opid, accesstoken)
.
compose
(
RxSchedulers
.
observableIO2Main
())
//
.compose(RxSchedulers.observableIO2Main())
.
subscribe
(
object
:
BaseObserver
<
WxBindEntity
>()
{
//
.subscribe(object : BaseObserver<WxBindEntity>() {
override
fun
onSuccess
(
result
:
WxBindEntity
?)
{
//
override fun onSuccess(result: WxBindEntity?) {
SettingPreference
.
saveToken
(
result
?.
token
)
//
SettingPreference.saveToken(result?.token)
Log
.
e
(
"MXL"
,
"微信登录成功"
)
//
Log.e("MXL", "微信登录成功")
// getShareCon tent(mContext)
//
// getShareCon tent(mContext)
callBack
.
loginSuccess
(
lottery
)
//
callBack.loginSuccess(lottery)
}
//
}
//
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
//
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
callBack
.
loginSuccess
(
lottery
)
//
callBack.loginSuccess(lottery)
}
//
}
//
})
//
})
}
}
...
@@ -176,24 +176,24 @@ class WeChatUtils {
...
@@ -176,24 +176,24 @@ class WeChatUtils {
}
}
fun
bindFaceBookLogin
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
fun
bindFaceBookLogin
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
ApiClient
.
homeApi
.
authFaceBookLogin
(
userId
,
userName
,
picture
)
//
ApiClient.homeApi.authFaceBookLogin(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?) {
SettingPreference
.
saveToken
(
result
?.
token
)
//
SettingPreference.saveToken(result?.token)
UserDataUtils
.
updateUserInfo
(
null
)
//
UserDataUtils.updateUserInfo(null)
Constant
.
Switch
.
isLogin
=
true
//
Constant.Switch.isLogin = true
Log
.
e
(
"MXL"
,
"FaceBook登录成功"
)
//
Log.e("MXL", "FaceBook登录成功")
// getShareCon tent(mContext)
//
// getShareCon tent(mContext)
// callBack.loginSuccess(lottery)
//
// callBack.loginSuccess(lottery)
callBack
.
loginSuccess
(
""
)
//
callBack.loginSuccess("")
}
//
}
//
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
//
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
// callBack.loginSuccess(lottery)
//
// callBack.loginSuccess(lottery)
}
//
}
//
})
//
})
}
}
fun
GoogleLogin
()
{
fun
GoogleLogin
()
{
...
@@ -241,24 +241,24 @@ class WeChatUtils {
...
@@ -241,24 +241,24 @@ class WeChatUtils {
}
}
fun
bindGoogle
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
fun
bindGoogle
(
userId
:
String
?,
userName
:
String
?,
picture
:
String
?)
{
ApiClient
.
homeApi
.
authGoogleLogin
(
userId
,
userName
,
picture
)
//
ApiClient.homeApi.authGoogleLogin(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?) {
SettingPreference
.
saveToken
(
result
?.
token
)
//
SettingPreference.saveToken(result?.token)
UserDataUtils
.
updateUserInfo
(
null
)
//
UserDataUtils.updateUserInfo(null)
Constant
.
Switch
.
isLogin
=
true
//
Constant.Switch.isLogin = true
Log
.
e
(
"MXL"
,
"谷歌登录成功"
)
//
Log.e("MXL", "谷歌登录成功")
// getShareCon tent(mContext)
//
// getShareCon tent(mContext)
// callBack.loginSuccess(lottery)
//
// callBack.loginSuccess(lottery)
callBack
.
loginSuccess
(
""
)
//
callBack.loginSuccess("")
}
//
}
//
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
//
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
// callBack.loginSuccess(lottery)
//
// callBack.loginSuccess(lottery)
}
//
}
//
})
//
})
}
}
}
}
\ No newline at end of file
cms/src/main/res/values/strings.xml
View file @
9ecfede9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<string
name=
"wait_ing"
>
loading
</string>
<string
name=
"wait_ing"
>
loading
</string>
<string
name=
"wait_ing2"
>
Loading
</string>
<string
name=
"wait_ing2"
>
Loading
</string>
<string
name=
"get_sms_code_success"
>
验证码已发送
</string>
<string
name=
"get_sms_code_success"
>
验证码已发送
</string>
<string
name=
"nav_back_again_finish"
>
再按一次退出程序
</string>
<string
name=
"nav_back_again_finish"
>
Press back again to exit
</string>
<string
name=
"album_not_available"
>
请检查系统相册是否可用
</string>
<string
name=
"album_not_available"
>
请检查系统相册是否可用
</string>
...
...
moduleMain/src/main/java/com/zxhl/main/page/activity/ThirdpartyLoginActivity.kt
View file @
9ecfede9
...
@@ -8,6 +8,7 @@ import com.facebook.login.LoginConfiguration
...
@@ -8,6 +8,7 @@ import com.facebook.login.LoginConfiguration
import
com.facebook.login.LoginManager
import
com.facebook.login.LoginManager
import
com.facebook.login.LoginResult
import
com.facebook.login.LoginResult
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.common.Constant
import
com.zxhl.cms.common.base.BaseActivity
import
com.zxhl.cms.common.base.BaseActivity
import
com.zxhl.cms.utils.*
import
com.zxhl.cms.utils.*
import
com.zxhl.cms.widget.LoadingDialog
import
com.zxhl.cms.widget.LoadingDialog
...
@@ -59,6 +60,7 @@ class ThirdpartyLoginActivity : BaseActivity(), WeChatLoginSuccessCallBall {
...
@@ -59,6 +60,7 @@ class ThirdpartyLoginActivity : BaseActivity(), WeChatLoginSuccessCallBall {
googleLogin
?.
googleLogin
(
object
:
GoogleLoginUtil
.
LoginCallBack
{
googleLogin
?.
googleLogin
(
object
:
GoogleLoginUtil
.
LoginCallBack
{
override
fun
onLoginSuccess
()
{
override
fun
onLoginSuccess
()
{
runOnUiThread
{
runOnUiThread
{
Constant
.
NewUserBox
.
isRefreshHomeList
=
true
mLoading
?.
setResult
(
true
,
"login success"
,
0
)
mLoading
?.
setResult
(
true
,
"login success"
,
0
)
finish
()
finish
()
}
}
...
@@ -80,6 +82,7 @@ class ThirdpartyLoginActivity : BaseActivity(), WeChatLoginSuccessCallBall {
...
@@ -80,6 +82,7 @@ class ThirdpartyLoginActivity : BaseActivity(), WeChatLoginSuccessCallBall {
mLoading
?.
show
()
mLoading
?.
show
()
faceBookLogin
?.
faceBookLogin
(
object
:
FaceBookLoginUtil
.
LoginCallBack
{
faceBookLogin
?.
faceBookLogin
(
object
:
FaceBookLoginUtil
.
LoginCallBack
{
override
fun
onLoginSuccess
()
{
override
fun
onLoginSuccess
()
{
Constant
.
NewUserBox
.
isRefreshHomeList
=
true
runOnUiThread
{
runOnUiThread
{
mLoading
?.
setResult
(
true
,
"login success"
,
0
)
mLoading
?.
setResult
(
true
,
"login success"
,
0
)
finish
()
finish
()
...
...
moduleMain/src/main/java/com/zxhl/main/page/adapter/BoxAdapter.kt
View file @
9ecfede9
...
@@ -75,12 +75,12 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
...
@@ -75,12 +75,12 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
holder
.
id_tv_new_people_price
?.
visibility
=
View
.
GONE
holder
.
id_tv_new_people_price
?.
visibility
=
View
.
GONE
if
(
bean
.
activitiesType
==
1
)
{
if
(
bean
.
activitiesType
==
1
)
{
holder
.
id_img_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_img_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_img_new_people
?.
setImageResource
(
R
.
drawable
.
biaoqian_xianshi
)
holder
.
id_img_new_people
?.
text
=
"Limited-time offer"
holder
.
item_tv_price
?.
text
=
bean
.
onePriceStr
holder
.
item_tv_price
?.
text
=
bean
.
onePriceStr
holder
.
id_tv_one_lottery
?.
text
=
"Open"
holder
.
id_tv_one_lottery
?.
text
=
"Open"
}
else
if
(
bean
.
activitiesType
==
2
)
{
}
else
if
(
bean
.
activitiesType
==
2
)
{
holder
.
id_img_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_img_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_img_new_people
?.
setImageResource
(
R
.
drawable
.
biaoqian_baozhang
)
holder
.
id_img_new_people
?.
text
=
"Buy one get one free"
holder
.
item_tv_price
?.
text
=
bean
.
activitiesPrice
holder
.
item_tv_price
?.
text
=
bean
.
activitiesPrice
// holder.id_tv_one_lottery?.text = "买一送一"
// holder.id_tv_one_lottery?.text = "买一送一"
}
else
{
}
else
{
...
@@ -92,12 +92,12 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
...
@@ -92,12 +92,12 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
holder
.
id_tv_one_lottery
?.
text
=
"Open"
holder
.
id_tv_one_lottery
?.
text
=
"Open"
holder
.
item_tv_price
?.
text
=
bean
.
onePriceStr
holder
.
item_tv_price
?.
text
=
bean
.
onePriceStr
holder
.
id_img_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_img_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_img_new_people
?.
setImageResource
(
R
.
drawable
.
biaoqianxinren
)
holder
.
id_img_new_people
?.
text
=
"Limited-offer for new users"
holder
.
id_rl_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_rl_new_people
?.
visibility
=
View
.
VISIBLE
holder
.
id_tv_new_people_price
?.
visibility
=
View
.
VISIBLE
holder
.
id_tv_new_people_price
?.
visibility
=
View
.
VISIBLE
holder
.
id_tv_new_people_price
?.
text
=
"${bean.newUserPrice}"
holder
.
id_tv_new_people_price
?.
text
=
"${bean.newUserPrice}"
holder
.
id_tv_new_people_price
?.
getPaint
()
?.
setFlags
(
Paint
.
STRIKE_THRU_TEXT_FLAG
)
holder
.
id_tv_new_people_price
?.
paint
?.
flags
=
Paint
.
STRIKE_THRU_TEXT_FLAG
holder
.
id_new_user_box_tips
?.
text
=
"
New user $${bean.discount}
discount"
holder
.
id_new_user_box_tips
?.
text
=
"
New user ${bean.discount} lucky coin
discount"
}
}
holder
.
item_img_goos
?.
setLoadImageUrl
(
bean
.
mainImage
,
false
)
holder
.
item_img_goos
?.
setLoadImageUrl
(
bean
.
mainImage
,
false
)
// holder.item_img_1?.setLoadImageUrl(bean.imageList2?.get(0), false)
// holder.item_img_1?.setLoadImageUrl(bean.imageList2?.get(0), false)
...
@@ -173,7 +173,7 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
...
@@ -173,7 +173,7 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
var
id_tv_new_people_price
:
TextView
?
var
id_tv_new_people_price
:
TextView
?
var
id_new_user_box_tips
:
TextView
?
var
id_new_user_box_tips
:
TextView
?
var
id_rl_new_people
:
RelativeLayout
?
var
id_rl_new_people
:
RelativeLayout
?
var
id_img_new_people
:
Image
View
?
var
id_img_new_people
:
Text
View
?
constructor
(
constructor
(
itemView
:
View
itemView
:
View
...
@@ -190,7 +190,7 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
...
@@ -190,7 +190,7 @@ class BoxAdapter : BaseRecyclerAdapter<HomeBoxListEntity, RecyclerView.ViewHolde
item_img_goos
=
itemView
.
findViewById
<
RecycleImageView
>(
R
.
id
.
id_img_goods
)
item_img_goos
=
itemView
.
findViewById
<
RecycleImageView
>(
R
.
id
.
id_img_goods
)
item_rl_goods
=
itemView
.
findViewById
<
RecyclerView
>(
R
.
id
.
id_rl_goods
)
item_rl_goods
=
itemView
.
findViewById
<
RecyclerView
>(
R
.
id
.
id_rl_goods
)
item_ll
=
itemView
.
findViewById
<
RelativeLayout
>(
R
.
id
.
id_ll_item
)
item_ll
=
itemView
.
findViewById
<
RelativeLayout
>(
R
.
id
.
id_ll_item
)
id_img_new_people
=
itemView
.
findViewById
<
Image
View
>(
R
.
id
.
id_img_new_people
)
id_img_new_people
=
itemView
.
findViewById
<
Text
View
>(
R
.
id
.
id_img_new_people
)
}
}
}
}
...
...
moduleMain/src/main/java/com/zxhl/main/page/adapter/PickUpAdapter.kt
View file @
9ecfede9
...
@@ -105,11 +105,12 @@ class PickUpAdapter : BaseRecyclerAdapter<DepotEntity, RecyclerView.ViewHolder>
...
@@ -105,11 +105,12 @@ class PickUpAdapter : BaseRecyclerAdapter<DepotEntity, RecyclerView.ViewHolder>
mContext
?.
startActivity
(
intent
)
mContext
?.
startActivity
(
intent
)
}
}
if
(
bean
.
boxId
.
equals
(
"-2"
))
{
holder
.
item_img_xinren
?.
visibility
=
View
.
GONE
holder
.
item_img_xinren
?.
visibility
=
View
.
VISIBLE
// if (bean.boxId.equals("-2")) {
}
else
{
// holder.item_img_xinren?.visibility = View.VISIBLE
holder
.
item_img_xinren
?.
visibility
=
View
.
GONE
// } else {
}
// holder.item_img_xinren?.visibility = View.GONE
// }
if
(
isAllSelect
)
{
if
(
isAllSelect
)
{
holder
.
item_img_choose
?.
isChecked
=
true
holder
.
item_img_choose
?.
isChecked
=
true
}
}
...
...
moduleMain/src/main/java/com/zxhl/main/page/fragment/AllFragment.kt
View file @
9ecfede9
...
@@ -83,6 +83,14 @@ class AllFragment : BaseFragment, HomeContract.View,
...
@@ -83,6 +83,14 @@ class AllFragment : BaseFragment, HomeContract.View,
})
})
}
}
override
fun
onResume
()
{
super
.
onResume
()
if
(
Constant
.
NewUserBox
.
isRefreshHomeList
)
{
mPresenter
?.
getHomeBoxList
(
title
,
true
)
Constant
.
NewUserBox
.
isRefreshHomeList
=
false
}
}
override
fun
lazyLoad
()
{
override
fun
lazyLoad
()
{
super
.
lazyLoad
()
super
.
lazyLoad
()
Log
.
d
(
"lazyLoad"
,
"isInitial:"
+
isInitial
+
" isVisible:"
+
isVisible
)
Log
.
d
(
"lazyLoad"
,
"isInitial:"
+
isInitial
+
" isVisible:"
+
isVisible
)
...
@@ -156,6 +164,18 @@ class AllFragment : BaseFragment, HomeContract.View,
...
@@ -156,6 +164,18 @@ class AllFragment : BaseFragment, HomeContract.View,
fun
oneLottery
(
data
:
HomeBoxListEntity
?)
{
fun
oneLottery
(
data
:
HomeBoxListEntity
?)
{
ownCoin
=
SettingPreference
.
getUserCoinNum
().
toDoubleOrNull
()
ownCoin
=
SettingPreference
.
getUserCoinNum
().
toDoubleOrNull
()
if
(
ownCoin
?.
compareTo
(
data
?.
onePrice
!!
)
!!
>=
0
)
{
if
(
ownCoin
?.
compareTo
(
data
?.
onePrice
!!
)
!!
>=
0
)
{
BoxResultDialog
.
setDialogDismissCallback
(
object
:
BoxResultDialog
.
DialogDismissCallback
{
override
fun
onDismiss
()
{
}
override
fun
onLotterySuccess
()
{
if
(
data
?.
boxId
?:
""
==
Constant
.
NewUserBox
.
newUserBoxId
&&!
Constant
.
NewUserBox
.
newUserBoxId
.
isNullOrEmpty
()){
mPresenter
?.
getHomeBoxList
(
title
,
true
)
Constant
.
NewUserBox
.
isRefreshHomeList
=
false
}
}
})
BoxResultDialog
.
showOneLotteryResult
(
BoxResultDialog
.
showOneLotteryResult
(
mActivity
,
mActivity
,
data
?.
boxId
?:
""
,
data
?.
boxId
?:
""
,
...
...
moduleMain/src/main/java/com/zxhl/main/page/fragment/HomeFragment.kt
View file @
9ecfede9
...
@@ -9,6 +9,7 @@ import androidx.fragment.app.Fragment
...
@@ -9,6 +9,7 @@ import androidx.fragment.app.Fragment
import
com.bumptech.glide.Glide
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.resource.bitmap.CircleCrop
import
com.bumptech.glide.load.resource.bitmap.CircleCrop
import
com.bumptech.glide.request.RequestOptions
import
com.bumptech.glide.request.RequestOptions
import
com.zxhl.cms.common.Constant
import
com.zxhl.cms.common.FragmentAdapter
import
com.zxhl.cms.common.FragmentAdapter
import
com.zxhl.cms.common.NetConfig
import
com.zxhl.cms.common.NetConfig
import
com.zxhl.cms.common.base.BaseFragment
import
com.zxhl.cms.common.base.BaseFragment
...
@@ -20,6 +21,7 @@ import com.zxhl.cms.utils.AdCallback
...
@@ -20,6 +21,7 @@ import com.zxhl.cms.utils.AdCallback
import
com.zxhl.cms.utils.JumpUtils
import
com.zxhl.cms.utils.JumpUtils
import
com.zxhl.cms.utils.UpdateCallback
import
com.zxhl.cms.utils.UpdateCallback
import
com.zxhl.cms.utils.UserDataUtils.updateUserInfo
import
com.zxhl.cms.utils.UserDataUtils.updateUserInfo
import
com.zxhl.cms.utils.WeChatUtils
import
com.zxhl.main.R
import
com.zxhl.main.R
import
com.zxhl.main.page.contract.NewPeopleContract
import
com.zxhl.main.page.contract.NewPeopleContract
import
com.zxhl.main.page.presenter.NewPeoplePresenter
import
com.zxhl.main.page.presenter.NewPeoplePresenter
...
@@ -73,6 +75,7 @@ class HomeFragment : BaseFragment(), NewPeopleContract.View, UpdateCallback {
...
@@ -73,6 +75,7 @@ class HomeFragment : BaseFragment(), NewPeopleContract.View, UpdateCallback {
}
}
}
}
private
var
wechatutil
:
WeChatUtils
?
=
null
override
fun
init
(
view
:
View
?)
{
override
fun
init
(
view
:
View
?)
{
//showGuide()
//showGuide()
...
@@ -109,7 +112,7 @@ class HomeFragment : BaseFragment(), NewPeopleContract.View, UpdateCallback {
...
@@ -109,7 +112,7 @@ class HomeFragment : BaseFragment(), NewPeopleContract.View, UpdateCallback {
id_img_open_box
?.
animation
=
id_img_open_box
?.
animation
=
AnimationUtils
.
loadAnimation
(
context
,
R
.
anim
.
scale_anim
)
AnimationUtils
.
loadAnimation
(
context
,
R
.
anim
.
scale_anim
)
WeChatUtils
(
mActivity
,
null
).
isWechatLogin
(
null
)
// UpdateUserInfo()
// UpdateUserInfo()
}
}
...
@@ -242,9 +245,16 @@ class HomeFragment : BaseFragment(), NewPeopleContract.View, UpdateCallback {
...
@@ -242,9 +245,16 @@ class HomeFragment : BaseFragment(), NewPeopleContract.View, UpdateCallback {
if
(
isPause
&&
isVisible
)
{
if
(
isPause
&&
isVisible
)
{
updateUserInfo
(
AdCallback
{
code
,
result
->
updateUserInfo
(
AdCallback
{
code
,
result
->
// UpdateUserInfo()
// UpdateUserInfo()
CheckUpate
(
false
)
})
}
else
if
(
Constant
.
NewUserBox
.
isRefreshHomeList
){
updateUserInfo
(
AdCallback
{
code
,
result
->
// UpdateUserInfo()
CheckUpate
(
false
)
})
})
}
}
isPause
=
false
isPause
=
false
}
}
override
fun
CheckUpate
(
boolean
:
Boolean
)
{
override
fun
CheckUpate
(
boolean
:
Boolean
)
{
...
...
moduleMain/src/main/java/com/zxhl/main/page/view/BoxResultDialog.kt
View file @
9ecfede9
...
@@ -91,7 +91,7 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -91,7 +91,7 @@ object BoxResultDialog : LotteryContract.View {
if
(!
isFast
())
{
if
(!
isFast
())
{
return
return
}
}
if
(
boxId
==
""
||
onePrice
==
0.0
)
{
if
(
boxId
==
""
)
{
return
return
}
}
EventUtils
.
onEvent
(
"OneLotteryClick"
)
EventUtils
.
onEvent
(
"OneLotteryClick"
)
...
...
moduleMain/src/main/java/com/zxhl/main/page/view/FreeGoodsDialog.kt
View file @
9ecfede9
...
@@ -2,6 +2,7 @@ package com.zxhl.main.page.view
...
@@ -2,6 +2,7 @@ package com.zxhl.main.page.view
import
android.animation.ValueAnimator
import
android.animation.ValueAnimator
import
android.app.Activity
import
android.app.Dialog
import
android.app.Dialog
import
android.content.Context
import
android.content.Context
import
android.util.Log
import
android.util.Log
...
@@ -64,11 +65,23 @@ object FreeGoodsDialog {
...
@@ -64,11 +65,23 @@ object FreeGoodsDialog {
tv_yi_fa
?.
animation
=
tv_yi_fa
?.
animation
=
AnimationUtils
.
loadAnimation
(
context
,
R
.
anim
.
button_scale_anim
)
AnimationUtils
.
loadAnimation
(
context
,
R
.
anim
.
button_scale_anim
)
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
)
{
BoxResultDialog
.
showOneLotteryResult
(
context
as
Activity
,
"-2"
,
0.0
,
0.0
,
0
)
}
else
{
JumpUtils
.
ThirdPardLoginJump
()
}
}
}
mDialog
?.
setOnDismissListener
{
mDialog
?.
setOnDismissListener
{
Log
.
d
(
"MXL"
,
"我被关闭了"
)
Log
.
d
(
"MXL"
,
"我被关闭了"
)
}
}
mDialog
?.
setCanceledOnTouchOutside
(
false
)
mDialog
?.
setCanceledOnTouchOutside
(
false
)
mDialog
?.
setCancelable
(
false
)
mDialog
?.
setCancelable
(
false
)
...
...
moduleMain/src/main/java/com/zxhl/main/page/view/RecycleDialog.kt
View file @
9ecfede9
...
@@ -89,7 +89,7 @@ object RecycleDialog : RecoverPopupContract.View {
...
@@ -89,7 +89,7 @@ object RecycleDialog : RecoverPopupContract.View {
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
id_img_dialog_close
).
setOnClickListener
{
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
id_img_dialog_close
).
setOnClickListener
{
mDialog
?.
dismiss
()
mDialog
?.
dismiss
()
}
}
val
df
=
DecimalFormat
(
"#.00"
)
val
df
=
DecimalFormat
(
"#
0
.00"
)
if
(
type
.
equals
(
Constant
.
Key
.
ONE_LOTTERY
))
{
if
(
type
.
equals
(
Constant
.
Key
.
ONE_LOTTERY
))
{
tv_recycle_price
?.
text
=
"${df.format(recoverPrice.toDoubleOrNull())}"
tv_recycle_price
?.
text
=
"${df.format(recoverPrice.toDoubleOrNull())}"
...
...
moduleMain/src/main/res/drawable-xhdpi/biaoqian_baozhang.png
deleted
100644 → 0
View file @
8f9f7ef7
13.5 KB
moduleMain/src/main/res/drawable-xhdpi/biaoqian_xianshi.png
deleted
100644 → 0
View file @
8f9f7ef7
8.07 KB
moduleMain/src/main/res/drawable-xhdpi/biaoqianxinren.png
deleted
100644 → 0
View file @
8f9f7ef7
10.5 KB
moduleMain/src/main/res/drawable-xhdpi/icon_box_item_label.9.png
0 → 100644
View file @
9ecfede9
1.38 KB
moduleMain/src/main/res/layout/activity_layout_order_detail.xml
View file @
9ecfede9
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
android:layout_marginLeft=
"15dp"
android:layout_marginLeft=
"15dp"
android:drawableLeft=
"@drawable/icon_add"
android:drawableLeft=
"@drawable/icon_add"
android:drawablePadding=
"5dp"
android:drawablePadding=
"5dp"
android:text=
"
请填写收货人信息
"
android:text=
"
Please input your delivery address
"
android:textColor=
"@color/color_333333"
android:textColor=
"@color/color_333333"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
...
...
moduleMain/src/main/res/layout/dialog_layout_box_result.xml
View file @
9ecfede9
...
@@ -237,7 +237,7 @@
...
@@ -237,7 +237,7 @@
android:layout_marginLeft=
"7dp"
android:layout_marginLeft=
"7dp"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"7dp"
android:layout_marginRight=
"7dp"
android:layout_marginBottom=
"
3
0dp"
android:layout_marginBottom=
"
2
0dp"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
...
moduleMain/src/main/res/layout/fragment_layout_other.xml
View file @
9ecfede9
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"200dp"
android:layout_marginBottom=
"200dp"
android:text=
"
到我的底线咯,往上翻
"
android:text=
"
@string/box_detail_open_box_bottom_desc
"
android:textColor=
"@color/color_999999"
android:textColor=
"@color/color_999999"
android:textSize=
"13sp"
/>
android:textSize=
"13sp"
/>
...
...
moduleMain/src/main/res/layout/item_layout_new_box.xml
View file @
9ecfede9
...
@@ -141,7 +141,6 @@
...
@@ -141,7 +141,6 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/color_999999"
android:textColor=
"@color/color_999999"
android:textSize=
"14sp"
android:textSize=
"14sp"
android:drawableLeft=
"@drawable/icon_jinbi"
android:drawablePadding=
"5dp"
/>
android:drawablePadding=
"5dp"
/>
<TextView
<TextView
...
@@ -210,11 +209,17 @@
...
@@ -210,11 +209,17 @@
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
/>
android:layout_marginRight=
"10dp"
/>
</LinearLayout>
</LinearLayout>
<ImageView
<TextView
android:id=
"@+id/id_img_new_people"
android:id=
"@+id/id_img_new_people"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
29dp
"
android:layout_marginLeft=
"2dp"
android:layout_marginLeft=
"2dp"
android:src=
"@drawable/biaoqianxinren"
android:text=
"Limited-time offer"
android:textColor=
"@color/white"
android:paddingTop=
"2dp"
android:textStyle=
"bold"
android:gravity=
"center_horizontal"
android:background=
"@drawable/icon_box_item_label"
android:visibility=
"visible"
/>
android:visibility=
"visible"
/>
</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