瀏覽代碼

🎨 优化页面细节换行逻辑,优化首页点亮逻辑

快乐的梦鱼 1 月之前
父節點
當前提交
335d219880

+ 1 - 0
src/common/components/SimpleDropDownPicker.vue

@@ -59,6 +59,7 @@ function bindPickerChange(e:{ detail: { value: number }}) {
 .simple-dropdown-box {
   position: relative;
   padding: 16rpx 18rpx;
+  font-size: 30rpx;
   border-radius: 30rpx;
   background: #FFFFFF;
   white-space: nowrap;

+ 2 - 0
src/common/config/Theme.ts

@@ -29,6 +29,8 @@ export function configAppTheme() {
     theme.varOverrides.radius.lg = '30rpx';
     theme.varOverrides.radius.lgr = '50rpx';
 
+    theme.varOverrides.ButtonDefaultColor = 'text.title';
+
     theme.textConfigs.primaryTitle = {
       color: 'text.title',
       fontFamily: 'SongtiSCBlack',

+ 2 - 1
src/components/basic/Button.vue

@@ -56,12 +56,13 @@ import { propGetThemeVar, useTheme, type ViewStyle } from '../theme/ThemeDefine'
 import { configPadding, DynamicColor, DynamicSize, selectStyleType } from '../theme/ThemeTools';
 import type { IconProps } from './Icon.vue';
 import type { FlexProps } from '../layout/FlexView.vue';
-import Text, { type TextProps } from './Text.vue';
+import Text from './Text.vue';
 import ActivityIndicator from './ActivityIndicator.vue';
 import Icon from './Icon.vue';
 import Touchable from '../feedback/Touchable.vue';
 import type { ButtonGroupContext } from './ButtonGroup.vue';
 import { useChildLinkChild } from '../composeabe/ChildItem';
+import type { TextProps } from './Text';
 
 export type ButtonType = 'default'|'primary'|'success'|'warning'|'danger'|'custom'|'text';
 export type ButtomSizeType = 'small'|'medium'|'large'|'larger'|'mini';

+ 2 - 2
src/components/dialog/ActionSheetTitle.vue

@@ -7,13 +7,13 @@
     }"
     justify="space-between"
   >
-    <Button v-if="cancelText" type="text" :textColor="cancelTextColor" @click="emit('cancel')">{{ cancelText }}</Button>
+    <Button v-if="cancelText" type="text" :textColor="cancelTextColor" :text="cancelText" @click="emit('cancel')" />
     <view v-else />
     <FlexCol v-if="title || description" :style="themeStyles.titleTextView.value" center>
       <text v-if="title" :style="themeStyles.title.value">{{ title }}</text>
       <text v-if="description" :style="themeStyles.description.value">{{ description }}</text>
     </FlexCol>
-    <Button v-if="confirmText" type="text" :textColor="confirmTextColor" :touchable="!confirmDisabled" @click="emit('confirm')">{{ confirmText }}</Button>
+    <Button v-if="confirmText" type="text" :textColor="confirmTextColor" :touchable="!confirmDisabled" :text="confirmText" @click="emit('confirm')" />
     <view v-else />
   </FlexRow>
 </template>

+ 1 - 1
src/components/dynamic/wrappers/PickerAddressField.vue

@@ -5,7 +5,7 @@
       :placeholder="readonly ? '未填写' : '输入地址或者选择地图地址'"
       @input="handleInput"
     />
-    <Button v-if="!disabled && !readonly" type="primary" size="mini" icon="map" @click="selectFromMap">地图选择</Button>
+    <Button v-if="!disabled && !readonly" type="primary" size="mini" icon="map" text="地图选择" @click="selectFromMap" />
     <view v-else></view>
   </FlexRow>
 </template>

+ 1 - 1
src/components/dynamic/wrappers/PickerCityField.vue

@@ -12,7 +12,7 @@
       v-bind="$attrs"
       :placeholder="readonly ? '未填写' : ($attrs.placeholder as string || '请选择省市区')" 
     />
-    <Button v-if="!disabled && !readonly" type="primary" size="mini" icon="map" @click="selectCityFromMap">地图选择</Button>
+    <Button v-if="!disabled && !readonly" type="primary" size="mini" icon="map" text="地图选择" @click="selectCityFromMap" />
   </FlexRow>
 </template>
 

+ 1 - 1
src/components/feedback/DropdownMenuItem.vue

@@ -68,7 +68,7 @@
         />
         <FlexCol
           v-if="type === 'mulit-check'" :padding="10">
-          <Button type="primary" shape="round" @click="close()">确定</Button>
+          <Button type="primary" shape="round" text="确定" @click="close()" />
         </FlexCol>
       </slot>
     </Popup>

+ 2 - 2
src/components/keyboard/PlateKeyBoardInner.vue

@@ -22,9 +22,9 @@
         </RadioGroup>
       </FlexRow>
       <FlexRow center>
-        <Button v-if="showDeleteButton" type="danger" size="small" shape="round" plain @click="onDelete">{{deleteButtonText}}</Button>
+        <Button v-if="showDeleteButton" type="danger" size="small" shape="round" plain :text="deleteButtonText" @click="onDelete" />
         <Width :size="10" />
-        <Button v-if="showFinishButton" type="primary" size="small" shape="round" plain @click="() => onFinish()">{{finishButtonText}}</Button>
+        <Button v-if="showFinishButton" type="primary" size="small" shape="round" plain :text="finishButtonText" @click="() => onFinish()" />
       </FlexRow>
     </FlexRow>
     <!-- 输入框区域 -->

+ 2 - 2
src/pages.json

@@ -56,9 +56,9 @@
       }
     },
     {
-      "path": "pages/home/light/submit-map",
+      "path": "pages/home/light/map",
       "style": {
-        "navigationBarTitleText": "选择点亮村社",
+        "navigationBarTitleText": "亮乡源地图",
         "navigationStyle": "custom",
         "enablePullDownRefresh": false
       }

+ 2 - 3
src/pages/dig/about/goving.vue

@@ -6,6 +6,7 @@ import Text from '@/components/basic/Text.vue';
 import Height from '@/components/layout/space/Height.vue';
 import Button from '@/components/basic/Button.vue';
 import { navTo } from '@/components/utils/PageAction';
+import PrimaryButton from '@/common/components/PrimaryButton.vue';
 
 </script>
 
@@ -15,9 +16,7 @@ import { navTo } from '@/components/utils/PageAction';
       <Image src="https://mn.wenlvti.net/app_static/xiangyuan/images/home/UnOpenIcon.png" width="300" mode="widthFix" />
       <Text textAlign="center">你挖掘的史料未经过专家审核,无法展示</Text>
       <Height :size="20" />
-      <Button size="large" type="primary" @click="navTo('/pages/home/about/contract')">
-        联系客服开通专家审核
-      </Button>
+      <PrimaryButton type="primary" text="联系客服开通专家审核" @click="navTo('/pages/home/about/contract')" />
     </FlexCol>
   </CommonTopBanner>
 </template>

+ 2 - 2
src/pages/dig/admin/review.vue

@@ -55,8 +55,8 @@
             :options="reviewFormDefine"
             :formGlobalParams="querys"
           />
-          <Button type="success" @click="handleReview(VolunteerInfo.STATUS_APPROVED)">通过审核</Button>
-          <Button type="danger" @click="handleReview(VolunteerInfo.STATUS_REJECTED)">驳回审核</Button>
+          <Button type="success" text="通过审核" @click="handleReview(VolunteerInfo.STATUS_APPROVED)" />
+          <Button type="danger" text="驳回审核" @click="handleReview(VolunteerInfo.STATUS_REJECTED)" />
         </FlexCol>
       </Popup>
     </FlexCol>

+ 1 - 1
src/pages/dig/admin/volunteer.vue

@@ -9,7 +9,7 @@
         :formGlobalParams="querys"
       />
       <Height :height="20" />
-      <Button type="primary" @click="submit">提交</Button>
+      <Button type="primary" text="提交" @click="submit" />
     </FlexCol>
   </CommonRoot>
 </template>

+ 3 - 10
src/pages/dig/forms/common.vue

@@ -32,7 +32,7 @@
         </BackgroundBox>
         <LoadingPage v-else loadingText="读取数据中..." /> 
         <Height :height="20" />
-        <Button v-if="querys.isView" type="primary" :loading="loading" @click="backPrev(false, false)">返回</Button>
+        <Button v-if="querys.isView" type="primary" :loading="loading" text="返回" @click="backPrev(false, false)" />
         <FlexCol v-else :gap="10" center>
           <Height :height="20" />
           <PrimaryButton 
@@ -44,12 +44,11 @@
           <Button v-if="querys.id > 0 && !loading" 
             type="text" 
             textColor="danger" 
+            text="删除"
             icon="delete-filling"
             :loading="deleteing" 
             @click="deleteInfo"
-          >
-            删除
-          </Button>
+          />
         </FlexCol>
       </FlexCol>
       <XBarSpace />
@@ -88,12 +87,6 @@ const show = ref(true);
 const deleteing = ref(false);
 const subTitle = ref('');
 
-uni.onMemoryWarning((res) => {
-  uni.showModal({
-    content: 'onMemoryWarningReceive' + JSON.stringify(res), 
-  })
-});
-
 const formRef = ref<IDynamicFormRef>();
 const formModel = ref(new CommonInfoModel()) as Ref<CommonInfoModel>;
 const formDefine = ref<IDynamicFormOptions>({

+ 2 - 2
src/pages/dig/sharereg/bind-wx.vue

@@ -2,8 +2,8 @@
   <CommonRoot>
     <FlexCol :gap="20" :padding="30">
       <Image src="https://mn.wenlvti.net/app_static/xiangyuan/images/bind-banner.jpg" width="100%" height="400" />
-      <Button type="primary" @click="submit" :loading="loading">立即绑定</Button>
-      <Button @click="doBack">稍后再说</Button>
+      <Button type="primary" text="立即绑定" @click="submit" :loading="loading" />
+      <Button text="稍后再说" @click="doBack" />
     </FlexCol>
   </CommonRoot>
 </template>

+ 2 - 2
src/pages/dig/sharereg/bind.vue

@@ -7,8 +7,8 @@
         :options="registerFormDefine"
       />
       <Height :height="20" />
-      <Button type="primary" @click="registerSubmit" :loading="registerFormLoading">立即绑定</Button>
-      <Button @click="cancel" :loading="registerFormLoading">稍后再说</Button>
+      <Button type="primary" @click="registerSubmit" text="立即绑定" :loading="registerFormLoading" />
+      <Button @click="cancel" text="稍后再说" :loading="registerFormLoading" />
     </FlexCol>
   </CommonRoot>
 </template>

+ 1 - 3
src/pages/home/chat/dependent/post/components/tbutton.vue

@@ -14,9 +14,7 @@
         <IconButton icon="close" @click="hideTip" />
       </FlexRow>
     </template>
-    <Button icon="https://xy.wenlvti.net/app_static/images/village/IconAi.png" @click="openAiWindow">
-      AI帮你写
-    </Button>
+    <Button icon="https://xy.wenlvti.net/app_static/images/village/IconAi.png" text="AI帮你写" @click="openAiWindow" /> 
   </BubbleBox>
 </template>
 

+ 37 - 29
src/pages/home/components/LightMap.vue

@@ -5,13 +5,18 @@
       'full': full ,
       'small': small
     }" 
+    @click="emit('mapClick')"
   >
     <slot />
     <map 
       id="prevMap"
       map-id="prevMap"
       class="light-map-map"
+      :style="{
+        pointerEvents: small ? 'none' : undefined
+      }"
       :show-location="true"
+      :enable-poi="!small"
       :scale="12"
       :longitude="lonlat?.longitude"
       :latitude="lonlat?.latitude"
@@ -45,31 +50,34 @@
       :padding="full ? [0, 40] : 20"
     >
       <FlexRow align="center" justify="space-between">
-        <NButton
-          :icon="searchKeyword ? 'close' : 'search'" 
-          iconMargin="0"
-          @click="showSearch" 
-        />
-        <FlexRow gap="gap.md" align="center">
+        <view v-if="small"></view>
+        <template v-else>
           <NButton
-            :text="city + ' ▼'"
-            color="white"
-            type="custom"
-            :radius="30"
-            :padding="[30,10]"
-            :textProps="{
-              maxWidth: 150,
-              lines: 1
-            }"
-            @click="emit('changeCity')" 
+            :icon="searchKeyword ? 'close' : 'search'" 
+            iconMargin="0"
+            @click="showSearch" 
           />
-          <SimpleDropDownPicker
-            class="light-map-region-picker" 
-            :modelValue="selectedRegion" 
-            @update:modelValue="onSelectedRegion"
-            :columns="regionLoader.content.value" 
-          />
-        </FlexRow>
+          <FlexRow gap="gap.md" align="center">
+            <NButton
+              :text="city + ' ▼'"
+              color="white"
+              type="custom"
+              :radius="30"
+              :padding="[30,10]"
+              :textProps="{
+                maxWidth: 150,
+                lines: 1
+              }"
+              @click="emit('changeCity')" 
+            />
+            <SimpleDropDownPicker
+              class="light-map-region-picker" 
+              :modelValue="selectedRegion" 
+              @update:modelValue="onSelectedRegion"
+              :columns="regionLoader.content.value" 
+            />
+          </FlexRow>
+        </template>
         <NButton
           icon="navigation" 
           iconMargin="0"
@@ -78,7 +86,6 @@
       </FlexRow>
       <StatusBarSpace v-if="full" />
     </FlexCol>
-
     <Dialog 
       v-model:show="searchDialogShow" 
       title="搜索村社"
@@ -137,6 +144,7 @@ const emit = defineEmits([
   'lightVillage',
   'createVillage',
   'changeCity',
+  'mapClick',
 ]);
 
 const props = defineProps<{
@@ -189,7 +197,7 @@ const mapLoader = useSimpleDataLoader<MapMarker[]>(async () => {
       iconPath: '',
       joinCluster: true,
       callout: {
-        display: 'ALWAYS',
+        display: props.small ? 'BYCLICK' : 'ALWAYS',
         content: p.name,
         color: '#000000',
         fontSize: 12,
@@ -199,7 +207,7 @@ const mapLoader = useSimpleDataLoader<MapMarker[]>(async () => {
       },
     }
 
-    if (p.isLight) {
+    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) {
@@ -372,7 +380,7 @@ onMounted(async () => {
   mapCtx.initMarkerCluster({
     enableDefaultStyle: false,
     zoomOnClick: true,
-    gridSize: 50,
+    gridSize: props.small ? 10 : 35,
   });
   mapCtx.on('markerClusterCreate', (e: { clusters: any[] }) => {
     const customClusters = e.clusters.map((cluster) => {
@@ -426,10 +434,10 @@ defineExpose({
     }
   }
   &.small {
-    height: 500rpx;
+    height: 400rpx;
     border-radius: 20rpx;
     .light-map-map {
-      height: 500rpx;
+      height: 400rpx;
     }
   }
 

+ 15 - 12
src/pages/home/dig.vue

@@ -42,18 +42,16 @@
         }"
       >
         <FlexCol :gap="10">
-          <FlexRow 
+          <BoxMid 
             v-for="item in villageListLoader.content.value"
             :key="item.id"
             radius="radius.md"
             :padding="20"
+            direction="row"
             align="center"
             justify="space-between"
-            :innerStyle="{
-              border: '1px solid #fff',
-            }"
           >
-            <FlexRow align="center" :gap="20">
+            <FlexRow align="center" gap="gap.lg">
               <Image 
                 mode="aspectFill"
                 :src="item.image" 
@@ -61,9 +59,14 @@
                 :width="80"
                 :height="80"
               />
-              <H3>{{ item.villageName }}</H3>
+              <Text 
+                :text="item.villageName" 
+                :maxWidth="260"
+                :lines="2"
+                fontConfig="lightGoldTitle" 
+              />
             </FlexRow>
-            <ButtonGroup direction="row" align="center" :gap="0">
+            <FlexRow align="center" gap="gap.md">
               <BubbleBox :items="[
                 {
                   icon: 'edit-filling',
@@ -76,12 +79,12 @@
                   onClick: () => goSubmitDigPage(item),
                 },
               ]">
-                <Button v-if="authStore.isAdmin" icon="edit-filling" size="small">采编/管理</Button>
+                <FrameButton v-if="authStore.isAdmin" icon="edit-filling" text="采编/管理" size="small" />
               </BubbleBox>
-              <Button v-if="!authStore.isAdmin" icon="edit-filling" size="small" @click="goSubmitDigPage(item)">采编</Button>
-              <Button type="primary" size="small" icon="edit-filling" @click="goMyDigPage(item)">我的投稿</Button>            
-            </ButtonGroup>
-          </FlexRow>
+              <FrameButton v-if="!authStore.isAdmin" icon="edit-filling" text="采编" size="small" @click="goSubmitDigPage(item)" />
+              <FrameButton primary size="small" icon="edit-filling" text="我的投稿" @click="goMyDigPage(item)" />
+            </FlexRow>
+          </BoxMid>
         </FlexCol>
       </SimplePageContentLoader>
     </RequireLogin>

+ 13 - 30
src/pages/home/index.vue

@@ -61,12 +61,10 @@
         small
         :city="currentCity"
         :cityCode="currentCityCode"
-        v-model:district="currentDistrict"
+        :district="currentDistrict"
         :lonlat="currentLocation.currentLonlat.value"
         @getCurrentLonlat="currentLocation.getCurrentExactLocation"
-        @createVillage="handleGoCreateVillage"
-        @selectVillage="handleGoVillageDetails"
-        @changeCity="showCityPopup=true"
+        @mapClick="handleGoMap"
       >
         <NoticeBar 
           v-if="currentNoticeContent"
@@ -96,17 +94,15 @@
           icon="https://xy.wenlvti.net/app_static/images/home/IconSwitch.png" 
           radius="radius.lg" 
           :padding="[10, 30]"
+          text="切换城市"
           @click="showCityPopup = true"
-        >
-          切换城市
-        </Button>
+        />
         <Button 
           icon="https://xy.wenlvti.net/app_static/images/home/IconFollow.png" 
           radius="radius.lg" :padding="[10, 30]" 
           @click="showMyFollowPopup = true"
-        >
-          我的关注
-        </Button>
+          text="我的关注"
+        />
         <BubbleTip
           v-model:show="showLightTip"
           content="没有加入村社?点击这里点亮村落"
@@ -119,10 +115,9 @@
           <Button 
             icon="https://xy.wenlvti.net/app_static/images/home/IconLight.png" 
             radius="radius.lg" :padding="[10, 30]" 
+            text="点亮村社"
             @click="handleLightVillage"
-          >
-            点亮村社
-          </Button>
+          />
         </BubbleTip>
       </FlexRow>
 
@@ -369,21 +364,6 @@ async function handleGoVillageDetails(item: VillageListItem) {
   await waitTimeOut(100);
   emit('goVillage')
 }
-async function handleGoCreateVillage(item: VillageMapItem) {
-  const con = await confirm({
-    title: '提示',
-    content: '您选择的村社尚未建村,是否去一键建村?',
-    confirmText: '去建村',
-  });
-  if (con) {
-    navTo('/pages/home/light/create-village', {
-      villageName: item.name,
-      areaCode: item.areaCode,
-      longitude: item.longitude,
-      latitude: item.latitude,
-    });
-  }
-}
 function handleSelectCity(city: RegionItem) {
   currentCity.value = city.name;
   currentCityCode.value = city.areaCode;
@@ -404,11 +384,14 @@ async function handleGoPublish() {
   }, '欢迎您发布内容,登录后以便使用更多功能哦!');
 }
 async function handleLightVillage() {
-  requireLogin(async () => navTo('/pages/home/light/submit-map', { 
+  requireLogin(async () => navTo('/pages/home/light/create-village'), '登录后才能点亮村社哦!');
+}
+function handleGoMap() {
+  navTo('/pages/home/light/map', {
     city: currentCity.value,
     cityCode: currentCityCode.value,
     district: currentDistrict.value,
-  }), '登录后才能点亮村社哦!');
+  });
 }
 function handleSearch() {
   if (!searchKeywords.value) {

+ 1 - 1
src/pages/home/light/create-village.vue

@@ -1,5 +1,5 @@
 <template>
-  <CommonTopBanner title="创建村庄">
+  <CommonTopBanner title="点亮村社">
     <FlexCol padding="padding.md" gap="gap.md">
       <template v-if="step === 'selectArea'">
         <FlexRow center>

+ 57 - 58
src/pages/home/light/submit-map.vue

@@ -1,3 +1,56 @@
+<template>
+  <CommonRoot>
+    <FlexCol position="absolute" :top="0" :left="0" :right="0" :zIndex="1000">
+      <StatusBarSpace />
+      <NavBar leftButton="back" />
+      <FlexRow center>
+        <BoxMid 
+          :innerStyle="{
+            width: '670rpx',
+          }"
+          direction="column"
+          align="center"
+          gap="gap.md"
+        > 
+          <FlexCol center>
+            <Image src="https://xy.wenlvti.net/app_static/images/home/BadgeNew.png" :width="220" mode="widthFix" />
+            <Text text="亮乡源地图" fontConfig="primaryTitle" />
+          </FlexCol>
+          <FlexCol gap="gap.lg">
+            <Text text="这里可看到您附近的村落,村落乡源光贡献越多,村落越亮哦!快去为自己家乡建设做贡献吧!" textAlign="center" fontConfig="contentText" :fontSize="26" />
+            <PrimaryButton text="去点亮我的家乡" @click="navTo('/pages/home/light/create-village')" />
+          </FlexCol>
+        </BoxMid>
+      </FlexRow>
+    </FlexCol>
+    <JoinDialog
+      ref="joinDialog" 
+      :villageId="joinCurrentVillageId"
+      @finish="handleJoinFinish"
+    />
+    <LightMap 
+      ref="lightMap"
+      full
+      :city="currentCity"
+      :cityCode="currentCityCode"
+      :district="currentDistrict"
+      :lonlat="currentLocation.currentLonlat.value"
+      @lightVillage="handleLightVillage"
+      @createVillage="handleCreateVillage"
+      @getCurrentLonlat="currentLocation.getCurrentExactLocation"
+      @changeCity="showCityPopup=true"
+    />   
+    <Popup 
+      v-model:show="showCityPopup" 
+      closeable
+      position="bottom"
+      size="60vh"
+    >
+      <CitySelect @selectCity="handleSelectCity" />
+    </Popup>
+  </CommonRoot>
+</template>
+
 <script setup lang="ts">
 import { ref } from 'vue';
 import { useLoadQuerys } from '@/components/composeabe/LoadQuerys';
@@ -18,8 +71,8 @@ import BoxMid from '@/common/components/box/BoxMid.vue';
 import JoinDialog from '../village/dialogs/JoinDialog.vue';
 import CitySelect from '../components/CitySelect.vue';
 import Popup from '@/components/dialog/Popup.vue';
-import FrameButton from '@/common/components/FrameButton.vue';
 import CommonRoot from '@/components/dialog/CommonRoot.vue';
+import PrimaryButton from '@/common/components/PrimaryButton.vue';
 
 const { querys } = useLoadQuerys({
   latitude: AppCofig.defaultLonLat[1],
@@ -48,8 +101,8 @@ function handleLightVillage(villageId: number) {
 async function handleCreateVillage(item: VillageMapItem) {
   const con = await confirm({
     title: '提示',
-    content: '您选择的村社尚未建村,是否去一键建村?',
-    confirmText: '去建村',
+    content: '您选择的村社尚未点亮,是否去一键点亮?',
+    confirmText: '去点亮',
   });
   if (con) {
     navTo('/pages/home/light/create-village', {
@@ -112,58 +165,4 @@ defineExpose({
     }
   }
 })
-</script>
-
-<template>
-  <CommonRoot>
-    <FlexCol position="absolute" :top="0" :left="0" :right="0" :zIndex="1000">
-      <StatusBarSpace />
-      <NavBar leftButton="back" />
-      <FlexRow center>
-        <BoxMid 
-          :innerStyle="{
-            width: '670rpx',
-          }"
-          direction="column"
-          align="center"
-          gap="gap.md"
-        > 
-          <FlexCol center>
-            <Image src="https://xy.wenlvti.net/app_static/images/home/BadgeNew.png" :width="220" mode="widthFix" />
-            <Text text="请选择您要点亮的村社" fontConfig="primaryTitle" />
-          </FlexCol>
-          <FlexRow gap="gap.md">
-            <FrameButton size="midium" icon="search" text="点击搜索" @click="lightMap?.showSearch()" />
-            <FrameButton size="midium" icon="home-filling" text="没有我的家乡?点这里建村" @click="navTo('/pages/home/light/create-village')" />
-          </FlexRow>
-        </BoxMid>
-      </FlexRow>
-    </FlexCol>
-    <JoinDialog
-      ref="joinDialog" 
-      :villageId="joinCurrentVillageId"
-      @finish="handleJoinFinish"
-    />
-    <LightMap 
-      ref="lightMap"
-      full
-      :city="currentCity"
-      :cityCode="currentCityCode"
-      :district="currentDistrict"
-      :lonlat="currentLocation.currentLonlat.value"
-      :isLightMode="true" 
-      @lightVillage="handleLightVillage"
-      @createVillage="handleCreateVillage"
-      @getCurrentLonlat="currentLocation.getCurrentExactLocation"
-      @changeCity="showCityPopup=true"
-    />   
-    <Popup 
-      v-model:show="showCityPopup" 
-      closeable
-      position="bottom"
-      size="60vh"
-    >
-      <CitySelect @selectCity="handleSelectCity" />
-    </Popup>
-  </CommonRoot>
-</template>
+</script>

+ 2 - 0
src/pages/home/village/dialogs/ChangeNickDialog.vue

@@ -30,6 +30,7 @@ import LightVillageApi from '@/api/light/LightVillageApi';
 const show = ref(false);
 const props = defineProps<{
   villageId: number;
+  currentNick?: string;
 }>();
 const emit = defineEmits(['finish']);
 const villageStore = useVillageStore();
@@ -60,6 +61,7 @@ async function addSubmit() {
 defineExpose({
   show: () => {
     show.value = true;
+    name.value = props.currentNick || '';
   },
 });
 </script>

+ 1 - 1
src/pages/home/village/gallery/index.vue

@@ -64,7 +64,7 @@
         <template #empty>
           <Empty description="还没有任何村社照片,快来上传吧">
             <Height :height="20" />
-            <Button type="primary" icon="add" @click="uploadImage">上传图片</Button>
+            <Button type="primary" icon="add" text="上传图片" @click="uploadImage" />
           </Empty>
         </template>
       </SimplePageListLoader>

+ 55 - 54
src/pages/home/village/introd/card.vue

@@ -14,66 +14,68 @@
     >
 
       <!-- 标题 -->
-      <FlexRow justify="space-between" align="flex-end" width="100%">
+      <FlexRow justify="space-between" gap="gap.lg" wrap align="flex-end" width="100%">
         <FlexRow gap="gap.md">
           <Text 
-            :text="villageInfoLoader.content.value?.title" 
+            :text="title" 
             :lines="1" 
             :fontSize="40"
-            :maxWidth="240"
             wordBreak="break-all"
             fontConfig="primaryTitle"
           />
-          <IconButton icon="cascades" :size="40" @click="shareQRDialog?.show()" />
         </FlexRow>
-        <FlexRow center gap="gap.lg">
-          <BubbleTip
-            v-model:show="showFollowTip"
-            content="关注我,方便下次进入"
-            @contentClick="isFollowed ? undefined : onFollow()"
-            @close="handleCloseFollowTip"
-          >
-            <Button 
-              icon="https://xy.wenlvti.net/app_static/images/village/IconJoin.png" 
+        <FlexRow flex="1" justify="space-between" align="center" gap="gap.lg">
+          <IconButton icon="cascades" :size="40" @click="shareQRDialog?.show()" />
+          <FlexRow align="center" gap="gap.lg">
+            <BubbleTip
+              v-model:show="showFollowTip"
+              content="关注我,方便下次进入"
+              @contentClick="isFollowed ? undefined : onFollow()"
+              @close="handleCloseFollowTip"
+            >
+              <Button 
+                :icon="isFollowed ? 'success' : 'https://xy.wenlvti.net/app_static/images/village/IconJoin.png'" 
+                radius="radius.lgr"
+                :text="isFollowed ? (title.length < 5 ? '已关注' : '') : '关注'"
+                :padding="[15, 10]"
+                :iconProps="{ size: 38 }"
+                @click="isFollowed ? onUnFollow() : onFollow()"
+              />
+            </BubbleTip>
+            <FlexRow 
+              v-if="isJoined"
+              gap="gap.md"
               radius="radius.lgr"
-              @click="isFollowed ? onUnFollow() : onFollow()"
+              backgroundColor="background.tertiary"
             >
-              {{ isFollowed ? '已关注' : '关注' }}
-            </Button>
-          </BubbleTip>
-          <FlexRow 
-            v-if="isJoined"
-            gap="gap.md"
-            radius="radius.lgr"
-            backgroundColor="background.tertiary"
-          >
-            <Avatar 
-              :src="authStore.userInfo?.avatar" 
-              :size="65"
-              defaultAvatar="https://xy.wenlvti.net/app_static/images/mine/DefaultAvatar.png"
+              <Avatar 
+                :src="authStore.userInfo?.avatar" 
+                :size="65"
+                defaultAvatar="https://xy.wenlvti.net/app_static/images/mine/DefaultAvatar.png"
+              />
+              <FlexCol position="relative" gap="gap.sm" :padding="[0,30,0,0]">
+                <FlexRow align="center" :gap="10">
+                  <Text :text="displayMyName" fontSize="23" :lines="1" :maxWidth="150" fontConfig="lightImportantTitle" />
+                  <Button 
+                    v-if="isStaff" 
+                    :innerStyle="{ position: 'absolute', right: 0, top: 0, transform: 'translate(5%,-50%)' }"
+                    text="管理" size="mini" radius="radius.md" type="danger" 
+                    @click="staffInfoRef?.show()" 
+                  />
+                </FlexRow>
+                <IconButton icon="edit-filling" size="26" @click="changeNickRef?.show()">
+                  <Text text="改昵称" :wrap="false" fontSize="22" fontConfig="subText" />
+                </IconButton>
+              </FlexCol>
+            </FlexRow>
+            <Button 
+              v-else
+              icon="https://xy.wenlvti.net/app_static/images/village/IconFollow.png"
+              radius="radius.lgr"
+              text="加入"
+              @click="handleGoJoin()"
             />
-            <FlexCol position="relative" gap="gap.sm" :padding="[0,30,0,0]">
-              <FlexRow align="center" :gap="10">
-                <Text :text="displayMyName" fontSize="23" :lines="1" :maxWidth="150" fontConfig="lightImportantTitle" />
-                <Button 
-                  v-if="isStaff" 
-                  :innerStyle="{ position: 'absolute', right: 0, top: 0, transform: 'translate(5%,-50%)' }"
-                  text="管理" size="mini" radius="radius.md" type="danger" 
-                  @click="staffInfoRef?.show()" 
-                />
-              </FlexRow>
-              <IconButton icon="edit-filling" size="26" @click="changeNickRef?.show()">
-                <Text text="改昵称" fontSize="22" fontConfig="subText" />
-              </IconButton>
-            </FlexCol>
           </FlexRow>
-          <Button 
-            v-else
-            icon="https://xy.wenlvti.net/app_static/images/village/IconFollow.png"
-            radius="radius.lgr"
-            text="加入"
-            @click="handleGoJoin()"
-          />
         </FlexRow>
       </FlexRow>
 
@@ -110,10 +112,9 @@
             radius="radius.lgr" 
             :padding="[10, 30]" 
             backgroundColor="white" 
+            text="升级村社"
             @click="upgradeRef?.show()"
-          >
-            升级村社
-          </Button>
+          />
         </FlexRow>
       </FlexRow>
       
@@ -305,6 +306,7 @@
   <ChangeNickDialog 
     v-if="villageStore.currentVillage"
     :villageId="villageStore.currentVillage.id"
+    :currentNick="displayMyName"
     ref="changeNickRef"
   />  
   <StaffInfoDialog 
@@ -451,9 +453,8 @@ const villageInfoLoader = useSimpleDataLoader(async () => {
     latitude: village?.latitude || 0,
   };
 });
-const isLight = computed(() => {
-  return villageStore.currentVillage?.isLight ?? false;
-});
+const isLight = computed(() => villageStore.currentVillage?.isLight ?? false);
+const title = computed(() => villageInfoLoader.content.value?.title || '');
 const extraInfoInList = computed(() => villageStore.myJoinedVillages.find(v => v.id === villageStore.currentVillage?.id));
 const displayMyName = computed(() => extraInfoInList.value?.villageNickname || authStore.userInfo?.nickname || authStore.userInfo?.username || '暂无昵称');
 const staffInfo = computed(() => extraInfoInList.value ? {

+ 1 - 3
src/pages/home/village/post/management-topic.vue

@@ -4,9 +4,7 @@
       <Image src="https://mn.wenlvti.net/app_static/xiangyuan/images/home/UnOpenIcon.png" width="300" mode="widthFix" />
       <Text textAlign="center">您还不是管理员,无法管理贴图哦</Text>
       <Height :size="20" />
-      <Button size="large" type="primary" @click="back">
-        返回
-      </Button>
+      <Button size="large" type="primary" text="返回" @click="back" />
     </FlexCol>
     <FlexCol v-else padding="padding.md">
       <SimplePageContentLoader :loader="topicsListLoader">

+ 5 - 5
src/pages/home/village/upgrade/my-upgrade-management.vue

@@ -2,7 +2,7 @@
 
 <template>
   <CommonTopBanner 
-    title="升级成为管理员"
+    title="升级成为临时管理员"
     showNav
     :customBack="true"
     @backPressed="handleBack"
@@ -22,12 +22,12 @@
           direction="row" justify="space-between" align="center" gap="gap.md"
         >
           <FlexCol width="74%" gap="gap.md">
-            <FlexRow align="center" gap="gap.md">
+            <FlexCol gap="gap.md">
               <Text :text="item.name" fontConfig="lightImportantTitle" :fontSize="42" />
-              <Text :text="`(${item.timeTypeText})`" :fontSize="42" :color="item.timeTypeText === '永久' ? 'warning' : 'success'" />
-            </FlexRow>
+              <Text :text="`${item.timeTypeText === '限时' ? `临时 ${item.days} 天管理员` : '永久'}`" :fontSize="32" :color="item.timeTypeText === '永久' ? 'warning' : 'success'" />
+            </FlexCol>
             <FlexRow align="center" gap="gap.md">
-              <Tag v-if="item.pointsLimit > 0" :text="`最低积分要求:${item.pointsLimit}`" :type="isPointEnough(item.pointsLimit) ? 'success' : 'danger'" />
+              <Tag v-if="item.pointsLimit > 0" :text="`${item.pointsLimit}积分/乡源果`" :type="isPointEnough(item.pointsLimit) ? 'success' : 'danger'" />
             </FlexRow>
           </FlexCol>
           <FlexRow align="center" gap="gap.lg">

+ 3 - 3
src/pages/index.vue

@@ -76,14 +76,14 @@ const { querys } = useLoadQuerys({
   openLogin: false,
   villageId: 0,
   userId: 0,
-  scense: '',
+  scene: '',
 }, (_querys) => {
   if (_querys.openLogin) {
     navTo('/pages/user/login');
   }
-  if (_querys.scense) {
+  if (_querys.scene) {
     //处理从二维码进入村社情况
-    const sp = _querys.scense.split(':');
+    const sp = _querys.scene.split(':');
     switch (sp[0]) {
       case 'invg':
         if (sp.length > 1) {

+ 2 - 4
src/pages/user/update/password.vue

@@ -17,9 +17,7 @@
         </text>
       </Form>
       <Height :height="40" />
-      <Button type="primary" :loading="loading" @click="submitForm" >
-        保存修改
-      </Button>
+      <PrimaryButton text="保存修改" @click="submitForm" />
     </FlexCol>
   </CommonTopBanner>
 </template>
@@ -31,7 +29,7 @@ import FlexCol from '@/components/layout/FlexCol.vue';
 import Form from '@/components/form/Form.vue';
 import Field from '@/components/form/Field.vue';
 import Height from '@/components/layout/space/Height.vue';
-import Button from '@/components/basic/Button.vue';
+import PrimaryButton from '@/common/components/PrimaryButton.vue';
 import type { Rules } from 'async-validator';
 import CommonTopBanner from '@/common/components/CommonTopBanner.vue';
 

+ 2 - 6
src/pages/user/update/profile.vue

@@ -27,13 +27,9 @@
 
       <Height :height="40" />
 
-      <Button type="primary" :loading="loading" @click="submitForm" >
-        保存修改
-      </Button>
+      <Button type="primary" text="保存修改" :loading="loading" @click="submitForm" />
       <Height :height="20" />
-      <Button :plain="true" @click="navTo('/pages/user/update/password')">
-        修改密码
-      </Button>
+      <Button :plain="true" text="修改密码" @click="navTo('/pages/user/update/password')" />
     </FlexCol>
   </CommonTopBanner>
 </template>