Browse Source

✨ feat(cart): 修改购物车页面属性信息

陈雪 1 month ago
parent
commit
20bf79c3d1
3 changed files with 11 additions and 10 deletions
  1. 1 8
      src/pages.json
  2. 10 1
      src/pages/cart/cart.vue
  3. 0 1
      src/types/uni-pages.d.ts

+ 1 - 8
src/pages.json

@@ -78,6 +78,7 @@
       "type": "page",
       "layout": "tabbar",
       "style": {
+        "navigationStyle": "custom",
         "navigationBarTitleText": "%tabbar.cart%"
       }
     },
@@ -98,14 +99,6 @@
       }
     },
     {
-      "path": "pages/index/hot-sell",
-      "type": "page",
-      "layout": "default",
-      "style": {
-        "navigationBarTitleText": "%home.hotSelling%"
-      }
-    },
-    {
       "path": "pages/person/person",
       "type": "page",
       "layout": "tabbar",

+ 10 - 1
src/pages/cart/cart.vue

@@ -2,10 +2,19 @@
 {
   layout: 'tabbar',
   style: {
+    navigationStyle: 'custom',
     navigationBarTitleText: '%tabbar.cart%',
   },
 }
 </route>
+<script setup lang="ts">
+  const { safeAreaInsets } = uni.getSystemInfoSync()
+</script>
 <template>
-  <view>购物车</view>
+  <view
+    class="pb-tab bg-white overflow-hidden box-border"
+    :style="{ marginTop: safeAreaInsets?.top + 'px' }"
+  >
+    购物车
+  </view>
 </template>

+ 0 - 1
src/types/uni-pages.d.ts

@@ -9,7 +9,6 @@ interface NavigateToOptions {
        "/pages/cart/cart" |
        "/pages/category/category" |
        "/pages/community/community" |
-       "/pages/index/hot-sell" |
        "/pages/person/person" |
        "/pages/user/login";
 }