|
@@ -107,7 +107,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref } from 'vue';
|
|
|
|
|
|
|
+import { ref, watch } from 'vue';
|
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
import { navTo } from '@/components/utils/PageAction';
|
|
|
import { useAuthStore } from '@/store/auth';
|
|
import { useAuthStore } from '@/store/auth';
|
|
|
import { useCollectStore } from '@/store/collect';
|
|
import { useCollectStore } from '@/store/collect';
|
|
@@ -144,6 +144,14 @@ const volunteerInfoLoader = useSimpleDataLoader(async () => {
|
|
|
}, true);
|
|
}, true);
|
|
|
const rankListLoader = useSimpleDataLoader(async () => await VillageApi.getVolunteerRanklist(), true);
|
|
const rankListLoader = useSimpleDataLoader(async () => await VillageApi.getVolunteerRanklist(), true);
|
|
|
|
|
|
|
|
|
|
+watch(() => authStore.isLogged, (newVal) => {
|
|
|
|
|
+ if (newVal) {
|
|
|
|
|
+ villageListLoader.loadData();
|
|
|
|
|
+ volunteerInfoLoader.loadData();
|
|
|
|
|
+ rankListLoader.loadData();
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
function goSubmitDigPage(item: VillageListItem) {
|
|
function goSubmitDigPage(item: VillageListItem) {
|
|
|
navTo('./dig/details', {
|
|
navTo('./dig/details', {
|
|
|
name: item.villageName,
|
|
name: item.villageName,
|