shish 1 روز پیش
والد
کامیت
c2fee92e8c
3فایلهای تغییر یافته به همراه12 افزوده شده و 16 حذف شده
  1. 10 16
      hdApp/src/admin/goods/categoryV2.vue
  2. 1 0
      hdApp/src/admin/home/apply.vue
  3. 1 0
      hdApp/src/admin/home/components/mall-home-panel.vue

+ 10 - 16
hdApp/src/admin/goods/categoryV2.vue

@@ -1,10 +1,10 @@
 <!--
   商品分类列表页(新版)
-  用途:花束/花材分类列表展示;花束编辑跳转 category-edit,花材在本页弹窗编辑
+  用途:花束/花材分类列表展示;花束编辑跳转 category-edit,花材在本页弹窗编辑;分类广告见独立页 category-ad
 -->
 <template>
   <view class="page-container">
-    <!-- Tabs -->
+    <!-- Tabs:花束 / 花材;分类广告已独立为 category-ad 页 -->
     <view class="tabs">
       <view class="tab-item" :class="{active: currentTab === 0}" @click="switchTab(0)">
         <text>花束分类</text>
@@ -14,17 +14,12 @@
         <text>花材分类</text>
         <view class="tab-line" v-if="currentTab === 1"></view>
       </view>
-      <view class="tab-item" :class="{active: currentTab === 2}" @click="switchTab(2)">
-        <text>分类广告</text>
-        <view class="tab-line" v-if="currentTab === 2"></view>
-      </view>
     </view>
 
     <!-- 列表头部 -->
     <view
       class="list-header"
       :class="{ 'layout-item-class': currentTab === 1 }"
-      v-if="currentTab !== 2"
     >
       <view class="col-name">分类名称</view>
       <view class="col-num" v-if="currentTab === 0">商品数量</view>
@@ -36,7 +31,6 @@
     <view
       class="list-container"
       :class="{ 'layout-item-class': currentTab === 1 }"
-      v-if="currentTab !== 2"
     >
       <block v-if="!$util.isEmpty(filteredList)">
         <view
@@ -82,7 +76,7 @@
     </view>
 
     <!-- 底部操作栏 -->
-    <view class="bottom-toolbar" v-if="currentTab !== 2">
+    <view class="bottom-toolbar">
       <button
         class="toolbar-btn outline-btn"
         hover-class="none"
@@ -310,19 +304,19 @@ export default {
   },
   onLoad(options) {
     if (options && options.tab !== undefined) {
-      this.currentTab = parseInt(options.tab) || 0;
+      // 仅保留花束(0)/花材(1);旧链 tab=2(分类广告)改走独立页
+      const tab = parseInt(options.tab) || 0;
+      this.currentTab = tab === 1 ? 1 : 0;
+      if (parseInt(options.tab) === 2) {
+        uni.redirectTo({ url: '/admin/goods/category-ad' });
+        return;
+      }
     }
     this.uploadHeaders.token = uni.getStorageSync('token') || '';
     this.init();
   },
   methods: {
     switchTab(index) {
-      if (index === 2) {
-        uni.navigateTo({
-          url: '/admin/goods/category-ad'
-        });
-        return;
-      }
       if (this.currentTab === index) return;
       this.currentTab = index;
       this.loadCurrentTabList();

+ 1 - 0
hdApp/src/admin/home/apply.vue

@@ -70,6 +70,7 @@ export default {
             { name: '商品列表', icon: 'bouquet', url: '/admin/goods/manage', pf: 1 },
             { name: '新增商品', icon: 'add-bouquet', url: '/admin/goods/add', pf: 1 },
             { name: '分类', icon: 'category-filled', url: '/admin/goods/categoryV2?tab=0', pf: 1 },
+            { name: '分类广告', icon: 'pic-text', url: '/admin/goods/category-ad', pf: 1 },
             { name: '排序', icon: 'sort-filled', url: '/admin/goods/categorySort', pf: 1 },
             { name: '场景管理', icon: 'category-filled', url: '/admin/useCase/list', pf: 1 },
             { name: '涨价管理', icon: 'price-increase', url: '/admin/goods/price-increase', pf: 1 }

+ 1 - 0
hdApp/src/admin/home/components/mall-home-panel.vue

@@ -229,6 +229,7 @@ export default {
         { name: '商品列表', icon: 'bouquet', url: '/admin/goods/manage', pf: 1 },
         { name: '新增商品', icon: 'add-bouquet', url: '/admin/goods/add', pf: 1 },
         { name: '分类', icon: 'category-filled', url: '/admin/goods/categoryV2?tab=0', pf: 1 },
+        { name: '分类广告', icon: 'pic-text', url: '/admin/goods/category-ad', pf: 1 },
         { name: '排序', icon: 'sort-filled', url: '/admin/goods/categorySort', pf: 1 },
         { name: '涨价管理', icon: 'price-increase', url: '/admin/goods/price-increase', pf: 1 },
         { name: '首页配置', icon: 'settings-filled', url: '/admin/homePageConfig/index', pf: 1 },