Przeglądaj źródła

✨ feat(home): 首页跳转处理

陈雪 1 miesiąc temu
rodzic
commit
61755819e9
1 zmienionych plików z 5 dodań i 9 usunięć
  1. 5 9
      src/pages/index/index.vue

+ 5 - 9
src/pages/index/index.vue

@@ -42,7 +42,7 @@
     <view class="hot-category">
       <view class="home-title">
         <view class="home-title-text">{{ t('home.hotCategory') }}</view>
-        <view class="home-see-all">
+        <view @click="gotoCategory" class="home-see-all">
           <view class="see-all-text">{{ t('home.seeAll') }}</view>
           <image class="w-9rpx" src="@/static/images/right.svg" mode="widthFix"></image>
         </view>
@@ -57,10 +57,7 @@
     <view class="hot-selling">
       <view class="selling-title">
         <view class="selling-title-text">{{ t('home.hotSelling') }}</view>
-        <view class="selling-see-all">
-          <view class="selling-see-all-text" @click="gotoHotSelling">{{ t('home.seeAll') }}</view>
-          <image class="w-9rpx" src="@/static/images/right.svg" mode="widthFix"></image>
-        </view>
+        <view class="block"></view>
       </view>
       <HotTags v-model:current-tag="currentTag"></HotTags>
       <ProductList></ProductList>
@@ -85,12 +82,11 @@
   const current = ref(0)
   const currentTag = ref(0)
 
-  const gotoHotSelling = () => {
-    uni.navigateTo({
-      url: '/pages/index/hot-sell',
+  const gotoCategory = () => {
+    uni.switchTab({
+      url: '/pages/category/category',
     })
   }
-
   const swiperList = ref([
     'https://t.xiaoyaotravel.com/image/TourImComplait/messageContent/696b679508664bb4bceb6cc6b06d0cdc.png',
     'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg',