Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
ed125fcb
Commit
ed125fcb
authored
Jul 09, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改门店选择回显效果
parent
99fd8e41
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
ChooseStoreApter.kt
...dian/shenghuoquan/newscontent/adapter/ChooseStoreApter.kt
+1
-1
ChooseStoreActivity.kt
.../shenghuoquan/newscontent/ui/store/ChooseStoreActivity.kt
+5
-7
YdSubwayApplication.kt
...ain/java/com/shenghuoquan/business/YdSubwayApplication.kt
+3
-1
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/adapter/ChooseStoreApter.kt
View file @
ed125fcb
...
...
@@ -18,7 +18,7 @@ import com.yidian.shenghuoquan.newscontent.ui.store.EditStoreActivity
class
ChooseStoreApter
:
BaseQuickAdapter
<
GetShopListBean
,
BaseViewHolder
>(
R
.
layout
.
layout_choose_store_list_item
)
{
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
GetShopListBean
)
{
val
position
=
holder
.
adapter
Position
val
position
=
holder
.
layout
Position
holder
.
getView
<
TextView
>(
R
.
id
.
tv_store_name
).
text
=
item
.
shop_name
holder
.
getView
<
TextView
>(
R
.
id
.
tv_store_address
).
text
=
item
.
address
val
ivStoreSelect
=
holder
.
getView
<
ImageView
>(
R
.
id
.
iv_store_select
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/store/ChooseStoreActivity.kt
View file @
ed125fcb
...
...
@@ -49,16 +49,14 @@ class ChooseStoreActivity : BaseActivity<ActivityChooseStoreBinding>() {
private
fun
requestStoreList
()
{
val
requestParams
=
HashMap
<
String
,
String
?>()
requestParams
[
"life_account_id"
]
=
StorageUtil
.
getLifeAccountId
()
ApiService
.
getShopList
(
requestParams
)
{
ApiService
.
getShopList
(
requestParams
)
{
shopList
->
// 勾选上次选中的门店的
if
(!
lastSelectStoreList
.
isNullOrEmpty
())
{
it
.
forEach
{
getShopListBean
->
lastSelectStoreList
?.
forEach
{
storeId
->
getShopListBean
.
isSelected
=
getShopListBean
.
shop_id
==
storeId
}
shopList
.
forEach
{
shopListBean
->
shopListBean
.
isSelected
=
lastSelectStoreList
!!
.
contains
(
shopListBean
.
sub_shop_id
)
}
}
chooseStoreAdapter
.
setList
(
i
t
)
chooseStoreAdapter
.
setList
(
shopLis
t
)
}
}
...
...
@@ -74,7 +72,7 @@ class ChooseStoreActivity : BaseActivity<ActivityChooseStoreBinding>() {
val
storeList
=
chooseStoreAdapter
.
data
val
filterList
=
storeList
.
filter
{
it
.
isSelected
}
filterList
.
forEach
{
selectStoreIdList
.
add
(
it
.
shop_id
)
selectStoreIdList
.
add
(
it
.
s
ub_s
hop_id
)
}
// 关闭选择类目页面
XEventManager
.
post
(
XBaseEvent
(
XEventConfig
.
CHOOSE_STORE_SUCCESS
,
selectStoreIdList
))
...
...
app/src/main/java/com/shenghuoquan/business/YdSubwayApplication.kt
View file @
ed125fcb
...
...
@@ -186,11 +186,13 @@ class YdSubwayApplication : YdBaseApplication() {
val
params
=
data
.
optJSONObject
(
"params"
)
val
options
=
data
.
optJSONObject
(
"options"
)
//
Native调用JS传递的数据
//
发送JS传递的数据到Service,并监听服务返回的结果回传JS
ZapTicket
(
request
.
name
).
withAction
(
action
).
withServiceParams
(
params
).
withServiceOptions
(
options
).
withIdentifier
(
identifier
)
.
onResult
{
result
->
Timber
.
tag
(
"xbrid"
).
e
(
"回传JS的结果码: ${result.code} + 结果信息: ${result.result}"
)
response
.
result
(
result
.
code
,
result
.
result
?:
""
,
""
)
}.
onLost
{
result
->
Timber
.
tag
(
"xbrid"
).
e
(
"回传JS的错误码: ${result.code} + 错误信息: ${result.mesg}"
)
response
.
result
(
result
.
code
,
""
,
result
.
mesg
)
}.
ship
()
}
...
...
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