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
c4b96a04
Commit
c4b96a04
authored
Mar 30, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :加入loading [实现方案] :
parent
a2b2d52c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
34 deletions
+80
-34
version.properties
app/version.properties
+2
-2
NetConfig.java
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
+1
-1
strings.xml
cms/src/main/res/values/strings.xml
+1
-1
EditAddressActivity.kt
...n/java/com/zxhl/main/page/activity/EditAddressActivity.kt
+17
-9
NewBoxGoodsDetailActivity.kt
.../com/zxhl/main/page/activity/NewBoxGoodsDetailActivity.kt
+3
-3
SplashActivity.kt
...c/main/java/com/zxhl/main/page/activity/SplashActivity.kt
+10
-8
OrderAdapter.kt
.../src/main/java/com/zxhl/main/page/adapter/OrderAdapter.kt
+7
-4
BoxResultDialog.kt
.../src/main/java/com/zxhl/main/page/view/BoxResultDialog.kt
+39
-6
No files found.
app/version.properties
View file @
c4b96a04
PACKAGE_NAME
=
com.zhangxin.magicbox
PACKAGE_NAME
=
com.zhangxin.magicbox
VERSION_CODE
=
11
VERSION_CODE
=
12
VERSION_NAME
=
1.0.3.3
VERSION_NAME
=
1.0.3.4
\ No newline at end of file
\ No newline at end of file
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
View file @
c4b96a04
...
@@ -232,7 +232,7 @@ public class NetConfig {
...
@@ -232,7 +232,7 @@ public class NetConfig {
public
static
final
String
HOME_BOX_LOTTERY_TEST
=
"app/v1/game/box/lotteryTest"
;
//盲盒抽取 - 试玩(单抽)
public
static
final
String
HOME_BOX_LOTTERY_TEST
=
"app/v1/game/box/lotteryTest"
;
//盲盒抽取 - 试玩(单抽)
public
static
final
String
HOME_BOX_ORDER
=
"app/v1/game/box/order"
;
//用户订单
public
static
final
String
HOME_BOX_ORDER
=
"app/v1/game/box/order"
;
//用户订单
public
static
final
String
HOME_BOX_RECOVER
=
"app/v2/game/box/recover"
;
//回收物品
public
static
final
String
HOME_BOX_RECOVER
=
"app/v2/game/box/recover"
;
//回收物品
public
static
final
String
HOME_BOX_SHIPPING
=
"app/v
3
/game/box/getShipping"
;
//用户仓库 - 获取运费
public
static
final
String
HOME_BOX_SHIPPING
=
"app/v
5
/game/box/getShipping"
;
//用户仓库 - 获取运费
public
static
final
String
HOME_BOX_SHOP_COST
=
"app/v4/game/box/getShipping"
;
//用户仓库 - 商城购买获取费用
public
static
final
String
HOME_BOX_SHOP_COST
=
"app/v4/game/box/getShipping"
;
//用户仓库 - 商城购买获取费用
public
static
final
String
HOME_BOX_CREATE_SHAOPPING_ORDER
=
"app/v1/game/box/createShippingOrder"
;
//创建发货订单
public
static
final
String
HOME_BOX_CREATE_SHAOPPING_ORDER
=
"app/v1/game/box/createShippingOrder"
;
//创建发货订单
public
static
final
String
HOME_BOX_SHOP_BUY_ONLY
=
"app/v1/game/box/shopBuyOnly"
;
//创建购买商城物品订单
public
static
final
String
HOME_BOX_SHOP_BUY_ONLY
=
"app/v1/game/box/shopBuyOnly"
;
//创建购买商城物品订单
...
...
cms/src/main/res/values/strings.xml
View file @
c4b96a04
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
<string
name=
"Please_fill_in_your_address2"
>
Please fill in your address2
</string>
<string
name=
"Please_fill_in_your_address2"
>
Please fill in your address2
</string>
<string
name=
"Please_fill_in_your_address1"
>
Please fill in your address1
</string>
<string
name=
"Please_fill_in_your_address1"
>
Please fill in your address1
</string>
<string
name=
"Please_fill_in_your_phone_number"
>
Please fill in your phone number
</string>
<string
name=
"Please_fill_in_your_phone_number"
>
Please fill in your phone number
</string>
<string
name=
"Please_fill_in_your_first_name"
>
Please fill in your
first name/last name/…
</string>
<string
name=
"Please_fill_in_your_first_name"
>
Please fill in your
name
</string>
<string
name=
"Add"
>
Add
</string>
<string
name=
"Add"
>
Add
</string>
</resources>
</resources>
moduleMain/src/main/java/com/zxhl/main/page/activity/EditAddressActivity.kt
View file @
c4b96a04
...
@@ -116,16 +116,24 @@ class EditAddressActivity : BaseActivity(), EditAddressContract.View {
...
@@ -116,16 +116,24 @@ class EditAddressActivity : BaseActivity(), EditAddressContract.View {
//
//
// }
// }
id_tv_save_address
?.
setOnClickListener
{
id_tv_save_address
?.
setOnClickListener
{
if
(
TextUtils
.
isEmpty
(
id_edit_name
.
text
.
toString
())
||
TextUtils
.
isEmpty
(
id_edit_phone
.
text
.
toString
())
||
TextUtils
.
isEmpty
(
if
(
TextUtils
.
isEmpty
(
id_edit_name
.
text
.
toString
()))
{
id_edit_address1
.
text
.
toString
()
Utils
.
showToast
(
)
||
TextUtils
.
isEmpty
(
AppContext
.
get
(),
id_select_city
.
text
.
toString
()
getString
(
R
.
string
.
Please_fill_in_your_first_name
)
)
||
TextUtils
.
isEmpty
(
id_select_country
.
text
.
toString
())
||
TextUtils
.
isEmpty
(
id_edit_province
.
text
.
toString
()
)
)
)
{
}
else
if
(
TextUtils
.
isEmpty
(
id_edit_phone
.
text
.
toString
()))
{
// Utils.showToast(AppContext.get(), "请完整填写信息")
Utils
.
showToast
(
return
@setOnClickListener
AppContext
.
get
(),
getString
(
R
.
string
.
Please_fill_in_your_phone_number
)
)
}
else
if
(
TextUtils
.
isEmpty
(
id_edit_address1
.
text
.
toString
()))
{
Utils
.
showToast
(
AppContext
.
get
(),
getString
(
R
.
string
.
Please_fill_in_your_address1
))
}
else
if
(
TextUtils
.
isEmpty
(
id_select_country
.
text
.
toString
()))
{
Utils
.
showToast
(
AppContext
.
get
(),
getString
(
R
.
string
.
Please_select
))
}
else
if
(
TextUtils
.
isEmpty
(
id_select_city
.
text
.
toString
()))
{
Utils
.
showToast
(
AppContext
.
get
(),
getString
(
R
.
string
.
PleaseFillInYourCity
))
}
else
if
(
TextUtils
.
isEmpty
(
id_edit_province
.
text
.
toString
()))
{
Utils
.
showToast
(
AppContext
.
get
(),
getString
(
R
.
string
.
PleaseFillInYourProvince
))
}
else
{
}
else
{
// if (id_edit_phone.text.toString()?.length != 11) {
// if (id_edit_phone.text.toString()?.length != 11) {
//// Utils.showToast(AppContext.get(), "请检查手机号码")
//// Utils.showToast(AppContext.get(), "请检查手机号码")
...
...
moduleMain/src/main/java/com/zxhl/main/page/activity/NewBoxGoodsDetailActivity.kt
View file @
c4b96a04
...
@@ -438,10 +438,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...
@@ -438,10 +438,10 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
private
fun
showResultLoading
(
isPaySuc
:
Boolean
)
{
private
fun
showResultLoading
(
isPaySuc
:
Boolean
)
{
if
(
isPaySuc
)
{
if
(
isPaySuc
)
{
EventUtils
.
onEvent
(
"pay_suc"
)
EventUtils
.
onEvent
(
"pay_suc"
)
mLoading
?.
setResult
(
true
,
"
支付成功
"
,
1000
)
mLoading
?.
setResult
(
true
,
"
Pay for success
"
,
1000
)
}
else
{
}
else
{
EventUtils
.
onEvent
(
"pay_fail"
)
EventUtils
.
onEvent
(
"pay_fail"
)
mLoading
?.
setResult
(
false
,
"
支付失败
"
,
1000
)
mLoading
?.
setResult
(
false
,
"
Pay for failure
"
,
1000
)
}
}
}
}
...
@@ -455,7 +455,7 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...
@@ -455,7 +455,7 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
}
}
override
fun
requestOrderSuc
()
{
override
fun
requestOrderSuc
()
{
mLoading
?.
setLoading
(
"
正在支付
"
)
mLoading
?.
setLoading
(
"
Is pay
"
)
}
}
override
fun
verifyOrderSuc
(
orsder
:
String
)
{
override
fun
verifyOrderSuc
(
orsder
:
String
)
{
...
...
moduleMain/src/main/java/com/zxhl/main/page/activity/SplashActivity.kt
View file @
c4b96a04
...
@@ -50,14 +50,16 @@ class SplashActivity : BaseActivity(), SplashContract.View {
...
@@ -50,14 +50,16 @@ class SplashActivity : BaseActivity(), SplashContract.View {
mPresenter
=
SplashPresenter
(
this
@SplashActivity
,
this
@SplashActivity
)
mPresenter
=
SplashPresenter
(
this
@SplashActivity
,
this
@SplashActivity
)
initListener
()
initListener
()
}
else
{
}
else
{
CenterDialog
.
showPrivacyProtocol
(
this
,
object
:
View
.
OnClickListener
{
// CenterDialog.showPrivacyProtocol(this, object : View.OnClickListener {
override
fun
onClick
(
p0
:
View
?)
{
// override fun onClick(p0: View?) {
SettingPreference
.
setFirstApp
()
// SettingPreference.setFirstApp()
mPresenter
=
SplashPresenter
(
this
@SplashActivity
,
this
@SplashActivity
)
// mPresenter = SplashPresenter(this@SplashActivity, this@SplashActivity)
initListener
()
// initListener()
}
// }
})
// })
SettingPreference
.
setFirstApp
()
mPresenter
=
SplashPresenter
(
this
@SplashActivity
,
this
@SplashActivity
)
initListener
()
}
}
}
else
{
}
else
{
...
...
moduleMain/src/main/java/com/zxhl/main/page/adapter/OrderAdapter.kt
View file @
c4b96a04
...
@@ -23,10 +23,13 @@ class OrderAdapter : BaseRecyclerAdapter<GoodList, OrderAdapter.ViewHolder> {
...
@@ -23,10 +23,13 @@ class OrderAdapter : BaseRecyclerAdapter<GoodList, OrderAdapter.ViewHolder> {
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
var
bean
=
mList
[
position
]
var
bean
=
mList
[
position
]
holder
?.
item_order_img
?.
setLoadImageUrl
(
bean
.
mainImage
,
false
)
if
(
bean
!=
null
){
holder
?.
item_order_name
?.
text
=
bean
.
productName
holder
?.
item_order_img
?.
setLoadImageUrl
(
bean
.
mainImage
?:
""
,
false
)
holder
?.
item_order_num
?.
text
=
"x ${bean.amount}"
holder
?.
item_order_name
?.
text
=
bean
.
productName
?:
""
holder
?.
id_tv_sale_price
?.
text
=
"$ ${bean.salePriceStr}"
holder
?.
item_order_num
?.
text
=
"x ${bean.amount}"
holder
?.
id_tv_sale_price
?.
text
=
"$ ${bean.salePriceStr}"
}
}
}
...
...
moduleMain/src/main/java/com/zxhl/main/page/view/BoxResultDialog.kt
View file @
c4b96a04
...
@@ -19,6 +19,7 @@ import com.zxhl.cms.net.model.box.*
...
@@ -19,6 +19,7 @@ import com.zxhl.cms.net.model.box.*
import
com.zxhl.cms.utils.EventUtils
import
com.zxhl.cms.utils.EventUtils
import
com.zxhl.cms.utils.JumpUtils
import
com.zxhl.cms.utils.JumpUtils
import
com.zxhl.cms.utils.UserDataUtils
import
com.zxhl.cms.utils.UserDataUtils
import
com.zxhl.cms.widget.LoadingDialog
import
com.zxhl.main.R
import
com.zxhl.main.R
import
com.zxhl.main.page.`interface`.PopupWidowCloseCallBack
import
com.zxhl.main.page.`interface`.PopupWidowCloseCallBack
import
com.zxhl.main.page.contract.LotteryContract
import
com.zxhl.main.page.contract.LotteryContract
...
@@ -30,6 +31,7 @@ import com.zxhl.main.page.presenter.LotteryPresenter
...
@@ -30,6 +31,7 @@ import com.zxhl.main.page.presenter.LotteryPresenter
* @detail :
* @detail :
*/
*/
object
BoxResultDialog
:
LotteryContract
.
View
{
object
BoxResultDialog
:
LotteryContract
.
View
{
private
var
mLotteryLoading
:
LoadingDialog
?
=
null
private
var
mPresenter
:
LotteryPresenter
=
LotteryPresenter
(
this
);
private
var
mPresenter
:
LotteryPresenter
=
LotteryPresenter
(
this
);
private
var
mActivity
:
Activity
?
=
null
private
var
mActivity
:
Activity
?
=
null
private
var
boxId
:
String
=
""
private
var
boxId
:
String
=
""
...
@@ -37,6 +39,7 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -37,6 +39,7 @@ object BoxResultDialog : LotteryContract.View {
private
var
fivePrice
:
Double
=
0.0
private
var
fivePrice
:
Double
=
0.0
private
var
mRePumpingCardNum
=
0
//重抽卡数量
private
var
mRePumpingCardNum
=
0
//重抽卡数量
private
var
dialogDismissCallback
:
DialogDismissCallback
?
=
null
private
var
dialogDismissCallback
:
DialogDismissCallback
?
=
null
fun
setDialogDismissCallback
(
callback
:
DialogDismissCallback
?)
{
fun
setDialogDismissCallback
(
callback
:
DialogDismissCallback
?)
{
this
.
dialogDismissCallback
=
callback
this
.
dialogDismissCallback
=
callback
}
}
...
@@ -76,6 +79,7 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -76,6 +79,7 @@ object BoxResultDialog : LotteryContract.View {
JumpUtils
.
payJump
(
boxId
,
(
fivePrice
-
ownCoin
).
toString
(),
Constant
.
Key
.
FIVE_LOTTERY
)
JumpUtils
.
payJump
(
boxId
,
(
fivePrice
-
ownCoin
).
toString
(),
Constant
.
Key
.
FIVE_LOTTERY
)
return
return
}
}
showLoading
(
mActivity
)
this
.
mActivity
=
mActivity
this
.
mActivity
=
mActivity
this
.
boxId
=
boxId
this
.
boxId
=
boxId
this
.
onePrice
=
onePrice
this
.
onePrice
=
onePrice
...
@@ -105,6 +109,7 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -105,6 +109,7 @@ object BoxResultDialog : LotteryContract.View {
JumpUtils
.
payJump
(
boxId
,
(
onePrice
-
ownCoin
).
toString
(),
Constant
.
Key
.
FIVE_LOTTERY
)
JumpUtils
.
payJump
(
boxId
,
(
onePrice
-
ownCoin
).
toString
(),
Constant
.
Key
.
FIVE_LOTTERY
)
return
return
}
}
showLoading
(
mActivity
)
this
.
mActivity
=
mActivity
this
.
mActivity
=
mActivity
this
.
boxId
=
boxId
this
.
boxId
=
boxId
this
.
onePrice
=
onePrice
this
.
onePrice
=
onePrice
...
@@ -121,6 +126,7 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -121,6 +126,7 @@ object BoxResultDialog : LotteryContract.View {
if
(
boxId
==
""
||
fivePrice
==
0.0
)
{
if
(
boxId
==
""
||
fivePrice
==
0.0
)
{
return
return
}
}
showLoading
(
mActivity
)
mRePumpingCardNum
=
cardNum
mRePumpingCardNum
=
cardNum
this
.
mActivity
=
mActivity
this
.
mActivity
=
mActivity
this
.
boxId
=
boxId
this
.
boxId
=
boxId
...
@@ -139,6 +145,7 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -139,6 +145,7 @@ object BoxResultDialog : LotteryContract.View {
desc1
:
String
,
desc1
:
String
,
desc2
:
String
desc2
:
String
)
{
)
{
dismissLoading
()
if
(
mDialog
==
null
)
{
if
(
mDialog
==
null
)
{
mDialog
=
Dialog
(
mActivity
,
R
.
style
.
CenterCompatDialogTheme
)
mDialog
=
Dialog
(
mActivity
,
R
.
style
.
CenterCompatDialogTheme
)
}
}
...
@@ -190,7 +197,7 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -190,7 +197,7 @@ object BoxResultDialog : LotteryContract.View {
depotIds
.
append
(
dataBean
.
depotId
)
depotIds
.
append
(
dataBean
.
depotId
)
recovertList
.
add
(
dataBean
.
recoverPriceStr
?.
toDoubleOrNull
()
!!
)
recovertList
.
add
(
dataBean
.
recoverPriceStr
?.
toDoubleOrNull
()
!!
)
}
}
var
recoverprice
=
recovertList
.
sum
()
var
recoverprice
=
recovertList
.
sum
()
//
//
if
(
desc1
==
""
)
{
if
(
desc1
==
""
)
{
resultDesc1
.
visibility
=
View
.
GONE
resultDesc1
.
visibility
=
View
.
GONE
...
@@ -292,11 +299,18 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -292,11 +299,18 @@ object BoxResultDialog : LotteryContract.View {
//回收
//回收
resultRecover
.
setOnClickListener
{
resultRecover
.
setOnClickListener
{
EventUtils
.
onEvent
(
"RecoverClick"
)
EventUtils
.
onEvent
(
"RecoverClick"
)
RecycleDialog
.
showRecycleDialog
(
mActivity
,
depotIds
.
toString
(),
"3"
,
recoverprice
.
toString
(),
Constant
.
Switch
.
recoverType
,
null
,
object
:
PopupWidowCloseCallBack
{
RecycleDialog
.
showRecycleDialog
(
override
fun
onClosePopupWindow
()
{
mActivity
,
mDialog
?.
dismiss
()
depotIds
.
toString
(),
}
"3"
,
})
recoverprice
.
toString
(),
Constant
.
Switch
.
recoverType
,
null
,
object
:
PopupWidowCloseCallBack
{
override
fun
onClosePopupWindow
()
{
mDialog
?.
dismiss
()
}
})
}
}
mDialog
?.
setOnDismissListener
{
mDialog
?.
setOnDismissListener
{
mDialog
=
null
mDialog
=
null
...
@@ -393,5 +407,24 @@ object BoxResultDialog : LotteryContract.View {
...
@@ -393,5 +407,24 @@ object BoxResultDialog : LotteryContract.View {
}
}
private
fun
showLoading
(
content
:
Activity
)
{
if
(
mLotteryLoading
==
null
)
{
mLotteryLoading
=
LoadingDialog
.
getLoadingDialog
(
content
,
content
.
getString
(
R
.
string
.
wait_ing
),
false
,
false
)
}
mLotteryLoading
?.
setLoading
(
content
.
getString
(
R
.
string
.
wait_ing
))
mLotteryLoading
?.
show
()
}
private
fun
dismissLoading
()
{
if
(
mLotteryLoading
!=
null
)
{
mLotteryLoading
?.
dismiss
()
}
}
}
}
\ No newline at end of file
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