Sheffi 4 сар өмнө
parent
commit
3e6f180861
51 өөрчлөгдсөн 4783 нэмэгдсэн , 582 устгасан
  1. 0 0
      ybvideoandroid/ShopHomeViewHolder.java
  2. 1 1
      ybvideoandroid/common/src/main/res/values/strings.xml
  3. 9 0
      ybvideoandroid/main/build.gradle
  4. 10 2
      ybvideoandroid/main/src/main/AndroidManifest.xml
  5. 18 14
      ybvideoandroid/main/src/main/java/com/yunbao/main/activity/MallClassActivity.java
  6. 480 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/activity/NewProductListActivity.java
  7. 200 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/activity/ShopGoodsActivity.java
  8. 310 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/activity/ShopInfoActivity.java
  9. 3 1
      ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/MainMallClassAdapter.java
  10. 104 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/ShopGoodsAdapter.java
  11. 94 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/ShopHomeCategoryAdapter.java
  12. 112 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/ShopListAdapter.java
  13. 14 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/bean/AddressBean.java
  14. 46 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/bean/ShopItem.java
  15. 4 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpConsts.java
  16. 58 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java
  17. 138 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/LiveSquareViewHolder.java
  18. 1 1
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeFollowViewHolder.java
  19. 5 2
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java
  20. 432 403
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainShopRuralViewHolder.java
  21. 7 4
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainShopViewHolder.java
  22. 412 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainViewHolder.java
  23. 156 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/ShopGoodsViewHolder.java
  24. 385 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/ShopHomeViewHolder.java
  25. 67 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/ShopReviewViewHolder.java
  26. 4 0
      ybvideoandroid/main/src/main/res/drawable/bg_search_shop.xml
  27. 5 0
      ybvideoandroid/main/src/main/res/drawable/bg_status_tag.xml
  28. 156 0
      ybvideoandroid/main/src/main/res/layout/activity_new_product_list.xml
  29. 64 0
      ybvideoandroid/main/src/main/res/layout/activity_shop_goods.xml
  30. 394 0
      ybvideoandroid/main/src/main/res/layout/activity_shop_info.xml
  31. 31 0
      ybvideoandroid/main/src/main/res/layout/item_first_category.xml
  32. 28 143
      ybvideoandroid/main/src/main/res/layout/item_main_shop_rural.xml
  33. 40 0
      ybvideoandroid/main/src/main/res/layout/item_recommended_product.xml
  34. 28 0
      ybvideoandroid/main/src/main/res/layout/item_second_category.xml
  35. 86 0
      ybvideoandroid/main/src/main/res/layout/item_shop_list.xml
  36. 36 0
      ybvideoandroid/main/src/main/res/layout/view_live_square.xml
  37. 62 0
      ybvideoandroid/main/src/main/res/layout/view_main.xml
  38. 3 0
      ybvideoandroid/main/src/main/res/layout/view_main_home_hot.xml
  39. 4 0
      ybvideoandroid/main/src/main/res/layout/view_main_home_news.xml
  40. 24 0
      ybvideoandroid/main/src/main/res/layout/view_shop_goods.xml
  41. 278 0
      ybvideoandroid/main/src/main/res/layout/view_shop_home.xml
  42. 22 0
      ybvideoandroid/main/src/main/res/layout/view_shop_review.xml
  43. BIN
      ybvideoandroid/main/src/main/res/mipmap-mdpi/ic_arrow_down1.png
  44. BIN
      ybvideoandroid/main/src/main/res/mipmap-mdpi/ic_arrow_up.png
  45. 4 0
      ybvideoandroid/main/src/main/res/values/ids.xml
  46. 161 8
      ybvideoandroid/mall/src/main/java/com/yunbao/mall/activity/ShopApplyActivity.java
  47. 113 0
      ybvideoandroid/mall/src/main/java/com/yunbao/mall/adapter/ShopTypeClassAdapter.java
  48. 40 0
      ybvideoandroid/mall/src/main/java/com/yunbao/mall/bean/ShopTypeBean.java
  49. 12 3
      ybvideoandroid/mall/src/main/java/com/yunbao/mall/http/MallHttpUtil.java
  50. 117 0
      ybvideoandroid/mall/src/main/res/layout/activity_shop_apply_mall.xml
  51. 5 0
      ybvideoandroid/video/src/main/java/com/yunbao/video/bean/ClassBean.java

+ 0 - 0
ybvideoandroid/ShopHomeViewHolder.java


+ 1 - 1
ybvideoandroid/common/src/main/res/values/strings.xml

@@ -946,7 +946,7 @@
     <string name="beauty">美颜</string>
 
 
-    <string name="mall_001">云豹小店</string>
+    <string name="mall_001">小店</string>
     <string name="mall_002">浏览记录</string>
     <string name="mall_003">我的地址</string>
     <string name="mall_004">账户余额</string>

+ 9 - 0
ybvideoandroid/main/build.gradle

@@ -36,6 +36,15 @@ dependencies {
     //直播
     api project(':live')
     api project(':mall')
+//    implementation 'androidx.appcompat:appcompat:1.7.1'
+//    implementation 'com.google.android.material:material:1.12.0'
+//    implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
+//    implementation 'androidx.appcompat:appcompat:1.7.1'
+//    implementation 'com.google.android.material:material:1.12.0'
+//    implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
+    // implementation 'androidx.appcompat:appcompat:1.6.1'
+    // implementation 'com.google.android.material:material:1.8.0'
+    // implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 
 
 }

+ 10 - 2
ybvideoandroid/main/src/main/AndroidManifest.xml

@@ -6,6 +6,15 @@
         android:allowBackup="true"
         android:theme="@style/AppTheme">
         <activity
+            android:name=".activity.ShopGoodsActivity"
+            android:exported="false" />
+        <activity
+            android:name=".activity.ShopInfoActivity"
+            android:exported="false" />
+        <activity
+            android:name=".activity.NewProductListActivity"
+            android:exported="false" />
+        <activity
             android:name=".activity.NewsDetailActivity"
             android:exported="false" />
         <activity
@@ -206,8 +215,7 @@
             android:screenOrientation="portrait" />
         <activity
             android:name=".activity.ImMsgInteractionActivity"
-            android:screenOrientation="portrait"
-            />
+            android:screenOrientation="portrait" />
     </application>
 
 </manifest>

+ 18 - 14
ybvideoandroid/main/src/main/java/com/yunbao/main/activity/MallClassActivity.java

@@ -83,6 +83,7 @@ public class MallClassActivity extends AbsActivity implements View.OnClickListen
         Intent intent = getIntent();
         setTitle(intent.getStringExtra(Constants.CLASS_NAME));
         String classId = intent.getStringExtra(Constants.CLASS_ID);
+        mClassId = classId;
         mBtnNew = findViewById(R.id.btn_new);
         mTvSale = findViewById(R.id.tv_sale);
         mTvPrice = findViewById(R.id.tv_price);
@@ -142,20 +143,23 @@ public class MallClassActivity extends AbsActivity implements View.OnClickListen
 
             }
         });
-        MainHttpUtil.getShopThreeClass(classId, new HttpCallback() {
-            @Override
-            public void onSuccess(int code, String msg, String[] info) {
-                if (code == 0) {
-                    mGoodsClassList = JSON.parseArray(Arrays.toString(info), GoodsHomeClassBean.class);
-                    if (mGoodsClassList != null && mGoodsClassList.size() > 0) {
-                        mClassId = mGoodsClassList.get(0).getId();
-                        showTab();
-                        loadData();
-                    }
-
-                }
-            }
-        });
+        if (mRefreshView != null) {
+            mRefreshView.initData();
+        }
+//        MainHttpUtil.getShopThreeClass(classId, new HttpCallback() {
+//            @Override
+//            public void onSuccess(int code, String msg, String[] info) {
+//                if (code == 0) {
+//                    mGoodsClassList = JSON.parseArray(Arrays.toString(info), GoodsHomeClassBean.class);
+//                    if (mGoodsClassList != null && mGoodsClassList.size() > 0) {
+//                        mClassId = mGoodsClassList.get(0).getId();
+//                        showTab();
+//                        loadData();
+//                    }
+//
+//                }
+//            }
+//        });
     }
 
     private void showTab() {

+ 480 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/activity/NewProductListActivity.java

@@ -0,0 +1,480 @@
+package com.yunbao.main.activity;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.content.ContextCompat;
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.view.ViewGroup;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.Toast;
+
+import com.alibaba.fastjson.JSON;
+import com.yunbao.common.CommonAppConfig;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.adapter.RefreshAdapter;
+import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.custom.ItemDecoration;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.interfaces.OnItemClickListener;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.RouteUtil;
+import com.yunbao.main.R;
+import com.yunbao.main.adapter.MallSearchAdapter;
+import com.yunbao.main.http.MainHttpUtil;
+import com.yunbao.mall.activity.GoodsDetailActivity;
+import com.yunbao.mall.bean.GoodsHomeClassBean;
+import com.yunbao.mall.bean.GoodsSimpleBean;
+
+// 添加MagicIndicator相关导入
+import net.lucode.hackware.magicindicator.MagicIndicator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.SimplePagerTitleView;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class NewProductListActivity extends AbsActivity {
+
+    // 移除原来的LinearLayout,改为使用MagicIndicator
+    private MagicIndicator mFirstCategoryIndicator;
+    private RecyclerView mSecondCategoryRecyclerView;
+    private SecondCategoryAdapter mSecondCategoryAdapter;
+    private CommonRefreshView mRefreshView;
+    private MallSearchAdapter mGoodsAdapter;
+
+    // 真实数据
+    private List<GoodsHomeClassBean> mPrimaryCategoryList = new ArrayList<>();
+    private List<GoodsHomeClassBean> mSecondaryCategoryList = new ArrayList<>();
+    private String mClassId; // 从Intent接收的分类ID
+    private int mCurrentPrimaryCategoryIndex = 0; // 当前选中的一级分类索引
+    private String currentShopclassid;
+    private String mSaleSort = "";
+    private String mPriceSort = "";
+    private int mIsNew;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.activity_new_product_list;
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // 获取Intent传递的参数
+        Intent intent = getIntent();
+        if (intent != null) {
+            mClassId = intent.getStringExtra("classId");
+        }
+
+        TextView titleView = findViewById(R.id.titleView);
+        if (titleView != null) {
+            String title = intent != null ? intent.getStringExtra("title") : null;
+            if (!TextUtils.isEmpty(title)) {
+                titleView.setText(title);
+            } else {
+                titleView.setText("商品分类"); // 默认标题
+            }
+        }
+
+        initViews();
+        loadPrimaryCategories(); // 加载一级分类数据
+    }
+
+    // 添加返回按钮点击事件
+    public void backClick(View view) {
+        finish();
+    }
+
+    private void initViews() {
+        // 改为使用MagicIndicator
+        mFirstCategoryIndicator = findViewById(R.id.indicator_first_category);
+        mSecondCategoryRecyclerView = findViewById(R.id.rv_second_category);
+        mRefreshView = findViewById(R.id.refreshView);
+        ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, DpUtil.dp2px(10), 0);
+        decoration.setOnlySetItemOffsetsButNoDraw(true);
+        mRefreshView.setItemDecoration(decoration);
+
+        // 添加搜索框点击事件
+        EditText searchEdit = findViewById(R.id.edit);
+        searchEdit.setFocusable(false);
+        searchEdit.setFocusableInTouchMode(false);
+        searchEdit.setClickable(true);
+        findViewById(R.id.edit).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                // 跳转到搜索页面
+                if (!CommonAppConfig.getInstance().isLogin()) {
+                    RouteUtil.forwardLogin(mContext);
+                    return;
+                }
+                MallSearchActivity.forward(mContext);
+            }
+        });
+
+        // 初始化二级分类RecyclerView
+        initSecondCategoryRecyclerView();
+
+        // 初始化商品列表RefreshView
+        initGoodsRefreshView();
+    }
+
+    private void initSecondCategoryRecyclerView() {
+        // 设置网格布局管理器,2行,水平滚动
+        GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 2, GridLayoutManager.HORIZONTAL, false);
+        mSecondCategoryRecyclerView.setLayoutManager(gridLayoutManager);
+
+        mSecondCategoryAdapter = new SecondCategoryAdapter(new ArrayList<>());
+        mSecondCategoryRecyclerView.setAdapter(mSecondCategoryAdapter);
+    }
+
+    /**
+     * 初始化商品列表RefreshView - 基于MallSearchActivity的实现
+     */
+    private void initGoodsRefreshView() {
+        mRefreshView.setLayoutManager(new GridLayoutManager(this, 2, GridLayoutManager.VERTICAL, false));
+        mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<GoodsSimpleBean>() {
+
+            @Override
+            public RefreshAdapter<GoodsSimpleBean> getAdapter() {
+                if (mGoodsAdapter == null) {
+                    mGoodsAdapter = new MallSearchAdapter(mContext);
+                    mGoodsAdapter.setOnItemClickListener(new OnItemClickListener<GoodsSimpleBean>() {
+                        @Override
+                        public void onItemClick(GoodsSimpleBean bean, int position) {
+//                            GoodsDetailActivity.forward(mContext, bean.getId(), );
+                            RouteUtil.forwardGoodsDetail(mContext, bean.getId(), true, bean.getType());
+                        }
+                    });
+                }
+                return mGoodsAdapter;
+            }
+
+            @Override
+            public void loadData(int p, HttpCallback callback) {
+                // 如果currentShopclassid为null,直接返回空列表
+                if (TextUtils.isEmpty(currentShopclassid)) {
+                    // 模拟返回空数据的回调
+                    callback.onSuccess(0, "暂无商品", new String[]{});
+                    return;
+                }
+                MainHttpUtil.getShopClassList(currentShopclassid, mSaleSort, mPriceSort, mIsNew, p, callback);
+            }
+
+            @Override
+            public List<GoodsSimpleBean> processData(String[] info) {
+                return JSON.parseArray(Arrays.toString(info), GoodsSimpleBean.class);
+            }
+
+            @Override
+            public void onRefreshSuccess(List<GoodsSimpleBean> list, int listCount) {
+                // 刷新成功
+            }
+
+            @Override
+            public void onRefreshFailure() {
+                // 刷新失败
+            }
+
+            @Override
+            public void onLoadMoreSuccess(List<GoodsSimpleBean> loadItemList, int loadItemCount) {
+                // 加载更多成功
+            }
+
+            @Override
+            public void onLoadMoreFailure() {
+                // 加载更多失败
+            }
+        });
+    }
+
+    /**
+     * 加载一级分类数据 - 基于GoodsFilterActivity的loadPrimaryCategories方法
+     */
+    private void loadPrimaryCategories() {
+        // 使用MainHttpUtil.getHomeTwoClassList接口调用
+        int shopClassId = 1;
+        if (!TextUtils.isEmpty(mClassId)) {
+            try {
+                shopClassId = Integer.parseInt(mClassId);
+            } catch (NumberFormatException e) {
+                shopClassId = 1;
+            }
+        }
+
+        MainHttpUtil.getHomeTwoClassList(1, shopClassId, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                if (code == 0 && info.length > 0) {
+                    try {
+                        // 解析为GoodsHomeClassBean列表
+                        List<GoodsHomeClassBean> categories = JSON.parseArray(Arrays.toString(info), GoodsHomeClassBean.class);
+                        if (categories != null && !categories.isEmpty()) {
+                            mPrimaryCategoryList.clear();
+                            mPrimaryCategoryList.addAll(categories);
+
+                            // 在UI线程中更新界面
+                            runOnUiThread(() -> {
+                                initFirstCategoryIndicator(); // 改为初始化MagicIndicator
+                                // 默认加载第一个分类的二级分类
+                                if (!mPrimaryCategoryList.isEmpty()) {
+                                    loadSecondaryCategories(mPrimaryCategoryList.get(0).getId());
+                                }
+                            });
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        runOnUiThread(() -> {
+                            Toast.makeText(NewProductListActivity.this, "分类数据解析失败", Toast.LENGTH_SHORT).show();
+                        });
+                    }
+                } else {
+                    runOnUiThread(() -> {
+                        Toast.makeText(NewProductListActivity.this, "加载分类失败: " + msg, Toast.LENGTH_SHORT).show();
+                    });
+                }
+            }
+
+            @Override
+            public void onError() {
+                runOnUiThread(() -> {
+                    Toast.makeText(NewProductListActivity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
+                });
+            }
+        });
+    }
+
+    /**
+     * 初始化一级分类MagicIndicator - 替换原来的LinearLayout实现
+     */
+    private void initFirstCategoryIndicator() {
+        if (mPrimaryCategoryList.isEmpty()) {
+            return;
+        }
+
+        CommonNavigator commonNavigator = new CommonNavigator(mContext);
+        commonNavigator.setAdapter(new CommonNavigatorAdapter() {
+            @Override
+            public int getCount() {
+                return mPrimaryCategoryList.size();
+            }
+
+            @Override
+            public IPagerTitleView getTitleView(Context context, final int index) {
+                SimplePagerTitleView simplePagerTitleView = new ColorTransitionPagerTitleView(context);
+                simplePagerTitleView.setNormalColor(ContextCompat.getColor(mContext, R.color.gray1));
+                simplePagerTitleView.setSelectedColor(ContextCompat.getColor(mContext, android.R.color.black));
+                simplePagerTitleView.setText(mPrimaryCategoryList.get(index).getName());
+                simplePagerTitleView.setTextSize(14);
+                simplePagerTitleView.setPadding(DpUtil.dp2px(12), DpUtil.dp2px(6), DpUtil.dp2px(12), DpUtil.dp2px(6));
+                
+                simplePagerTitleView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        onFirstCategoryClick(index);
+                    }
+                });
+                return simplePagerTitleView;
+            }
+
+            @Override
+            public IPagerIndicator getIndicator(Context context) {
+                LinePagerIndicator indicator = new LinePagerIndicator(context);
+                indicator.setColors(ContextCompat.getColor(mContext, android.R.color.black));
+                indicator.setLineHeight(DpUtil.dp2px(2));
+                indicator.setLineWidth(DpUtil.dp2px(20));
+                indicator.setRoundRadius(DpUtil.dp2px(1));
+                indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
+                return indicator;
+            }
+        });
+        
+        mFirstCategoryIndicator.setNavigator(commonNavigator);
+        
+        // 设置默认选中第一个
+        if (mPrimaryCategoryList.size() > 0) {
+            mFirstCategoryIndicator.onPageSelected(0);
+            mFirstCategoryIndicator.onPageScrolled(0, 0, 0);
+        }
+    }
+
+    /**
+     * 加载二级分类数据
+     */
+    private void loadSecondaryCategories(String primaryCategoryId) {
+        if (TextUtils.isEmpty(primaryCategoryId)) {
+            return;
+        }
+
+        MainHttpUtil.getShopThreeClass(primaryCategoryId, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                if (code == 0 && info.length > 0) {
+                    try {
+                        // 解析为GoodsHomeClassBean列表
+                        List<GoodsHomeClassBean> categories = JSON.parseArray(Arrays.toString(info), GoodsHomeClassBean.class);
+                        if (categories == null) {
+                            categories = new ArrayList<>();
+                        }
+
+                        mSecondaryCategoryList.clear();
+                        mSecondaryCategoryList.addAll(categories);
+                        if (!mSecondaryCategoryList.isEmpty()) {
+                            GoodsHomeClassBean first = mSecondaryCategoryList.get(0);
+                            currentShopclassid = first.getId();
+                            // 刷新商品列表
+                            if (mRefreshView != null) {
+                                mRefreshView.initData();
+                            }
+                        }
+
+                        // 在UI线程中更新界面
+                        runOnUiThread(() -> {
+                            mSecondCategoryAdapter.updateData(mSecondaryCategoryList);
+                        });
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        runOnUiThread(() -> {
+                            Toast.makeText(NewProductListActivity.this, "二级分类数据解析失败", Toast.LENGTH_SHORT).show();
+                        });
+                        if (mRefreshView != null) {
+                            mRefreshView.initData();
+                        }
+                    }
+                } else {
+                    runOnUiThread(() -> {
+                        // 如果没有二级分类,清空列表
+                        mSecondaryCategoryList.clear();
+                        mSecondCategoryAdapter.updateData(mSecondaryCategoryList);
+                    });
+                }
+                if (mRefreshView != null) {
+                    mRefreshView.initData();
+                }
+            }
+
+            @Override
+            public void onError() {
+                runOnUiThread(() -> {
+                    Toast.makeText(NewProductListActivity.this, "加载二级分类失败", Toast.LENGTH_SHORT).show();
+                });
+            }
+        });
+    }
+
+    /**
+     * 一级分类点击事件 - 使用MagicIndicator的方式
+     */
+    private void onFirstCategoryClick(int position) {
+        if (position == mCurrentPrimaryCategoryIndex || position >= mPrimaryCategoryList.size()) {
+            return;
+        }
+        currentShopclassid = null;
+
+        mCurrentPrimaryCategoryIndex = position;
+
+        // 更新MagicIndicator选中状态
+        mFirstCategoryIndicator.onPageScrollStateChanged(2);
+        mFirstCategoryIndicator.onPageSelected(position);
+        mFirstCategoryIndicator.onPageScrolled(position, 0, 0);
+        mFirstCategoryIndicator.onPageScrollStateChanged(0);
+
+        // 加载对应的二级分类数据
+        GoodsHomeClassBean selectedCategory = mPrimaryCategoryList.get(position);
+        loadSecondaryCategories(selectedCategory.getId());
+    }
+
+    // 二级分类适配器 - 保持不变
+    private class SecondCategoryAdapter extends RecyclerView.Adapter<SecondCategoryAdapter.ViewHolder> {
+        private List<GoodsHomeClassBean> mData;
+        private int mItemWidth;
+
+        public SecondCategoryAdapter(List<GoodsHomeClassBean> data) {
+            this.mData = data;
+            mItemWidth = Resources.getSystem().getDisplayMetrics().widthPixels / 5;
+        }
+
+        public void updateData(List<GoodsHomeClassBean> data) {
+            this.mData = data;
+
+            // 根据数据量动态调整行数
+            GridLayoutManager layoutManager = (GridLayoutManager) mSecondCategoryRecyclerView.getLayoutManager();
+            if (layoutManager != null) {
+                int spanCount = data.size() < 9 ? 1 : 2; // 数据小于9个时显示1行,否则显示2行
+                layoutManager.setSpanCount(spanCount);
+            }
+
+            notifyDataSetChanged();
+        }
+
+        @Override
+        public ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
+            View view = LayoutInflater.from(parent.getContext())
+                    .inflate(R.layout.item_second_category, parent, false);
+            ViewGroup.LayoutParams params = view.getLayoutParams();
+            params.width = mItemWidth;
+            view.setLayoutParams(params);
+            return new ViewHolder(view);
+        }
+
+        @Override
+        public void onBindViewHolder(ViewHolder holder, int position) {
+            GoodsHomeClassBean item = mData.get(position);
+            holder.bind(item, position);
+        }
+
+        @Override
+        public int getItemCount() {
+            return mData.size();
+        }
+
+        class ViewHolder extends RecyclerView.ViewHolder {
+            // ViewHolder实现保持不变
+            public ViewHolder(View itemView) {
+                super(itemView);
+            }
+
+            public void bind(GoodsHomeClassBean item, int position) {
+                // 绑定数据的逻辑保持不变
+                itemView.setOnClickListener(v -> {
+                    currentShopclassid = item.getId();
+                    if (mRefreshView != null) {
+                        mRefreshView.initData();
+                    }
+                });
+            }
+        }
+    }
+
+    /**
+     * 静态方法用于启动Activity并传递classId参数
+     */
+    public static void forward(android.content.Context context, String classId, String title) {
+        Intent intent = new Intent(context, NewProductListActivity.class);
+        intent.putExtra("classId", classId);
+        intent.putExtra("title", title);
+        context.startActivity(intent);
+    }
+
+    // 保留原有方法以兼容现有调用
+    public static void forward(android.content.Context context, String classId) {
+        forward(context, classId, "商品分类");
+    }
+}

+ 200 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/activity/ShopGoodsActivity.java

@@ -0,0 +1,200 @@
+package com.yunbao.main.activity;
+
+import static android.content.Intent.getIntent;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.GridLayoutManager;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.custom.ItemDecoration;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.RouteUtil;
+import com.yunbao.main.R;
+import com.yunbao.main.adapter.ShopGoodsAdapter;
+import com.yunbao.main.bean.MainMallGoodsBean;
+import com.yunbao.main.http.MainHttpUtil;
+import com.yunbao.mall.bean.GoodsSimpleBean;
+
+import java.util.List;
+
+/**
+ * 店铺商品Activity
+ */
+public class ShopGoodsActivity extends AbsActivity {
+
+    private static final String EXTRA_SHOP_ID = "shop_id";
+    private static final String EXTRA_CATEGORY_ID = "category_id";
+    private static final String EXTRA_SHOP_NAME = "shop_name";
+
+    private CommonRefreshView mRefreshView;
+    private TextView mEmptyTip;
+    private TextView mTitle;
+    private String mShopId;
+    private String mCategoryId;
+    private String mShopName;
+    private ShopGoodsAdapter mAdapter;
+
+    /**
+     * 启动店铺商品页面
+     * @param context 上下文
+     * @param shopId 店铺ID
+     */
+    public static void forward(Context context, String categoryId, String shopId) {
+        forward(context, categoryId, shopId, null);
+    }
+
+    /**
+     * 启动店铺商品页面
+     * @param context 上下文
+     * @param shopId 店铺ID
+     * @param shopName 店铺名称
+     */
+    public static void forward(Context context, String categoryId, String shopId, String shopName) {
+        Intent intent = new Intent(context, ShopGoodsActivity.class);
+        intent.putExtra(EXTRA_SHOP_ID, shopId);
+        intent.putExtra(EXTRA_CATEGORY_ID, categoryId);
+        if (shopName != null) {
+            intent.putExtra(EXTRA_SHOP_NAME, shopName);
+        }
+        context.startActivity(intent);
+    }
+
+    @Override
+    protected void getInentParams() {
+        super.getInentParams();
+        Intent intent = getIntent();
+        if (intent != null) {
+            mShopId = intent.getStringExtra(EXTRA_SHOP_ID);
+            mShopName = intent.getStringExtra(EXTRA_SHOP_NAME);
+            mCategoryId = intent.getStringExtra(EXTRA_CATEGORY_ID);
+        }
+    }
+
+    @Override
+    protected boolean isStatusBarWhite() {
+        return false;
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.activity_shop_goods;
+    }
+
+    @Override
+    protected void main() {
+        initViews();
+        initRefreshView();
+        loadData();
+    }
+
+    private void initViews() {
+        mRefreshView = findViewById(R.id.refreshView);
+        mEmptyTip = findViewById(R.id.tv_empty_tip);
+        mTitle = findViewById(R.id.title);
+
+        // 设置标题
+        if (mShopName != null && !mShopName.isEmpty()) {
+            mTitle.setText(mShopName);
+        } else {
+            mTitle.setText("店铺商品");
+        }
+    }
+
+    private void initRefreshView() {
+        ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, DpUtil.dp2px(10), 0);
+        decoration.setOnlySetItemOffsetsButNoDraw(true);
+        mRefreshView.setItemDecoration(decoration);
+        mRefreshView.setLayoutManager(new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false));
+
+        // 使用DataHelper模式设置适配器和数据加载
+        mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<MainMallGoodsBean>() {
+            @Override
+            public ShopGoodsAdapter getAdapter() {
+                if (mAdapter == null) {
+                    mAdapter = new ShopGoodsAdapter(mContext);
+                    mAdapter.setOnItemClickListener(new ShopGoodsAdapter.OnItemClickListener() {
+                        @Override
+                        public void onItemClick(GoodsSimpleBean bean, int position) {
+                            onGoodsItemClick(bean, position);
+                        }
+                    });
+                }
+                return mAdapter;
+            }
+
+            @Override
+            public void loadData(int p, HttpCallback callback) {
+                MainHttpUtil.getShopGoodsList(mShopId, mCategoryId, p, callback);
+            }
+
+            @Override
+            public List<MainMallGoodsBean> processData(String[] info) {
+                JSONObject obj = JSON.parseObject(info[0]);
+                return JSON.parseArray(obj.getString("goods_list"), MainMallGoodsBean.class);
+            }
+
+            @Override
+            public void onRefreshSuccess(List<MainMallGoodsBean> list, int listCount) {
+                updateEmptyState();
+            }
+
+            @Override
+            public void onRefreshFailure() {
+                // 刷新失败处理
+            }
+
+            @Override
+            public void onLoadMoreSuccess(List<MainMallGoodsBean> loadItemList, int loadItemCount) {
+                // 加载更多成功处理
+            }
+
+            @Override
+            public void onLoadMoreFailure() {
+                // 加载更多失败处理
+            }
+        });
+    }
+
+    private void loadData() {
+        // 初始化数据加载
+        mRefreshView.initData();
+    }
+
+    /**
+     * 更新空状态显示
+     */
+    private void updateEmptyState() {
+        if (mAdapter != null && mEmptyTip != null) {
+            if (mAdapter.getItemCount() == 0) {
+                mEmptyTip.setVisibility(View.VISIBLE);
+            } else {
+                mEmptyTip.setVisibility(View.GONE);
+            }
+        }
+    }
+
+    /**
+     * 处理商品点击事件
+     */
+    private void onGoodsItemClick(GoodsSimpleBean bean, int position) {
+        RouteUtil.forwardGoodsDetail(mContext, bean.getId(), true, bean.getType());
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        // 释放资源
+        if (mAdapter != null) {
+            mAdapter = null;
+        }
+    }
+}

+ 310 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/activity/ShopInfoActivity.java

@@ -0,0 +1,310 @@
+package com.yunbao.main.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.viewpager.widget.ViewPager;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.yunbao.common.Constants;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.adapter.ViewPagerAdapter;
+import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.common.utils.ToastUtil;
+import com.yunbao.common.utils.WordUtil;
+import com.yunbao.main.R;
+import com.yunbao.main.views.AbsMainViewHolder;
+import com.yunbao.main.views.ShopHomeViewHolder;
+import com.yunbao.main.views.ShopGoodsViewHolder;
+import com.yunbao.main.views.ShopReviewViewHolder;
+import com.yunbao.mall.bean.GoodsSimpleBean;
+import com.yunbao.mall.http.MallHttpUtil;
+import com.yunbao.common.http.HttpCallback;
+
+import net.lucode.hackware.magicindicator.MagicIndicator;
+import net.lucode.hackware.magicindicator.ViewPagerHelper;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 店铺信息页面
+ * 包含搜索框、店铺信息和ViewPager(首页、全部商品、评价)
+ */
+public class ShopInfoActivity extends AbsActivity implements View.OnClickListener {
+
+    private static final int PAGE_COUNT = 2;
+
+    public static void forward(Context context, String shopId) {
+        Intent intent = new Intent(context, ShopInfoActivity.class);
+        intent.putExtra("shopId", shopId);
+        context.startActivity(intent);
+    }
+
+    // 搜索框相关
+    private ImageView mAvatar;
+    private TextView mName;
+    private TextView mMyGoodsNum;//我的商品数量
+    private TextView mPlatGoodsNum;//平台商品数量
+    private TextView mSaleNumAll;
+    private TextView mGoodsQuality;
+    private TextView mTaiDuFuWu;//服务态度
+    private TextView mTaiDuWuLiu;//物流态度
+
+    // ViewPager相关
+    private ViewPager mViewPager;
+    private MagicIndicator mIndicator;
+    private List<FrameLayout> mViewList;
+    private AbsMainViewHolder[] mViewHolders;
+    private ViewPagerAdapter mViewPagerAdapter;
+
+    private String mShopId;
+    private JSONObject mShopInfo;
+    private String mUnitString;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.activity_shop_info;
+    }
+
+    protected boolean isStatusBarWhite() {
+        return false;
+    }
+    @Override
+    protected void main() {
+        Intent intent = getIntent();
+        mShopId = intent.getStringExtra("shopId");
+        mUnitString = WordUtil.getString(com.yunbao.mall.R.string.mall_168);
+        initViews();
+        initViewPager();
+        loadShopInfo();
+    }
+
+    private void initViews() {
+        mAvatar = findViewById(com.yunbao.mall.R.id.avatar);
+        mName = findViewById(com.yunbao.mall.R.id.name);
+        mSaleNumAll = findViewById(com.yunbao.mall.R.id.sale_num_all);
+        mGoodsQuality = findViewById(com.yunbao.mall.R.id.goods_quality);
+        mTaiDuFuWu = findViewById(com.yunbao.mall.R.id.taidu_fuwu);
+        mTaiDuWuLiu = findViewById(com.yunbao.mall.R.id.taidu_wuliu);
+        findViewById(com.yunbao.mall.R.id.btn_cert).setOnClickListener(this);
+        View btnKefu = findViewById(com.yunbao.mall.R.id.btn_kefu);
+        btnKefu.setVisibility(View.INVISIBLE);
+
+        // ViewPager
+        mViewPager = findViewById(R.id.view_pager);
+        mIndicator = findViewById(R.id.indicator);
+    
+        // 返回按钮
+        findViewById(R.id.btn_back).setOnClickListener(this);
+    }
+
+    private void initViewPager() {
+        mViewList = new ArrayList<>();
+        for (int i = 0; i < PAGE_COUNT; i++) {
+            FrameLayout frameLayout = new FrameLayout(mContext);
+            frameLayout.setLayoutParams(new ViewPager.LayoutParams());
+            mViewList.add(frameLayout);
+        }
+
+        mViewPagerAdapter = new ViewPagerAdapter(mViewList);
+        mViewPager.setAdapter(mViewPagerAdapter);
+        mViewPager.setOffscreenPageLimit(PAGE_COUNT);
+
+        mViewHolders = new AbsMainViewHolder[PAGE_COUNT];
+
+        // 设置指示器
+        final String[] titles = new String[]{
+               "首页", "全部商品"
+        };
+
+        CommonNavigator commonNavigator = new CommonNavigator(mContext);
+        commonNavigator.setAdapter(new CommonNavigatorAdapter() {
+            @Override
+            public int getCount() {
+                return titles.length;
+            }
+
+            @Override
+            public IPagerTitleView getTitleView(Context context, int index) {
+                ColorTransitionPagerTitleView colorTransitionPagerTitleView = new ColorTransitionPagerTitleView(context);
+                colorTransitionPagerTitleView.setNormalColor(0xff999999);
+                colorTransitionPagerTitleView.setSelectedColor(0xff333333);
+                colorTransitionPagerTitleView.setText(titles[index]);
+                colorTransitionPagerTitleView.setTextSize(16);
+                colorTransitionPagerTitleView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        mViewPager.setCurrentItem(index);
+                    }
+                });
+                return colorTransitionPagerTitleView;
+            }
+
+            @Override
+            public IPagerIndicator getIndicator(Context context) {
+                LinePagerIndicator indicator = new LinePagerIndicator(context);
+                indicator.setColors(0xff333333);
+                return indicator;
+            }
+        });
+
+        mIndicator.setNavigator(commonNavigator);
+        ViewPagerHelper.bind(mIndicator, mViewPager);
+
+        mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+            }
+
+            @Override
+            public void onPageSelected(int position) {
+                loadPageData(position);
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int state) {
+            }
+        });
+
+        // 默认加载第一页
+        loadPageData(0);
+    }
+
+    private void loadPageData(int position) {
+        if (mViewHolders == null) {
+            return;
+        }
+
+        AbsMainViewHolder vh = mViewHolders[position];
+        if (vh == null) {
+            if (mViewList != null && position < mViewList.size()) {
+                FrameLayout parent = mViewList.get(position);
+                if (parent == null) {
+                    return;
+                }
+
+                if (position == 0) {
+                    // 首页
+                    vh = new ShopHomeViewHolder(mContext, parent, mShopId);
+                } else if (position == 1) {
+                    // 全部商品
+                    vh = new ShopGoodsViewHolder(mContext, parent, mShopId);
+                } else if (position == 2) {
+                    // 评价
+                    vh = new ShopReviewViewHolder(mContext, parent, mShopId);
+                }
+
+                if (vh == null) {
+                    return;
+                }
+
+                mViewHolders[position] = vh;
+                vh.addToParent();
+                vh.subscribeActivityLifeCycle();
+            }
+        }
+
+        if (vh != null) {
+            vh.loadData();
+        }
+    }
+
+    private void loadShopInfo() {
+        // 加载店铺信息
+        MallHttpUtil.getPlatShop(mShopId, 1, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                JSONObject obj = JSON.parseObject(info[0]);
+                showShopInfo(obj.getJSONObject("shop_info"));
+                List<GoodsSimpleBean> list = JSON.parseArray(obj.getString("list"), GoodsSimpleBean.class);
+                if (list != null) {
+                    ShopHomeViewHolder shopHomeViewHolder = getShopHomeViewHolder();
+                    if (shopHomeViewHolder != null) {
+                        shopHomeViewHolder.updateRecommendedProducts(list);
+                    }
+                }
+            }
+
+            @Override
+            public void onError() {
+                // 网络错误处理
+                ToastUtil.show("网络请求失败");
+            }
+        });
+    }
+
+    private ShopHomeViewHolder getShopHomeViewHolder() {
+        if (mViewHolders != null && mViewHolders[0] instanceof ShopHomeViewHolder) {
+            return (ShopHomeViewHolder) mViewHolders[0];
+        }
+        return null;
+    }
+
+    public void showShopInfo(JSONObject shopInfo) {
+        mShopInfo = shopInfo;
+        if (mShopInfo != null) {
+            if (mAvatar != null) {
+                ImgLoader.displayAvatar(mContext, mShopInfo.getString("avatar"), mAvatar);
+            }
+            if (mName != null) {
+                mName.setText(mShopInfo.getString("name"));
+            }
+            if (mMyGoodsNum != null) {
+                mMyGoodsNum.setText(String.format(mUnitString, mShopInfo.getString("goods_nums")));
+            }
+            if (mPlatGoodsNum != null) {
+                mPlatGoodsNum.setText(String.format(mUnitString, mShopInfo.getString("platform_goods_nums")));
+            }
+            if (mSaleNumAll != null) {
+                mSaleNumAll.setText(String.format(mUnitString, mShopInfo.getString("sale_nums")));
+            }
+            if (mGoodsQuality != null) {
+                mGoodsQuality.setText(mShopInfo.getString("quality_points"));
+            }
+            if (mTaiDuFuWu != null) {
+                mTaiDuFuWu.setText(mShopInfo.getString("service_points"));
+            }
+            if (mTaiDuWuLiu != null) {
+                mTaiDuWuLiu.setText(mShopInfo.getString("express_points"));
+            }
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.btn_back) {
+            finish();
+        }
+        // 移除对btn_search的处理
+        // else if (id == R.id.btn_search) {
+        //     // 搜索逻辑
+        // }
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        if (mViewHolders != null) {
+            for (AbsMainViewHolder holder : mViewHolders) {
+                if (holder != null) {
+                    holder.release();
+                }
+            }
+        }
+    }
+}

+ 3 - 1
ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/MainMallClassAdapter.java

@@ -16,6 +16,7 @@ import com.yunbao.common.utils.RouteUtil;
 import com.yunbao.main.R;
 import com.yunbao.main.activity.GoodsFilterActivity;
 import com.yunbao.main.activity.MallClassActivity;
+import com.yunbao.main.activity.NewProductListActivity;
 import com.yunbao.mall.activity.BuyerAccountActivity;
 import com.yunbao.mall.bean.GoodsHomeClassBean;
 
@@ -38,7 +39,8 @@ public class MainMallClassAdapter extends RefreshAdapter<GoodsHomeClassBean> {
                     return;
                 }
 //                MallClassActivity.forward(mContext, bean.getName(), bean.getId());
-                GoodsFilterActivity.forward(mContext, bean.getId());
+//                GoodsFilterActivity.forward(mContext, bean.getId());
+                NewProductListActivity.forward(mContext, bean.getId(), bean.getName());
             }
         };
     }

+ 104 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/ShopGoodsAdapter.java

@@ -0,0 +1,104 @@
+package com.yunbao.main.adapter;
+
+import android.content.Context;
+import android.graphics.Paint;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.yunbao.common.adapter.RefreshAdapter;
+import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.ScreenDimenUtil;
+import com.yunbao.common.utils.WordUtil;
+import com.yunbao.main.R;
+import com.yunbao.main.bean.MainMallGoodsBean;
+import com.yunbao.mall.bean.GoodsSimpleBean;
+
+import java.util.List;
+
+public class ShopGoodsAdapter extends RefreshAdapter<MainMallGoodsBean> {
+    private OnItemClickListener mOnItemClickListener;
+    private String mSaleString;
+    private final int mDisplayWidth;
+    private final int mDisplayHeightMax;
+
+    public ShopGoodsAdapter(Context context) {
+        super(context);
+        mDisplayWidth = (ScreenDimenUtil.getInstance().getScreenWidth() - DpUtil.dp2px(30)) / 2;
+        mDisplayHeightMax = DpUtil.dp2px(250);
+        mSaleString = WordUtil.getString(R.string.mall_114);
+    }
+
+    @Override
+    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        return new Vh(LayoutInflater.from(mContext).inflate(R.layout.item_shop_home, parent, false));
+    }
+
+    @Override
+    public void onBindViewHolder(RecyclerView.ViewHolder vh, int position) {
+        ((Vh) vh).setData(mList.get(position), position);
+    }
+
+    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
+        mOnItemClickListener = onItemClickListener;
+    }
+
+    class Vh extends RecyclerView.ViewHolder {
+        ImageView mThumb;
+        TextView mName;
+        TextView mPrice;
+        TextView mSaleNum;
+        TextView mOriginPrice;
+        View mCoupon;
+        TextView mCouponText;
+
+        public Vh(View itemView) {
+            super(itemView);
+            mThumb = itemView.findViewById(R.id.thumb);
+            mName = itemView.findViewById(R.id.name);
+            mPrice = itemView.findViewById(R.id.price);
+            mSaleNum = itemView.findViewById(R.id.sale_num);
+            mOriginPrice = itemView.findViewById(R.id.origin_price);
+            mCoupon = itemView.findViewById(R.id.coupon);
+            mCouponText = itemView.findViewById(R.id.coupon_text);
+            itemView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (mOnItemClickListener != null) {
+                        int position = getLayoutPosition();
+                        if (position >= 0 && position < mList.size()) {
+                            mOnItemClickListener.onItemClick(mList.get(position), position);
+                        }
+                    }
+                }
+            });
+        }
+
+        void setData(MainMallGoodsBean bean, int position) {
+            if (bean == null) {
+                return;
+            }
+
+            bean.display(mContext, mThumb, mDisplayWidth, mDisplayHeightMax);
+            mName.setText(bean.getName());
+            mPrice.setText(bean.getPrice());
+            if (bean.getType() == 1) {
+                mSaleNum.setText(null);
+                mOriginPrice.setText(bean.getOriginPrice());
+            } else {
+                mSaleNum.setText(String.format(mSaleString, bean.getSaleNum()));
+                mOriginPrice.setText(null);
+            }
+        }
+    }
+
+    public interface OnItemClickListener {
+        void onItemClick(GoodsSimpleBean bean, int position);
+    }
+}

+ 94 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/ShopHomeCategoryAdapter.java

@@ -0,0 +1,94 @@
+package com.yunbao.main.adapter;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.yunbao.common.adapter.RefreshAdapter;
+import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.main.R;
+import com.yunbao.mall.bean.GoodsHomeClassBean;
+
+import java.util.List;
+
+public class ShopHomeCategoryAdapter extends RefreshAdapter<GoodsHomeClassBean> {
+
+    private View.OnClickListener mOnClickListener;
+    private int mItemWidth;
+    private OnItemClickListener mOnItemClickListener;
+    
+    public interface OnItemClickListener {
+        void onItemClick(GoodsHomeClassBean bean, int position);
+    }
+    
+    public ShopHomeCategoryAdapter(Context context, List<GoodsHomeClassBean> list) {
+        super(context, list);
+        mItemWidth = Resources.getSystem().getDisplayMetrics().widthPixels / 5;
+        mOnClickListener = new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (!canClick()) {
+                    return;
+                }
+                GoodsHomeClassBean bean = (GoodsHomeClassBean) v.getTag();
+                int position = (int) v.getTag(R.id.tag_position);
+                if (mOnItemClickListener != null) {
+                    mOnItemClickListener.onItemClick(bean, position);
+                }
+            }
+        };
+    }
+    
+    public void setOnItemClickListener(OnItemClickListener listener) {
+        mOnItemClickListener = listener;
+    }
+
+    @NonNull
+    @Override
+    public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
+        View itemView = mInflater.inflate(R.layout.item_main_mall_class, viewGroup, false);
+        ViewGroup.LayoutParams params = itemView.getLayoutParams();
+        params.width = mItemWidth;
+        itemView.setLayoutParams(params);
+        return new Vh(itemView);
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int i) {
+        ((Vh) vh).setData(mList.get(i), i);
+    }
+
+    class Vh extends RecyclerView.ViewHolder {
+
+        ImageView mIcon;
+        TextView mName;
+
+        public Vh(@NonNull View itemView) {
+            super(itemView);
+            mIcon = itemView.findViewById(R.id.icon);
+            mName = itemView.findViewById(R.id.name);
+            itemView.setOnClickListener(mOnClickListener);
+        }
+
+        void setData(GoodsHomeClassBean bean, int position) {
+            itemView.setTag(bean);
+            itemView.setTag(R.id.tag_position, position);
+            
+            // 加载分类图标
+            if (bean.getIcon() != null && !bean.getIcon().isEmpty()) {
+                ImgLoader.display(mContext, bean.getIcon(), mIcon);
+            } else {
+                // 设置默认图标
+                mIcon.setImageResource(R.mipmap.ic_logo);
+            }
+            
+            mName.setText(bean.getName());
+        }
+    }
+}

+ 112 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/ShopListAdapter.java

@@ -0,0 +1,112 @@
+package com.yunbao.main.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.yunbao.common.adapter.RefreshAdapter;
+import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.main.R;
+import com.yunbao.main.bean.ShopItem;
+
+/**
+ * 商家列表适配器,支持下拉刷新和上拉加载更多
+ */
+public class ShopListAdapter extends RefreshAdapter<ShopItem> {
+
+    public ShopListAdapter(Context context) {
+        super(context);
+    }
+
+    @NonNull
+    @Override
+    public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        View view = mInflater.inflate(R.layout.item_shop_list, parent, false);
+        return new ShopViewHolder(view);
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
+        if (holder instanceof ShopViewHolder) {
+            ShopItem shopItem = mList.get(position);
+            ((ShopViewHolder) holder).bindData(shopItem, position);
+        }
+    }
+
+    public class ShopViewHolder extends RecyclerView.ViewHolder {
+        private ImageView ivShopImage;
+        private TextView tvShopTag;
+        private TextView tvShopName;
+        private TextView tvPriceTag;
+        private TextView tvShopDetail;
+
+        public ShopViewHolder(@NonNull View itemView) {
+            super(itemView);
+            ivShopImage = itemView.findViewById(R.id.iv_shop_image);
+//            tvShopTag = itemView.findViewById(R.id.tv_shop_tag);
+            tvShopName = itemView.findViewById(R.id.tv_shop_name);
+//            tvPriceTag = itemView.findViewById(R.id.tv_price_tag);
+            tvShopDetail = itemView.findViewById(R.id.tv_shop_detail);
+
+            itemView.setOnClickListener(v -> {
+                if (mOnItemClickListener != null && canClick()) {
+                    int position = getAdapterPosition();
+                    if (position != RecyclerView.NO_POSITION && position < mList.size()) {
+                        mOnItemClickListener.onItemClick(mList.get(position), position);
+                    }
+                }
+            });
+        }
+
+        public void bindData(ShopItem shopItem, int position) {
+            // 设置商家图片
+            if (shopItem.getThumb() != null && !shopItem.getThumb().isEmpty()) {
+                ImgLoader.display(mContext, shopItem.getThumb(), ivShopImage);
+            } else {
+                ivShopImage.setImageResource(R.mipmap.pijiu1);
+            }
+
+            // 设置商家标签
+//            tvShopTag.setText(shopItem.getShopTag() != null ? shopItem.getShopTag() : "品牌");
+
+            // 设置商家名称
+            tvShopName.setText(shopItem.getName() != null ? shopItem.getName() : "");
+
+            String detail = null;
+            if (shopItem.getSaleNums() != null) {
+                detail = "总销量:" + shopItem.getSaleNums();
+            }
+            if (shopItem.getServicePoints() != null) {
+                if (detail != null) {
+                    detail = detail + " | " + "服务评分:" +  shopItem.getServicePoints();
+                } else  {
+                    detail = "服务评分:" +  shopItem.getServicePoints();
+                }
+            }
+            if (shopItem.getDeliveryTime() != null) {
+                if (detail != null) {
+                    detail = detail + " | " + "配送时间:" +  shopItem.getDeliveryTime();
+                } else  {
+                    detail = "配送时间:" +  shopItem.getDeliveryTime();
+                }
+            }
+            if (detail != null) {
+                tvShopDetail.setText(detail);
+            } else  {
+                tvShopDetail.setText("");
+            }
+
+            // 设置价格标签
+//            tvPriceTag.setText(shopItem.getpr() != null ? shopItem.getPriceTag() : "零售价");
+
+            // 设置商家详情
+//            tvShopDetail.setText(shopItem.getShopDetail() != null ? shopItem.getShopDetail() : "商家详情");
+        }
+    }
+}

+ 14 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/bean/AddressBean.java

@@ -0,0 +1,14 @@
+package com.yunbao.main.bean;
+
+public class AddressBean {
+    
+    private String province;
+    
+    public String getProvince() {
+        return province;
+    }
+    
+    public void setProvince(String province) {
+        this.province = province;
+    }
+}

+ 46 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/bean/ShopItem.java

@@ -0,0 +1,46 @@
+package com.yunbao.main.bean;
+
+public class ShopItem {
+    private String uid;              // 用户店铺id
+    private String name;             // 店铺名称
+    private String thumb;            // 店铺图片
+    private String username;         // 会员名称
+    private String sale_nums;        // 销售时间
+    private String service_points;   // 服务评分
+    private String delivery_time;    // 配送时间
+
+    public ShopItem() {}
+
+    public ShopItem(String uid, String name, String thumb, String username, 
+                   String sale_nums, String service_points, String delivery_time) {
+        this.uid = uid;
+        this.name = name;
+        this.thumb = thumb;
+        this.username = username;
+        this.sale_nums = sale_nums;
+        this.service_points = service_points;
+        this.delivery_time = delivery_time;
+    }
+
+    // Getters and Setters
+    public String getUid() { return uid; }
+    public void setUid(String uid) { this.uid = uid; }
+
+    public String getName() { return name; }
+    public void setName(String name) { this.name = name; }
+
+    public String getThumb() { return thumb; }
+    public void setThumb(String thumb) { this.thumb = thumb; }
+
+    public String getUsername() { return username; }
+    public void setUsername(String username) { this.username = username; }
+
+    public String getSaleNums() { return sale_nums; }
+    public void setSaleNums(String sale_nums) { this.sale_nums = sale_nums; }
+
+    public String getServicePoints() { return service_points; }
+    public void setServicePoints(String service_points) { this.service_points = service_points; }
+
+    public String getDeliveryTime() { return delivery_time; }
+    public void setDeliveryTime(String delivery_time) { this.delivery_time = delivery_time; }
+}

+ 4 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpConsts.java

@@ -87,4 +87,8 @@ public class MainHttpConsts {
     public static final String GET_AUTHOR_DATA_CENTER_VIDEOS = "getAuthorDataCenterVideos";
     public static final String GET_NEWS_LIST = "getNewsList";
     public static final String GET_NEWS_DETAIL = "getNewsDetail";
+    public static final String GET_CLASSID_SHOP_LIST = "getClassidShopList";
+    public static final String GET_SHOP_ADDRESS_LIST = "getShopAddressList";
+    public static final String GET_SHOP_GOODS_CLASSID_LIST = "getShopGoodsClassidList";
+    public static final String GET_SHOP_GOODS_LIST = "getShopGoodsList";
 }

+ 58 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java

@@ -1158,6 +1158,64 @@ public class MainHttpUtil {
                 .params("id", id)
                 .execute(callback);
     }
+
+    /**
+     * 获取分类店铺列表
+     * @param type 店铺类型 1:乡村云店; 2:都市云店; 3:一线云店; 4:普通商户
+     * @param name 店铺名称
+     * @param province 地址省份
+     * @param p 页数
+     * @param callback 回调
+     */
+    public static void getClassidShopList(int type, String name, String province, int p, HttpCallback callback) {
+        HttpClient.getInstance().get("Home.getClassidShopList", MainHttpConsts.GET_CLASSID_SHOP_LIST)
+                .params("uid", CommonAppConfig.getInstance().getUid())
+                .params("token", CommonAppConfig.getInstance().getToken())
+                .params("type", type)
+                .params("name", name)
+                .params("province", province)
+                .params("p", p)
+                .execute(callback);
+
+    }
+
+    /**
+     * 获取店铺商品分类列表
+     * @param uid 店铺用户id (可选参数)
+     * @param callback 回调
+     */
+    public static void getShopGoodsClassidList(String uid, HttpCallback callback) {
+        HttpClient.getInstance().get("Home.getShopGoodsClassidList", MainHttpConsts.GET_SHOP_GOODS_CLASSID_LIST)
+                .params("uid", uid != null ? uid : CommonAppConfig.getInstance().getUid())
+                .params("token", CommonAppConfig.getInstance().getToken())
+                .execute(callback);
+    }
+
+    /**
+     * 获取云店店铺地址列表
+     */
+    public static void getShopAddressList(HttpCallback callback) {
+        HttpClient.getInstance().get("Home.getShopAddressList", MainHttpConsts.GET_SHOP_ADDRESS_LIST)
+                .params("uid", CommonAppConfig.getInstance().getUid())
+                .params("token", CommonAppConfig.getInstance().getToken())
+                .execute(callback);
+    }
+
+    /**
+     * 获取店铺商品列表
+     * @param uid 店铺用户ID (可选参数)
+     * @param threeClassId 商品三级分类id (可选参数)
+     * @param p 页码 (可选参数,默认为1)
+     * @param callback 回调
+     */
+    public static void getShopGoodsList(String uid, String threeClassId, int p, HttpCallback callback) {
+        HttpClient.getInstance().get("Shop.getShopGoodsList", MainHttpConsts.GET_SHOP_GOODS_LIST)
+                .params("uid", uid != null ? uid : CommonAppConfig.getInstance().getUid())
+                .params("token", CommonAppConfig.getInstance().getToken())
+                .params("three_classid", threeClassId != null ? threeClassId : "")
+                .params("p", p > 0 ? p : 1)
+                .execute(callback);
+    }
 }
 
 

+ 138 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/views/LiveSquareViewHolder.java

@@ -0,0 +1,138 @@
+package com.yunbao.main.views;
+
+import android.content.Context;
+import androidx.recyclerview.widget.GridLayoutManager;
+import android.view.ViewGroup;
+
+import com.alibaba.fastjson.JSON;
+import com.yunbao.common.CommonAppConfig;
+import com.yunbao.common.Constants;
+import com.yunbao.common.adapter.RefreshAdapter;
+import com.yunbao.common.bean.LiveBean;
+import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.custom.ItemDecoration;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.interfaces.OnItemClickListener;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.live.presenter.CheckLivePresenter;
+import com.yunbao.live.utils.LiveStorge;
+import com.yunbao.main.R;
+import com.yunbao.main.activity.LoginActivity;
+import com.yunbao.main.adapter.LiveListAdapter;
+import com.yunbao.main.http.MainHttpUtil;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 直播广场ViewHolder
+ * 参考MainHomeRecommendViewHolder设计,只展示推荐直播列表
+ */
+public class LiveSquareViewHolder extends AbsMainViewHolder implements OnItemClickListener<LiveBean> {
+
+    private CommonRefreshView mRefreshView;
+    private LiveListAdapter mAdapter;
+    private CheckLivePresenter mCheckLivePresenter;
+
+    public LiveSquareViewHolder(Context context, ViewGroup parentView) {
+        super(context, parentView);
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.view_live_square;
+    }
+
+    @Override
+    public void init() {
+        mRefreshView = findViewById(R.id.refreshView);
+        mRefreshView.setEmptyLayoutId(R.layout.view_no_data_live);
+        mRefreshView.setLayoutManager(new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false));
+
+        ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0);
+        decoration.setOnlySetItemOffsetsButNoDraw(true);
+        mRefreshView.setItemDecoration(decoration);
+
+        mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<LiveBean>() {
+            @Override
+            public RefreshAdapter<LiveBean> getAdapter() {
+                if (mAdapter == null) {
+                    mAdapter = new LiveListAdapter(mContext);
+                    mAdapter.setOnItemClickListener(LiveSquareViewHolder.this);
+                }
+                return mAdapter;
+            }
+
+            @Override
+            public void loadData(int p, HttpCallback callback) {
+                // 只加载推荐列表数据
+                MainHttpUtil.getRecommendList(p, callback);
+            }
+
+            @Override
+            public List<LiveBean> processData(String[] info) {
+                return JSON.parseArray(Arrays.toString(info), LiveBean.class);
+            }
+
+            @Override
+            public void onRefreshSuccess(List<LiveBean> list, int listCount) {
+                if (CommonAppConfig.LIVE_ROOM_SCROLL) {
+                    LiveStorge.getInstance().put(Constants.LIVE_SQUARE, list);
+                }
+            }
+
+            @Override
+            public void onRefreshFailure() {
+
+            }
+
+            @Override
+            public void onLoadMoreSuccess(List<LiveBean> loadItemList, int loadItemCount) {
+
+            }
+
+            @Override
+            public void onLoadMoreFailure() {
+
+            }
+        });
+    }
+
+    @Override
+    public void onItemClick(LiveBean bean, int position) {
+        watchLive(bean, position);
+    }
+
+    /**
+     * 观看直播
+     */
+    public void watchLive(LiveBean liveBean, int position) {
+        if (!CommonAppConfig.getInstance().isLogin()) {
+            LoginActivity.forward(mContext);
+            return;
+        }
+        if (mCheckLivePresenter == null) {
+            mCheckLivePresenter = new CheckLivePresenter(mContext);
+        }
+        if (CommonAppConfig.LIVE_ROOM_SCROLL) {
+            mCheckLivePresenter.watchLive(liveBean, Constants.LIVE_SQUARE, position);
+        } else {
+            mCheckLivePresenter.watchLive(liveBean);
+        }
+    }
+
+    @Override
+    public void loadData() {
+        if (mRefreshView != null) {
+            mRefreshView.initData();
+        }
+    }
+
+    @Override
+    public void onDestroy() {
+        if (mCheckLivePresenter != null) {
+            mCheckLivePresenter.cancel();
+        }
+        super.onDestroy();
+    }
+}

+ 1 - 1
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeFollowViewHolder.java

@@ -71,7 +71,7 @@ public class MainHomeFollowViewHolder extends AbsVideoMainViewHolder implements
 
             @Override
             public void loadData(int p, HttpCallback callback) {
-                MainHttpUtil.getRecommendVideoList(p, callback);
+                MainHttpUtil.getFollowVideoList(p, callback);
             }
 
             @Override

+ 5 - 2
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java

@@ -47,6 +47,7 @@ public class MainHomeViewHolder extends AbsMainViewHolder {
     private MagicIndicator mIndicator;
     private List<AbsMainViewHolder> mViewHolders;
 
+    private MainViewHolder mMainViewHolder;
     private  MainShopViewHolder mShopViewHolder; // 云店
     private MainMallViewHolder mMainMallViewHolder;//商城
     private MainHomeFriendsViewHolder mFriendsViewHolder;//朋友
@@ -246,8 +247,10 @@ public class MainHomeViewHolder extends AbsMainViewHolder {
                     mRecommendViewHolder = new MainHomeRecommendViewHolder(mContext, parent);
                 }
                 if (position == 0) {
-                    mFollowViewHolder = new MainHomeFollowViewHolder(mContext, parent);
-                    vh = mFollowViewHolder;
+                    mMainViewHolder = new MainViewHolder(mContext, parent);
+                    vh = mMainViewHolder;
+//                    mFollowViewHolder = new MainHomeFollowViewHolder(mContext, parent);
+//                    vh = mFollowViewHolder;
 //                    mMainMallViewHolder = new MainMallViewHolder(mContext, parent);
 //                    vh = mMainMallViewHolder;
 //                    mRecommendViewHolder = new MainHomeRecommendViewHolder(mContext, parent);

+ 432 - 403
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainShopRuralViewHolder.java

@@ -2,19 +2,43 @@ package com.yunbao.main.views;
 
 import android.content.Context;
 import android.graphics.Typeface;
+import android.os.Handler;
+import android.os.Looper;
+import android.text.TextUtils;
 import android.view.Gravity;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.HorizontalScrollView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
-
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentActivity;
-import androidx.viewpager2.adapter.FragmentStateAdapter;
-import androidx.viewpager2.widget.ViewPager2;
-
+import android.view.inputmethod.EditorInfo;
+import android.widget.EditText;
+import android.view.inputmethod.InputMethodManager;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.yunbao.common.CommonAppConfig;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.bean.VideoBean;
+import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.event.LocationCityEvent;
+import com.yunbao.common.event.LocationEvent;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.interfaces.OnItemClickListener;
+import com.yunbao.common.utils.LocationUtil;
 import com.yunbao.main.R;
+import com.yunbao.main.activity.ShopInfoActivity;
+import com.yunbao.main.adapter.ShopListAdapter;
+import com.yunbao.main.bean.AddressBean;
+import com.yunbao.main.bean.ShopItem;
+import com.yunbao.main.http.MainHttpUtil;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+import org.greenrobot.eventbus.ThreadMode;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -22,9 +46,10 @@ import java.util.List;
 
 /**
  * 农村电商主页ViewHolder
- * 展示地区选择、商品分类、推荐商品等功能
+ * 展示地区选择、商家列表等功能
+ * 支持下拉刷新和上拉加载更多
  */
-public class MainShopRuralViewHolder extends AbsMainViewHolder implements View.OnClickListener {
+public class MainShopRuralViewHolder extends AbsMainViewHolder implements View.OnClickListener, OnItemClickListener<ShopItem> {
 
     // 顶部控件
     private LinearLayout mLocationLayout;
@@ -33,41 +58,35 @@ public class MainShopRuralViewHolder extends AbsMainViewHolder implements View.O
     // 地区标签相关
     private HorizontalScrollView mRegionScrollView;
     private LinearLayout mRegionContainer;
+    // 搜索框
+    private EditText mEditShopName;
+    private String mSearchKeyword = "";
     private List<RegionTabItem> mRegionTabItems;
     private int mCurrentSelectedRegion = 0;
     
     // 地区数据
     private List<String> mRegionList;
     
-    // 导航栏和ViewPager
-    private TextView mNavHome;
-    private TextView mNavAllGoods;
-    private TextView mNavReview;
-    private ViewPager2 mViewPager;
-    private ShopContentAdapter mContentAdapter;
-    private int mCurrentNavIndex = 0;
+    // 商家列表相关
+    private CommonRefreshView mRefreshView;
+    private ShopListAdapter mShopAdapter;
+    private String mCurrentRegionName = "";
 
-    /**
-     * 地区标签项数据类
-     */
-    private static class RegionTabItem {
-        LinearLayout container;
-        TextView textView;
-        View underline;
-        String regionName;
-        int index;
-        
-        RegionTabItem(LinearLayout container, TextView textView, View underline, String regionName, int index) {
-            this.container = container;
-            this.textView = textView;
-            this.underline = underline;
-            this.regionName = regionName;
-            this.index = index;
-        }
-    }
+    private int mShopType; // 店铺类型:1乡村云店 2都市云店 3一线云店
+
+    private InputMethodManager mInputMethodManager;
+
+    // 添加请求序列号,用于防止请求竞态
+    private volatile long mCurrentRequestId = 0;
+    private final Object mRequestLock = new Object();
+
+    private Handler mDebounceHandler = new Handler(Looper.getMainLooper());
+    private Runnable mDebounceRunnable;
+    private static final int DEBOUNCE_DELAY = 300;
 
-    public MainShopRuralViewHolder(Context context, ViewGroup parentView) {
+    public MainShopRuralViewHolder(Context context, ViewGroup parentView, int shopType) {
         super(context, parentView);
+        this.mShopType = shopType;
     }
 
     @Override
@@ -86,469 +105,479 @@ public class MainShopRuralViewHolder extends AbsMainViewHolder implements View.O
         mRegionContainer = findViewById(R.id.ll_region_container);
         mRegionTabItems = new ArrayList<>();
         
-        // 初始化地区数据
-        initRegionData();
-        
-        // 动态创建地区标签
-        createRegionTabs();
-        
-        // 初始化导航栏和ViewPager
-        initNavigationTabs();
-        
-        // 初始化商品分类
-        initCategoryItems();
+        // 初始化商家列表刷新视图
+        mRefreshView = findViewById(R.id.refresh_view);
+
+        // 初始化搜索框
+        mEditShopName = findViewById(R.id.edit_shop_name);
+        mInputMethodManager = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
+        initSearchBox();
         
+        // 初始化商家列表
+        initShopRefreshView();
+
         // 设置点击事件
         setClickListeners();
         
-        // 设置示例数据
-        setupSampleData();
-    }
-
-    /**
-     * 初始化地区数据
-     */
-    private void initRegionData() {
-        // 示例地区数据,实际项目中可以从服务器获取或配置文件读取
-        mRegionList = Arrays.asList(
-            "山东", "北京", "湖北", "上海", "河南", 
-            "陕西", "四川", "广东", "江苏", "浙江",
-            "湖南", "安徽", "河北", "山西", "辽宁"
-        );
+        // 注册EventBus监听定位事件
+        if (!EventBus.getDefault().isRegistered(this)) {
+            EventBus.getDefault().register(this);
+        }
+        
+        // 先启动定位,定位成功后再请求地址列表
+        initLocationInfo();
     }
 
     /**
-     * 动态创建地区标签
+     * 初始化商家列表刷新视图
      */
-    private void createRegionTabs() {
-        if (mRegionContainer == null || mRegionList == null) {
+    private void initShopRefreshView() {
+        if (mRefreshView == null) {
             return;
         }
-        
-        // 清空现有标签
-        mRegionContainer.removeAllViews();
-        mRegionTabItems.clear();
-        
-        for (int i = 0; i < mRegionList.size(); i++) {
-            String regionName = mRegionList.get(i);
-            RegionTabItem tabItem = createRegionTabItem(regionName, i);
-            mRegionTabItems.add(tabItem);
-            mRegionContainer.addView(tabItem.container);
-        }
-        
-        // 设置默认选中第一个
-        if (!mRegionTabItems.isEmpty()) {
-            updateRegionSelection(0);
-        }
-    }
 
-    /**
-     * 创建单个地区标签项
-     */
-    private RegionTabItem createRegionTabItem(String regionName, int index) {
-        // 创建容器
-        LinearLayout container = new LinearLayout(mContext);
-        LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams(
-            LinearLayout.LayoutParams.WRAP_CONTENT,
-            LinearLayout.LayoutParams.WRAP_CONTENT
-        );
-        containerParams.rightMargin = dpToPx(24);
-        container.setLayoutParams(containerParams);
-        container.setOrientation(LinearLayout.VERTICAL);
-        container.setGravity(Gravity.CENTER);
-        container.setPadding(dpToPx(12), dpToPx(6), dpToPx(12), dpToPx(6));
-        container.setTag(index); // 设置标签用于点击识别
-        
-        // 创建文本
-        TextView textView = new TextView(mContext);
-        LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(
-            LinearLayout.LayoutParams.WRAP_CONTENT,
-            LinearLayout.LayoutParams.WRAP_CONTENT
-        );
-        textView.setLayoutParams(textParams);
-        textView.setText(regionName);
-        textView.setTextSize(14);
-        textView.setTextColor(0xFF999999); // 默认未选中颜色
+        // 设置布局管理器
+        mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
         
-        // 创建下划线
-        View underline = new View(mContext);
-        LinearLayout.LayoutParams lineParams = new LinearLayout.LayoutParams(
-            dpToPx(20),
-            dpToPx(2)
-        );
-        lineParams.topMargin = dpToPx(4);
-        underline.setLayoutParams(lineParams);
-        underline.setBackgroundColor(0xFF333333);
-        underline.setVisibility(View.INVISIBLE); // 默认隐藏
-        
-        // 添加到容器
-        container.addView(textView);
-        container.addView(underline);
-        
-        // 设置点击事件
-        container.setOnClickListener(this);
-        
-        return new RegionTabItem(container, textView, underline, regionName, index);
-    }
+        // 设置数据助手
+        mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<ShopItem>() {
+            @Override
+            public com.yunbao.common.adapter.RefreshAdapter<ShopItem> getAdapter() {
+                if (mShopAdapter == null) {
+                    mShopAdapter = new ShopListAdapter(mContext);
+                    mShopAdapter.setOnItemClickListener(MainShopRuralViewHolder.this);
+                }
+                return mShopAdapter;
+            }
 
-    /**
-     * dp转px
-     */
-    private int dpToPx(int dp) {
-        float density = mContext.getResources().getDisplayMetrics().density;
-        return (int) (dp * density + 0.5f);
+            @Override
+            public void loadData(int page, HttpCallback callback) {
+                // 获取当前请求ID
+                final long currentRequestId;
+                synchronized (mRequestLock) {
+                    currentRequestId = mCurrentRequestId;
+                }
+                
+                // 添加日志追踪loadData方法的调用
+                android.util.Log.d("MainShopRuralViewHolder", "loadData - 开始加载数据,页码: " + page + ", 请求ID: " + currentRequestId);
+                
+                // 获取当前省份信息
+                String province = CommonAppConfig.getInstance().getProvince();
+                if (TextUtils.isEmpty(province)) {
+                    province = "";
+                }
+                
+                // 使用当前选中的地区名称作为搜索条件
+                String searchProvince = TextUtils.isEmpty(mCurrentRegionName) ? "" : mCurrentRegionName;
+                
+                android.util.Log.d("MainShopRuralViewHolder", "loadData - 请求参数: shopType=" + mShopType + ", province=" + province + ", searchProvince=" + searchProvince);
+                
+                // 调用接口,传入搜索关键词
+                MainHttpUtil.getClassidShopList(mShopType, mSearchKeyword, mCurrentRegionName, page, new HttpCallback() {
+                    @Override
+                    public void onSuccess(int code, String msg, String[] info) {
+                        // 检查请求是否已过期
+                        synchronized (mRequestLock) {
+                            if (currentRequestId != mCurrentRequestId) {
+                                android.util.Log.d("MainShopRuralViewHolder", "请求已过期,忽略结果。当前ID: " + mCurrentRequestId + ", 请求ID: " + currentRequestId);
+                                return; // 请求已过期,忽略结果
+                            }
+                        }
+                        callback.onSuccess(code, msg, info);
+                    }
+
+                    @Override
+                    public void onError() {
+                        // 检查请求是否已过期
+                        synchronized (mRequestLock) {
+                            if (currentRequestId != mCurrentRequestId) {
+                                android.util.Log.d("MainShopRuralViewHolder", "请求已过期,忽略错误。当前ID: " + mCurrentRequestId + ", 请求ID: " + currentRequestId);
+                                return; // 请求已过期,忽略错误
+                            }
+                        }
+                        callback.onError();
+                    }
+
+                    @Override
+                    public void onFinish() {
+                        // 检查请求是否已过期
+                        synchronized (mRequestLock) {
+                            if (currentRequestId != mCurrentRequestId) {
+                                android.util.Log.d("MainShopRuralViewHolder", "请求已过期,忽略完成回调。当前ID: " + mCurrentRequestId + ", 请求ID: " + currentRequestId);
+                                return; // 请求已过期,忽略完成回调
+                            }
+                        }
+                        callback.onFinish();
+                    }
+                });
+            }
+
+            @Override
+            public List<ShopItem> processData(String[] info) {
+                List<ShopItem> list = JSON.parseArray(Arrays.toString(info), ShopItem.class);
+                return list;
+            }
+
+            @Override
+            public void onRefreshSuccess(List<ShopItem> list, int listCount) {
+                // 下拉刷新成功回调
+            }
+
+            @Override
+            public void onRefreshFailure() {
+                // 下拉刷新失败回调
+            }
+
+            @Override
+            public void onLoadMoreSuccess(List<ShopItem> loadItemList, int loadItemCount) {
+                // 上拉加载更多成功回调
+            }
+
+            @Override
+            public void onLoadMoreFailure() {
+                // 上拉加载更多失败回调
+            }
+        });
     }
 
     /**
-     * 更新地区选中状态
+     * 初始化搜索框
      */
-    private void updateRegionSelection(int selectedIndex) {
-        if (selectedIndex < 0 || selectedIndex >= mRegionTabItems.size()) {
+    private void initSearchBox() {
+        if (mEditShopName == null) {
             return;
         }
-        
-        mCurrentSelectedRegion = selectedIndex;
-        
-        // 更新所有标签状态
-        for (int i = 0; i < mRegionTabItems.size(); i++) {
-            RegionTabItem item = mRegionTabItems.get(i);
-            if (i == selectedIndex) {
-                // 选中状态
-                item.textView.setTextColor(0xFF333333);
-                item.textView.setTypeface(null, Typeface.BOLD);
-                item.underline.setVisibility(View.VISIBLE);
-            } else {
-                // 未选中状态
-                item.textView.setTextColor(0xFF999999);
-                item.textView.setTypeface(null, Typeface.NORMAL);
-                item.underline.setVisibility(View.INVISIBLE);
+
+        // 设置提示文字
+        mEditShopName.setHint("输入商家名");
+
+        // 设置键盘回车键为搜索键
+        mEditShopName.setImeOptions(EditorInfo.IME_ACTION_SEARCH);
+        mEditShopName.setSingleLine(true);
+
+        // 监听回车键点击事件
+        mEditShopName.setOnEditorActionListener((v, actionId, event) -> {
+            if (actionId == EditorInfo.IME_ACTION_SEARCH) {
+                performSearch();
+                return true;
             }
-        }
+            return false;
+        });
     }
 
     /**
-     * 初始化导航栏和ViewPager
+     * 执行搜索
      */
-    private void initNavigationTabs() {
-        // 获取导航栏控件
-        mNavHome = findViewById(R.id.tv_nav_home);
-        mNavAllGoods = findViewById(R.id.tv_nav_all_goods);
-        mNavReview = findViewById(R.id.tv_nav_review);
-        
-        // 获取ViewPager
-        mViewPager = findViewById(R.id.vp_content);
-        
-        // 设置ViewPager适配器
-        if (mContext instanceof FragmentActivity) {
-            mContentAdapter = new ShopContentAdapter((FragmentActivity) mContext);
-            mViewPager.setAdapter(mContentAdapter);
-            
-            // 设置ViewPager页面切换监听
-            mViewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
-                @Override
-                public void onPageSelected(int position) {
-                    super.onPageSelected(position);
-                    updateNavigationSelection(position);
-                }
-            });
+    private void performSearch() {
+        if (mEditShopName == null) {
+            return;
         }
-    }
 
-    /**
-     * 初始化商品分类项
-     */
-    private void initCategoryItems() {
-        // 商品分类项在布局中已经设置好了
-        // 可以在这里添加分类点击逻辑
+        String keyword = mEditShopName.getText().toString().trim();
+        mSearchKeyword = keyword;
+    
+        // 显示loading状态
+        if (mRefreshView != null) {
+            mRefreshView.showLoading();
+            mRefreshView.initData();
+        }
+    
+        // 隐藏软键盘
+        if (mInputMethodManager != null && mEditShopName != null) {
+            mInputMethodManager.hideSoftInputFromWindow(mEditShopName.getWindowToken(), 0);
+        }
     }
 
     /**
-     * 设置点击事件监听器
+     * 初始化定位信息
      */
-    private void setClickListeners() {
-        if (mLocationLayout != null) {
-            mLocationLayout.setOnClickListener(this);
+    private void initLocationInfo() {
+        // 先尝试从缓存获取省份信息
+        String province = CommonAppConfig.getInstance().getProvince();
+        if (!TextUtils.isEmpty(province)) {
+            initRegionData();
+        } else {
+            // 如果没有缓存的定位信息,则启动定位
+            startLocationIfNeeded();
         }
-        
-        // 设置导航栏点击事件
-        if (mNavHome != null) mNavHome.setOnClickListener(this);
-        if (mNavAllGoods != null) mNavAllGoods.setOnClickListener(this);
-        if (mNavReview != null) mNavReview.setOnClickListener(this);
     }
-
+    
     /**
-     * 设置示例数据
+     * 启动定位(如果需要)
      */
-    private void setupSampleData() {
-        // 设置地区文本
-        if (mLocationText != null) {
-            mLocationText.setText("北京市");
+    private void startLocationIfNeeded() {
+        if (mContext instanceof AbsActivity) {
+            AbsActivity activity = (AbsActivity) mContext;
+            if (activity.hasLocationPermission()) {
+                // 有权限直接启动定位
+                LocationUtil.getInstance().startLocation();
+            } else {
+                // 没有权限则请求权限
+                activity.checkLocationPermission(new Runnable() {
+                    @Override
+                    public void run() {
+                        LocationUtil.getInstance().startLocation();
+                    }
+                });
+            }
         }
-        
-        // 设置默认导航选中状态
-        updateNavigationSelection(0);
     }
-
+    
     /**
-     * 设置地区数据(外部调用)
+     * 更新定位文本显示
      */
-    public void setRegionData(List<String> regionList) {
-        if (regionList != null && !regionList.isEmpty()) {
-            mRegionList = new ArrayList<>(regionList);
-            createRegionTabs();
+    private void updateLocationText(String province) {
+        if (mLocationText != null && !TextUtils.isEmpty(province)) {
+            mLocationText.setText(province);
         }
     }
-
+    
     /**
-     * 获取当前选中的地区
+     * 监听定位事件
      */
-    public String getCurrentSelectedRegion() {
-        if (mCurrentSelectedRegion >= 0 && mCurrentSelectedRegion < mRegionList.size()) {
-            return mRegionList.get(mCurrentSelectedRegion);
-        }
-        return null;
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void onLocationEvent(LocationEvent event) {
+        // 定位成功后会触发LocationCityEvent,这里可以不处理
     }
-
+    
     /**
-     * 设置选中的地区
+     * 监听定位城市事件
      */
-    public void setSelectedRegion(int index) {
-        updateRegionSelection(index);
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void onLocationCityEvent(LocationCityEvent event) {
+        // 定位成功后请求地址列表
+        initRegionData();
     }
 
     /**
-     * 设置选中的地区
+     * 初始化地区数据
      */
-    public void setSelectedRegion(String regionName) {
-        if (mRegionList != null) {
-            int index = mRegionList.indexOf(regionName);
-            if (index >= 0) {
-                updateRegionSelection(index);
-            }
-        }
-    }
-
-    @Override
-    public void loadData() {
-        if (isFirstLoadData()) {
-            // 首次加载数据
-            loadRuralShopData();
-        }
+    private void initRegionData() {
+        // 调用getShopAddressList接口获取店铺地址列表
+        loadShopAddressListFromServer();
     }
-
+    
     /**
-     * 加载农村电商数据
+     * 从服务器加载店铺地址列表
      */
-    private void loadRuralShopData() {
-        // TODO: 实现农村电商数据加载逻辑
-        // 1. 加载地区列表
-        // 2. 加载推荐商品
-        // 3. 加载商品分类
-        // 4. 加载广告横幅
-        
-        // 示例:模拟数据加载完成
-        setupSampleData();
-    }
-
-    @Override
-    public void onClick(View v) {
-        int id = v.getId();
-        if (id == R.id.ll_location) {
-            // 点击地区选择
-            onLocationClick();
-        } else if (id == R.id.tv_nav_home) {
-            // 点击首页导航
-            switchToPage(0);
-        } else if (id == R.id.tv_nav_all_goods) {
-            // 点击全部商品导航
-            switchToPage(1);
-        } else if (id == R.id.tv_nav_review) {
-            // 点击评价导航
-            switchToPage(2);
-        } else {
-            // 检查是否是地区标签点击
-            Object tag = v.getTag();
-            if (tag instanceof Integer) {
-                int regionIndex = (Integer) tag;
-                updateRegionSelection(regionIndex);
-                onRegionClick(mRegionList.get(regionIndex));
+    private void loadShopAddressListFromServer() {
+        MainHttpUtil.getShopAddressList(new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                try {
+                    if (info != null && info.length > 0) {
+                        // 解析返回的地址数据
+                        List<AddressBean> addressList = JSON.parseArray(Arrays.toString(info), AddressBean.class);
+
+                        // 获取当前定位的省份
+                        String currentProvince = CommonAppConfig.getInstance().getProvince();
+                        
+                        // 构建地区列表(不包含"全部"选项)
+                        List<String> regionList = new ArrayList<>();
+                        
+                        // 用于记录定位地址是否在列表中
+                        boolean hasLocationProvince = false;
+                        int locationProvinceIndex = -1;
+                        
+                        // 从AddressBean中提取province字段
+                        List<String> provinceList = new ArrayList<>();
+                        for (AddressBean addressBean : addressList) {
+                            if (addressBean != null && !TextUtils.isEmpty(addressBean.getProvince())) {
+                                String province = addressBean.getProvince();
+                                provinceList.add(province);
+                                
+                                // 检查是否包含定位地址
+                                if (!TextUtils.isEmpty(currentProvince) && currentProvince.equals(province)) {
+                                    hasLocationProvince = true;
+                                    locationProvinceIndex = provinceList.size() - 1;
+                                }
+                            }
+                        }
+                        
+                        // 如果包含定位地址,将其置为第一个
+                        if (hasLocationProvince && locationProvinceIndex >= 0) {
+                            String locationProvince = provinceList.get(locationProvinceIndex);
+                            provinceList.remove(locationProvinceIndex);
+                            regionList.add(locationProvince); // 添加到第一个位置
+                            regionList.addAll(provinceList); // 添加其余地址
+                        } else {
+                            // 如果不包含定位地址,按原顺序添加
+                            regionList.addAll(provinceList);
+                        }
+                        
+                        // 更新地区列表
+                        mRegionList = regionList;
+                        // 重新创建地区标签
+                        createRegionTabs();
+                        selectRegionTab(mCurrentSelectedRegion);
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    // 如果解析失败,创建空列表
+                    mRegionList = new ArrayList<>();
+                    createRegionTabs();
+                }
             }
-        }
+            
+            @Override
+            public void onError() {
+                // 网络请求失败时,创建空列表
+                mRegionList = new ArrayList<>();
+                createRegionTabs();
+            }
+        });
     }
 
     /**
-     * 处理地区选择点击
+     * 动态创建地区标签
      */
-    private void onLocationClick() {
-        // TODO: 打开地区选择页面
-        // 例如:启动城市选择Activity
-    }
+    private void createRegionTabs() {
+        if (mRegionContainer == null || mRegionList == null) {
+            return;
+        }
 
-    /**
-     * 处理地区标签点击
-     */
-    private void onRegionClick(String regionName) {
-        // TODO: 根据选中的地区加载对应数据
-        // 例如:刷新商品列表、更新推荐内容等
-    }
+        mRegionContainer.removeAllViews();
+        mRegionTabItems.clear();
 
-    /**
-     * 切换到指定页面
-     */
-    private void switchToPage(int pageIndex) {
-        if (mViewPager != null && pageIndex >= 0 && pageIndex < 3) {
-            mViewPager.setCurrentItem(pageIndex, true);
+        for (int i = 0; i < mRegionList.size(); i++) {
+            String regionName = mRegionList.get(i);
+            RegionTabItem tabItem = createRegionTabItem(regionName, i);
+            mRegionTabItems.add(tabItem);
+            mRegionContainer.addView(tabItem.textView);
         }
     }
 
     /**
-     * 更新导航栏选中状态
+     * 创建地区标签项
      */
-    private void updateNavigationSelection(int selectedIndex) {
-        mCurrentNavIndex = selectedIndex;
+    private RegionTabItem createRegionTabItem(String regionName, int index) {
+        TextView textView = new TextView(mContext);
+        textView.setText(regionName);
+        textView.setTextSize(14);
+        textView.setPadding(24, 12, 24, 12);
+        textView.setGravity(Gravity.CENTER);
         
-        // 重置所有导航项状态
-        resetNavigationStates();
+        // 设置点击事件
+        textView.setOnClickListener(v -> selectRegionTab(index));
         
-        // 设置选中状态
-        switch (selectedIndex) {
-            case 0: // 首页
-                setNavigationSelected(mNavHome);
-                break;
-            case 1: // 全部商品
-                setNavigationSelected(mNavAllGoods);
-                break;
-            case 2: // 评价
-                setNavigationSelected(mNavReview);
-                break;
-        }
-    }
-
-    /**
-     * 重置所有导航项状态
-     */
-    private void resetNavigationStates() {
-        setNavigationUnselected(mNavHome);
-        setNavigationUnselected(mNavAllGoods);
-        setNavigationUnselected(mNavReview);
+        // 设置布局参数
+        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+            LinearLayout.LayoutParams.WRAP_CONTENT,
+            LinearLayout.LayoutParams.WRAP_CONTENT
+        );
+        params.setMargins(0, 0, 16, 0);
+        textView.setLayoutParams(params);
+        
+        return new RegionTabItem(textView, regionName, index);
     }
 
     /**
-     * 设置导航项为选中状态
+     * 选中地区标签
      */
-    private void setNavigationSelected(TextView textView) {
-        if (textView != null) {
-            textView.setTextSize(18); // 18sp
-            textView.setTypeface(null, Typeface.BOLD);
+    private void selectRegionTab(int index) {
+        if (index < 0 || index >= mRegionTabItems.size()) {
+            return;
         }
-    }
-
-    /**
-     * 设置导航项为未选中状态
-     */
-    private void setNavigationUnselected(TextView textView) {
-        if (textView != null) {
-            textView.setTextSize(14); // 14sp
-            textView.setTypeface(null, Typeface.NORMAL);
+    
+        // 重置所有标签状态
+        for (RegionTabItem item : mRegionTabItems) {
+            item.textView.setTextColor(0xFF666666);
+            item.textView.setBackgroundResource(android.R.color.transparent);
+            item.textView.setTypeface(null, Typeface.NORMAL);
         }
-    }
-
-    /**
-     * ViewPager适配器
-     */
-    private static class ShopContentAdapter extends FragmentStateAdapter {
+    
+        // 设置选中状态
+        RegionTabItem selectedItem = mRegionTabItems.get(index);
+        selectedItem.textView.setTextColor(0xFF333333);
+        selectedItem.textView.setTypeface(null, Typeface.BOLD);
         
-        public ShopContentAdapter(FragmentActivity fragmentActivity) {
-            super(fragmentActivity);
+        mCurrentSelectedRegion = index;
+        mCurrentRegionName = selectedItem.regionName;
+        updateLocationText(mCurrentRegionName);
+
+        // 取消之前的防抖任务
+        if (mDebounceRunnable != null) {
+            mDebounceHandler.removeCallbacks(mDebounceRunnable);
         }
 
-        @Override
-        public Fragment createFragment(int position) {
-            // 根据位置创建对应的Fragment
-            switch (position) {
-                case 0:
-                    return new ShopHomeFragment(); // 首页Fragment
-                case 1:
-                    return new ShopAllGoodsFragment(); // 全部商品Fragment
-                case 2:
-                    return new ShopReviewFragment(); // 评价Fragment
-                default:
-                    return new ShopHomeFragment();
+        // 创建新的防抖任务
+        mDebounceRunnable = new Runnable() {
+            @Override
+            public void run() {
+                // 生成新的请求ID
+                synchronized (mRequestLock) {
+                    mCurrentRequestId++;
+                }
+
+                // 刷新商家数据
+                if (mRefreshView != null) {
+                    mRefreshView.initData();
+                }
             }
-        }
+        };
 
-        @Override
-        public int getItemCount() {
-            return 3; // 三个页面
-        }
+        // 延迟执行
+        mDebounceHandler.postDelayed(mDebounceRunnable, DEBOUNCE_DELAY);
     }
 
     /**
-     * 首页Fragment(示例)
+     * 设置点击事件监听器
      */
-    public static class ShopHomeFragment extends Fragment {
-        @Override
-        public View onCreateView(android.view.LayoutInflater inflater, ViewGroup container, android.os.Bundle savedInstanceState) {
-            return inflater.inflate(R.layout.fragment_shop_home, container, false);
+    private void setClickListeners() {
+        if (mLocationLayout != null) {
+            mLocationLayout.setOnClickListener(this);
         }
     }
 
-    /**
-     * 全部商品Fragment(示例)
-     */
-    public static class ShopAllGoodsFragment extends Fragment {
-        @Override
-        public View onCreateView(android.view.LayoutInflater inflater, ViewGroup container, android.os.Bundle savedInstanceState) {
-            TextView textView = new TextView(getContext());
-            textView.setText("暂无商品");
-            textView.setGravity(Gravity.CENTER);
-            textView.setPadding(50, 50, 50, 50);
-            return textView;
+    @Override
+    public void onItemClick(ShopItem shopItem, int position) {
+        if (shopItem != null && shopItem.getUid() != null) {
+            // 跳转到商家详情页面
+            ShopInfoActivity.forward(mContext, shopItem.getUid());
         }
     }
 
-    /**
-     * 评价Fragment(示例)
-     */
-    public static class ShopReviewFragment extends Fragment {
-        @Override
-        public View onCreateView(android.view.LayoutInflater inflater, ViewGroup container, android.os.Bundle savedInstanceState) {
-            TextView textView = new TextView(getContext());
-            textView.setText("暂无评价");
-            textView.setGravity(Gravity.CENTER);
-            textView.setPadding(50, 50, 50, 50);
-            return textView;
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.ll_location) {
+            // 处理地区选择点击事件 - 重新定位
+            startLocationIfNeeded();
+        }
+    }
+
+    @Override
+    public void loadData() {
+        if (mRefreshView != null) {
+            mRefreshView.showLoading(); // 显示loading状态
+            mRefreshView.initData();
         }
     }
 
     @Override
     public void release() {
         super.release();
-        // 释放资源
-        mLocationLayout = null;
-        mLocationText = null;
-        mRegionContainer = null;
-        
-        // 释放导航栏和ViewPager资源
-        mNavHome = null;
-        mNavAllGoods = null;
-        mNavReview = null;
-        
-        if (mViewPager != null) {
-            mViewPager.setAdapter(null);
-            mViewPager = null;
+        // 取消EventBus注册
+        if (EventBus.getDefault().isRegistered(this)) {
+            EventBus.getDefault().unregister(this);
         }
-        
-        mContentAdapter = null;
-        
-        if (mRegionTabItems != null) {
-            mRegionTabItems.clear();
-            mRegionTabItems = null;
+        if (mShopAdapter != null) {
+            mShopAdapter = null;
         }
-        
-        if (mRegionList != null) {
-            mRegionList.clear();
-            mRegionList = null;
+    }
+
+    /**
+     * 地区标签项数据类
+     */
+    private static class RegionTabItem {
+        TextView textView;
+        String regionName;
+        int index;
+
+        RegionTabItem(TextView textView, String regionName, int index) {
+            this.textView = textView;
+            this.regionName = regionName;
+            this.index = index;
         }
     }
-}
+}

+ 7 - 4
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainShopViewHolder.java

@@ -45,6 +45,7 @@ public class MainShopViewHolder extends AbsMainViewHolder {
 
     // 页面标题
     private String[] mPageTitles = {"乡村云店", "都市云店", "一线云店"};
+    private int[] mShopId = {1, 2, 3};
 
     public MainShopViewHolder(Context context, ViewGroup parentView) {
         super(context, parentView);
@@ -59,7 +60,7 @@ public class MainShopViewHolder extends AbsMainViewHolder {
     public void init() {
         // 首先初始化页面标题
         if (mPageTitles == null) {
-            mPageTitles = new String[]{"乡村云店", "都市云店", "一云店"};
+            mPageTitles = new String[]{"乡村云店", "都市云店", "一线云店"};
         }
         
         setStatusHeight();
@@ -105,7 +106,7 @@ public class MainShopViewHolder extends AbsMainViewHolder {
     private void initViewPager() {
         // 确保 mPageTitles 已初始化
         if (mPageTitles == null) {
-            mPageTitles = new String[]{"乡村云店", "都市云店", "一云店"};
+            mPageTitles = new String[]{"乡村云店", "都市云店", "一线云店"};
         }
         
         // 创建三个页面的FrameLayout容器
@@ -165,7 +166,7 @@ public class MainShopViewHolder extends AbsMainViewHolder {
                 titleView.setNormalColor(0xff666666);
                 titleView.setSelectedColor(0xff333333);
                 titleView.setText(mPageTitles[index]);
-                titleView.setTextSize(18);
+                titleView.setTextSize(16);
                 titleView.getPaint().setFakeBoldText(true);
 
                 titleView.setOnClickListener(new View.OnClickListener() {
@@ -231,7 +232,9 @@ public class MainShopViewHolder extends AbsMainViewHolder {
 //                    vh = mOneClickViewHolder;
 //                    break;
 //            }
-            mRuralViewHolder = new MainShopRuralViewHolder(mContext, parent);
+            // 根据位置创建对应的ViewHolder,都使用MainShopRuralViewHolder但传入不同的type值
+            int shopType = mShopId[position]; // 使用已定义的mShopId数组:{1, 2, 3}
+            mRuralViewHolder = new MainShopRuralViewHolder(mContext, parent, shopType);
             vh = mRuralViewHolder;
 
             if (vh != null) {

+ 412 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainViewHolder.java

@@ -0,0 +1,412 @@
+package com.yunbao.main.views;
+
+import android.content.Context;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+
+import androidx.viewpager.widget.ViewPager;
+
+import com.alibaba.fastjson.JSON;
+import com.yunbao.common.CommonAppConfig;
+import com.yunbao.common.adapter.ViewPagerAdapter;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.L;
+import com.yunbao.common.utils.WordUtil;
+import com.yunbao.main.R;
+import com.yunbao.main.activity.MainActivity;
+import com.yunbao.main.custom.MainHomePagerTitleView;
+import com.yunbao.video.bean.ClassBean;
+import com.yunbao.video.http.VideoHttpUtil;
+
+import net.lucode.hackware.magicindicator.MagicIndicator;
+import net.lucode.hackware.magicindicator.ViewPagerHelper;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
+import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.SimplePagerTitleView;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Created by cxf on 2018/9/22.
+ * MainActivity 首页
+ */
+
+public class MainViewHolder extends AbsMainViewHolder {
+
+    private static final int DEFAULT_PAGE_COUNT = 5;
+    private ViewPager mViewPager;
+    private List<FrameLayout> mViewList;
+    private MagicIndicator mIndicator;
+    private List<AbsMainViewHolder> mViewHolders;
+
+    private  LiveSquareViewHolder mliveSquareViewHolder;
+    private  MainShopViewHolder mShopViewHolder; // 云店
+    private MainMallViewHolder mMainMallViewHolder;//商城
+    private MainHomeFriendsViewHolder mFriendsViewHolder;//朋友
+    private MainHomeNewsViewHolder mNewsViewHolder; // 新闻列表
+    private MainHomeSameCityViewHolder mSameCityViewHolder;//同城
+    private MainHomeFollowViewHolder mFollowViewHolder;//关注
+    private MainHomeRecommendViewHolder mRecommendViewHolder;//推荐
+    private MainHomeHotViewHolder mHotViewHolder;//热门
+    private MainHomeFindViewHolder mFindViewHolder;//发现
+    private List<MainHomeClassViewHolder> mClassViewHolder;
+    private List<ClassBean> mClassBeanList;
+    private CommonNavigatorAdapter mNavigatorAdapter;
+    private ViewPagerAdapter mViewPagerAdapter;
+    private boolean mLoadSuc;
+    private boolean mIndicatorBlack;
+    private List<MainHomePagerTitleView> mPagerTitleList;
+    private LinePagerIndicator mLinePagerIndicator;
+    private ImageView mBtnSearch;
+    private ImageView mBtnLiveSquare;
+    private ImageView mBtnMenu;
+
+
+    public MainViewHolder(Context context, ViewGroup parentView) {
+        super(context, parentView);
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.view_main;
+    }
+
+    @Override
+    public void init() {
+        setStatusHeight();
+        mPagerTitleList = new ArrayList<>();
+        mViewList = new ArrayList<>();
+        mViewHolders = new ArrayList<>();
+        mClassViewHolder = new ArrayList<>();
+        mViewPager = (ViewPager) findViewById(R.id.viewPager);
+        mIndicator = (MagicIndicator) findViewById(R.id.indicator);
+        mClassBeanList = new ArrayList<>();
+//        云店、朋友、新闻、同城、关注、发现
+        mClassBeanList.add(new ClassBean(ClassBean.VIDEO_ID, "直播"));
+//        mClassBeanList.add(new ClassBean(ClassBean.MALL_ID, "商城"));
+//        mClassBeanList.add(new ClassBean(ClassBean.SHOP_ID, WordUtil.getString(R.string.main_shop)));
+//        mClassBeanList.add(new ClassBean(ClassBean.SHOP_ID, WordUtil.getString(R.string.main_shop)));
+//        mClassBeanList.add(new ClassBean(ClassBean.FRIEND_ID, WordUtil.getString(R.string.main_friend)));
+        mClassBeanList.add(new ClassBean(ClassBean.NEWS_ID, WordUtil.getString(R.string.main_news)));
+        mClassBeanList.add(new ClassBean(ClassBean.FRIEND_ID, WordUtil.getString(R.string.main_friend)));
+        mClassBeanList.add(new ClassBean(ClassBean.CITY_ID, WordUtil.getString(R.string.main_city)));
+//        mClassBeanList.add(new ClassBean(ClassBean.RECOMMEND_ID, WordUtil.getString(R.string.recommend)));
+//        mClassBeanList.add(new ClassBean(ClassBean.HOT_ID, WordUtil.getString(R.string.hot)));
+        mClassBeanList.add(new ClassBean(ClassBean.FOLLOW_ID, WordUtil.getString(R.string.follow)));
+//        mClassBeanList.add(new ClassBean(ClassBean.DISCOVER_ID, WordUtil.getString(R.string.main_discover)));
+        initData();
+    }
+
+    private void initData() {
+        VideoHttpUtil.getClassLists(new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                if (code == 0) {
+                    List<ClassBean> list = JSON.parseArray(Arrays.toString(info), ClassBean.class);
+                    mClassBeanList.addAll(list);
+                    loadView();
+                    mLoadSuc = true;
+                }
+            }
+
+            @Override
+            public void onError() {
+                super.onError();
+                loadView();
+                mLoadSuc = true;
+            }
+        });
+    }
+
+    private void loadView() {
+        int size = mClassBeanList.size();
+        for (int i = 0; i < size; i++) {
+            FrameLayout frameLayout = new FrameLayout(mContext);
+            frameLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
+            mViewList.add(frameLayout);
+            mViewHolders.add(null);
+            if (size >= DEFAULT_PAGE_COUNT) {
+                mClassViewHolder.add(null);
+            }
+        }
+        if (size > 1) {
+            mViewPager.setOffscreenPageLimit(size - 1);
+        }
+        if (mViewPagerAdapter == null) {
+            mViewPagerAdapter = new ViewPagerAdapter(mViewList);
+        }
+        mViewPager.setAdapter(mViewPagerAdapter);
+        mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+
+            }
+
+            @Override
+            public void onPageSelected(int position) {
+                loadPageData(position);
+                for (int i = 0, length = mViewHolders.size(); i < length; i++) {
+                    AbsMainViewHolder vh = mViewHolders.get(i);
+                    if (vh != null) {
+                        vh.setShowed(position == i);
+                    }
+                }
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int state) {
+
+            }
+        });
+        if (mNavigatorAdapter == null) {
+            mNavigatorAdapter = new CommonNavigatorAdapter() {
+
+                @Override
+                public int getCount() {
+                    return mClassBeanList.size();
+                }
+
+                @Override
+                public IPagerTitleView getTitleView(Context context, final int index) {
+                    MainHomePagerTitleView simplePagerTitleView = new MainHomePagerTitleView(context);
+//                    simplePagerTitleView.setNormalColor(0xccffffff);
+//                    simplePagerTitleView.setSelectedColor(0xffffffff);
+                    simplePagerTitleView.setNormalColor(0xff666666);
+                    simplePagerTitleView.setSelectedColor(0xff111111);
+//                    simplePagerTitleView.setBackgroundColor(0xffffffff);
+                    simplePagerTitleView.setText(mClassBeanList.get(index).getName());
+                    simplePagerTitleView.setTextSize(20);
+                    simplePagerTitleView.getPaint().setFakeBoldText(true);
+                    simplePagerTitleView.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+//                            if(mClassBeanList.get(index).getId()==ClassBean.FOLLOW_ID&& !CommonAppConfig.getInstance().isLogin()){
+//                                LoginActivity.forward(mContext);
+//                                return;
+//                            }
+                            if (CommonAppConfig.getInstance().isBaseFunctionMode()) {
+                                return;
+                            }
+//                            setIndicatorBlack(index == 3);
+                            if (mViewPager != null) {
+                                mViewPager.setCurrentItem(index, false);
+                            }
+                        }
+                    });
+                    mPagerTitleList.add(simplePagerTitleView);
+                    return simplePagerTitleView;
+                }
+
+                @Override
+                public IPagerIndicator getIndicator(Context context) {
+                    LinePagerIndicator linePagerIndicator = new LinePagerIndicator(context);
+                    linePagerIndicator.setMode(LinePagerIndicator.MODE_WRAP_CONTENT);
+                    linePagerIndicator.setXOffset(DpUtil.dp2px(5));
+                    linePagerIndicator.setRoundRadius(DpUtil.dp2px(2));
+//                    linePagerIndicator.setColors(0xffffffff);
+                    linePagerIndicator.setColors(0xff111111);
+                    mLinePagerIndicator = linePagerIndicator;
+                    return linePagerIndicator;
+                }
+            };
+            CommonNavigator commonNavigator = new CommonNavigator(mContext);
+            commonNavigator.setAdapter(mNavigatorAdapter);
+            commonNavigator.setAdjustMode(false);  // 改为true,让标题均匀分布
+
+            mIndicator.setNavigator(commonNavigator);
+            ViewPagerHelper.bind(mIndicator, mViewPager);
+        }
+//        loadPageData(0);
+        mViewPager.setCurrentItem(0, true);  // 改为索引0(直播页面)
+        loadPageData(0);  // 改为索引0
+    }
+
+    private void loadPageData(int position) {
+        if (mViewHolders == null) {
+            return;
+        }
+        AbsMainViewHolder vh = null;
+        vh = mViewHolders.get(position);
+        if (vh == null) {
+            if (mViewList != null) {
+                FrameLayout parent = mViewList.get(position);
+                if (parent == null) {
+                    return;
+                }
+//                if (mRecommendViewHolder == null) {
+//                    mRecommendViewHolder = new MainHomeRecommendViewHolder(mContext, parent);
+//                }
+                if (position == 0) {
+                    mliveSquareViewHolder = new LiveSquareViewHolder(mContext, parent);
+                    vh = mliveSquareViewHolder;
+//                    mMainMallViewHolder = new MainMallViewHolder(mContext, parent);
+//                    vh = mMainMallViewHolder;
+//                    mRecommendViewHolder = new MainHomeRecommendViewHolder(mContext, parent);
+//                    vh = mRecommendViewHolder;
+                } else if (position == 1) {
+//                    mFriendsViewHolder = new MainHomeFriendsViewHolder(mContext, parent);
+//                    vh = mFriendsViewHolder;
+//                    mMainMallViewHolder = new MainMallViewHolder(mContext, parent);
+//                    vh = mMainMallViewHolder;
+
+//                }
+                    mNewsViewHolder = new MainHomeNewsViewHolder(mContext, parent);
+                    vh = mNewsViewHolder;
+//                    mHotViewHolder = new MainHomeHotViewHolder(mContext, parent);
+//                    vh = mHotViewHolder;
+                } else if (position == 2) {
+//                    mNewsViewHolder = new MainHomeNewsViewHolder(mContext, parent);
+//                    vh = mNewsViewHolder;
+//                    mShopViewHolder = new MainShopViewHolder(mContext, parent);
+//                    vh = mShopViewHolder;
+                    mFindViewHolder = new MainHomeFindViewHolder(mContext, parent);
+                    vh = mFindViewHolder;
+                } else if (position == 3) {
+                    mSameCityViewHolder = new MainHomeSameCityViewHolder(mContext, parent);
+                    vh = mSameCityViewHolder;
+//                    mSameCityViewHolder = new MainHomeSameCityViewHolder(mContext, parent);
+//                    vh = mSameCityViewHolder;
+//                    mMainMallViewHolder = new MainMallViewHolder(mContext, parent);
+//                    vh = mMainMallViewHolder;
+                } else if (position == 4) {
+                    mFollowViewHolder = new MainHomeFollowViewHolder(mContext, parent);
+                    vh = mFollowViewHolder;
+//                } else if (position == 4) {
+//                    mFindViewHolder = new MainHomeFindViewHolder(mContext, parent);
+//                    vh = mFindViewHolder;
+//
+                } else {
+                    int posClassView = position - DEFAULT_PAGE_COUNT;
+                    AbsMainViewHolder classView = mClassViewHolder.get(posClassView);
+                    if (classView == null) {
+                        mClassViewHolder.add(posClassView, new MainHomeClassViewHolder(mContext, parent, mClassBeanList.get(position).getId()));
+                        vh = mClassViewHolder.get(posClassView);
+                    } else {
+                        vh = classView;
+                    }
+                }
+                mViewHolders.set(position, vh);
+                vh.addToParent();
+                vh.subscribeActivityLifeCycle();
+
+            }
+        }
+
+        if (vh != null) {
+            vh.loadData();
+        }
+//        boolean mallChecked = position == 3;
+        MainActivity mainActivity = ((MainActivity) mContext);
+//        mainActivity.setBottomWhite(mallChecked);
+//        mainActivity.changeStatusBarWhite(!mallChecked);
+//        boolean mallChecked = true;
+//        MainActivity mainActivity = ((MainActivity) mContext);
+//        mainActivity.setBottomWhite(mallChecked);
+        mainActivity.changeStatusBarWhite(!true);
+        for (int i = 0; i < mPagerTitleList.size(); i++) {
+            mPagerTitleList.get(i).updateColor(i == position);
+        }
+    }
+
+
+    @Override
+    public void loadData() {
+        if (mViewPager != null && mLoadSuc) {
+            loadPageData(mViewPager.getCurrentItem());
+        }
+    }
+
+    @Override
+    public void setShowed(boolean showed) {
+        super.setShowed(showed);
+        if (mViewHolders != null && mViewPager != null) {
+            mViewHolders.get(mViewPager.getCurrentItem()).setShowed(showed);
+        }
+    }
+
+    /**
+     * 刷新推荐
+     */
+    public void refreshRecommend() {
+        if (mRecommendViewHolder != null) {
+            mRecommendViewHolder.refreshRecommend();
+        }
+    }
+
+    /**
+     * 刷新关注
+     */
+    public void refreshFollow() {
+        if (mFollowViewHolder != null) {
+            mFollowViewHolder.loadData();
+        }
+    }
+
+    /**
+     * 从播放列表中删除视频
+     */
+    public void deleteVideoFromPlay(String videoId) {
+        if (mRecommendViewHolder != null) {
+            mRecommendViewHolder.deleteVideoFromPlay(videoId);
+        }
+    }
+
+
+    public void setCurrentItem(int position) {
+        if (mViewPager != null && mViewPager.getCurrentItem() != position) {
+            mViewPager.setCurrentItem(position, false);
+        }
+    }
+
+
+    public int getCurrentItem() {
+        if (mViewPager != null) {
+            return mViewPager.getCurrentItem();
+        }
+        return 0;
+    }
+
+
+    public boolean isVideoPub() {
+        if (mRecommendViewHolder != null) {
+            return mRecommendViewHolder.isVideoPub();
+        }
+        return false;
+    }
+
+
+    private void setIndicatorBlack(boolean black) {
+        if (mIndicatorBlack != black) {
+            mIndicatorBlack = black;
+            SimplePagerTitleView pagerTitleView = null;
+            for (int i = 0; i < mPagerTitleList.size(); i++) {
+                pagerTitleView = mPagerTitleList.get(i);
+                if (black) {
+                    pagerTitleView.setNormalColor(0xff7d7d7d);
+                    pagerTitleView.setSelectedColor(0xff282828);
+                } else {
+                    pagerTitleView.setNormalColor(0xccffffff);
+                    pagerTitleView.setSelectedColor(0xffffffff);
+                }
+            }
+            int color = black ? 0xff282828 : 0xffffffff;
+            if (mLinePagerIndicator != null) {
+                mLinePagerIndicator.setColors(color);
+            }
+            if (mBtnSearch != null) {
+                mBtnSearch.setColorFilter(color);
+            }
+            if (mBtnLiveSquare != null) {
+                mBtnLiveSquare.setColorFilter(color);
+            }
+        }
+    }
+}

+ 156 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/views/ShopGoodsViewHolder.java

@@ -0,0 +1,156 @@
+package com.yunbao.main.views;
+
+import android.content.Context;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.custom.ItemDecoration;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.RouteUtil;
+import com.yunbao.main.R;
+import com.yunbao.main.adapter.ShopGoodsAdapter;
+import com.yunbao.main.bean.MainMallGoodsBean;
+import com.yunbao.main.http.MainHttpUtil;
+import com.yunbao.mall.bean.GoodsSimpleBean;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 店铺全部商品ViewHolder
+ */
+public class ShopGoodsViewHolder extends AbsMainViewHolder {
+
+    private RecyclerView mRecyclerView;
+    private CommonRefreshView mRefreshView;
+    private TextView mEmptyTip;
+    private String mShopId;
+    private ShopGoodsAdapter mAdapter;
+
+    public ShopGoodsViewHolder(Context context, ViewGroup parentView, String shopId) {
+        super(context, parentView, shopId);
+        mShopId = shopId;
+    }
+
+    @Override
+    protected void processArguments(Object... args) {
+        if (args != null && args.length > 0) {
+            mShopId = (String) args[0];
+        }
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.view_shop_goods;
+    }
+
+    @Override
+    public void init() {
+        mRefreshView = findViewById(R.id.refreshView);
+        mEmptyTip = findViewById(R.id.tv_empty_tip);
+        
+        ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, DpUtil.dp2px(10), 0);
+        decoration.setOnlySetItemOffsetsButNoDraw(true);
+        mRefreshView.setItemDecoration(decoration);
+        mRefreshView.setLayoutManager(new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false));
+        
+        // 使用DataHelper模式设置适配器和数据加载
+        mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<MainMallGoodsBean>() {
+            @Override
+            public ShopGoodsAdapter getAdapter() {
+                if (mAdapter == null) {
+                    mAdapter = new ShopGoodsAdapter(mContext);
+                    mAdapter.setOnItemClickListener(new ShopGoodsAdapter.OnItemClickListener() {
+                        @Override
+                        public void onItemClick(GoodsSimpleBean bean, int position) {
+                            onGoodsItemClick(bean, position);
+                        }
+                    });
+                }
+                return mAdapter;
+            }
+
+            @Override
+            public void loadData(int p, HttpCallback callback) {
+                // TODO: 实现实际的数据加载逻辑
+                // 这里模拟数据加载
+                MainHttpUtil.getShopGoodsList(mShopId, null, p, callback);
+
+            }
+
+            @Override
+            public List<MainMallGoodsBean> processData(String[] info) {
+                // TODO: 处理服务器返回的数据
+                // 这里返回示例数据
+                JSONObject obj = JSON.parseObject(info[0]);
+
+                return JSON.parseArray(obj.getString("goods_list"), MainMallGoodsBean.class);
+            }
+
+            @Override
+            public void onRefreshSuccess(List<MainMallGoodsBean> list, int listCount) {
+                updateEmptyState();
+            }
+
+            @Override
+            public void onRefreshFailure() {
+                // 刷新失败处理
+            }
+
+            @Override
+            public void onLoadMoreSuccess(List<MainMallGoodsBean> loadItemList, int loadItemCount) {
+                // 加载更多成功处理
+            }
+
+            @Override
+            public void onLoadMoreFailure() {
+                // 加载更多失败处理
+            }
+        });
+    }
+
+    @Override
+    public void loadData() {
+        if (isFirstLoadData()) {
+            // 初始化数据加载
+            mRefreshView.initData();
+        }
+    }
+    
+    /**
+     * 更新空状态显示
+     */
+    private void updateEmptyState() {
+        if (mAdapter != null && mEmptyTip != null) {
+            if (mAdapter.getItemCount() == 0) {
+                mEmptyTip.setVisibility(View.VISIBLE);
+            } else {
+                mEmptyTip.setVisibility(View.GONE);
+            }
+        }
+    }
+    
+    /**
+     * 处理商品点击事件
+     */
+    private void onGoodsItemClick(GoodsSimpleBean bean, int position) {
+        // TODO: 实现商品详情页跳转逻辑
+        // 可以通过接口回调给上层处理
+        RouteUtil.forwardGoodsDetail(mContext,bean.getId(), true, bean.getType());
+    }
+
+    @Override
+    public void release() {
+        super.release();
+        // CommonRefreshView会自动处理适配器的释放
+    }
+}

+ 385 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/views/ShopHomeViewHolder.java

@@ -0,0 +1,385 @@
+package com.yunbao.main.views;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.custom.ItemDecoration;
+import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.RouteUtil;
+import com.yunbao.main.R;
+import com.yunbao.main.activity.ShopGoodsActivity;
+import com.yunbao.main.adapter.ShopHomeCategoryAdapter;
+import com.yunbao.main.activity.NewProductListActivity;
+import com.yunbao.main.http.MainHttpUtil;
+import com.yunbao.mall.activity.GoodsDetailActivity;
+import com.yunbao.mall.bean.GoodsHomeClassBean;
+import com.yunbao.mall.bean.GoodsSimpleBean;
+import com.yunbao.mall.http.MallHttpUtil;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 店铺首页ViewHolder
+ */
+public class ShopHomeViewHolder extends AbsMainViewHolder implements View.OnClickListener {
+
+    private String mShopId;
+    
+    // 排行榜和编辑推荐区域
+    private LinearLayout mTopSection;
+    private ImageView mRankingImage;
+    private TextView mRankingTitle;
+    private ImageView mEditorPickImage;
+    private TextView mEditorPickTitle;
+    
+    // 商品分类RecyclerView
+    private RecyclerView mCategoryRecyclerView;
+    private ShopHomeCategoryAdapter mCategoryAdapter;
+    private List<GoodsHomeClassBean> mCategoryList;
+    
+    // 底部广告横幅
+    private LinearLayout mBottomBanner;
+    private ImageView mBannerImage;
+
+    private View productItem1;
+    private View productItem2;
+    private View productItem3;
+
+    
+    // 推荐商品区域
+    private LinearLayout mRecommendedProducts;
+    private TextView mViewAllButton;
+    private LinearLayout mProductsContainer;
+    
+    // 商品项控件数组
+    private ImageView[] mProductImages = new ImageView[3];
+    private TextView[] mProductNames = new TextView[3];
+    private TextView[] mProductPrices = new TextView[3];
+    private View[] mProductItems = new View[3];
+    
+    // 推荐商品数据
+    private List<GoodsSimpleBean> mRecommendedProductList;
+
+    public ShopHomeViewHolder(Context context, ViewGroup parentView, String shopId) {
+        super(context, parentView, shopId);
+        mShopId = shopId;
+    }
+
+    @Override
+    protected void processArguments(Object... args) {
+        if (args != null && args.length > 0) {
+            mShopId = (String) args[0];
+        }
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.view_shop_home;
+    }
+
+    @Override
+    public void init() {
+        // 初始化顶部区域
+        mTopSection = findViewById(R.id.ll_top_section);
+        
+        // 初始化商品分类RecyclerView
+        mCategoryRecyclerView = findViewById(R.id.rv_category);
+        if (mCategoryRecyclerView != null) {
+            initCategoryRecyclerView();
+        }
+        
+        // 初始化底部横幅
+        mBottomBanner = findViewById(R.id.ll_bottom_banner);
+        mBannerImage = findViewById(R.id.iv_banner);
+        
+        // 初始化推荐商品区域
+        mRecommendedProducts = findViewById(R.id.ll_recommended_products);
+        mViewAllButton = findViewById(R.id.tv_view_all);
+        mProductsContainer = findViewById(R.id.ll_products_container);
+        
+        // 初始化商品项控件
+        initProductItems();
+        
+        // 设置点击事件 - 只为存在的控件设置
+        if (mBannerImage != null) {
+            mBannerImage.setOnClickListener(this);
+        }
+        if (mViewAllButton != null) {
+            mViewAllButton.setOnClickListener(this);
+        }
+    }
+    
+    private void initCategoryRecyclerView() {
+        // 初始化分类数据
+        mCategoryList = new ArrayList<>();
+        
+        // 设置网格布局管理器,5列
+        GridLayoutManager layoutManager = new GridLayoutManager(mContext, 5, GridLayoutManager.VERTICAL, false);
+        mCategoryRecyclerView.setLayoutManager(layoutManager);
+        
+        // 设置适配器
+        mCategoryAdapter = new ShopHomeCategoryAdapter(mContext, mCategoryList);
+        mCategoryAdapter.setOnItemClickListener(new ShopHomeCategoryAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(GoodsHomeClassBean bean, int position) {
+                onCategoryClick(bean, position);
+            }
+        });
+        mCategoryRecyclerView.setAdapter(mCategoryAdapter);
+    }
+    
+    /**
+     * 初始化商品项控件
+     */
+    private void initProductItems() {
+
+        // 通过ID直接获取每个商品项(include的根视图)
+
+        productItem1 = findViewById(R.id.product_item_1);
+        productItem2 = findViewById(R.id.product_item_2);
+        productItem3 = findViewById(R.id.product_item_3);
+        productItem1.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                onProductItemClick(1);
+            }
+        });
+        productItem2.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                onProductItemClick(2);
+            }
+        });
+        productItem3.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                onProductItemClick(3);
+            }
+        });
+    }
+    
+    /**
+     * 更新推荐商品UI显示
+     */
+    private void updateRecommendedProductsUI() {
+        Log.e("ShopHome", "updateRecommendedProductsUI called, list size: " +
+                (mRecommendedProductList != null ? mRecommendedProductList.size() : "null"));
+        if (mRecommendedProductList != null && mRecommendedProductList.size() > 0) {
+            for (int i = 0; i < Math.min(3, mRecommendedProductList.size()); i++) {
+                GoodsSimpleBean product = mRecommendedProductList.get(i);
+                if (i == 0) {
+                    productItem1.setVisibility(View.VISIBLE);
+                    ImageView img = productItem1.findViewById(R.id.iv_product_image);
+                    TextView name = productItem1.findViewById(R.id.tv_product_name);
+                    TextView price = productItem1.findViewById(R.id.tv_product_price);
+                    ImgLoader.display(mContext, product.getThumb(), img);
+                    name.setText(product.getName());
+                    price.setText("¥" + product.getPrice());
+                } else if (i == 1) {
+                    productItem2.setVisibility(View.VISIBLE);
+                    ImageView img = productItem2.findViewById(R.id.iv_product_image);
+                    TextView name = productItem2.findViewById(R.id.tv_product_name);
+                    TextView price = productItem2.findViewById(R.id.tv_product_price);
+                    ImgLoader.display(mContext, product.getThumb(), img);
+                    name.setText(product.getName());
+                    price.setText("¥" + product.getPrice());
+                } else {
+                    productItem3.setVisibility(View.VISIBLE);
+                    ImageView img = productItem3.findViewById(R.id.iv_product_image);
+                    TextView name = productItem3.findViewById(R.id.tv_product_name);
+                    TextView price = productItem3.findViewById(R.id.tv_product_price);
+                    ImgLoader.display(mContext, product.getThumb(), img);
+                    name.setText(product.getName());
+                    price.setText("¥" + product.getPrice());
+                }
+            }
+        }
+    }
+
+    @Override
+    public void loadData() {
+        if (isFirstLoadData()) {
+            // 加载店铺首页数据
+            loadShopHomeData();
+        }
+    }
+    
+    private void loadShopHomeData() {
+        // 调用API加载店铺首页数据
+        // 包括:排行榜商品、编辑推荐、商品分类、横幅广告等
+        
+        // 示例:加载排行榜图片
+        // ImgLoader.display(mContext, rankingImageUrl, mRankingImage);
+        
+        // 示例:加载编辑推荐图片
+        // ImgLoader.display(mContext, editorPickImageUrl, mEditorPickImage);
+        
+        // 加载分类数据
+        loadCategoryData();
+
+//        loadRecommendedProducts();
+        
+        // 示例:加载横幅广告
+        // ImgLoader.display(mContext, bannerImageUrl, mBannerImage);
+    }
+    
+    private void loadCategoryData() {
+        // 调用getShopGoodsClassidList接口获取店铺商品分类数据
+        MainHttpUtil.getShopGoodsClassidList(mShopId, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                if (code == 0 && info.length > 0) {
+                    try {
+                        // 解析JSON数据
+                        List<GoodsHomeClassBean> list = JSON.parseArray(Arrays.toString(info), GoodsHomeClassBean.class);
+                        
+                        if (list.size() > 0) {
+                            mCategoryList.clear();
+                            mCategoryList.addAll(list);
+                            if (mCategoryAdapter != null) {
+                                mCategoryAdapter.notifyDataSetChanged();
+                            }
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+
+                    }
+                }
+            }
+
+            @Override
+            public void onError() {
+
+            }
+        });
+    }
+    private void loadRecommendedProducts() {
+        // 直接在ViewHolder中调用API获取推荐商品
+        MallHttpUtil.getPlatShop(mShopId, 1, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                JSONObject obj = JSON.parseObject(info[0]);
+                List<GoodsSimpleBean> list = JSON.parseArray(obj.getString("list"), GoodsSimpleBean.class);
+                if (list != null) {
+                    updateRecommendedProducts(list);
+                }
+            }
+        });
+    }
+    
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        // if (id == R.id.iv_ranking) {  // 注释掉
+        //     onRankingClick();
+        // } else if (id == R.id.iv_editor_pick) {  // 注释掉
+        //     onEditorPickClick();
+        // } else 
+        if (id == R.id.iv_banner) {
+            onBannerClick();
+        } else if (id == R.id.tv_view_all) {
+            onViewAllClick();
+        }
+    }
+    
+    private void onRankingClick() {
+        // TODO: 跳转到排行榜页面
+    }
+    
+    private void onEditorPickClick() {
+        // TODO: 跳转到编辑推荐页面
+    }
+    
+    private void onCategoryClick(GoodsHomeClassBean bean, int position) {
+        // 跳转到对应分类的商品列表页面
+//        NewProductListActivity.forward(mContext, bean.getId(), bean.getName());
+        ShopGoodsActivity.forward(mContext, bean.getId(), mShopId, bean.getName());
+    }
+    
+    private void onBannerClick() {
+        // TODO: 处理横幅广告点击事件
+    }
+    
+    /**
+     * 处理"全部"按钮点击事件
+     */
+    private void onViewAllClick() {
+        // TODO: 跳转到推荐商品列表页面
+        // NewProductListActivity.forward(mContext, "recommended", "推荐商品");
+    }
+    
+    /**
+     * 处理商品项点击事件
+     */
+    private void onProductItemClick(int index) {
+        if (mRecommendedProductList != null && index < mRecommendedProductList.size()) {
+            GoodsSimpleBean product = mRecommendedProductList.get(index);
+            // TODO: 跳转到商品详情页面
+//             GoodsDetailActivity.forward(mContext, product.getId());
+
+            RouteUtil.forwardGoodsDetail(mContext,product.getId(), true,product.getType());
+        }
+    }
+
+    @Override
+    public void release() {
+        super.release();
+        // 释放资源
+        mShopId = null;
+        if (mCategoryList != null) {
+            mCategoryList.clear();
+        }
+        if (mRecommendedProductList != null) {
+            mRecommendedProductList.clear();
+        }
+    }
+    
+    /**
+     * 更新店铺首页数据
+     */
+    public void updateShopHomeData(String shopId) {
+        mShopId = shopId;
+        loadShopHomeData();
+    }
+    
+    /**
+     * 更新分类数据
+     */
+    public void updateCategoryData(List<GoodsHomeClassBean> categoryList) {
+        if (categoryList != null && mCategoryList != null) {
+            mCategoryList.clear();
+            mCategoryList.addAll(categoryList);
+            if (mCategoryAdapter != null) {
+                mCategoryAdapter.notifyDataSetChanged();
+            }
+        }
+    }
+    
+    /**
+     * 更新推荐商品数据
+     */
+    public void updateRecommendedProducts(List<GoodsSimpleBean> productList) {
+        if (productList != null) {
+            mRecommendedProductList = new ArrayList<>(productList);
+            updateRecommendedProductsUI();
+        }
+    }
+}

+ 67 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/views/ShopReviewViewHolder.java

@@ -0,0 +1,67 @@
+package com.yunbao.main.views;
+
+import android.content.Context;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.custom.ItemDecoration;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.main.R;
+
+/**
+ * 店铺评价ViewHolder
+ */
+public class ShopReviewViewHolder extends AbsMainViewHolder {
+
+    private RecyclerView mRecyclerView;
+    private CommonRefreshView mRefreshView;
+    private TextView mEmptyTip;
+    private String mShopId;
+
+    public ShopReviewViewHolder(Context context, ViewGroup parentView, String shopId) {
+        super(context, parentView, shopId);
+        mShopId = shopId;
+    }
+
+    @Override
+    protected void processArguments(Object... args) {
+        if (args != null && args.length > 0) {
+            mShopId = (String) args[0];
+        }
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.view_shop_review;
+    }
+
+    @Override
+    public void init() {
+        mRefreshView = findViewById(R.id.refreshView);
+        mEmptyTip = findViewById(R.id.tv_empty_tip);
+        
+        ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, DpUtil.dp2px(1), 0);
+        decoration.setOnlySetItemOffsetsButNoDraw(true);
+        mRefreshView.setItemDecoration(decoration);
+        mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
+        
+        // TODO: 设置适配器和数据加载
+    }
+
+    @Override
+    public void loadData() {
+        if (isFirstLoadData()) {
+            // TODO: 加载店铺评价数据
+        }
+    }
+
+    @Override
+    public void release() {
+        super.release();
+        // TODO: 释放资源
+    }
+}

+ 4 - 0
ybvideoandroid/main/src/main/res/drawable/bg_search_shop.xml

@@ -0,0 +1,4 @@
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#EDEDED"/>
+    <corners android:radius="5dp"/>
+</shape>

+ 5 - 0
ybvideoandroid/main/src/main/res/drawable/bg_status_tag.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke android:width="1dp" android:color="#FF9800" />
+    <corners android:radius="2dp" />
+</shape>

+ 156 - 0
ybvideoandroid/main/src/main/res/layout/activity_new_product_list.xml

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:background="#f5f5f5">
+
+    <FrameLayout
+        android:id="@+id/fl_top"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:paddingTop="19dp">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="46dp">
+
+            <TextView
+                android:id="@+id/titleView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_centerHorizontal="true"
+                android:gravity="center"
+                android:paddingLeft="50dp"
+                android:paddingRight="50dp"
+                android:text="商品分类"
+                android:textColor="@color/black"
+                android:textSize="18sp"
+                android:textStyle="bold" />
+
+            <ImageView
+                android:id="@+id/btn_back_arrow"
+                android:layout_width="40dp"
+                android:layout_height="40dp"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="5dp"
+                android:onClick="backClick"
+                android:padding="10dp"
+                android:src="@mipmap/icon_back"
+                android:background="?android:attr/selectableItemBackgroundBorderless" />
+
+        </RelativeLayout>
+
+    </FrameLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="6dp"
+        android:background="@color/white"
+        android:orientation="horizontal"
+        android:paddingLeft="15dp"
+        android:paddingRight="10dp"
+        android:paddingBottom="6dp">
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/bg_main_mall_search"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:layout_width="17dp"
+                android:layout_height="17dp"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="10dp"
+                android:src="@mipmap/icon_main_search" />
+
+            <EditText
+                android:id="@+id/edit"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@null"
+                android:gravity="center_vertical"
+                android:hint="@string/mall_387"
+                android:imeActionLabel="@string/search"
+                android:imeOptions="actionSearch"
+                android:paddingLeft="10dp"
+                android:paddingRight="15dp"
+                android:singleLine="true"
+                android:textColor="@color/textColorBlack"
+                android:textColorHint="#7D7D7D"
+                android:textSize="13sp" />
+
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/btn_back"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:onClick="backClick"
+            android:text=""
+            android:textColor="@color/gray1"
+            android:textSize="14sp" />
+
+    </LinearLayout>
+
+    <!-- 一级分类使用MagicIndicator替换原来的HorizontalScrollView -->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:orientation="vertical">
+
+        <net.lucode.hackware.magicindicator.MagicIndicator
+            android:id="@+id/indicator_first_category"
+            android:layout_width="match_parent"
+            android:layout_height="44dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="10dp" />
+
+        <!-- 分割线 -->
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="0.5dp"
+            android:background="#E5E5E5" />
+
+    </LinearLayout>
+
+    <!-- 二级分类网格布局 - 保持不变 -->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:orientation="vertical"
+        android:paddingTop="15dp"
+        android:paddingBottom="15dp">
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_second_category"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:paddingLeft="15dp"
+            android:paddingRight="15dp"
+            android:overScrollMode="never" />
+
+    </LinearLayout>
+
+    <!-- 分割线 -->
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="8dp"
+        android:background="#f5f5f5" />
+
+    <com.yunbao.common.custom.CommonRefreshView
+        android:id="@+id/refreshView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        app:crv_refreshEnable="false"
+        app:crv_textColor="@color/textColorBlack" />
+
+</LinearLayout>

+ 64 - 0
ybvideoandroid/main/src/main/res/layout/activity_shop_goods.xml

@@ -0,0 +1,64 @@
+<?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:orientation="vertical"
+    android:background="@color/gray6">
+
+    <com.yunbao.common.custom.StatusBarView
+        android:layout_width="match_parent"
+        android:layout_height="0dp"/>
+
+    <!-- 标题栏 -->
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:background="@color/white">
+
+        <ImageView
+            android:id="@+id/btn_back"
+            android:layout_width="44dp"
+            android:layout_height="44dp"
+            android:layout_alignParentLeft="true"
+            android:layout_centerVertical="true"
+            android:padding="12dp"
+            android:src="@mipmap/icon_back"
+            android:onClick="backClick" />
+
+        <TextView
+            android:id="@+id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:text="店铺商品"
+            android:textColor="@color/black1"
+            android:textSize="16sp"
+            android:textStyle="bold" />
+
+    </RelativeLayout>
+
+    <!-- 商品列表内容 -->
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <com.yunbao.common.custom.CommonRefreshView
+            android:id="@+id/refreshView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:paddingLeft="5dp"
+            android:paddingRight="5dp"/>
+
+        <TextView
+            android:id="@+id/tv_empty_tip"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:text="暂无商品"
+            android:textSize="14sp"
+            android:textColor="@color/gray3"
+            android:visibility="gone" />
+
+    </FrameLayout>
+
+</LinearLayout>

+ 394 - 0
ybvideoandroid/main/src/main/res/layout/activity_shop_info.xml

@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:background="@color/white">
+
+    <FrameLayout
+        android:background="@drawable/bg_nav"
+        android:id="@+id/fl_top"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="19dp">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="46dp">
+
+            <ImageView
+                android:id="@+id/btn_back"
+                android:layout_width="40dp"
+                android:layout_height="40dp"
+                android:layout_centerVertical="true"
+                android:layout_alignParentLeft="true"
+                android:onClick="backClick"
+                android:padding="9dp"
+                android:src="@mipmap/icon_back"
+                app:tint="@color/textColorBlack" />
+
+            <TextView
+                android:id="@+id/titleView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_centerHorizontal="true"
+                android:gravity="center"
+                android:paddingLeft="20dp"
+                android:paddingRight="20dp"
+                android:textColor="@color/textColorBlack"
+                android:textSize="18sp"
+                android:textStyle="bold" />
+
+        </RelativeLayout>
+    </FrameLayout>
+
+
+    <!-- 店铺信息区域 -->
+    <!-- 店铺信息区域 -->
+<!--    <LinearLayout-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:orientation="vertical"-->
+<!--        android:padding="15dp"-->
+<!--        android:background="@color/white">-->
+
+<!--        &lt;!&ndash; 店铺基本信息 &ndash;&gt;-->
+<!--        <LinearLayout-->
+<!--            android:layout_width="match_parent"-->
+<!--            android:layout_height="wrap_content"-->
+<!--            android:orientation="horizontal"-->
+<!--            android:gravity="center_vertical">-->
+
+<!--            &lt;!&ndash; 店铺头像 &ndash;&gt;-->
+<!--            <com.makeramen.roundedimageview.RoundedImageView-->
+<!--                android:id="@+id/iv_shop_avatar"-->
+<!--                android:layout_width="60dp"-->
+<!--                android:layout_height="60dp"-->
+<!--                android:scaleType="centerCrop"-->
+<!--                app:riv_corner_radius="8dp"-->
+<!--                android:src="@mipmap/ic_haha_yuyan" />-->
+
+<!--            &lt;!&ndash; 店铺信息 &ndash;&gt;-->
+<!--            <LinearLayout-->
+<!--                android:layout_width="0dp"-->
+<!--                android:layout_height="wrap_content"-->
+<!--                android:layout_weight="1"-->
+<!--                android:layout_marginLeft="12dp"-->
+<!--                android:orientation="vertical">-->
+
+<!--                &lt;!&ndash; 品牌标签和店铺名称 &ndash;&gt;-->
+<!--                <LinearLayout-->
+<!--                    android:layout_width="match_parent"-->
+<!--                    android:layout_height="wrap_content"-->
+<!--                    android:orientation="horizontal"-->
+<!--                    android:gravity="center_vertical">-->
+
+<!--                    <TextView-->
+<!--                        android:id="@+id/tv_shop_tag"-->
+<!--                        android:layout_width="wrap_content"-->
+<!--                        android:layout_height="wrap_content"-->
+<!--                        android:text="品牌"-->
+<!--                        android:textColor="#FFFFFF"-->
+<!--                        android:textSize="10sp"-->
+<!--                        android:background="@drawable/bg_brand_tag"-->
+<!--                        android:paddingHorizontal="6dp"-->
+<!--                        android:paddingVertical="2dp" />-->
+
+<!--                    <TextView-->
+<!--                        android:id="@+id/tv_shop_name"-->
+<!--                        android:layout_width="0dp"-->
+<!--                        android:layout_height="wrap_content"-->
+<!--                        android:layout_weight="1"-->
+<!--                        android:text="青岛啤酒新鲜直送..."-->
+<!--                        android:textSize="16sp"-->
+<!--                        android:textColor="@color/black1"-->
+<!--                        android:textStyle="bold"-->
+<!--                        android:maxLines="1"-->
+<!--                        android:ellipsize="end"-->
+<!--                        android:layout_marginLeft="6dp"/>-->
+
+<!--&lt;!&ndash;                    <TextView&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:id="@+id/tv_shop_status"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:layout_width="wrap_content"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:layout_height="wrap_content"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:text="老顾客了"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:textSize="12sp"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:textColor="#FF9800"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:background="@drawable/bg_status_tag"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:paddingHorizontal="6dp"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:paddingVertical="2dp" />&ndash;&gt;-->
+
+<!--                </LinearLayout>-->
+
+<!--                &lt;!&ndash; 评分和服务信息 &ndash;&gt;-->
+<!--                <LinearLayout-->
+<!--                    android:layout_width="match_parent"-->
+<!--                    android:layout_height="wrap_content"-->
+<!--                    android:layout_marginTop="8dp"-->
+<!--                    android:orientation="horizontal"-->
+<!--                    android:gravity="center_vertical">-->
+
+<!--                    <TextView-->
+<!--                        android:layout_width="wrap_content"-->
+<!--                        android:layout_height="wrap_content"-->
+<!--                        android:text="评分"-->
+<!--                        android:textColor="#999999"-->
+<!--                        android:textSize="12sp" />-->
+
+<!--                    <TextView-->
+<!--                        android:id="@+id/tv_shop_rating"-->
+<!--                        android:layout_width="wrap_content"-->
+<!--                        android:layout_height="wrap_content"-->
+<!--                        android:text="5.0"-->
+<!--                        android:textColor="#333333"-->
+<!--                        android:textSize="14sp"-->
+<!--                        android:textStyle="bold"-->
+<!--                        android:layout_marginLeft="4dp" />-->
+
+<!--                    <TextView-->
+<!--                        android:layout_width="wrap_content"-->
+<!--                        android:layout_height="wrap_content"-->
+<!--                        android:text="总售量:"-->
+<!--                        android:textColor="#999999"-->
+<!--                        android:textSize="12sp"-->
+<!--                        android:layout_marginLeft="16dp" />-->
+
+<!--                    <TextView-->
+<!--                        android:id="@+id/tv_monthly_sales"-->
+<!--                        android:layout_width="wrap_content"-->
+<!--                        android:layout_height="wrap_content"-->
+<!--                        android:text="600+"-->
+<!--                        android:textColor="#333333"-->
+<!--                        android:textSize="14sp"-->
+<!--                        android:textStyle="bold"-->
+<!--                        android:layout_marginLeft="4dp" />-->
+
+<!--&lt;!&ndash;                    <TextView&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:layout_width="wrap_content"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:layout_height="wrap_content"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:text="35分钟"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:textColor="#333333"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:textSize="14sp"&ndash;&gt;-->
+<!--&lt;!&ndash;                        android:layout_marginLeft="16dp" />&ndash;&gt;-->
+<!--                    -->
+<!--                </LinearLayout>-->
+
+<!--            </LinearLayout>-->
+
+<!--        </LinearLayout>-->
+
+<!--    </LinearLayout>-->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:orientation="vertical"
+        app:layout_scrollFlags="scroll">
+
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="80dp"
+            android:paddingLeft="15dp"
+            android:paddingRight="10dp">
+
+
+            <com.makeramen.roundedimageview.RoundedImageView
+                android:id="@+id/avatar"
+                android:layout_width="50dp"
+                android:layout_height="50dp"
+                android:layout_gravity="center_vertical"
+                android:scaleType="centerCrop"
+                app:riv_oval="true" />
+
+            <LinearLayout
+                android:id="@+id/btn_cert"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="66dp"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/textColorBlack"
+                    android:textSize="15sp"
+                    android:textStyle="bold" />
+
+                <ImageView
+                    android:layout_width="10dp"
+                    android:layout_height="14dp"
+                    android:layout_marginLeft="12dp"
+                    android:scaleType="fitXY"
+                    android:src="@mipmap/arrow_01"
+                    app:tint="#DCDCDC" />
+
+            </LinearLayout>
+
+
+            <ImageView
+                android:id="@+id/btn_kefu"
+                android:layout_width="38dp"
+                android:layout_height="38dp"
+                android:layout_gravity="center_vertical|right"
+                android:padding="5dp"
+                android:src="@mipmap/shop_05" />
+
+
+        </FrameLayout>
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="64dp"
+            android:layout_marginLeft="15dp"
+            android:layout_marginTop="3dp"
+            android:layout_marginRight="15dp"
+            android:background="#fafafa"
+            android:gravity="center_vertical">
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="center_horizontal"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/sale_num_all"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/textColor2"
+                    android:textSize="13sp"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/tv_1"
+                    android:gravity="center_horizontal"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="8dp"
+                    android:text="@string/mall_127"
+                    android:textColor="@color/gray3"
+                    android:textSize="13sp" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="1dp"
+                android:layout_height="20dp"
+                android:background="#C6C6C6" />
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="center_horizontal"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/goods_quality"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/textColor2"
+                    android:textSize="13sp"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/tv_2"
+                    android:gravity="center_horizontal"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="8dp"
+                    android:text="@string/mall_128"
+                    android:textColor="@color/gray3"
+                    android:textSize="13sp" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="center_horizontal"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/taidu_fuwu"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/textColor2"
+                    android:textSize="13sp"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/tv_3"
+                    android:gravity="center_horizontal"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="8dp"
+                    android:text="@string/mall_129"
+                    android:textColor="@color/gray3"
+                    android:textSize="13sp" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="center_horizontal"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/taidu_wuliu"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/textColor2"
+                    android:textSize="13sp"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/tv_4"
+                    android:gravity="center_horizontal"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="8dp"
+                    android:text="@string/mall_130"
+                    android:textColor="@color/gray3"
+                    android:textSize="13sp" />
+
+            </LinearLayout>
+        </LinearLayout>
+
+        <!--                    <Space-->
+        <!--                        android:layout_width="0dp"-->
+        <!--                        android:layout_height="0dp"-->
+        <!--                        android:layout_weight="1" />-->
+
+    </LinearLayout>
+
+    <!-- 分割线 -->
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="8dp"
+        android:background="@color/gray6" />
+
+    <!-- ViewPager指示器 -->
+    <net.lucode.hackware.magicindicator.MagicIndicator
+        android:id="@+id/indicator"
+        android:layout_width="match_parent"
+        android:layout_height="45dp"
+        android:background="@color/white" />
+
+    <!-- ViewPager -->
+    <androidx.viewpager.widget.ViewPager
+        android:id="@+id/view_pager"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1" />
+
+</LinearLayout>

+ 31 - 0
ybvideoandroid/main/src/main/res/layout/item_first_category.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:gravity="center"
+    android:padding="8dp"
+    android:background="?android:attr/selectableItemBackground">
+
+    <TextView
+        android:id="@+id/tv_category_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="14sp"
+        android:textColor="@color/gray1"
+        android:paddingLeft="12dp"
+        android:paddingRight="12dp"
+        android:paddingTop="6dp"
+        android:paddingBottom="6dp"
+        android:text="推荐" />
+
+    <!-- 底部指示线 -->
+    <View
+        android:id="@+id/view_indicator"
+        android:layout_width="match_parent"
+        android:layout_height="2dp"
+        android:layout_marginTop="4dp"
+        android:background="@android:color/black"
+        android:visibility="invisible" />
+
+</LinearLayout>

+ 28 - 143
ybvideoandroid/main/src/main/res/layout/item_main_shop_rural.xml

@@ -2,17 +2,19 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
+    android:layout_height="match_parent"
     android:orientation="vertical"
-    android:background="#F5F5F5">
+    android:background="#FFFFFF"
+    android:paddingBottom="48dp">
 
     <!-- 顶部地区选择和搜索栏 -->
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="36dp"
         android:orientation="horizontal"
-        android:padding="12dp"
-        android:background="#FFFFFF"
+        android:layout_marginLeft="15dp"
+        android:layout_marginRight="15dp"
+        android:background="@drawable/bg_search_shop"
         android:gravity="center_vertical">
 
         <!-- 地区选择 -->
@@ -36,10 +38,18 @@
                 android:layout_width="12dp"
                 android:layout_height="12dp"
                 android:layout_marginStart="4dp"
-                android:background="#CCCCCC" />
+                android:src="@mipmap/ic_arrow_down1" />
 
         </LinearLayout>
 
+        <View
+            android:layout_width="1dp"
+            android:layout_height="match_parent"
+            android:background="#707070"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="10dp"
+            android:layout_marginLeft="12dp"
+            />
         <!-- 搜索框 -->
         <LinearLayout
             android:layout_width="0dp"
@@ -54,14 +64,17 @@
             <ImageView
                 android:layout_width="16dp"
                 android:layout_height="16dp"
-                android:background="#CCCCCC" />
+                android:src="@mipmap/search_01" />
 
-            <TextView
+            <EditText
+                android:id="@+id/edit_shop_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginStart="8dp"
-                android:text="寻找好货"
-                android:textColor="#999999"
+                android:hint="输入商家名"
+                android:background="@android:color/transparent"
+                android:textColorHint="#999999"
+                android:textColor="#333333"
                 android:textSize="12sp" />
 
         </LinearLayout>
@@ -86,140 +99,12 @@
 
     </HorizontalScrollView>
 
-    <!-- 推荐商品卡片 -->
-    <LinearLayout
+    <!-- 商家列表 - 使用CommonRefreshView支持下拉刷新和上拉加载更多 -->
+    <com.yunbao.common.custom.CommonRefreshView
+        android:id="@+id/refresh_view"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:background="#FFFFFF"
-        android:padding="12dp"
+        android:layout_height="match_parent"
         android:layout_marginTop="8dp"
-        android:gravity="center_vertical">
-
-        <!-- 商品图片 -->
-        <ImageView
-            android:layout_width="60dp"
-            android:layout_height="60dp"
-            android:src="@mipmap/pijiu1" />
-
-        <!-- 商品信息 -->
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:layout_marginStart="12dp"
-            android:orientation="vertical">
-
-            <!-- 标签和标题 -->
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:gravity="center_vertical">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="品牌"
-                    android:textColor="#FFFFFF"
-                    android:textSize="10sp"
-                    android:background="#FFB300"
-                    android:paddingHorizontal="4dp"
-                    android:paddingVertical="2dp" />
-
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:layout_marginStart="8dp"
-                    android:text="青岛啤酒新鲜直送..."
-                    android:textColor="#333333"
-                    android:textSize="14sp"
-                    android:maxLines="1"
-                    android:ellipsize="end" />
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="零售价"
-                    android:textColor="#FF6B35"
-                    android:textSize="10sp"
-                    android:background="#FFF0ED"
-                    android:paddingHorizontal="4dp"
-                    android:paddingVertical="2dp" />
-
-            </LinearLayout>
-
-            <!-- 商品详情 -->
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="4dp"
-                android:text="起步价¥0 | 配送费¥5 | 19分钟 | 2600.3km"
-                android:textColor="#999999"
-                android:textSize="12sp" />
-
-        </LinearLayout>
-
-    </LinearLayout>
-
-    <!-- 导航栏和ViewPager容器 -->
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:background="#FFFFFF"
-        android:layout_marginTop="8dp">
-
-        <!-- 导航栏 -->
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:paddingVertical="12dp"
-            android:gravity="start"
-            android:paddingStart="16dp">
-
-            <TextView
-                android:id="@+id/tv_nav_home"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="首页"
-                android:textColor="#333333"
-                android:textSize="18sp"
-                android:textStyle="bold"
-                android:layout_marginEnd="24dp"
-                android:padding="8dp" />
-
-            <TextView
-                android:id="@+id/tv_nav_all_goods"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="推荐"
-                android:textColor="#333333"
-                android:textSize="14sp"
-                android:layout_marginEnd="24dp"
-                android:padding="8dp" />
-
-            <TextView
-                android:id="@+id/tv_nav_review"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="评价"
-                android:textColor="#333333"
-                android:textSize="14sp"
-                android:padding="8dp" />
-
-        </LinearLayout>
-
-        <!-- ViewPager -->
-        <androidx.viewpager2.widget.ViewPager2
-            android:id="@+id/vp_content"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
-
-    </LinearLayout>
-
-
+        android:background="#F5F5F5" />
 
 </LinearLayout>

+ 40 - 0
ybvideoandroid/main/src/main/res/layout/item_recommended_product.xml

@@ -0,0 +1,40 @@
+<?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="wrap_content"
+    android:orientation="vertical"
+    android:padding="8dp"
+    android:background="?android:attr/selectableItemBackground">
+
+    <!-- 商品图片 -->
+    <ImageView
+        android:id="@+id/iv_product_image"
+        android:layout_width="match_parent"
+        android:layout_height="120dp"
+        android:scaleType="centerCrop"
+        android:background="#f5f5f5"
+        android:layout_marginBottom="8dp" />
+
+    <!-- 商品名称 -->
+    <TextView
+        android:id="@+id/tv_product_name"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text=""
+        android:textSize="14sp"
+        android:textColor="#333333"
+        android:maxLines="2"
+        android:ellipsize="end"
+        android:layout_marginBottom="4dp" />
+
+    <!-- 商品价格 -->
+    <TextView
+        android:id="@+id/tv_product_price"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text=""
+        android:textSize="16sp"
+        android:textColor="#ff4444"
+        android:textStyle="bold" />
+
+</LinearLayout>

+ 28 - 0
ybvideoandroid/main/src/main/res/layout/item_second_category.xml

@@ -0,0 +1,28 @@
+<?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="wrap_content"
+    android:orientation="vertical"
+    android:gravity="center"
+    android:padding="8dp"
+    android:background="?android:attr/selectableItemBackground">
+
+    <ImageView
+        android:id="@+id/iv_category_icon"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:scaleType="centerCrop"
+        android:src="@mipmap/ic_launcher" />
+
+    <TextView
+        android:id="@+id/tv_category_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:textSize="12sp"
+        android:textColor="@color/gray1"
+        android:maxLines="1"
+        android:ellipsize="end"
+        android:text="乳品冲饮" />
+
+</LinearLayout>

+ 86 - 0
ybvideoandroid/main/src/main/res/layout/item_shop_list.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:background="#FFFFFF"
+    android:padding="12dp"
+    android:layout_marginTop="8dp"
+    android:gravity="center_vertical">
+
+    <!-- 商家图片 -->
+    <com.makeramen.roundedimageview.RoundedImageView
+        android:id="@+id/iv_shop_image"
+        android:layout_width="60dp"
+        android:layout_height="60dp"
+        android:scaleType="centerCrop"
+        app:riv_corner_radius="10dp"
+        />
+
+    <!-- 商家信息 -->
+    <LinearLayout
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginStart="12dp"
+        android:orientation="vertical">
+
+        <!-- 标签和标题 -->
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:gravity="center_vertical">
+
+            <TextView
+                android:id="@+id/tv_shop_tag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="品牌"
+                android:textColor="#FFFFFF"
+                android:textSize="10sp"
+                android:background="#FFB300"
+                android:paddingHorizontal="4dp"
+                android:paddingVertical="2dp" />
+
+            <TextView
+                android:id="@+id/tv_shop_name"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:layout_marginStart="8dp"
+                android:text=""
+                android:textColor="#333333"
+                android:textSize="14sp"
+                android:textStyle="bold"
+                android:maxLines="1"
+                android:ellipsize="end" />
+
+            <TextView
+                android:id="@+id/tv_price_tag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="零售价"
+                android:textColor="#FF6B35"
+                android:textSize="10sp"
+                android:background="#FFF0ED"
+                android:paddingHorizontal="4dp"
+                android:paddingVertical="2dp"
+                android:visibility="gone"/>
+
+        </LinearLayout>
+
+        <!-- 商家详情 -->
+        <TextView
+            android:id="@+id/tv_shop_detail"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="4dp"
+            android:text="起步价¥0 | 配送费¥5 | 19分钟 | 2600.3km"
+            android:textColor="#999999"
+            android:textSize="12sp" />
+
+    </LinearLayout>
+
+</LinearLayout>

+ 36 - 0
ybvideoandroid/main/src/main/res/layout/view_live_square.xml

@@ -0,0 +1,36 @@
+<?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:orientation="vertical"
+android:paddingBottom="70dp"
+android:background="@color/white">
+
+<FrameLayout
+    android:background="@color/white"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingBottom="46dp">
+
+    <com.yunbao.common.custom.StatusBarView
+        android:layout_width="match_parent"
+        android:layout_height="0dp" />
+</FrameLayout>
+
+<View
+    android:layout_width="match_parent"
+    android:layout_height="46dp"/>
+
+<com.yunbao.common.custom.CommonRefreshView
+    android:id="@+id/refreshView"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_marginLeft="10dp"
+    android:layout_marginRight="10dp"/>
+
+<!--    <View-->
+<!--        android:layout_width="match_parent"-->
+<!--        android:layout_height="150dp"-->
+<!--        android:background="@drawable/bg_shadow_top"-->
+<!--        />-->
+</LinearLayout>

+ 62 - 0
ybvideoandroid/main/src/main/res/layout/view_main.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:background="@color/white">
+
+    <com.yunbao.common.custom.MyViewPager
+        android:id="@+id/viewPager"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        app:canScroll="false"
+        />
+
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <com.yunbao.common.custom.StatusBarView
+            android:layout_width="match_parent"
+            android:layout_height="0dp"/>
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="46dp"/>
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="46dp"
+            android:gravity="center_vertical"
+            >
+
+            <!--            <ImageView-->
+            <!--                android:id="@+id/btn_live_square"-->
+            <!--                android:layout_width="46dp"-->
+            <!--                android:layout_height="46dp"-->
+            <!--                android:onClick="mainClick"-->
+            <!--                android:layout_marginLeft="10dp"-->
+            <!--                app:tint="@color/black"-->
+            <!--                android:padding="10dp"-->
+            <!--                android:src="@mipmap/icon_live_square"-->
+            <!--                />-->
+<!--            <View-->
+<!--                android:layout_width="match_parent"-->
+<!--                android:layout_height="72dp"-->
+<!--                />-->
+            <net.lucode.hackware.magicindicator.MagicIndicator
+                android:id="@+id/indicator"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:layout_marginLeft="15dp"
+                android:layout_marginRight="15dp"
+                android:layout_height="36dp"
+                />
+        </LinearLayout>
+
+
+    </LinearLayout>
+
+</FrameLayout>
+

+ 3 - 0
ybvideoandroid/main/src/main/res/layout/view_main_home_hot.xml

@@ -17,6 +17,9 @@
             android:layout_height="0dp" />
     </FrameLayout>
 
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="46dp"/>
 
     <com.yunbao.common.custom.CommonRefreshView
         android:id="@+id/refreshView"

+ 4 - 0
ybvideoandroid/main/src/main/res/layout/view_main_home_news.xml

@@ -18,6 +18,10 @@
             android:layout_height="0dp" />
     </FrameLayout>
 
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="46dp"/>
+
     <com.scwang.smart.refresh.layout.SmartRefreshLayout
         android:id="@+id/refreshLayout"
         android:layout_width="match_parent"

+ 24 - 0
ybvideoandroid/main/src/main/res/layout/view_shop_goods.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/gray6">
+
+    <com.yunbao.common.custom.CommonRefreshView
+        android:id="@+id/refreshView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:paddingLeft="5dp"
+        android:paddingRight="5dp"/>
+
+    <TextView
+        android:id="@+id/tv_empty_tip"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:text="暂无商品"
+        android:textSize="14sp"
+        android:textColor="@color/gray3"
+        android:visibility="gone" />
+
+</FrameLayout>

+ 278 - 0
ybvideoandroid/main/src/main/res/layout/view_shop_home.xml

@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:id="@+id/ll_top_section"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:layout_marginBottom="16dp"
+            android:visibility="gone">
+
+            <!-- 排行榜 -->
+            <LinearLayout
+                android:id="@+id/ll_category_ranking"
+                android:layout_width="0dp"
+                android:layout_height="80dp"
+                android:layout_weight="1"
+                android:orientation="horizontal"
+                android:background="#FFFFFF"
+                android:padding="12dp">
+
+                <!-- 左侧文字区域 -->
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:orientation="vertical"
+                    android:gravity="start|center_vertical">
+
+                    <!-- 皇冠图标+排行榜 -->
+                    <LinearLayout
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:orientation="horizontal"
+                        android:gravity="center_vertical">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="👑"
+                            android:textSize="16sp"
+                            android:layout_marginEnd="4dp" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="排行榜"
+                            android:textColor="#333333"
+                            android:textSize="14sp"
+                            android:textStyle="bold" />
+
+                    </LinearLayout>
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="4dp"
+                        android:text="每日更新"
+                        android:textColor="#999999"
+                        android:textSize="11sp" />
+
+                </LinearLayout>
+
+                <!-- 右侧商品图片 -->
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:orientation="horizontal"
+                    android:gravity="center_vertical">
+
+                    <ImageView
+                        android:layout_width="28dp"
+                        android:layout_height="28dp"
+                        android:src="@mipmap/lishi1"
+                        android:layout_marginEnd="4dp" />
+
+                    <ImageView
+                        android:layout_width="28dp"
+                        android:layout_height="28dp"
+                        android:src="@mipmap/linshi2" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <!-- 分割线 -->
+            <View
+                android:layout_width="1dp"
+                android:layout_height="60dp"
+                android:layout_gravity="center_vertical"
+                android:background="#E0E0E0" />
+
+            <!-- 小编推荐 -->
+            <LinearLayout
+                android:id="@+id/ll_category_recommend"
+                android:layout_width="0dp"
+                android:layout_height="80dp"
+                android:layout_weight="1"
+                android:orientation="horizontal"
+                android:background="#FFFFFF"
+                android:padding="12dp">
+
+                <!-- 左侧文字区域 -->
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:orientation="vertical"
+                    android:gravity="start|center_vertical">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="小编推荐"
+                        android:textColor="#333333"
+                        android:textSize="14sp"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="4dp"
+                        android:text="精选好货"
+                        android:textColor="#999999"
+                        android:textSize="11sp" />
+
+                </LinearLayout>
+
+                <!-- 右侧商品图片 -->
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:orientation="horizontal"
+                    android:gravity="center_vertical">
+
+                    <ImageView
+                        android:layout_width="28dp"
+                        android:layout_height="28dp"
+                        android:src="@mipmap/linshi3"
+                        android:layout_marginEnd="4dp" />
+
+                    <ImageView
+                        android:layout_width="28dp"
+                        android:layout_height="28dp"
+                        android:background="#9C27B0"
+                        android:src="@mipmap/linshi4"/>
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+
+        <!-- 商品分类RecyclerView -->
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_category"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="15dp"
+            android:layout_marginLeft="15dp"
+            android:layout_marginRight="15dp"
+            android:nestedScrollingEnabled="false" />
+
+        <!-- 底部广告横幅区域 -->
+        <LinearLayout
+            android:id="@+id/ll_bottom_banner"
+            android:layout_width="match_parent"
+            android:layout_height="100dp"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="15dp"
+            android:layout_marginRight="15dp"
+            android:orientation="vertical"
+            android:visibility="gone">
+
+            <ImageView
+                android:id="@+id/iv_banner"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:scaleType="centerCrop"
+                android:background="@drawable/bg_gray_round_1"
+                android:src="@mipmap/pijiu1" />
+
+        </LinearLayout>
+
+        <!-- 推荐商品区域 -->
+        <LinearLayout
+            android:id="@+id/ll_recommended_products"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            android:layout_marginLeft="15dp"
+            android:layout_marginRight="15dp"
+            android:layout_marginBottom="20dp"
+            android:orientation="vertical"
+            android:background="@color/white">
+
+            <!-- 标题栏 -->
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingVertical="12dp">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentStart="true"
+                    android:layout_centerVertical="true"
+                    android:text="推荐商品"
+                    android:textColor="#333333"
+                    android:textSize="16sp"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/tv_view_all"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentEnd="true"
+                    android:layout_centerVertical="true"
+                    android:text="全部"
+                    android:textColor="#999999"
+                    android:textSize="14sp"
+                    android:background="?android:attr/selectableItemBackground"
+                    android:padding="8dp"
+                    android:visibility="gone"/>
+
+            </RelativeLayout>
+
+            <!-- 商品展示区域 -->
+            <LinearLayout
+                android:id="@+id/ll_products_container"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:weightSum="3">
+
+                <!-- 商品1 -->
+                <include
+                    android:id="@+id/product_item_1"
+                    layout="@layout/item_recommended_product"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:visibility="gone"/>
+
+                <!-- 商品2 -->
+                <include
+                    android:id="@+id/product_item_2"
+                    layout="@layout/item_recommended_product"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:visibility="gone"/>
+
+                <!-- 商品3 -->
+                <include
+                    android:id="@+id/product_item_3"
+                    layout="@layout/item_recommended_product"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:visibility="gone"/>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+</ScrollView>

+ 22 - 0
ybvideoandroid/main/src/main/res/layout/view_shop_review.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/gray6">
+
+    <com.yunbao.common.custom.CommonRefreshView
+        android:id="@+id/refreshView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
+    <TextView
+        android:id="@+id/tv_empty_tip"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:text="暂无评价"
+        android:textSize="14sp"
+        android:textColor="@color/gray3"
+        android:visibility="gone" />
+
+</FrameLayout>

BIN
ybvideoandroid/main/src/main/res/mipmap-mdpi/ic_arrow_down1.png


BIN
ybvideoandroid/main/src/main/res/mipmap-mdpi/ic_arrow_up.png


+ 4 - 0
ybvideoandroid/main/src/main/res/values/ids.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <item name="tag_position" type="id" />
+</resources>

+ 161 - 8
ybvideoandroid/mall/src/main/java/com/yunbao/mall/activity/ShopApplyActivity.java

@@ -9,6 +9,10 @@ import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import androidx.appcompat.app.AlertDialog;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.yunbao.common.CommonAppConfig;
@@ -31,7 +35,9 @@ import com.yunbao.common.utils.StringUtil;
 import com.yunbao.common.utils.ToastUtil;
 import com.yunbao.common.utils.WordUtil;
 import com.yunbao.mall.R;
+import com.yunbao.mall.adapter.ShopTypeClassAdapter;
 import com.yunbao.mall.bean.ManageClassBean;
+import com.yunbao.mall.bean.ShopTypeBean;
 import com.yunbao.mall.http.MallHttpConsts;
 import com.yunbao.mall.http.MallHttpUtil;
 
@@ -60,6 +66,9 @@ public class ShopApplyActivity extends AbsActivity {
 
     private TextView mName;//姓名
     private TextView mCardNo;//身份证号
+    private EditText mShopName;// 店铺名
+    private ImageView mImgLogo; // 店铺logo
+    private TextView mTypeClassName; // 店铺类型
     private TextView mManageClassName;//经营类目
     private EditText mManageName;//经营者名字
     private EditText mManagePhoneNum;//经营者手机号
@@ -77,7 +86,7 @@ public class ShopApplyActivity extends AbsActivity {
     private ImageView mImgOther;//其他证件
     private ImageView mTargetImageView;
     private TextView mTargetArea;
-
+    private List<ShopTypeBean> mShopTypeClassList;// 商户类型
     private List<ManageClassBean> mManageClassList;//经营类目
     private String mProvinceVal;//经营者所在省
     private String mCityVal;//经营者所在市
@@ -87,9 +96,13 @@ public class ShopApplyActivity extends AbsActivity {
     private String mRefundZoneVal;//退货人所在区
     private File mImgLicenseFile;//营业执照图片
     private File mImgOtherFile;//其他证件图片
+    private File mImgLogoFile;//店铺logo
+    private String mImgLogoUrl = "";//店铺logo
     private String mImgLicenseUrl = "";//营业执照图片
     private String mImgOtherUrl = "";//其他证件图片
     private Dialog mLoading;
+    private AlertDialog mShopTypeDialog;
+    private int mShopTypeId;
     private ImageResultCallback mImageResultCallback = new ImageResultCallback() {
         @Override
         public void beforeCamera() {
@@ -104,6 +117,8 @@ public class ShopApplyActivity extends AbsActivity {
                         mImgLicenseFile = file;
                     } else if (mTargetImageView == mImgOther) {
                         mImgOtherFile = file;
+                    } else if (mTargetImageView == mImgLogo) {
+                        mImgLogoFile = file;
                     }
                     ImgLoader.display(mContext, file, mTargetImageView);
                 }
@@ -133,6 +148,9 @@ public class ShopApplyActivity extends AbsActivity {
         setTitle(WordUtil.getString(R.string.mall_014));
         mName = findViewById(R.id.name);//姓名
         mCardNo = findViewById(R.id.card_no);//身份证号
+        mShopName = findViewById(R.id.shop_name); /// 店铺名
+        mImgLogo = findViewById(R.id.img_logo); /// 店铺logo
+        mTypeClassName = findViewById(R.id.type_class_name); //店铺类型
         mManageClassName = findViewById(R.id.manage_class_name);//经营类目
         mManageName = findViewById(R.id.manage_name);//经营者名字
         mManagePhoneNum = findViewById(R.id.manage_phone_num);//经营者手机号
@@ -155,6 +173,16 @@ public class ShopApplyActivity extends AbsActivity {
         String realName = intent.getStringExtra(Constants.NICK_NAME);
         mName.setText(realName);
         mCardNo.setText(cardNo);
+        // 初始化商户类型数据
+        mShopTypeClassList = new ArrayList<>();
+        mShopTypeClassList.add(new ShopTypeBean(1, "乡村云店"));
+        mShopTypeClassList.add(new ShopTypeBean(2, "都市云店"));
+        mShopTypeClassList.add(new ShopTypeBean(3, "一线云店"));
+        ShopTypeBean bean = new ShopTypeBean(4, "普通商户");
+        bean.setChecked(true);
+        mShopTypeClassList.add(bean);
+
+        mShopTypeId = 4;
         //审核失败,显示原来的信息
         boolean applyFailed = intent.getBooleanExtra(Constants.MALL_APPLY_FAILED, false);
         if (applyFailed) {
@@ -175,6 +203,12 @@ public class ShopApplyActivity extends AbsActivity {
                         if (mManagePhoneNum != null) {
                             mManagePhoneNum.setText(obj.getString("phone"));
                         }
+                        if (mShopName != null) {
+                            mShopName.setText(obj.getString("name"));
+                        }
+                        if (mImgLogo != null) {
+                            ImgLoader.display(mContext, obj.getString("thumb"), mImgLogo);
+                        }
                         mProvinceVal = obj.getString("province");
                         mCityVal = obj.getString("city");
                         mZoneVal = obj.getString("area");
@@ -204,6 +238,9 @@ public class ShopApplyActivity extends AbsActivity {
                         }
                         mImgLicenseUrl = obj.getString("certificate");
                         mImgOtherUrl = obj.getString("other");
+                        mImgLogoUrl = obj.getString("thumb");
+                        mShopTypeId = obj.getIntValue("type");
+                        setDefaultShopTypeSelection();
                         if (mImgLicense != null) {
                             ImgLoader.display(mContext, obj.getString("certificate_format"), mImgLicense);
                         }
@@ -241,6 +278,11 @@ public class ShopApplyActivity extends AbsActivity {
             setBond();
         } else if (i == R.id.btn_submit) {//提交
             submit();
+        } else if (i == R.id.btn_img_logo) {
+            mTargetImageView = mImgLogo;
+            chooseImage();
+        } else if (i == R.id.btn_type_class) {
+            chooseShopTypeClass();
         }
     }
 
@@ -258,6 +300,53 @@ public class ShopApplyActivity extends AbsActivity {
     }
 
     /**
+     * 选择商铺类型类目
+     */
+    public void chooseShopTypeClass() {
+        if (mShopTypeClassList == null || mShopTypeClassList.size() == 0) {
+            return;
+        }
+
+        // 创建对话框
+        AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
+        builder.setTitle("选择店铺类型");
+
+        // 创建RecyclerView
+        RecyclerView recyclerView = new RecyclerView(mContext);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
+
+        int padding = (int) (16 * getResources().getDisplayMetrics().density);
+        recyclerView.setPadding(padding, padding, padding, padding);
+
+        // 创建适配器
+        ShopTypeClassAdapter adapter = new ShopTypeClassAdapter(mContext, mShopTypeClassList);
+        adapter.setOnItemClickListener(new ShopTypeClassAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(ShopTypeBean bean, int position) {
+                // 更新选中的店铺类型
+                mShopTypeId = bean.getId();
+                if (mTypeClassName != null) {
+                    mTypeClassName.setText(bean.getName());
+                }
+
+                // 关闭对话框
+                if (mShopTypeDialog != null) {
+                    mShopTypeDialog.dismiss();
+                }
+            }
+        });
+
+        recyclerView.setAdapter(adapter);
+
+        // 设置对话框内容
+        builder.setView(recyclerView);
+        builder.setNegativeButton("取消", null);
+
+        mShopTypeDialog = builder.create();
+        mShopTypeDialog.show();
+    }
+
+    /**
      * 选择经营类目
      */
     private void chooseManageClass() {
@@ -389,6 +478,17 @@ public class ShopApplyActivity extends AbsActivity {
             ToastUtil.show(R.string.mall_056);
             return;
         }
+        // 店铺名
+        final String shopName = mShopName.getText().toString().trim();
+        if (TextUtils.isEmpty(shopName)) {
+            ToastUtil.show("请输入店铺名");
+            return;
+        }
+        //店铺logo
+        if (mImgLogoFile == null && TextUtils.isEmpty(mImgLogoUrl)) {
+            ToastUtil.show(R.string.mall_061);
+            return;
+        }
         //经营类目
         if (mManageClassList == null || mManageClassList.size() == 0) {
             ToastUtil.show(R.string.mall_044);
@@ -491,13 +591,20 @@ public class ShopApplyActivity extends AbsActivity {
                     if (obj.getIntValue("bond_status") == 0) {
                         ToastUtil.show(R.string.mall_062);
                     } else {
-                        if (mImgLicenseFile != null || mImgOtherFile != null) {
+                        if (mImgLicenseFile != null || mImgOtherFile != null || mImgLogoFile != null) {
                             final List<UploadBean> uploadList = new ArrayList<>();
+                            final List<String> uploadTypes = new ArrayList<>();
                             if (mImgLicenseFile != null) {
                                 uploadList.add(new UploadBean(mImgLicenseFile, UploadBean.IMG));
+                                uploadTypes.add("license");
                             }
                             if (mImgOtherFile != null) {
                                 uploadList.add(new UploadBean(mImgOtherFile, UploadBean.IMG));
+                                uploadTypes.add("other");
+                            }
+                            if (mImgLogoFile != null) {
+                                uploadList.add(new UploadBean(mImgLogoFile, UploadBean.IMG));
+                                uploadTypes.add("logo");
                             }
                             //上传图片开始
                             showLoading();
@@ -507,18 +614,36 @@ public class ShopApplyActivity extends AbsActivity {
                                     strategy.upload(uploadList, true, new UploadCallback() {
                                         @Override
                                         public void onFinish(List<UploadBean> list, boolean success) {
-                                            if (mImgLicenseFile != null) {
-                                                mImgLicenseUrl = list.get(0).getRemoteFileName();
-                                                if (list.size() > 1) {
-                                                    mImgOtherUrl = list.get(1).getRemoteFileName();
+//                                            if (mImgLicenseFile != null) {
+//                                                mImgLicenseUrl = list.get(0).getRemoteFileName();
+//                                                if (list.size() > 1) {
+//                                                    mImgOtherUrl = list.get(1).getRemoteFileName();
+//                                                }
+//                                                if (list.size() > 2) {
+//                                                    mImgLogoUrl = list.get(2).getRemoteFileName();
+//                                                }
+//                                            } else {
+//                                                mImgOtherUrl = list.get(0).getRemoteFileName();
+//                                            }
+                                            // 在回调中根据类型赋值
+                                            for (int i = 0; i < uploadTypes.size() && i < list.size(); i++) {
+                                                String type = uploadTypes.get(i);
+                                                String url = list.get(i).getRemoteFileName();
+                                                if ("license".equals(type)) {
+                                                    mImgLicenseUrl = url;
+                                                } else if ("other".equals(type)) {
+                                                    mImgOtherUrl = url;
+                                                } else if ("logo".equals(type)) {
+                                                    mImgLogoUrl = url;
                                                 }
-                                            } else {
-                                                mImgOtherUrl = list.get(0).getRemoteFileName();
                                             }
                                             //上传图片结束
                                             MallHttpUtil.applyShop(
                                                     name,
                                                     cardNo,
+                                                    shopName,
+                                                    mImgLogoUrl,
+                                                    mShopTypeId,
                                                     manageClassIdFinal,
                                                     manageName,
                                                     managePhoneNum,
@@ -557,6 +682,9 @@ public class ShopApplyActivity extends AbsActivity {
                             MallHttpUtil.applyShop(
                                     name,
                                     cardNo,
+                                    shopName,
+                                    mImgLogoUrl,
+                                    mShopTypeId,
                                     manageClassIdFinal,
                                     manageName,
                                     managePhoneNum,
@@ -616,6 +744,31 @@ public class ShopApplyActivity extends AbsActivity {
         UploadUtil.cancelUpload();
         hideLoading();
         mLoading = null;
+        mShopTypeDialog = null;
         super.onDestroy();
     }
+
+    /**
+     * 根据店铺类型ID设置默认选择
+     */
+    private void setDefaultShopTypeSelection() {
+        if (mShopTypeClassList != null && mShopTypeClassList.size() > 0) {
+            // 先清除所有选中状态
+            for (ShopTypeBean bean : mShopTypeClassList) {
+                bean.setChecked(false);
+            }
+
+            // 根据mShopTypeId设置对应的选中状态
+            for (ShopTypeBean bean : mShopTypeClassList) {
+                if (bean.getId() == mShopTypeId) {
+                    bean.setChecked(true);
+                    // 同时更新UI显示
+                    if (mTypeClassName != null) {
+                        mTypeClassName.setText(bean.getName());
+                    }
+                    break;
+                }
+            }
+        }
+    }
 }

+ 113 - 0
ybvideoandroid/mall/src/main/java/com/yunbao/mall/adapter/ShopTypeClassAdapter.java

@@ -0,0 +1,113 @@
+package com.yunbao.mall.adapter;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
+import androidx.recyclerview.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.yunbao.common.Constants;
+import com.yunbao.mall.R;
+import com.yunbao.mall.bean.ShopTypeBean;
+
+import java.util.List;
+
+public class ShopTypeClassAdapter extends RecyclerView.Adapter<ShopTypeClassAdapter.Vh> {
+
+    private Context mContext;
+    private List<ShopTypeBean> mList;
+    private LayoutInflater mInflater;
+    private View.OnClickListener mOnClickListener;
+    private Drawable mCheckedDrawable;
+    private Drawable mUnCheckedDrawable;
+    private OnItemClickListener mOnItemClickListener;
+
+    public interface OnItemClickListener {
+        void onItemClick(ShopTypeBean bean, int position);
+    }
+
+    public ShopTypeClassAdapter(Context context, List<ShopTypeBean> list) {
+        mContext = context;
+        mList = list;
+        mInflater = LayoutInflater.from(context);
+        mCheckedDrawable = ContextCompat.getDrawable(context, R.mipmap.ic_check_1);
+        mUnCheckedDrawable = ContextCompat.getDrawable(context, R.mipmap.ic_check_0);
+        mOnClickListener = new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Object tag = v.getTag();
+                if (tag == null) {
+                    return;
+                }
+                int position = (int) tag;
+                ShopTypeBean bean = mList.get(position);
+                
+                // 清除其他选中状态(单选)
+                for (ShopTypeBean item : mList) {
+                    item.setChecked(false);
+                }
+                
+                // 设置当前选中
+                bean.setChecked(true);
+                notifyDataSetChanged();
+                
+                if (mOnItemClickListener != null) {
+                    mOnItemClickListener.onItemClick(bean, position);
+                }
+            }
+        };
+    }
+
+    public void setOnItemClickListener(OnItemClickListener listener) {
+        mOnItemClickListener = listener;
+    }
+
+    public ShopTypeBean getSelectedItem() {
+        for (ShopTypeBean bean : mList) {
+            if (bean.isChecked()) {
+                return bean;
+            }
+        }
+        return null;
+    }
+
+    @NonNull
+    @Override
+    public Vh onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        return new Vh(mInflater.inflate(R.layout.item_manage_class, parent, false));
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull Vh holder, int position) {
+        holder.setData(mList.get(position), position);
+    }
+
+    @Override
+    public int getItemCount() {
+        return mList != null ? mList.size() : 0;
+    }
+
+    class Vh extends RecyclerView.ViewHolder {
+
+        ImageView mImg;
+        TextView mName;
+
+        public Vh(@NonNull View itemView) {
+            super(itemView);
+            mImg = itemView.findViewById(R.id.img);
+            mName = itemView.findViewById(R.id.name);
+            itemView.setOnClickListener(mOnClickListener);
+        }
+
+        void setData(ShopTypeBean bean, int position) {
+            itemView.setTag(position);
+            mName.setText(bean.getName());
+            mImg.setImageDrawable(bean.isChecked() ? mCheckedDrawable : mUnCheckedDrawable);
+        }
+    }
+}

+ 40 - 0
ybvideoandroid/mall/src/main/java/com/yunbao/mall/bean/ShopTypeBean.java

@@ -0,0 +1,40 @@
+package com.yunbao.mall.bean;
+
+public class ShopTypeBean {
+
+    private int id;
+    private String name;
+
+    private boolean mChecked;
+
+    public ShopTypeBean() {
+    }
+
+    public ShopTypeBean(int id, String name) {
+        this.id = id;
+        this.name = name;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+    public boolean isChecked() {
+        return mChecked;
+    }
+
+    public void setChecked(boolean checked) {
+        mChecked = checked;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 12 - 3
ybvideoandroid/mall/src/main/java/com/yunbao/mall/http/MallHttpUtil.java

@@ -715,8 +715,11 @@ public class MallHttpUtil {
     /**
      * 卖家店铺申请
      *
-     * @param name           姓名
+     * @param userNam           姓名
      * @param cardNo         身份证号
+     * @param shopName       店铺名
+     * @param logoFileUrl    店铺 logo
+     * @param type           店铺类型
      * @param manageClassId  经营类目
      * @param manageName     经营者名字
      * @param managePhone    经营者手机号
@@ -735,8 +738,11 @@ public class MallHttpUtil {
      * @param otherFileUrl   其他证件
      */
     public static void applyShop(
-            String name,
+            String userNam,
             String cardNo,
+            String shopName,
+            String logoFileUrl,
+            int    type,
             String manageClassId,
             String manageName,
             String managePhone,
@@ -757,8 +763,11 @@ public class MallHttpUtil {
         HttpClient.getInstance().get("Shop.shopApply", MallHttpConsts.APPLY_SHOP)
                 .params("uid", CommonAppConfig.getInstance().getUid())
                 .params("token", CommonAppConfig.getInstance().getToken())
-                .params("username", name)
+                .params("username", userNam)
                 .params("cardno", cardNo)
+                .params("name", shopName)
+                .params("thumb", logoFileUrl)
+                .params("type", type)
                 .params("classid", manageClassId)
                 .params("contact", manageName)
                 .params("phone", managePhone)

+ 117 - 0
ybvideoandroid/mall/src/main/res/layout/activity_shop_apply_mall.xml

@@ -160,6 +160,123 @@
                 android:layout_height="10dp"
                 android:background="@color/gray6" />
 
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:layout_marginTop="15dp"
+                android:layout_marginRight="15dp"
+                android:layout_marginBottom="15dp"
+                android:text="店铺名:"
+                android:textColor="@color/gray3"
+                android:textSize="15sp"
+                android:textStyle="bold" />
+
+            <EditText
+                tools:text="啊啊啊啊啊"
+                android:id="@+id/shop_name"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:layout_marginLeft="15dp"
+                android:layout_marginRight="15dp"
+                android:background="@null"
+                android:gravity="center_vertical"
+                android:hint="店铺名"
+                android:textColor="@color/textColorBlack"
+                android:textColorHint="@color/gray3"
+                android:textSize="14sp" />
+
+            <FrameLayout
+                android:id="@+id/btn_type_class"
+                android:layout_width="match_parent"
+                android:layout_height="56dp"
+                android:onClick="shopApplyClick"
+                android:paddingRight="15dp">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="15dp"
+                    android:layout_marginTop="15dp"
+                    android:layout_marginRight="15dp"
+                    android:layout_marginBottom="13dp"
+                    android:text="店铺类型"
+                    android:textColor="@color/gray3"
+                    android:textSize="15sp"
+                    android:textStyle="bold" />
+
+                <ImageView
+                    android:layout_width="14dp"
+                    android:layout_height="16dp"
+                    android:layout_gravity="center_vertical|right"
+                    android:src="@mipmap/arrow_01"
+                    android:tint="@color/gray3" />
+
+                <TextView
+                    tools:text="啊啊啊啊啊"
+                    android:id="@+id/type_class_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical|right"
+                    android:layout_marginRight="18dp"
+                    android:hint="@string/mall_023"
+                    android:textColor="@color/gray3"
+                    android:textColorHint="@color/gray3"
+                    android:textSize="15sp" />
+
+            </FrameLayout>
+
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:layout_marginTop="15dp"
+                android:layout_marginRight="15dp"
+                android:layout_marginBottom="15dp"
+                android:text="店铺logo:"
+                android:textColor="@color/gray3"
+                android:textSize="15sp"
+                android:textStyle="bold" />
+
+            <LinearLayout
+                android:id="@+id/btn_img_logo"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:onClick="shopApplyClick"
+                android:orientation="vertical">
+
+                <FrameLayout
+                    android:layout_width="100dp"
+                    android:layout_height="75dp"
+                    android:background="@color/gray6">
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:layout_gravity="center"
+                        android:src="@mipmap/shop_apply_01"
+                        android:tint="@color/gray3" />
+
+                    <ImageView
+                        android:id="@+id/img_logo"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:scaleType="centerCrop" />
+
+                </FrameLayout>
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="12dp"
+                    android:maxWidth="100dp"
+                    android:text="店铺logo"
+                    android:textColor="@color/gray3"
+                    android:textSize="13sp" />
+            </LinearLayout>
+
             <FrameLayout
                 android:id="@+id/btn_manage_class"
                 android:layout_width="match_parent"

+ 5 - 0
ybvideoandroid/video/src/main/java/com/yunbao/video/bean/ClassBean.java

@@ -22,6 +22,11 @@ public class ClassBean implements Parcelable {
 //public static final int FOLLOW_ID = -5;
 //public static final int DISCOVER_ID = -6;
 
+    public static final int NEWS_ID = -2;
+    public static final int FRIEND_ID = -3;
+    public static final int CITY_ID = -4;
+    public static final int FOLLOW_ID = -5;
+
     public static final int VIDEO_ID = -1;
     public static final int MALL_ID = -1;
     public static final int SHOP_ID = -1;