Quellcode durchsuchen

修改细节问题

快乐的梦鱼 vor 1 Monat
Ursprung
Commit
ec7d52fe78
2 geänderte Dateien mit 16 neuen und 1 gelöschten Zeilen
  1. 14 0
      src/pages/index.vue
  2. 2 1
      src/pages/user/index.vue

+ 14 - 0
src/pages/index.vue

@@ -41,6 +41,7 @@ import HomeIndex from './home/index.vue';
 import DiscoverIndex from './home/discover/index.vue';
 import StoreIndex from './home/store/index.vue';
 import CommonRoot from '@/components/dialog/CommonRoot.vue';
+import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
 
 const title = computed(() => {
   switch (tabIndex.value) {
@@ -58,6 +59,19 @@ const title = computed(() => {
   return '';
 });
 const tabIndex = ref(0);
+
+onShareAppMessage(() => {
+  return {
+    title: '村社文化资源挖掘平台',
+    path: '/pages/index/index',
+  }
+})
+onShareTimeline(() => {
+  return {
+    title: '村社文化资源挖掘平台',
+    path: '/pages/index/index',
+  }
+})
 </script>
 
 <style scoped>

+ 2 - 1
src/pages/user/index.vue

@@ -94,7 +94,8 @@ function doLogout() {
   }).then((res) => {
     if (res) {
       authStore.logout();
-      uni.reLaunch({ url: '/pages/user/login' });
+      if (AppCofig.requireLogin)
+        uni.reLaunch({ url: '/pages/user/login' });
     }
   });
 }