Commit de9d1f70 authored by shiyl's avatar shiyl

门店管理修改为只允许新增一家门店

parent efa6bd75
......@@ -60,10 +60,13 @@ class ChooseStoreActivity : BaseActivity<ActivityChooseStoreBinding>() {
if (shopList.isNullOrEmpty()) {
viewBind.rvStore.hide()
viewBind.pvEmptyPage.show()
viewBind.include.tvMenu.show()
return@getShopList
} else {
viewBind.rvStore.show()
viewBind.pvEmptyPage.hide()
// 暂时隐藏,目前只支持新增一家门店
viewBind.include.tvMenu.hide()
}
// 勾选上次选中的门店的
if (!lastSelectStoreList.isNullOrEmpty()) {
......
......@@ -2,10 +2,11 @@ package com.yidian.shenghuoquan.newscontent.ui.store
import android.content.Intent
import android.os.Bundle
import androidx.core.view.isVisible
import androidx.recyclerview.widget.LinearLayoutManager
import com.yidian.common.XRouterPathConstants.Companion.STORE_MANAGEMENT
import com.yidian.common.base.BaseActivity
import com.yidian.common.extensions.hide
import com.yidian.common.extensions.show
import com.yidian.shenghuoquan.newscontent.adapter.StoreAdapter
import com.yidian.shenghuoquan.newscontent.databinding.ActivityStoreManagementBinding
import com.yidian.shenghuoquan.newscontent.http.ApiService
......@@ -48,12 +49,15 @@ class StoreManagementActivity : BaseActivity<ActivityStoreManagementBinding>() {
requestParams["life_account_id"] = StorageUtil.getLifeAccountId()
ApiService.getShopList(requestParams) {
if (it.isNullOrEmpty()) {
viewBind.storeList.isVisible = false
viewBind.pvEmptyPage.isVisible = true
viewBind.storeList.hide()
viewBind.pvEmptyPage.show()
viewBind.addStoreBtn.show()
return@getShopList
} else {
viewBind.storeList.isVisible = true
viewBind.pvEmptyPage.isVisible = false
viewBind.storeList.show()
viewBind.pvEmptyPage.hide()
// 暂时隐藏,目前只支持新增一家门店
viewBind.addStoreBtn.hide()
}
adapter.setData(it)
}
......
......@@ -32,13 +32,13 @@
app:CommonEmptyPageView_place_holder_img="@drawable/img_empty_place_holder" />
<LinearLayout
android:id="@+id/add_store_btn"
android:layout_width="match_parent"
android:layout_height="@dimen/dp64"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/add_store_btn"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginLeft="30dp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment