Преглед изворни кода

🎨 按要求修改挖掘页

快乐的梦鱼 пре 1 месец
родитељ
комит
4622d31949
2 измењених фајлова са 37 додато и 23 уклоњено
  1. 36 23
      src/pages/dig/index.vue
  2. 1 0
      src/store/collect.ts

+ 36 - 23
src/pages/dig/index.vue

@@ -56,34 +56,33 @@
                     onClick: () => goManagePage(item),
                   },
                   {
+                    icon: 'edit-filling',
+                    text: '采编',
+                    onClick: () => goSubmitDigPage(item),
+                  },
+                  {
                     icon: 'browse',
-                    text: '预览',
-                    onClick: () => goPreviewDigPage(item),
+                    text: '我的投稿',
+                    onClick: () => goMyDigPage(item),
                   },
                 ]">
-                  <Button v-if="authStore.isAdmin" icon="edit-filling" size="small">管理</Button>
+                  <Button v-if="authStore.isAdmin" icon="edit-filling" size="small">采编/管理</Button>
                 </BubbleBox>
-                <BubbleBox 
-                  v-if="authStore.isAdmin" 
-                  :items="[
-                    {
-                      icon: 'edit-filling',
-                      text: '采编',
-                      onClick: () => goSubmitDigPage(item),
-                    },
-                    {
-                      icon: 'browse',
-                      text: '我的投稿',
-                      onClick: () => goMyDigPage(item),
-                    },
-                  ]"
-                >
-                  <Button type="primary" size="small" icon="edit-filling">采编</Button>
+                <BubbleBox :items="[
+                  {
+                    icon: 'edit-filling',
+                    text: '采编',
+                    onClick: () => goSubmitDigPage(item),
+                  },
+                  {
+                    icon: 'browse',
+                    text: '我的投稿',
+                    onClick: () => goMyDigPage(item),
+                  },
+                ]">
+                  <Button v-if="!authStore.isAdmin" icon="edit-filling" size="small">采编</Button>
                 </BubbleBox>
-              </ButtonGroup>
-              <ButtonGroup v-if="!authStore.isAdmin">
-                <Button size="small" icon="browse" @click="goMyDigPage(item)">我的投稿</Button>
-                <Button type="primary" size="small" icon="edit-filling" @click="goSubmitDigPage(item)">采编</Button>
+                <Button type="primary" size="small" icon="edit-filling" @click="showOnlinePreviewDialog = true">线上展示</Button>            
               </ButtonGroup>
             </FlexRow>
           </FlexCol>
@@ -103,6 +102,17 @@
         </FlexCol>
       </FlexRow>
     </FlexCol>
+
+    <Dialog 
+      v-model:show="showOnlinePreviewDialog"
+      :showConfirm="false"
+    >
+      <FlexCol :padding="[40,20]" :gap="10" center>
+        <Image src="https://mn.wenlvti.net/app_static/xiangyuan/images/home/UnOpenIcon.png" width="300" mode="widthFix" />
+        <Text textAlign="center">尊敬的用户,您未开通线上村史的使用权限,开通后即可使用!</Text>
+        <Button size="large" type="primary" @click="showOnlinePreviewDialog = false">去开通</Button>
+      </FlexCol>
+    </Dialog>
   </FlexCol>
 </template>
 
@@ -127,9 +137,12 @@ import Height from '@/components/layout/space/Height.vue';
 import ButtonGroup from '@/components/basic/ButtonGroup.vue';
 import BubbleBox from '@/components/feedback/BubbleBox.vue';
 import Result from '@/components/feedback/Result.vue';
+import Dialog from '@/components/dialog/Dialog.vue';
 
+const showOnlinePreviewDialog = ref(false);
 const authStore = useAuthStore();
 const collectStore = useCollectStore();
+
 const notVolunteerError = ref(false);
 const villageListLoader = useSimpleDataLoader(async () => await VillageApi.getClaimedVallageList(), true);
 const volunteerInfoLoader = useSimpleDataLoader(async () => {

+ 1 - 0
src/store/collect.ts

@@ -76,6 +76,7 @@ export const useCollectStore = defineStore('collect', () => {
     for (const key of needRemoveKeys)
       collectableModulesMap.delete(key);
     collectableCatalogs.value = res.catalogIds || [];
+    console.log('collectableModulesMap', collectableModules, collectableModulesMap);
     setCollectableModules(collectableModulesMap);
   }