Selaa lähdekoodia

🎨 优化界面细节问题

快乐的梦鱼 2 viikkoa sitten
vanhempi
commit
a441b44b2c

+ 11 - 11
src/common/components/DragSortList.vue

@@ -94,17 +94,6 @@ function syncList(list: DragSortItem[]) {
   }
 }
 
-watch(
-  () => props.list,
-  (val) => {
-    // 仅在非拖拽状态下同步外部变化
-    if (dragIndex.value < 0) {
-      syncList(val);
-    }
-  },
-  { immediate: true, deep: true },
-);
-
 // ==================== 拖拽状态 ====================
 
 /** 当前拖拽项的索引,-1 表示未拖拽 */
@@ -125,6 +114,17 @@ const itemPitch = ref(60);
 /** 当前目标索引 */
 const targetIndex = ref(-1);
 
+watch(
+  () => props.list,
+  (val) => {
+    // 仅在非拖拽状态下同步外部变化
+    if (dragIndex.value < 0) {
+      syncList(val);
+    }
+  },
+  { immediate: true, deep: true },
+);
+
 // ==================== 实例引用 ====================
 
 const instance = getCurrentInstance();

+ 6 - 7
src/components/basic/Icon.vue

@@ -38,12 +38,11 @@
   />
   <!-- #endif -->
 
-  <WrappedImage
+  <image
     v-else-if="iconData.type == 'image' && iconData.value"
-    :innerStyle="style"
-    :innerClass="innerClass"
+    :style="style"
+    :class="innerClass"
     :src="iconData.value"
-    :showFailed="!noError"
     mode="aspectFill"
   />
 </template>
@@ -52,7 +51,7 @@
 import { computed } from 'vue';
 import { IconUtils, type IconItem } from './IconUtils';
 import { useTheme } from '../theme/ThemeDefine';
-import WrappedImage from './Image.vue';
+import { isUrl } from '../utils/CheckUtils';
 
 export interface IconProps {
   /**
@@ -96,7 +95,7 @@ const props = withDefaults(defineProps<IconProps>(), {
 });
 const icon = computed(() => props.icon || props.name);
 const iconData = computed(() => {
-  if (IconUtils.iconCount.value === 0) {
+  if (IconUtils.iconCount.value === 0 || !icon.value) {
     return {
       type: 'none',
       value: '',
@@ -109,7 +108,7 @@ const iconData = computed(() => {
       value: icon.value,
       fontFamily: 'iconfont',
     } as IconItem
-  } else if (!data && icon.value) {
+  } else if (!data && icon.value && isUrl(icon.value)) {
     return {
       type: 'image',
       value: icon.value,

+ 2 - 3
src/components/theme/ProvideVar.vue

@@ -3,7 +3,7 @@
 </template>
 
 <script setup lang="ts">
-import { provideSomeThemeColor, provideSomeThemeVar } from './ThemeDefine';
+import { provideThemeOverrides } from './ThemeDefine';
 
 defineOptions({
   options: {
@@ -16,6 +16,5 @@ const props = defineProps({
   colors: Object
 })
 
-provideSomeThemeVar(props.vars || {});
-provideSomeThemeColor(props.colors || {});
+provideThemeOverrides(props.colors || {}, props.vars || {});
 </script>

+ 3 - 14
src/components/theme/ThemeDefine.ts

@@ -100,25 +100,14 @@ function applyOverrides<T extends Record<string, any>>(
   return result as T;
 }
 
-export function provideSomeThemeColor(record: Record<string, any>) {
+export function provideThemeOverrides(colors: Record<string, any>, vars: Record<string, any>) {
   const topTheme = inject<Ref<ThemeConfig>>(ThemeKey);
   const newTheme = computed(() => {
     const topThemeValue = topTheme?.value ?? DefaultTheme;
     const v = {
       ...topThemeValue,
-      colorConfigs: applyOverrides(topThemeValue.colorConfigs, record),
-    } as ThemeConfig;
-    return v;
-  });
-  provide(ThemeKey, newTheme);
-}
-export function provideSomeThemeVar(record: Record<string, any>) {
-  const topTheme = inject<Ref<ThemeConfig>>(ThemeKey);
-  const newTheme = computed(() => {
-    const topThemeValue = topTheme?.value ?? DefaultTheme;
-    const v = {
-      ...topThemeValue,
-      varOverrides: applyOverrides(topThemeValue.varOverrides, record),
+      varOverrides: applyOverrides(topThemeValue.varOverrides, vars),
+      colorConfigs: applyOverrides(topThemeValue.colorConfigs, colors),
     } as ThemeConfig;
     return v;
   });

+ 3 - 0
src/components/utils/CheckUtils.ts

@@ -1,3 +1,6 @@
 export function isNumeric(str: any) {
   return !isNaN(Number(str)) && str.trim() !== "";
+}
+export function isUrl(str: any) {
+  return /^https?:\/\//.test(str);
 }

+ 51 - 50
src/pages/home/components/LightMap.vue

@@ -220,6 +220,11 @@ const mapLoader = useSimpleDataLoader<MapMarker[]>(async () => {
   let res = (await LightVillageApi.getMapVillage({
     areaCode: selectedRegion.value
   }));
+
+  //如果小地图则只显示200个
+  if (props.small && res.length > 200)
+    res.splice(200, res.length - 200);
+
   //如果为空则尝试获取子级
   hasResItems.value = res.length > 0;
   const list = res
@@ -231,59 +236,55 @@ const mapLoader = useSimpleDataLoader<MapMarker[]>(async () => {
       return false;
     })
     .map((p, i) => {
-    const id = p.villageId ?? i;
-    villageData.set(id, p);
-    const maker : MapMarker = {
-      id,
-      title: p.name,
-      longitude: Number(p.longitude),
-      latitude: Number(p.latitude),
-      width: 30,
-      height: 30,
-      iconPath: '',
-      joinCluster: true,
-      callout: {
-        display: props.small ? 'BYCLICK' : 'ALWAYS',
-        content: p.name,
-        color: '#000000',
-        fontSize: 12,
-        padding: 5,
-        bgColor: '#ffffff',
-        borderRadius: 5,
-      },
-    }
+      const id = p.villageId ?? i;
+      villageData.set(id, p);
+      const maker : MapMarker = {
+        id,
+        title: p.name,
+        longitude: Number(p.longitude),
+        latitude: Number(p.latitude),
+        width: 30,
+        height: 30,
+        iconPath: '',
+        joinCluster: true,
+        callout: {
+          display: props.small ? 'BYCLICK' : 'ALWAYS',
+          content: p.name,
+          color: '#000000',
+          fontSize: 12,
+          padding: 5,
+          bgColor: '#ffffff',
+          borderRadius: 5,
+        },
+      }
 
-    if (p.isLight && p.villageId) {
-      if (p.lightValue >= 1) {
-        maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light3.png`;
-      } else if (p.lightValue >= 0.5) {
-        maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light2.png`;
-      } else if (p.lightValue >= 0.25) {
-        maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light1.png`;
+      if (p.isLight && p.villageId) {
+        if (p.lightValue >= 1) {
+          maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light3.png`;
+        } else if (p.lightValue >= 0.5) {
+          maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light2.png`;
+        } else if (p.lightValue >= 0.25) {
+          maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light1.png`;
+        } else {
+          maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light1.png`;
+        }
+        const size = Math.floor(30 +(p.lightValue) * 40);
+        maker.width = size;
+        maker.height = Math.floor(size * 1.05);
+        
       } else {
-        maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/Light1.png`;
+        maker.width = 25;
+        maker.height = 27;
+        maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/LightUnLight.png`;
       }
-      const size = Math.floor(30 +(p.lightValue) * 40);
-      maker.width = size;
-      maker.height = size * 1.05;
-      
-    } else {
-      maker.width = 25;
-      maker.height = 27;
-      maker.iconPath = `https://mncdn.wenlvti.net/app_static/xiangyuan/images/map/LightUnLight.png`;
-    }
-
-    return maker as MapMarker;
-  }).filter(p => 
-    p.longitude && p.latitude 
-    && !isNaN(p.longitude) && !isNaN(p.latitude)
-    && p.longitude > -180 && p.longitude < 180
-    && p.latitude > -90 && p.latitude < 90
-  );
-
-  //如果小地图则只显示200个
-  if (props.small && list.length > 200)
-    list.splice(200, list.length - 200);
+      return maker as MapMarker;
+    })
+    .filter(p => 
+      p.longitude && p.latitude 
+      && !isNaN(p.longitude) && !isNaN(p.latitude)
+      && p.longitude > -180 && p.longitude < 180
+      && p.latitude > -90 && p.latitude < 90
+    );
 
   asyncAddMarkers(list);
 

+ 2 - 1
src/pages/home/village/dialogs/ShareQRDialog.vue

@@ -44,11 +44,12 @@ const loader = useSimpleDataLoader(async () => {
     env_version: envVersion as 'trial'|'release'|'develop',
     auto_color: true,
   });
-});
+}, false);
 
 defineExpose({
   show: () => {
     show.value = true;
+    loader.load();
   },
 });
 </script>

+ 2 - 0
src/pages/home/village/index.vue

@@ -17,6 +17,7 @@
             :text="villageStore.currentVillage?.name || '未选择村社'"
             textColor="text.titleLight"
             size="medium"
+            radius="radius.xl"
             @click="showMyFollowPopup = true"
           />
         </BubbleTip>
@@ -25,6 +26,7 @@
           textColor="text.content"
           text="周边村社" 
           size="medium"
+          radius="radius.xl"
           @click="handleGoAround" 
         />
       </FlexRow>

+ 72 - 81
src/pages/home/village/introd/card.vue

@@ -2,7 +2,13 @@
   <SimplePageContentLoader :loader="pageThemeLoader">
     <ProvideVar 
       v-if="pageThemeLoader.content.value" 
-      :vars="pageThemeLoader.content.value.props?.varOvrride"
+      :vars="{
+        GridItemIconSize: 90,
+        GridItemBackgroundColor: 'transparent',
+        GridItemPaddingHorizontal: 0,
+        GridItemPaddingVertical: 8,
+        ...pageThemeLoader.content.value.props?.varOvrride
+      }"
       :colors="pageThemeLoader.content.value.props?.colorOvrride"
     >
   
@@ -96,7 +102,7 @@
                 <!-- 简介 -->
                 <TextEllipsis 
                   fontConfig="secondText"
-                  :outerProps="{ direction: 'row', width: '490rpx' }"
+                  :outerProps="{ direction: descOpen ? 'column' : 'row', width: descOpen ? undefined : '630rpx' }"
                   :lines="1" 
                   :expandable="(villageInfoLoader.content.value?.desc as string || '').length > 20"
                   :text="(villageInfoLoader.content.value?.desc as string) || '暂无简介,欢迎您来编写完善!'"
@@ -250,11 +256,7 @@
               <template v-else-if="node.type === 'Block:Collect'">
 
                 <!-- 魅力乡源 -->
-                <HomeTitle 
-                  :title="node.props?.title" 
-                  showMore 
-                  @moreClicked="handleGoCollect()"
-                >
+                <HomeTitle :title="node.props?.title">
                   <template #right>
                     <FlexRow align="center" gap="gap.md">
                       <FrameButton
@@ -274,23 +276,16 @@
                   </template>
                 </HomeTitle>
                 <Height height="gap.md" />
-                <ProvideVar :vars="{
-                  GridItemIconSize: 90,
-                  GridItemBackgroundColor: 'transparent',
-                  GridItemPaddingHorizontal: 0,
-                  GridItemPaddingVertical: 8,
-                }">
-                  <Grid :borderGrid="false" :mainAxisCount="4">
-                    <GridItem title="村社概况" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIntrod.png" touchable @click="handleGoCollect(11, '村社概况')" />
-                    <GridItem title="自然风光" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeEnvirounment.png" touchable @click="handleGoCollect(13, '自然风光')" />
-                    <GridItem title="历史沿革" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png" touchable @click="handleGoCollect(2, '历史沿革')" />
-                    <GridItem title="特色产业" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIndustry.png" touchable @click="handleGoCollect(9, '特色产业'  )"    />
-                    <GridItem title="文艺活动" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeActivity.png" touchable @click="handleGoCollect(12, '文艺活动')" />
-                    <GridItem title="非遗展示" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeShow.png" touchable @click="handleGoCollect(10, '非遗展示')" />
-                    <GridItem title="民俗风采" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeFolkloreVibe.png" touchable @click="handleGoCollect(8, '民俗风采')" />
-                    <GridItem title="历史人物" icon="https://xy.wenlvti.net/app_static/images/village/IconGoods.png" touchable @click="handleGoCollect(7, '历史人物')" />
-                  </Grid>
-                </ProvideVar>
+                <Grid :borderGrid="false" :mainAxisCount="4">
+                  <GridItem title="村社概况" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIntrod.png" touchable @click="handleGoCollect(11, '村社概况')" />
+                  <GridItem title="自然风光" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeEnvirounment.png" touchable @click="handleGoCollect(13, '自然风光')" />
+                  <GridItem title="历史沿革" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png" touchable @click="handleGoCollect(2, '历史沿革')" />
+                  <GridItem title="特色产业" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeIndustry.png" touchable @click="handleGoCollect(9, '特色产业'  )"    />
+                  <GridItem title="文艺活动" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeActivity.png" touchable @click="handleGoCollect(12, '文艺活动')" />
+                  <GridItem title="非遗展示" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeShow.png" touchable @click="handleGoCollect(10, '非遗展示')" />
+                  <GridItem title="民俗风采" icon="https://xy.wenlvti.net/app_static/images/village/IconLargeFolkloreVibe.png" touchable @click="handleGoCollect(8, '民俗风采')" />
+                  <GridItem title="历史人物" icon="https://xy.wenlvti.net/app_static/images/village/IconGoods.png" touchable @click="handleGoCollect(7, '历史人物')" />
+                </Grid>
 
               </template>
               <template v-else-if="node.type === 'Block:Games'">
@@ -298,68 +293,64 @@
                 <!-- 活力乡源 -->
                 <HomeTitle :title="node.props?.title" />
                 <Height height="gap.md" />
-                <ProvideVar :vars="{
-                  GridItemIconSize: 90,
-                  GridItemBackgroundColor: 'transparent',
-                  GridItemPaddingHorizontal: 0,
-                  GridItemPaddingVertical: 8,
-                }">
-                  <Grid :borderGrid="false" :mainAxisCount="4">
-                    <GridItem 
-                      v-for="item in node.props?.items" 
-                      :key="item.title"
-                      :title="item.title"
-                      :icon="item.icon"
-                      touchable 
-                      @click="() => context.getScriptEngine().execute(item.handler, node.getNodeScriptContext?.())" 
-                    />
-                  </Grid>
-                </ProvideVar>
+                <Grid :borderGrid="false" :mainAxisCount="4">
+                  <GridItem 
+                    v-for="item in node.props?.items" 
+                    :key="item.title"
+                    :title="item.title"
+                    :icon="item.icon"
+                    touchable 
+                    @click="() => context.getScriptEngine().execute(item.handler, node.getNodeScriptContext?.())" 
+                  />
+                </Grid>
 
               </template>
               <template v-else-if="node.type === 'Block:Official'">
 
                 <!-- 文脉乡源 -->
-                <HomeTitle :title="node.props?.title">
-                  <template #right>
-                    <FlexRow align="center" gap="gap.md">
-                      <BubbleTip
-                        v-model:show="showManageTip"
-                        position="bottom"
-                        crossPosition="right"
-                        arrowOffsetX="180rpx"
-                        content="村社贴图太乱?点这里整理"
-                        @contentClick="handleCloseManageTip(true)"
-                        @close="handleCloseManageTip(false)"
-                      >
-                        <FrameButton
-                          text="管理" 
-                          size="small" 
-                          primary
-                          @click="handleGoOfficalManage()"
-                        />
-                      </BubbleTip>
-                      <FrameButton 
-                        text="乡源AI帮你写" 
-                        size="small" 
-                        icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png"
-                        @click="handleGoPublish()" 
-                      />
-                    </FlexRow>
-                  </template>
-                </HomeTitle>
-                <Height height="gap.md" />
-                <RoundTags 
-                  v-model:active="listActiveTag" 
-                  :tags="tagsLoader.content.value || []" 
-                />
-                <Height height="gap.md" />
-                <OfficialAccountPublishWrap
-                  :topic="recommendTagName" 
-                  :path="recommendPath"
-                  @publishsuccess="onPublishSuccess"
-                  @empty="isOfficialEmpty=true"
-                />
+                <FlexCol>
+                  <FlexCol gap="gap.md" padding="padding.lg">
+                    <HomeTitle :title="node.props?.title" :showTopMargin="false">
+                      <template #right>
+                        <FlexRow align="center" gap="gap.md">
+                          <BubbleTip
+                            v-model:show="showManageTip"
+                            position="bottom"
+                            crossPosition="right"
+                            arrowOffsetX="180rpx"
+                            content="村社贴图太乱?点这里整理"
+                            @contentClick="handleCloseManageTip(true)"
+                            @close="handleCloseManageTip(false)"
+                          >
+                            <FrameButton
+                              text="管理" 
+                              size="small" 
+                              primary
+                              @click="handleGoOfficalManage()"
+                            />
+                          </BubbleTip>
+                          <FrameButton 
+                            text="乡源AI帮你写" 
+                            size="small" 
+                            icon="https://xy.wenlvti.net/app_static/images/village/IconLargeHistory.png"
+                            @click="handleGoPublish()" 
+                          />
+                        </FlexRow>
+                      </template>
+                    </HomeTitle>
+                    <Height height="gap.md" />
+                    <RoundTags 
+                      v-model:active="listActiveTag" 
+                      :tags="tagsLoader.content.value || []" 
+                    />
+                  </FlexCol>
+                  <OfficialAccountPublishWrap
+                    :topic="recommendTagName" 
+                    :path="recommendPath"
+                    @publishsuccess="onPublishSuccess"
+                    @empty="isOfficialEmpty=true"
+                  />
+                </FlexCol>
 
               </template>
             </template>

+ 99 - 91
src/pages/home/village/introd/data/DefaultCard.json

@@ -9,117 +9,125 @@
       "type": "flex",
       "props": {
         "direction": "column",
-        "padding": [30, 30, 0, 30],
         "gap": "gap.lg"
       },
       "nodes": [
-        {
-          "name": "VILLAGE:CONTENT:Basic",
-          "type": "BackgroundBox",
+         {
+          "type": "flex",
           "props": {
-            "color1": "#eecaa0",
-            "color2": "white",
-            "color2Position": "85%",
-            "color3": "white",
-            "radius": "radius.lg",
             "direction": "column",
-            "padding": [35, 30],
+            "padding": "padding.lg",
             "gap": "gap.lg"
           },
           "nodes": [
-            { "type": "Card:Basic" },
-            { "type": "Card:Level" },
-            { "type": "Card:Gallery" },
-            { "type": "Card:AddressAndMap" },
             {
-              "type": "flex",
+              "type": "BackgroundBox",
               "props": {
-                "direction": "row",
-                "justify": "center",
-                "align": "center",
-                "gap": "gap.md"
+                "color1": "#eecaa0",
+                "color2": "white",
+                "color2Position": "85%",
+                "color3": "white",
+                "radius": "radius.lg",
+                "direction": "column",
+                "padding": [35, 30],
+                "gap": "gap.lg"
               },
               "nodes": [
+                { "type": "Card:Basic" },
+                { "type": "Card:Level" },
+                { "type": "Card:Gallery" },
+                { "type": "Card:AddressAndMap" },
                 {
-                  "type": "button",
+                  "type": "flex",
                   "props": {
-                    "size": "mini",
-                    "icon": "picture",
-                    "text": "村社相册"
+                    "direction": "row",
+                    "justify": "center",
+                    "align": "center",
+                    "gap": "gap.md"
                   },
-                  "events": {
-                    "click": "globalContext.handleGoGallery()"
-                  }
+                  "nodes": [
+                    {
+                      "type": "button",
+                      "props": {
+                        "size": "mini",
+                        "icon": "picture",
+                        "text": "村社相册"
+                      },
+                      "events": {
+                        "click": "globalContext.handleGoGallery()"
+                      }
+                    },
+                    {
+                      "type": "button",
+                      "props": {
+                        "size": "mini",
+                        "icon": "edit-filling",
+                        "text": "编辑简介"
+                      },
+                      "events": {
+                        "click": "globalContext.handleGoEdit()"
+                      }
+                    },
+                    {
+                      "type": "button",
+                      "props": {
+                        "size": "mini",
+                        "icon": "fabulous",
+                        "text": "主页换肤"
+                      },
+                      "events": {
+                        "click": "globalContext.handleGoSkin()"
+                      }
+                    }
+                  ]
                 },
-                {
-                  "type": "button",
-                  "props": {
-                    "size": "mini",
-                    "icon": "edit-filling",
-                    "text": "编辑简介"
+                { "type": "Card:Static" }
+              ]
+            },
+            {
+              "name": "VILLAGE:CONTENT:Rank",
+              "type": "Block:Rank",
+              "props": {
+                "title": "排行榜"
+              }
+            },
+            {
+              "name": "VILLAGE:CONTENT:Collect",
+              "type": "Block:Collect",
+              "props": {
+                "title": "魅力乡源"
+              }
+            },
+            {
+              "name": "VILLAGE:CONTENT:Games",
+              "type": "Block:Games",
+              "props": {
+                "title": "活力乡源",
+                "items": [
+                  {
+                    "title": "乡源荣光",
+                    "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeHornor.png",
+                    "handler": "globalContext.handleGoCollect(23, '乡源荣光')"
                   },
-                  "events": {
-                    "click": "globalContext.handleGoEdit()"
-                  }
-                },
-                {
-                  "type": "button",
-                  "props": {
-                    "size": "mini",
-                    "icon": "fabulous",
-                    "text": "主页换肤"
+                  {
+                    "title": "乡源好物",
+                    "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeGoods.png",
+                    "handler": "globalContext.navTo(\"/pages/home/village/goods/index\", { villageId: globalContext.getVillageId() })"
                   },
-                  "events": {
-                    "click": "globalContext.handleGoSkin()"
+                  {
+                    "title": "乡源树",
+                    "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeTree.png",
+                    "handler": "globalContext.emit(\"goTree\")"
+                  },
+                  {
+                    "title": "互动游戏",
+                    "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeGame.png",
+                    "handler": "globalContext.navTo(\"/pages/home/village/games/index\")"
                   }
-                }
-              ]
-            },
-            { "type": "Card:Static" }
-          ]
-        },
-        {
-          "name": "VILLAGE:CONTENT:Rank",
-          "type": "Block:Rank",
-          "props": {
-            "title": "排行榜"
-          }
-        },
-        {
-          "name": "VILLAGE:CONTENT:Collect",
-          "type": "Block:Collect",
-          "props": {
-            "title": "魅力乡源"
-          }
-        },
-        {
-          "name": "VILLAGE:CONTENT:Games",
-          "type": "Block:Games",
-          "props": {
-            "title": "活力乡源",
-            "items": [
-              {
-                "title": "乡源荣光",
-                "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeHornor.png",
-                "handler": "globalContext.handleGoCollect(23, '乡源荣光')"
-              },
-              {
-                "title": "乡源好物",
-                "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeGoods.png",
-                "handler": "globalContext.navTo(\"/pages/home/village/goods/index\", { villageId: globalContext.getVillageId() })"
-              },
-              {
-                "title": "乡源树",
-                "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeTree.png",
-                "handler": "globalContext.emit(\"goTree\")"
-              },
-              {
-                "title": "互动游戏",
-                "icon": "https://xy.wenlvti.net/app_static/images/village/IconLargeGame.png",
-                "handler": "globalContext.navTo(\"/pages/home/village/games/index\")"
+                ]
               }
-            ]
-          }
+            }
+          ]
         },
         {
           "name": "VILLAGE:CONTENT:Official",

+ 23 - 10
src/pages/home/village/post/management-list.vue

@@ -1,11 +1,15 @@
 <template>
   <CommonTopBanner title="贴图管理" @backPressed="handleBack">
     <FlexCol padding="padding.md">
-      <SearchBar
-        v-model="searchText"
-        placeholder="搜一搜" 
-        @search="listLoader.reload()"
-      />
+      <FlexRow align="center" justify="space-between">
+        <SearchBar
+          v-model="searchText"
+          placeholder="搜一搜" 
+          :innerStyle="{ width: '430rpx' }"
+          @search="listLoader.reload()"
+        />
+        <Button icon="discount" text="管理话题" radius="radius.xl" @click="hndleGoManageTopic" />
+      </FlexRow>
       <Height :height="20" />
       <SimplePageListLoader :loader="listLoader">
         <FlexCol gap="gap.lg">
@@ -19,8 +23,8 @@
             :showPinned="item.ext?.isTop === 1"
             :showBlocked="item.ext?.isBlock === 1"
             :userName="item.nickName"
-            @click="goDetail(item)"
-            @management="manage(item)"
+            @click="handleGoDetail(item)"
+            @handleManagement="handleManage(item)"
           />
         </FlexCol>
       </SimplePageListLoader>
@@ -29,7 +33,7 @@
 </template>
 
 <script setup lang="ts">
-import { back, backAndCallOnPageBack } from '@/components/utils/PageAction';
+import { back, backAndCallOnPageBack, navTo } from '@/components/utils/PageAction';
 import { ref } from 'vue';
 import { alert, actionSheet, toast } from '@/components/dialog/CommonRoot';
 import { useLoadQuerys } from '@/components/composeabe/LoadQuerys';
@@ -43,6 +47,8 @@ import SimplePageListLoader from '@/components/loader/SimplePageListLoader.vue';
 import PostItem from './components/PostItem.vue';
 import ImagesUrls from '@/common/config/ImagesUrls';
 import { formatError } from '@imengyu/imengyu-utils';
+import FlexRow from '@/components/layout/FlexRow.vue';
+import Button from '@/components/basic/Button.vue';
 
 const searchText = ref('');
 const listManaged = ref(false);
@@ -82,7 +88,7 @@ const listLoader = useSimplePageListLoader(40, async (page, pageSize) => {
   };
 }, false);
 
-function goDetail(item: PostMessage) {
+function handleGoDetail(item: PostMessage) {
   if (!item.jumpUrl) {
     alert({
       title: '提示',
@@ -97,7 +103,7 @@ function goDetail(item: PostMessage) {
     }
   })
 }
-async function manage(item: PostMessage) {
+async function handleManage(item: PostMessage) {
   if (!item.jumpUrl || !item.ext) {
     alert({
       title: '提示',
@@ -154,6 +160,13 @@ async function manage(item: PostMessage) {
     uni.hideLoading();
   }
 }
+
+function hndleGoManageTopic() {
+  navTo('/pages/home/village/introd/config/config-tags', {
+    villageId: querys.value.villageId,
+  })
+}
+
 function handleBack() {
   if (listManaged.value) {
     backAndCallOnPageBack('refreshOfficialAccount', { })

+ 1 - 1
src/pages/index.vue

@@ -2,7 +2,7 @@
 	<view class="index" :style="{
     backgroundImage: tabIndex === 4 ? 
       `url('https://xy.wenlvti.net/app_static/images/mine/TopBanner.png')` 
-      : `url('${topBanner}')`,
+      : (topBanner ? `url('${topBanner}')` : 'none'),
     backgroundRepeat: 'no-repeat',
     backgroundSize: '100% auto',
     backgroundPosition: 'top center',