瀏覽代碼

🎨 修改细节问题

快乐的梦鱼 2 天之前
父節點
當前提交
39ed1c5389

+ 0 - 59
src/common/components/tabs/Tabbar.vue

@@ -1,59 +0,0 @@
-<template>
-  <TabBar
-    :selectedTabIndex="current"
-    @update:selectedTabIndex="changeTab"
-    fixed
-    xbarSpace
-    :innerStyle="{ 
-      zIndex: 999 ,
-      boxShadow: '0 -2rpx 4rpx rgba(0, 0, 0, 0.1)',
-      backdropFilter: 'blur(10px)',
-      backgroundColor: 'rgba(246, 242, 231, 0.7)',
-    }"
-  >
-    <TabBarItem icon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_home_off.png" activeIcon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_home_on.png" text="首页" />
-    <TabBarItem icon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_discover_off.png" activeIcon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_discover_on.png" text="资讯" />
-    <TabBarItem icon="https://mn.wenlvti.net/app_static/minnan/images/tabs/icon_inhert_off.png" activeIcon="https://mn.wenlvti.net/app_static/minnan/images/tabs/icon_inhert_on.png" hump :humpHeight="[0,0]" :humpSpace="[20,20]" :iconSize="140" text="传承" />
-    <TabBarItem icon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_shop_off.png" activeIcon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_shop_on.png" text="乐游" />
-    <TabBarItem icon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_profile_off.png" activeIcon="https://mncdn.wenlvti.net/app_static/minnan/images/tabs/icon_profile_on.png" text="我的" />
-  </TabBar>
-</template>
-
-<script setup lang="ts">
-import TabBar from '@/components/nav/TabBar.vue';
-import TabBarItem from '@/components/nav/TabBarItem.vue';
-
-const props = defineProps({
-  current: {
-    type: Number,
-    default: 0
-  }
-});
-function changeTab(newVal: number) {
-  switch(newVal) {
-    case 0:
-      switchTab('/pages/home/index', 0);
-      break;
-    case 1:
-      switchTab('/pages/article/index', 1);
-      break;
-    case 2:
-      switchTab('/pages/inhert/index', 2);
-      break;
-    case 3:
-      switchTab('/pages/travel/index', 3);
-      break;
-    case 4:
-      switchTab('/pages/user/index', 4);
-      break;
-  }
-}
-
-function switchTab(path: string, index: number) {
-  if (props.current === index) 
-    return;
-  uni.switchTab({
-    url: path
-  });
-}
-</script>

+ 5 - 4
src/common/composeabe/LoadQuerys.ts

@@ -17,14 +17,15 @@ export function useLoadQuerys<T extends Record<string, any>>(
     rawQuerys.value = _querys || {};
     if (_querys) {
       for (const key in querys.value) {
+        const isDefined = _querys[key] !== undefined;
         if (typeof defaults[key] === 'number')
-          (querys.value as Record<string, any>)[key] = Number(_querys[key]); 
+          (querys.value as Record<string, any>)[key] = isDefined ? Number(_querys[key]) : defaults[key]; 
         else if (typeof defaults[key] === 'boolean')
-          (querys.value as Record<string, any>)[key] = Boolean(_querys[key]); 
+          (querys.value as Record<string, any>)[key] = isDefined ? Boolean(_querys[key]) : defaults[key]; 
         else if (typeof defaults[key] === 'object')
-          (querys.value as Record<string, any>)[key] = JSON.parse(decodeURIComponent(_querys[key])); 
+          (querys.value as Record<string, any>)[key] = isDefined ? JSON.parse(decodeURIComponent(_querys[key])) : defaults[key]; 
         else
-          querys.value[key] = decodeURIComponent(_querys[key]) as any;
+          querys.value[key] = isDefined ? decodeURIComponent(_querys[key]) as any : defaults[key];
       }
     }
     nextTick(() => {

+ 0 - 33
src/pages.json

@@ -21,13 +21,6 @@
       }
     },
     {
-      "path": "pages/travel/index",
-      "style": {
-        "navigationBarTitleText": "闽南文化生态保护-文旅",
-        "navigationStyle": "custom"
-      }
-    },
-    {
       "path": "pages/travel/calendar/index",
       "style": {
         "navigationBarTitleText": "节庆日历",
@@ -49,20 +42,6 @@
       }
     },
     {
-      "path": "pages/article/index",
-      "style": {
-        "navigationBarTitleText": "闽南文化生态保护-发现",
-        "navigationStyle": "custom"
-      }
-    },
-    {
-      "path": "pages/inhert/index",
-      "style": {
-        "navigationBarTitleText": "闽南文化生态保护-传承",
-        "navigationStyle": "custom"
-      }
-    },
-    {
       "path": "pages/inhert/inheritor/list",
       "style": {
         "navigationBarTitleText": "传承人列表",
@@ -236,18 +215,6 @@
         "text": "首页"
       },
       {
-        "pagePath": "pages/article/index",
-        "text": "资讯"
-      },
-      {
-        "pagePath": "pages/inhert/index",
-        "text": "传承"
-      },
-      {
-        "pagePath": "pages/travel/index",
-        "text": "文旅"
-      },
-      {
         "pagePath": "pages/user/index",
         "text": "我的"
       }

+ 0 - 36
src/pages/article/index.vue

@@ -1,36 +0,0 @@
-<template>
-  <FlexCol>
-    <StatusBarSpace backgroundColor="background.page" />
-    <NavBar leftButton="custom" backgroundColor="background.page">
-      <template #left>
-        <Image
-          src="https://mn.wenlvti.net/app_static/minnan/images/discover/Title2.png"
-          mode="widthFix"
-          :width="210"
-          :innerStyle="{ marginLeft: '30rpx', marginTop: '30rpx' }"
-        />
-      </template>
-    </NavBar>
-    <CommonCategoryList pageConfigName="news" />
-    <Height :height="140" />
-    <Tabbar :current="1" />
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
-import Tabbar from '@/common/components/tabs/Tabbar.vue';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import NavBar from '@/components/nav/NavBar.vue';
-import StatusBarSpace from '@/components/layout/space/StatusBarSpace.vue';
-import Height from '@/components/layout/space/Height.vue';
-import CommonCategoryList from './data/CommonCategoryList.vue';
-import Image from '@/components/basic/Image.vue';
-
-onShareTimeline(() => {
-  return {}; 
-})
-onShareAppMessage(() => {
-  return {}; 
-})
-</script>

+ 0 - 2
src/pages/home/introduction.vue

@@ -56,7 +56,6 @@
       <SimplePageListLoader :loader="listLoader" />
     </view>
   </view>
-  <tabbar :current="0"></tabbar>
 </template>
 
 <script setup lang="ts">
@@ -65,7 +64,6 @@ import CommonContent, { GetColumListParams, GetContentListParams } from '@/api/C
 import SimplePageListLoader from '@/common/components/SimplePageListLoader.vue';
 import Box2LineImageRightShadow from '@/pages/parts/Box2LineImageRightShadow.vue';
 import NewsIndexContent from '@/api/news/NewsIndexContent';
-import Tabbar from '@/common/components/tabs/Tabbar.vue';
 import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
 import { useSimplePageListLoader } from '@/common/composeabe/SimplePageListLoader';
 import { DataDateUtils } from '@imengyu/js-request-transform';

+ 0 - 39
src/pages/inhert/index.vue

@@ -1,39 +0,0 @@
-<template>
-  <FlexCol>
-    <StatusBarSpace backgroundColor="background.page" />
-    <NavBar leftButton="custom" backgroundColor="background.page">
-      <template #left>
-        <Image
-          src="https://mn.wenlvti.net/app_static/minnan/images/inhert/Title.png"
-          mode="widthFix"
-          :width="110"
-          :innerStyle="{ marginLeft: '30rpx', marginTop: '30rpx' }"
-        />
-      </template>
-    </NavBar>
-    <CommonCategoryList pageConfigName="inhert" />
-    <Height :height="150" />
-    <Tabbar :current="2" />
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import Tabbar from '@/common/components/tabs/Tabbar.vue';
-import { onShareTimeline, onShareAppMessage } from '@dcloudio/uni-app';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import StatusBarSpace from '@/components/layout/space/StatusBarSpace.vue';
-import NavBar from '@/components/nav/NavBar.vue';
-import Image from '@/components/basic/Image.vue';
-import Height from '@/components/layout/space/Height.vue';
-import CommonCategoryList from '../article/data/CommonCategoryList.vue';
-
-onShareTimeline(() => {
-  return {}; 
-})
-onShareAppMessage(() => {
-  return {}; 
-})
-</script>
-
-<style lang="scss">
-</style>

+ 0 - 36
src/pages/travel/index.vue

@@ -1,36 +0,0 @@
-<template>
-  <FlexCol>
-    <StatusBarSpace backgroundColor="background.page" />
-    <NavBar leftButton="custom" backgroundColor="background.page">
-      <template #left>
-        <Image
-          src="https://mn.wenlvti.net/app_static/minnan/images/travel/Title4.png"
-          mode="widthFix"
-          :width="210"
-          :innerStyle="{ marginLeft: '30rpx', marginTop: '30rpx' }"
-        />
-      </template>
-    </NavBar>
-    <CommonCategoryList pageConfigName="travel" />
-    <Height :height="150" />
-    <Tabbar :current="3" />
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import { onShareTimeline, onShareAppMessage } from '@dcloudio/uni-app';
-import Tabbar from '@/common/components/tabs/Tabbar.vue';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import StatusBarSpace from '@/components/layout/space/StatusBarSpace.vue';
-import NavBar from '@/components/nav/NavBar.vue';
-import Height from '@/components/layout/space/Height.vue';
-import CommonCategoryList from '../article/data/CommonCategoryList.vue';
-import Image from '@/components/basic/Image.vue';
-
-onShareTimeline(() => {
-  return {}; 
-})
-onShareAppMessage(() => {
-  return {}; 
-})
-</script>

+ 0 - 4
src/pages/user/index.vue

@@ -85,15 +85,11 @@
           我的预约 -->
         </view>
       </CellGroup>
-
-      
     </view>
-    <tabbar :current="4"></tabbar>
   </view>
 </template>
 
 <script setup lang="ts">
-import Tabbar from '@/common/components/tabs/Tabbar.vue';
 import { confirm } from '@/components/utils/DialogAction';
 import { navTo } from '@/components/utils/PageAction';
 import { useAuthStore } from '@/store/auth';