Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
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
王雪伟
xxsq
Commits
22623dfa
Commit
22623dfa
authored
Aug 15, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :1.1.8 [实现方案] :加入话费充值确认弹窗
parent
c364f2a8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
163 additions
and
19 deletions
+163
-19
version.properties
app/version.properties
+2
-2
PayUtil.kt
cms/src/main/java/com/zxhl/cms/pay/PayUtil.kt
+30
-0
RecyclerViewSpacesItemDecoration2.java
...om/zxhl/cms/widget/RecyclerViewSpacesItemDecoration2.java
+30
-0
RechargeActivity.kt
...ain/java/com/zxbw/modulemain/activity/RechargeActivity.kt
+20
-17
ShopRecommendFragment.kt
...ava/com/zxbw/modulemain/fragment/ShopRecommendFragment.kt
+2
-0
DialogUtils.kt
...ain/src/main/java/com/zxbw/modulemain/view/DialogUtils.kt
+27
-0
dialog_layout_recharge_tips.xml
...eMain/src/main/res/layout/dialog_layout_recharge_tips.xml
+52
-0
No files found.
app/version.properties
View file @
22623dfa
PACKAGE_NAME
=
com.zxhl.shop
PACKAGE_NAME
=
com.zxhl.shop
VERSION_CODE
=
18
VERSION_CODE
=
19
VERSION_NAME
=
1.1.7
VERSION_NAME
=
1.1.8
\ No newline at end of file
\ No newline at end of file
cms/src/main/java/com/zxhl/cms/pay/PayUtil.kt
0 → 100644
View file @
22623dfa
package
com.zxhl.cms.pay
/**
* @author (wangXuewei)
* @datetime 2022-08-15 14:16 GMT+8
* @detail :
*/
class
PayUtil
{
interface
PayCallBack
{
fun
paySuccess
()
fun
payFail
(
errorMsg
:
String
)
fun
payCancel
()
}
fun
payInit
()
{
}
fun
payShop
()
{
}
private
fun
loadPay
()
{
}
}
\ No newline at end of file
cms/src/main/java/com/zxhl/cms/widget/RecyclerViewSpacesItemDecoration2.java
0 → 100644
View file @
22623dfa
package
com
.
zxhl
.
cms
.
widget
;
import
android.graphics.Rect
;
import
android.util.Log
;
import
android.view.View
;
import
androidx.recyclerview.widget.RecyclerView
;
import
java.util.HashMap
;
public
class
RecyclerViewSpacesItemDecoration2
extends
RecyclerView
.
ItemDecoration
{
public
RecyclerViewSpacesItemDecoration2
()
{
}
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
Log
.
d
(
"wxw"
,
"adapterPos"
+
parent
.
getChildAdapterPosition
(
view
));
Log
.
d
(
"wxw"
,
"layoutPos"
+
parent
.
getChildLayoutPosition
(
view
));
int
pos
=
parent
.
getChildAdapterPosition
(
view
);
if
(
pos
>
1
)
{
if
(
pos
%
2
==
0
)
{
outRect
.
left
=
40
;
}
else
{
outRect
.
right
=
40
;
}
}
}
}
moduleMain/src/main/java/com/zxbw/modulemain/activity/RechargeActivity.kt
View file @
22623dfa
...
@@ -206,20 +206,23 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
...
@@ -206,20 +206,23 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
showToast
(
"请选择运营商"
)
showToast
(
"请选择运营商"
)
return
return
}
}
isClickPayBtn
=
true
DialogUtils
.
showRechargeTips
(
this
,
phoneNumber
)
{
mLoading
?.
setLoading
(
"请稍后..."
)
isClickPayBtn
=
true
mLoading
?.
show
()
mLoading
?.
setLoading
(
"请稍后..."
)
mPresenter
?.
requestRightsAliPay
(
mLoading
?.
show
()
"xxsqshop://recharge"
,
mPresenter
?.
requestRightsAliPay
(
goodsID
.
toString
(),
"xxsqshop://recharge"
,
pay_type
.
toString
(),
goodsID
.
toString
(),
phoneNumber
,
pay_type
.
toString
(),
"8080"
,
phoneNumber
,
false
,
"8080"
,
""
,
false
,
couponsentity
?.
id
,
""
,
mobileOp
couponsentity
?.
id
,
)
mobileOp
)
}
}
}
private
var
mCouponsResult
:
List
<
CouponsEntity
>?
=
null
private
var
mCouponsResult
:
List
<
CouponsEntity
>?
=
null
...
@@ -282,7 +285,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
...
@@ -282,7 +285,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
mLoading
?.
setResult
(
false
,
"支付异常"
,
1000
)
mLoading
?.
setResult
(
false
,
"支付异常"
,
1000
)
}
}
});
});
}
else
if
(
pay_type
==
PaymentConfig
.
ZFB_H5_PAY
||
pay_type
==
PaymentConfig
.
WX_H5_PAY
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY1
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY2
)
{
}
else
if
(
pay_type
==
PaymentConfig
.
ZFB_H5_PAY
||
pay_type
==
PaymentConfig
.
WX_H5_PAY
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY1
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY2
)
{
if
(
result
.
outTradeNo
.
isNullOrEmpty
())
{
if
(
result
.
outTradeNo
.
isNullOrEmpty
())
{
EventUtils
.
onEvent
(
"h5_pay_error"
)
EventUtils
.
onEvent
(
"h5_pay_error"
)
showResultLoading
(
false
)
showResultLoading
(
false
)
...
@@ -295,7 +298,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
...
@@ -295,7 +298,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
object
:
H5PayUtil
.
H5AppPayCallBack
{
object
:
H5PayUtil
.
H5AppPayCallBack
{
override
fun
jumpAppException
(
e
:
Exception
)
{
override
fun
jumpAppException
(
e
:
Exception
)
{
EventUtils
.
onEvent
(
"H5AppPayError"
,
"error:${pay_type}"
)
EventUtils
.
onEvent
(
"H5AppPayError"
,
"error:${pay_type}"
)
if
(
pay_type
==
PaymentConfig
.
ZFB_H5_PAY
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY1
)
{
if
(
pay_type
==
PaymentConfig
.
ZFB_H5_PAY
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY1
)
{
mLoading
?.
setResult
(
false
,
"支付失败,请安装支付宝后重试"
,
1000
)
mLoading
?.
setResult
(
false
,
"支付失败,请安装支付宝后重试"
,
1000
)
}
else
{
}
else
{
mLoading
?.
setResult
(
false
,
"支付失败,请安装微信后重试"
,
1000
)
mLoading
?.
setResult
(
false
,
"支付失败,请安装微信后重试"
,
1000
)
...
@@ -508,7 +511,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
...
@@ -508,7 +511,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
if
(
isPause
&&
isClickPayBtn
)
{
if
(
isPause
&&
isClickPayBtn
)
{
if
(
pay_type
==
PaymentConfig
.
MIN_PAY_PROGRAM
||
pay_type
==
PaymentConfig
.
H5_PAY
||
pay_type
==
PaymentConfig
.
ZFB_H5_PAY
||
pay_type
==
PaymentConfig
.
WX_H5_PAY
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY1
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY2
)
{
if
(
pay_type
==
PaymentConfig
.
MIN_PAY_PROGRAM
||
pay_type
==
PaymentConfig
.
H5_PAY
||
pay_type
==
PaymentConfig
.
ZFB_H5_PAY
||
pay_type
==
PaymentConfig
.
WX_H5_PAY
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY1
||
pay_type
==
PaymentConfig
.
HUI_FU_H5_PAY2
)
{
//如果是敏支付或者H5支付
//如果是敏支付或者H5支付
mPresenter
?.
verifyPay
(
SettingPreference
.
getOutTradeNo
(),
pay_type
!!
)
mPresenter
?.
verifyPay
(
SettingPreference
.
getOutTradeNo
(),
pay_type
!!
)
}
else
{
}
else
{
...
...
moduleMain/src/main/java/com/zxbw/modulemain/fragment/ShopRecommendFragment.kt
View file @
22623dfa
...
@@ -20,6 +20,7 @@ import com.zxhl.cms.net.model.qy.JgqQyEntity
...
@@ -20,6 +20,7 @@ import com.zxhl.cms.net.model.qy.JgqQyEntity
import
com.zxhl.cms.net.model.qy.TbGoodsItemEntity
import
com.zxhl.cms.net.model.qy.TbGoodsItemEntity
import
com.zxhl.cms.utils.JumpUtils
import
com.zxhl.cms.utils.JumpUtils
import
com.zxhl.cms.utils.OnRecycleItemClickListener
import
com.zxhl.cms.utils.OnRecycleItemClickListener
import
com.zxhl.cms.widget.RecyclerViewSpacesItemDecoration2
import
kotlinx.android.synthetic.main.fragment_layout_recommend.*
import
kotlinx.android.synthetic.main.fragment_layout_recommend.*
/**
/**
...
@@ -54,6 +55,7 @@ class ShopRecommendFragment : BaseFragment, ShopRecommendContract.View,
...
@@ -54,6 +55,7 @@ class ShopRecommendFragment : BaseFragment, ShopRecommendContract.View,
}
}
}
}
id_rcl_goods_list
?.
layoutManager
=
gridLayoutManager
id_rcl_goods_list
?.
layoutManager
=
gridLayoutManager
id_rcl_goods_list
?.
addItemDecoration
(
RecyclerViewSpacesItemDecoration2
())
id_rcl_goods_list
.
adapter
=
mGoodsAdapter
id_rcl_goods_list
.
adapter
=
mGoodsAdapter
id_refresh_view
.
setRefreshHeader
(
ClassicsHeader
(
activity
))
id_refresh_view
.
setRefreshHeader
(
ClassicsHeader
(
activity
))
...
...
moduleMain/src/main/java/com/zxbw/modulemain/view/DialogUtils.kt
View file @
22623dfa
...
@@ -385,6 +385,33 @@ object DialogUtils {
...
@@ -385,6 +385,33 @@ object DialogUtils {
mDialog
.
show
()
mDialog
.
show
()
}
}
//显示充话费提示弹窗
fun
showRechargeTips
(
context
:
Activity
?,
phone
:
String
,
makeSureListener
:
View
.
OnClickListener
)
{
if
(
context
==
null
)
return
val
mDialog
=
Dialog
(
context
,
R
.
style
.
CenterCompatDialogTheme
)
val
mDialogView
=
showBottomDialog
(
R
.
layout
.
dialog_layout_recharge_tips
,
context
,
mDialog
,
0
,
Gravity
.
CENTER
)
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_phone
).
text
=
"本次充值号码为:${phone}"
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_btn_ok
).
setOnClickListener
{
mDialog
.
dismiss
()
makeSureListener
.
onClick
(
it
)
}
mDialog
.
setCanceledOnTouchOutside
(
true
)
mDialog
.
setCancelable
(
true
)
mDialog
.
show
()
}
//显示删除用户提示弹窗
//显示删除用户提示弹窗
fun
showDeleteUserIdTips
(
context
:
Activity
?,
deleteListener
:
View
.
OnClickListener
)
{
fun
showDeleteUserIdTips
(
context
:
Activity
?,
deleteListener
:
View
.
OnClickListener
)
{
if
(
context
==
null
)
return
if
(
context
==
null
)
return
...
...
moduleMain/src/main/res/layout/dialog_layout_recharge_tips.xml
0 → 100644
View file @
22623dfa
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"40dp"
android:background=
"@drawable/shape_ffffff_r10"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
android:padding=
"15dp"
>
<TextView
android:id=
"@+id/id_tv_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"本次充值号码为:"
android:textColor=
"@color/color_333333"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"我已阅读并知悉温馨提示中所有规则。"
android:textColor=
"@color/color_999999"
android:textSize=
"20sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/id_btn_ok"
android:layout_width=
"150dp"
android:layout_height=
"40dp"
android:layout_marginTop=
"20dp"
android:layout_marginBottom=
"20dp"
android:background=
"@drawable/shape_333333_r20"
android:gravity=
"center"
android:text=
"确定"
android:textColor=
"#F8E8CC"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</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