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
ab18a99d
Commit
ab18a99d
authored
Jun 02, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :小象省钱 [实现方案] :调整订单
parent
75262c44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
131 additions
and
223 deletions
+131
-223
OpenMemberOrderActivity.kt
...a/com/zxbw/modulemain/activity/OpenMemberOrderActivity.kt
+0
-5
ItemVipOrderAdapter.kt
...n/java/com/zxbw/modulemain/adapter/ItemVipOrderAdapter.kt
+1
-1
JgqQyAdapter.kt
...src/main/java/com/zxbw/modulemain/adapter/JgqQyAdapter.kt
+6
-1
MyOrderAdapter.kt
...c/main/java/com/zxbw/modulemain/adapter/MyOrderAdapter.kt
+2
-4
NewBoxGoodsDetailActivity.kt
...zxbw/modulemain/box/activity/NewBoxGoodsDetailActivity.kt
+1
-1
OrderDetailActivity.kt
...a/com/zxbw/modulemain/box/activity/OrderDetailActivity.kt
+47
-136
MagicBoxOrderFragment.kt
...ava/com/zxbw/modulemain/fragment/MagicBoxOrderFragment.kt
+31
-38
BoxOrderPresenter.kt
...n/java/com/zxbw/modulemain/presenter/BoxOrderPresenter.kt
+4
-22
img_vip_rights_bg.png
moduleMain/src/main/res/drawable-xhdpi/img_vip_rights_bg.png
+0
-0
activity_layout_card_detail.xml
...eMain/src/main/res/layout/activity_layout_card_detail.xml
+1
-1
activity_layout_member_order.xml
...Main/src/main/res/layout/activity_layout_member_order.xml
+1
-1
activity_layout_order_detail.xml
...Main/src/main/res/layout/activity_layout_order_detail.xml
+20
-4
activity_layout_rights_detail.xml
...ain/src/main/res/layout/activity_layout_rights_detail.xml
+1
-1
activity_layout_skill_shop.xml
...leMain/src/main/res/layout/activity_layout_skill_shop.xml
+1
-1
activity_layout_to_pay_skill_goods.xml
...rc/main/res/layout/activity_layout_to_pay_skill_goods.xml
+1
-1
fragment_layout_magic_box_order.xml
...n/src/main/res/layout/fragment_layout_magic_box_order.xml
+4
-3
items_item_vip_rights_order.xml
...eMain/src/main/res/layout/items_item_vip_rights_order.xml
+10
-3
No files found.
moduleMain/src/main/java/com/zxbw/modulemain/activity/OpenMemberOrderActivity.kt
View file @
ab18a99d
package
com.zxbw.modulemain.activity
import
android.content.Intent
import
android.net.Uri
import
android.net.http.SslError
import
android.os.Handler
import
android.util.Log
import
android.view.View
import
android.webkit.*
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.zxbw.modulemain.R
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.common.Constant
import
com.zxhl.cms.common.NetConfig
import
com.zxhl.cms.common.base.BaseActivity
import
com.zxhl.cms.net.ApiClient
import
com.zxhl.cms.net.RxSchedulers
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/ItemVipOrderAdapter.kt
View file @
ab18a99d
...
...
@@ -25,7 +25,7 @@ class ItemVipOrderAdapter :
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
var
bean
=
mList
[
position
]
holder
.
id_img_rights_icon
?.
setLoadImageUrl
(
bean
.
icon
,
0
,
4
)
holder
.
id_img_rights_icon
?.
setLoadImageUrl
(
bean
.
icon
,
false
)
holder
.
id_tv_vip_goods_name
?.
text
=
"${bean.brand} ${bean.category} ${bean.goodsName}"
holder
.
id_tv_vip_goods_price
?.
text
=
"¥${bean.salePrice}"
// holder.id_tv_vip_goods_num?.text = "${bean.salePrice}"
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/JgqQyAdapter.kt
View file @
ab18a99d
...
...
@@ -41,7 +41,12 @@ class JgqQyAdapter : BaseRecyclerAdapter<JgqQyEntity, JgqQyAdapter.ViewHolder> {
.
apply
(
RequestOptions
.
bitmapTransform
(
CircleCrop
()))
.
into
(
holder
?.
id_icon
!!
)
holder
.
id_name
?.
text
=
bean
.
brand
holder
.
id_tv_discount_value
?.
text
=
"${bean.maxDiscount}折"
if
(
bean
.
maxDiscount
.
isNullOrEmpty
()||
bean
.
maxDiscount
.
equals
(
"0"
)){
holder
.
id_tv_discount_value
?.
visibility
=
View
.
INVISIBLE
}
else
{
holder
.
id_tv_discount_value
?.
visibility
=
View
.
VISIBLE
holder
.
id_tv_discount_value
?.
text
=
"${bean.maxDiscount}折"
}
holder
.
id_rl_qy_item_view
?.
setOnClickListener
{
listener
.
onItemClick
(
it
,
position
,
bean
)
}
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/MyOrderAdapter.kt
View file @
ab18a99d
...
...
@@ -51,7 +51,6 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
copy
(
holder
.
id_tv_order_no
?.
text
.
toString
())
}
holder
.
id_tv_total_price
?.
text
=
"¥${bean.cash}"
// var mPrice = bean.cash?.toDouble()?.plus(bean.discount?.toDouble())
holder
.
id_tv_pricedesc
?.
text
=
"总价:¥${bean.totalPrice}|优惠:¥${bean.discount}|运费:¥${bean.freight}|"
holder
.
id_tv_order_no
?.
text
=
bean
.
orderNo
...
...
@@ -63,7 +62,6 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
holder
.
id_rl_order_item
?.
adapter
=
mAdapter
mAdapter
?.
clear
()
mAdapter
?.
appendToList
(
bean
.
goodsList
)
mAdapter
?.
notifyDataSetChanged
()
}
}
else
if
(
holder
is
VipRightsOrderViewHolder
)
{
holder
.
img_vip_order_no_copy
?.
setOnClickListener
{
...
...
@@ -102,9 +100,9 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
.
inflate
(
R
.
layout
.
items_layout_card_rights_order
,
parent
,
false
)
)
}
else
if
(
viewType
==
VIEW_TYPE_GOODS_VIEW
)
{
return
CardRight
sOrderViewHolder
(
return
Good
sOrderViewHolder
(
LayoutInflater
.
from
(
AppContext
.
get
())
.
inflate
(
R
.
layout
.
items_layout_
card_rights
_order
,
parent
,
false
)
.
inflate
(
R
.
layout
.
items_layout_
box
_order
,
parent
,
false
)
)
}
else
{
return
CardRightsOrderViewHolder
(
...
...
moduleMain/src/main/java/com/zxbw/modulemain/box/activity/NewBoxGoodsDetailActivity.kt
View file @
ab18a99d
...
...
@@ -102,7 +102,7 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
id_detail_rule
?.
setOnClickListener
{
JumpUtils
.
webJump
(
"规则"
,
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xi
ngyunmohe/ios/use_introduce
.html"
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xi
aoxiangSaveMoney/privacy_app1
.html"
)
}
//试玩
...
...
moduleMain/src/main/java/com/zxbw/modulemain/box/activity/OrderDetailActivity.kt
View file @
ab18a99d
This diff is collapsed.
Click to expand it.
moduleMain/src/main/java/com/zxbw/modulemain/fragment/MagicBoxOrderFragment.kt
View file @
ab18a99d
...
...
@@ -4,6 +4,8 @@ import android.text.TextUtils
import
android.view.View
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.scwang.smart.refresh.footer.ClassicsFooter
import
com.scwang.smart.refresh.header.ClassicsHeader
import
com.zxbw.modulemain.R
import
com.zxbw.modulemain.adapter.MyOrderAdapter
import
com.zxbw.modulemain.contract.BoxOrderContract
...
...
@@ -13,66 +15,57 @@ import com.zxhl.cms.net.model.box.NoticeEntity
import
com.zxhl.cms.net.model.box.ShopOrderEntity
import
com.zxhl.cms.utils.Utils
import
kotlinx.android.synthetic.main.fragment_layout_magic_box_order.*
import
kotlinx.android.synthetic.main.fragment_layout_magic_box_order.id_refresh_view
import
kotlinx.android.synthetic.main.fragment_layout_recommend.*
class
MagicBoxOrderFragment
:
BaseFragment
(),
BoxOrderContract
.
View
{
class
MagicBoxOrderFragment
:
BaseFragment
(),
BoxOrderContract
.
View
{
private
var
mPresenter
:
BoxOrderPresenter
?
=
null
private
var
mAdapter
:
MyOrderAdapter
?
=
null
private
var
mAdapter
:
MyOrderAdapter
?
=
null
override
fun
layoutID
():
Int
{
return
R
.
layout
.
fragment_layout_magic_box_order
}
override
fun
init
(
view
:
View
?)
{
mPresenter
=
BoxOrderPresenter
(
this
)
mAdapter
=
MyOrderAdapter
(
mActivity
)
box_order_recyclerView
.
layoutManager
=
LinearLayoutManager
(
mActivity
)
box_order_recyclerView
.
adapter
=
mAdapter
mAdapter
=
MyOrderAdapter
(
mActivity
)
box_order_recyclerView
.
layoutManager
=
LinearLayoutManager
(
mActivity
)
box_order_recyclerView
.
adapter
=
mAdapter
mPresenter
?.
getOrderList
(
true
)
mPresenter
?.
getNotice
()
refreshLayout
.
setColorSchemeColors
(
resources
.
getColor
(
R
.
color
.
color_3A95FD
))
refreshLayout
?.
setOnRefreshListener
{
mPresenter
?.
getOrderList
(
true
)
}
box_order_recyclerView
.
addOnScrollListener
(
object
:
RecyclerView
.
OnScrollListener
()
{
override
fun
onScrollStateChanged
(
recyclerView
:
RecyclerView
,
newState
:
Int
)
{
super
.
onScrollStateChanged
(
recyclerView
,
newState
)
}
override
fun
onScrolled
(
recyclerView
:
RecyclerView
,
dx
:
Int
,
dy
:
Int
)
{
super
.
onScrolled
(
recyclerView
,
dx
,
dy
)
if
(
Utils
.
isSlideToBottom
(
recyclerView
))
{
if
((
mAdapter
?.
list
?.
size
?:
0
)
>
0
)
{
mPresenter
?.
getOrderList
(
false
)
}
}
}
})
id_refresh_view
.
setRefreshHeader
(
ClassicsHeader
(
activity
))
id_refresh_view
.
setRefreshFooter
(
ClassicsFooter
(
activity
))
id_refresh_view
.
setOnRefreshListener
{
mPresenter
?.
getOrderList
(
true
)
}
id_refresh_view
.
setOnLoadMoreListener
{
mPresenter
?.
getOrderList
(
false
)
}
}
companion
object
{
fun
newInstance
()
=
MagicBoxOrderFragment
()
}
override
fun
setOrderListData
(
isRefresh
:
Boolean
,
reslut
:
List
<
ShopOrderEntity
>?)
{
if
(
isRefresh
)
{
id_refresh_view
.
finishRefresh
(!
reslut
.
isNullOrEmpty
());
//传入false表示加载失败
}
else
{
id_refresh_view
.
finishLoadMore
(!
reslut
.
isNullOrEmpty
());
//传入false表示加载失败
}
if
(
isRefresh
&&
!
reslut
.
isNullOrEmpty
())
{
mAdapter
?.
clear
()
}
setEmptyView
(
false
)
val
start
=
mAdapter
?.
getItemCount
()
?:
0
mAdapter
?.
appendToList
(
reslut
)
if
(
isRefresh
)
{
mAdapter
?.
notifyDataSetChanged
()
}
else
{
val
end
=
mAdapter
?.
getItemCount
()
?:
0
mAdapter
?.
notifyItemRangeChanged
(
start
,
end
)
if
(!
reslut
.
isNullOrEmpty
())
{
mAdapter
?.
appendToList
(
reslut
)
}
setEmptyView
(
mAdapter
?.
list
?.
size
?:
0
==
0
)
}
override
fun
setEmptyView
(
isEmpty
:
Boolean
)
{
refreshLayout
?.
isRefreshing
=
false
if
(
isEmpty
)
{
id_order_empty
.
visibility
=
View
.
VISIBLE
}
else
{
...
...
@@ -81,11 +74,11 @@ class MagicBoxOrderFragment:BaseFragment(), BoxOrderContract.View {
}
override
fun
setNotice
(
reslut
:
NoticeEntity
?)
{
if
(!
TextUtils
.
isEmpty
(
reslut
?.
orderNotice
))
{
id_ll_notice
?.
visibility
=
View
.
VISIBLE
id_tv_order_notice
?.
text
=
reslut
?.
orderNotice
}
else
{
id_ll_notice
?.
visibility
=
View
.
GONE
if
(!
TextUtils
.
isEmpty
(
reslut
?.
orderNotice
))
{
id_ll_notice
?.
visibility
=
View
.
VISIBLE
id_tv_order_notice
?.
text
=
reslut
?.
orderNotice
}
else
{
id_ll_notice
?.
visibility
=
View
.
GONE
}
}
...
...
moduleMain/src/main/java/com/zxbw/modulemain/presenter/BoxOrderPresenter.kt
View file @
ab18a99d
...
...
@@ -18,43 +18,25 @@ class BoxOrderPresenter : BoxOrderContract.Presenter {
private
var
page
:
Int
=
1
private
val
size
:
Int
=
10
private
var
isMore
=
false
override
fun
getOrderList
(
ifRefresh
:
Boolean
)
{
if
(
ifRefresh
)
{
page
=
1
isMore
=
false
}
else
if
(
isMore
)
{
return
}
isMore
=
true
ApiClient
.
homeApi
.
getOrder
(
page
,
size
)
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
List
<
ShopOrderEntity
>>()
{
override
fun
onSuccess
(
result
:
List
<
ShopOrderEntity
>?)
{
if
(
result
!=
null
)
{
if
(!
result
.
isNullOrEmpty
())
{
if
(
result
.
size
<=
size
)
{
page
++
isMore
=
false
}
else
{
isMore
=
true
}
mView
.
setOrderListData
(
ifRefresh
,
result
)
}
else
{
if
(
page
==
1
)
{
mView
.
setEmptyView
(
true
)
}
}
page
++;
mView
.
setOrderListData
(
ifRefresh
,
result
)
}
else
{
mView
.
set
EmptyView
(
true
)
mView
.
set
OrderListData
(
ifRefresh
,
null
)
}
}
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
Log
.
d
(
"wxw"
,
"goodsListError "
+
code
+
" errorMsg "
+
errorMsg
)
// mView.setEmptyView(true)
mView
.
setEmptyView
(
true
)
mView
.
setOrderListData
(
ifRefresh
,
null
)
}
})
...
...
moduleMain/src/main/res/drawable-xhdpi/img_vip_rights_bg.png
View replaced file @
75262c44
View file @
ab18a99d
53.8 KB
|
W:
|
H:
10.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
moduleMain/src/main/res/layout/activity_layout_card_detail.xml
View file @
ab18a99d
...
...
@@ -409,7 +409,7 @@
android:id=
"@+id/id_img_close_pay_web"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@
+id/id_member
_pay_web_view"
android:layout_alignRight=
"@
id/id_rights
_pay_web_view"
android:padding=
"10dp"
android:src=
"@drawable/icon_guanbi"
/>
...
...
moduleMain/src/main/res/layout/activity_layout_member_order.xml
View file @
ab18a99d
...
...
@@ -342,7 +342,7 @@
android:id=
"@+id/id_img_close_pay_web"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@
+
id/id_member_pay_web_view"
android:layout_alignRight=
"@id/id_member_pay_web_view"
android:padding=
"10dp"
android:src=
"@drawable/icon_guanbi"
/>
...
...
moduleMain/src/main/res/layout/activity_layout_order_detail.xml
View file @
ab18a99d
...
...
@@ -450,9 +450,25 @@
<!-- android:textSize="15sp" />-->
<!-- </RelativeLayout>-->
<
WebView
android:id=
"@+id/id_
pay_web
_view"
<
RelativeLayout
android:id=
"@+id/id_
rl_h5_pay
_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
/>
android:layout_height=
"match_parent"
android:layout_below=
"@id/id_rl_order_title"
android:visibility=
"gone"
>
<WebView
android:id=
"@+id/id_pay_web_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<ImageView
android:id=
"@+id/id_img_close_pay_web"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@id/id_pay_web_view"
android:padding=
"10dp"
android:src=
"@drawable/icon_guanbi"
/>
</RelativeLayout>
</RelativeLayout>
moduleMain/src/main/res/layout/activity_layout_rights_detail.xml
View file @
ab18a99d
...
...
@@ -322,7 +322,7 @@
android:id=
"@+id/id_img_close_pay_web"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@
+id/id_member
_pay_web_view"
android:layout_alignRight=
"@
id/id_rights
_pay_web_view"
android:padding=
"10dp"
android:src=
"@drawable/icon_guanbi"
/>
...
...
moduleMain/src/main/res/layout/activity_layout_skill_shop.xml
View file @
ab18a99d
...
...
@@ -343,7 +343,7 @@
android:id=
"@+id/id_img_close_pay_web"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@
+id/id_member
_pay_web_view"
android:layout_alignRight=
"@
id/id_rights
_pay_web_view"
android:padding=
"10dp"
android:src=
"@drawable/icon_guanbi"
/>
...
...
moduleMain/src/main/res/layout/activity_layout_to_pay_skill_goods.xml
View file @
ab18a99d
...
...
@@ -344,7 +344,7 @@
android:id=
"@+id/id_img_close_pay_web"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignRight=
"@
+id/id_member
_pay_web_view"
android:layout_alignRight=
"@
id/id_rights
_pay_web_view"
android:padding=
"10dp"
android:src=
"@drawable/icon_guanbi"
/>
...
...
moduleMain/src/main/res/layout/fragment_layout_magic_box_order.xml
View file @
ab18a99d
...
...
@@ -31,18 +31,19 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<
androidx.swiperefreshlayout.widget.Swipe
RefreshLayout
android:id=
"@+id/
refreshLayout
"
<
com.scwang.smart.refresh.layout.Smart
RefreshLayout
android:id=
"@+id/
id_refresh_view
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/box_order_recyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:padding=
"5dp"
/>
</
androidx.swiperefreshlayout.widget.Swipe
RefreshLayout>
</
com.scwang.smart.refresh.layout.Smart
RefreshLayout>
<LinearLayout
android:id=
"@+id/id_order_empty"
...
...
moduleMain/src/main/res/layout/items_item_vip_rights_order.xml
View file @
ab18a99d
...
...
@@ -9,11 +9,18 @@
android:layout_height=
"52dp"
android:orientation=
"horizontal"
>
<com.zxhl.cms.widget.RecycleImageView
android:id=
"@+id/id_img_rights_icon"
<RelativeLayout
android:layout_width=
"70dp"
android:layout_height=
"52dp"
android:layout_marginRight=
"10dp"
/>
android:layout_marginRight=
"10dp"
android:background=
"@drawable/img_vip_rights_bg"
>
<com.zxhl.cms.widget.RecycleImageView
android:id=
"@+id/id_img_rights_icon"
android:layout_width=
"12dp"
android:layout_height=
"12dp"
android:layout_margin=
"5dp"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/id_tv_vip_goods_name"
...
...
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