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
b373f51e
Commit
b373f51e
authored
Jun 14, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :1.1.0 [实现方案] :调整UI
parent
bda7e069
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
402 additions
and
7 deletions
+402
-7
NetConfig.java
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
+1
-1
RounterApi.kt
cms/src/main/java/com/zxhl/cms/router/RounterApi.kt
+4
-1
JumpUtils.java
cms/src/main/java/com/zxhl/cms/utils/JumpUtils.java
+9
-0
AndroidManifest.xml
moduleMain/src/main/AndroidManifest.xml
+11
-0
PhoneVouchersActivity.kt
...ava/com/zxbw/modulemain/activity/PhoneVouchersActivity.kt
+73
-0
PhoneVouchersAdapter.kt
.../java/com/zxbw/modulemain/adapter/PhoneVouchersAdapter.kt
+84
-0
UserCenterFragment.kt
...n/java/com/zxbw/modulemain/fragment/UserCenterFragment.kt
+3
-0
icon_huafeichongzhi.png
...eMain/src/main/res/drawable-xhdpi/icon_huafeichongzhi.png
+0
-0
activity_layout_phone_vouchers.xml
...in/src/main/res/layout/activity_layout_phone_vouchers.xml
+61
-0
fragment_layout_user_center.xml
...eMain/src/main/res/layout/fragment_layout_user_center.xml
+6
-5
item_layout_phone_voucher.xml
moduleMain/src/main/res/layout/item_layout_phone_voucher.xml
+150
-0
No files found.
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
View file @
b373f51e
...
@@ -21,7 +21,7 @@ public class NetConfig {
...
@@ -21,7 +21,7 @@ public class NetConfig {
}
}
// 根据调试选项更新环境
// 根据调试选项更新环境
public
static
Environment
sEnvironment
=
PRODUCT
;
// 当前环境
public
static
Environment
sEnvironment
=
DEV
;
// 当前环境
public
static
String
BASE_WEB_URL
=
""
;
public
static
String
BASE_WEB_URL
=
""
;
public
static
String
BASE_URL
=
""
;
public
static
String
BASE_URL
=
""
;
public
static
String
BASE_NEW_URL
=
""
;
public
static
String
BASE_NEW_URL
=
""
;
...
...
cms/src/main/java/com/zxhl/cms/router/RounterApi.kt
View file @
b373f51e
...
@@ -255,7 +255,10 @@ interface RounterApi {
...
@@ -255,7 +255,10 @@ interface RounterApi {
@RounterParam
(
"uid"
)
uid
:
String
@RounterParam
(
"uid"
)
uid
:
String
):
Intent
):
Intent
@RounterUri
(
Constant
.
scheme
+
"://cardvoucher"
)
@RounterUri
(
Constant
.
scheme
+
"://phone_voucher"
)
fun
getIntentPhoneVoucher
():
Intent
@RounterUri
(
Constant
.
scheme
+
"://cardvoucher"
)
fun
getIntentCardVoucher
(
@RounterParam
(
"brand"
)
brand
:
String
):
Intent
fun
getIntentCardVoucher
(
@RounterParam
(
"brand"
)
brand
:
String
):
Intent
@RounterUri
(
Constant
.
scheme
+
"://carddetail"
)
@RounterUri
(
Constant
.
scheme
+
"://carddetail"
)
...
...
cms/src/main/java/com/zxhl/cms/utils/JumpUtils.java
View file @
b373f51e
...
@@ -382,6 +382,15 @@ public class JumpUtils {
...
@@ -382,6 +382,15 @@ public class JumpUtils {
}
}
}
}
public
static
void
PhoneVoucherJump
()
{
try
{
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentPhoneVoucher
();
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
AppContext
.
get
().
startActivity
(
intent
);
}
catch
(
Exception
e
)
{
Utils
.
showToast
(
AppContext
.
get
(),
"该版本暂不支持,请更新版本!"
);
}
}
public
static
void
CardVoucherJump
(
String
brand
)
{
public
static
void
CardVoucherJump
(
String
brand
)
{
try
{
try
{
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentCardVoucher
(
brand
);
Intent
intent
=
RounterBus
.
getRounter
(
RounterApi
.
class
).
getIntentCardVoucher
(
brand
);
...
...
moduleMain/src/main/AndroidManifest.xml
View file @
b373f51e
...
@@ -35,6 +35,17 @@
...
@@ -35,6 +35,17 @@
android:scheme=
"xxsqshop"
/>
android:scheme=
"xxsqshop"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
".activity.PhoneVouchersActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<data
android:host=
"phone_voucher"
android:scheme=
"xxsqshop"
/>
</intent-filter>
</activity>
<activity
android:name=
".activity.CardVoucherActivity"
>
<activity
android:name=
".activity.CardVoucherActivity"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<action
android:name=
"android.intent.action.VIEW"
/>
...
...
moduleMain/src/main/java/com/zxbw/modulemain/activity/PhoneVouchersActivity.kt
0 → 100644
View file @
b373f51e
package
com.zxbw.modulemain.activity
import
android.view.View
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.zxbw.modulemain.R
import
com.zxbw.modulemain.adapter.PhoneVouchersAdapter
import
com.zxhl.cms.common.base.BaseActivity
import
com.zxhl.cms.net.ApiClient
import
com.zxhl.cms.net.RxSchedulers
import
com.zxhl.cms.net.callback.BaseObserver
import
com.zxhl.cms.net.model.qy.CouponsEntity
import
com.zxhl.cms.utils.JumpUtils
import
kotlinx.android.synthetic.main.activity_layout_phone_vouchers.*
import
kotlinx.android.synthetic.main.activity_layout_phone_vouchers.id_img_back
/**
* @author (wangXuewei)
* @datetime 2022-06-14 18:09 GMT+8
* @detail :话费券列表
*/
class
PhoneVouchersActivity
:
BaseActivity
()
{
private
var
mAdapter
:
PhoneVouchersAdapter
?
=
null
override
fun
layoutID
():
Int
=
R
.
layout
.
activity_layout_phone_vouchers
override
fun
onClick
(
v
:
View
?)
{
when
(
v
)
{
id_img_back
->
{
finish
()
}
}
}
override
fun
init
()
{
id_img_back
.
setOnClickListener
(
this
)
mAdapter
=
PhoneVouchersAdapter
(
this
)
{
view
,
position
,
data
->
JumpUtils
.
RechargeJump
()
finish
()
}
id_rl_phone_voucher
?.
layoutManager
=
LinearLayoutManager
(
mActivity
)
id_rl_phone_voucher
?.
adapter
=
mAdapter
getData
()
}
private
fun
getData
()
{
ApiClient
.
homeApi
.
getFetchallCard
().
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
List
<
CouponsEntity
>>()
{
override
fun
onSuccess
(
result
:
List
<
CouponsEntity
>?)
{
if
(
result
.
isNullOrEmpty
())
{
id_phone_voucher_empty
?.
visibility
=
View
.
GONE
id_rl_phone_voucher
?.
visibility
=
View
.
VISIBLE
}
else
{
id_phone_voucher_empty
?.
visibility
=
View
.
VISIBLE
id_rl_phone_voucher
?.
visibility
=
View
.
GONE
mAdapter
?.
clear
()
mAdapter
?.
appendToList
(
result
)
}
}
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
id_phone_voucher_empty
?.
visibility
=
View
.
GONE
id_rl_phone_voucher
?.
visibility
=
View
.
VISIBLE
}
})
}
}
\ No newline at end of file
moduleMain/src/main/java/com/zxbw/modulemain/adapter/PhoneVouchersAdapter.kt
0 → 100644
View file @
b373f51e
package
com.zxbw.modulemain.adapter
import
android.app.Activity
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
com.zxbw.modulemain.R
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.common.base.BaseRecyclerAdapter
import
com.zxhl.cms.net.model.qy.CouponsEntity
import
com.zxhl.cms.net.model.qy.JgqQyEntity
import
com.zxhl.cms.net.model.qy.RightsDetailEntity
import
com.zxhl.cms.utils.OnRecycleItemClickListener
import
com.zxhl.cms.widget.RecycleImageView
class
PhoneVouchersAdapter
:
BaseRecyclerAdapter
<
CouponsEntity
,
PhoneVouchersAdapter
.
ViewHolder
>
{
private
var
mContext
:
Activity
?
=
null
private
val
listener
:
OnRecycleItemClickListener
<
CouponsEntity
>
constructor
(
content
:
Activity
?,
listener
:
OnRecycleItemClickListener
<
CouponsEntity
>
)
:
super
()
{
mContext
=
content
this
.
listener
=
listener
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
var
bean
=
mList
[
position
]
holder
.
id_tv_cards_name
?.
text
=
"${bean.amount}元话费券"
holder
.
id_tv_guanfang_price
?.
text
=
bean
.
desc
holder
.
id_goods_yuan_jia
?.
text
=
"${bean.amount}"
holder
.
id_ll_item
?.
setOnClickListener
{
listener
.
onItemClick
(
it
,
position
,
bean
)
}
}
override
fun
getItemCount
():
Int
{
return
mList
.
size
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
return
ViewHolder
(
LayoutInflater
.
from
(
AppContext
.
get
())
.
inflate
(
R
.
layout
.
item_layout_phone_voucher
,
parent
,
false
)
)
}
class
ViewHolder
:
RecyclerView
.
ViewHolder
{
var
id_ll_item
:
LinearLayout
?
var
id_img_cards
:
RecycleImageView
?
// var id_goods_icon: RecycleImageView?
var
id_tv_cards_name
:
TextView
?
var
id_goods_yuan_jia
:
TextView
?
var
id_tv_card_discount
:
TextView
?
var
id_tv_card_price
:
TextView
?
var
id_tv_guanfang_price
:
TextView
?
var
id_tv_cagte_name
:
TextView
?
constructor
(
itemView
:
View
)
:
super
(
itemView
)
{
id_ll_item
=
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
id_ll_item
)
id_img_cards
=
itemView
.
findViewById
<
RecycleImageView
>(
R
.
id
.
id_img_cards
)
// id_goods_icon = itemView.findViewById<TextView>(R.id.id_goods_icon)
id_tv_cards_name
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_cards_name
)
id_goods_yuan_jia
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_goods_yuan_jia
)
id_tv_card_discount
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_card_discount
)
id_tv_card_price
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_card_price
)
id_tv_guanfang_price
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_guanfang_price
)
id_tv_cagte_name
=
itemView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_cagte_name
)
}
}
}
\ No newline at end of file
moduleMain/src/main/java/com/zxbw/modulemain/fragment/UserCenterFragment.kt
View file @
b373f51e
...
@@ -61,6 +61,9 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
...
@@ -61,6 +61,9 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
//JumpUtils.WithdrawalJump()
//JumpUtils.WithdrawalJump()
JumpUtils
.
MyOrderJump
(
""
)
JumpUtils
.
MyOrderJump
(
""
)
}
}
id_ll_huafeiquan
?.
setOnClickListener
{
JumpUtils
.
PhoneVoucherJump
()
}
}
}
...
...
moduleMain/src/main/res/drawable-xhdpi/icon_huafeichongzhi.png
0 → 100644
View file @
b373f51e
1.75 KB
moduleMain/src/main/res/layout/activity_layout_phone_vouchers.xml
0 → 100644
View file @
b373f51e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#F3F4F5"
android:orientation=
"vertical"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"80dp"
android:background=
"@color/white"
>
<ImageView
android:id=
"@+id/id_img_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:padding=
"16dp"
android:src=
"@drawable/icon_fanhui"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"15dp"
android:text=
"话费券列表"
android:textColor=
"@color/color_333333"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/id_rl_phone_voucher"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<LinearLayout
android:id=
"@+id/id_phone_voucher_empty"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:visibility=
"gone"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"160dp"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"10dp"
android:src=
"@drawable/icon_kong"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"话费券用完了?去享受其他权益吧!"
android:textColor=
"@color/color_999999"
android:textSize=
"13sp"
/>
</LinearLayout>
</LinearLayout>
moduleMain/src/main/res/layout/fragment_layout_user_center.xml
View file @
b373f51e
...
@@ -402,6 +402,7 @@
...
@@ -402,6 +402,7 @@
android:textColor=
"@color/color_333333"
android:textColor=
"@color/color_333333"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/id_ll_my_warehouse"
android:id=
"@+id/id_ll_my_warehouse"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -425,7 +426,6 @@
...
@@ -425,7 +426,6 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/id_ll_xieyi_zhengze"
android:id=
"@+id/id_ll_xieyi_zhengze"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -477,6 +477,7 @@
...
@@ -477,6 +477,7 @@
android:layout_marginTop=
"16dp"
android:layout_marginTop=
"16dp"
android:layout_marginBottom=
"16dp"
android:layout_marginBottom=
"16dp"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/id_ll_aboutus"
android:id=
"@+id/id_ll_aboutus"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -524,23 +525,23 @@
...
@@ -524,23 +525,23 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/id_ll_huafeiquan"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
android:orientation=
"vertical"
>
android:visibility=
"invisible"
>
<ImageView
<ImageView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"6dp"
android:layout_marginBottom=
"6dp"
android:src=
"@drawable/icon_
yinsizhnegce
"
/>
android:src=
"@drawable/icon_
huafeichongzhi
"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
隐私政策
"
android:text=
"
话费券
"
android:textColor=
"@color/color_333333"
android:textColor=
"@color/color_333333"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
...
...
moduleMain/src/main/res/layout/item_layout_phone_voucher.xml
0 → 100644
View file @
b373f51e
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/id_ll_item"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"16dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"16dp"
android:background=
"@drawable/shape_ffffff_r10"
android:orientation=
"horizontal"
>
<RelativeLayout
android:id=
"@+id/id_rl_bg"
android:layout_width=
"110dp"
android:layout_height=
"wrap_content"
android:padding=
"10dp"
>
<com.zxhl.cms.widget.RecycleImageView
android:id=
"@+id/id_img_cards"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/img_daijinquan"
/>
<TextView
android:id=
"@+id/id_goods_icon"
android:layout_width=
"12dp"
android:layout_height=
"12dp"
android:layout_margin=
"8dp"
android:background=
"@drawable/shape_edd49d_r"
android:gravity=
"center"
android:includeFontPadding=
"false"
android:text=
"¥"
android:textColor=
"#D93442"
android:textSize=
"10sp"
/>
<TextView
android:id=
"@+id/id_tv_cagte_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:layout_toRightOf=
"@+id/id_goods_icon"
android:ellipsize=
"end"
android:includeFontPadding=
"false"
android:lines=
"1"
android:maxWidth=
"34dp"
android:text=
"话费券"
android:textColor=
"@color/white"
android:textSize=
"10sp"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@+id/id_img_cards"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"30dp"
android:layout_marginBottom=
"8dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/id_goods_yuan_jia"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"0"
android:textColor=
"@color/white"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"元"
android:textColor=
"@color/white"
android:textSize=
"10sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/id_tv_cards_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"9dp"
android:includeFontPadding=
"false"
android:text=
""
android:textColor=
"@color/color_333333"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/id_tv_card_discount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"4dp"
android:layout_marginBottom=
"8dp"
android:background=
"@drawable/shape_edd49d_r4"
android:includeFontPadding=
"false"
android:paddingLeft=
"6dp"
android:paddingTop=
"2dp"
android:paddingRight=
"6dp"
android:paddingBottom=
"2dp"
android:text=
"会员专享7.6折"
android:textColor=
"#A85C00"
android:textSize=
"12sp"
android:visibility=
"invisible"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"4dp"
android:includeFontPadding=
"false"
android:text=
"¥"
android:textColor=
"#D53C32"
android:textSize=
"12sp"
android:textStyle=
"bold"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/id_tv_card_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:text=
"0.0"
android:textColor=
"#D53C32"
android:textSize=
"18sp"
android:textStyle=
"bold"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/id_tv_guanfang_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:text=
"官方价 ¥5元"
android:textColor=
"@color/color_999999"
android:textSize=
"15sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
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