chenrong 1 rok pred
rodič
commit
b5333f9a1e

+ 1 - 5
src/App.vue

@@ -1,11 +1,7 @@
 <template>
   <div id="app">
     <div class="w-full h-full flex">
-      <NavMenu />
-      <div class="pageContent">
-        <router-view />
-      </div>
-      
+      <router-view />
     </div>
     <loginPopup />
   </div>

+ 12 - 80
src/layout/index.vue

@@ -1,111 +1,43 @@
 <template>
-  <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
-    <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
-    <sidebar v-if="!sidebar.hide" class="sidebar-container" />
-    <div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
-      <div :class="{'fixed-header':fixedHeader}">
-        <navbar />
-        <tags-view v-if="needTagsView" />
-      </div>
+  <div class="app-wrapper flex">
+    <NavMenu />
+    <div class="pageContent">
       <app-main />
-      <right-panel>
-        <settings />
-      </right-panel>
     </div>
   </div>
 </template>
 
 <script>
-import RightPanel from '@/components/RightPanel'
-import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
+import NavMenu from '@/views/components/NavMenu'
 import ResizeMixin from './mixin/ResizeHandler'
-import { mapState } from 'vuex'
-import variables from '@/assets/styles/variables.scss'
+import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
 
 export default {
   name: 'Layout',
   components: {
     AppMain,
-    Navbar,
-    RightPanel,
-    Settings,
-    Sidebar,
-    TagsView
+    NavMenu
   },
   mixins: [ResizeMixin],
   computed: {
-    ...mapState({
-      theme: state => state.settings.theme,
-      sideTheme: state => state.settings.sideTheme,
-      sidebar: state => state.app.sidebar,
-      device: state => state.app.device,
-      needTagsView: state => state.settings.tagsView,
-      fixedHeader: state => state.settings.fixedHeader
-    }),
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened,
-        withoutAnimation: this.sidebar.withoutAnimation,
-        mobile: this.device === 'mobile'
-      }
-    },
-    variables() {
-      return variables;
-    }
+    
   },
   methods: {
-    handleClickOutside() {
-      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
-    }
+
   }
 }
 </script>
 
 <style lang="scss" scoped>
-  @import "~@/assets/styles/mixin.scss";
-  @import "~@/assets/styles/variables.scss";
-
   .app-wrapper {
-    @include clearfix;
     position: relative;
     height: 100%;
     width: 100%;
-
-    &.mobile.openSidebar {
-      position: fixed;
-      top: 0;
-    }
   }
-
-  .drawer-bg {
-    background: #000;
-    opacity: 0.3;
-    width: 100%;
-    top: 0;
+  .pageContent {
+    width: calc(100% - 72px);
     height: 100%;
-    position: absolute;
-    z-index: 999;
-  }
-
-  .fixed-header {
-    position: fixed;
-    top: 0;
-    right: 0;
-    z-index: 9;
-    width: calc(100% - #{$base-sidebar-width});
-    transition: width 0.28s;
-  }
-
-  .hideSidebar .fixed-header {
-    width: calc(100% - 54px);
-  }
-
-  .sidebarHide .fixed-header {
-    width: 100%;
-  }
-
-  .mobile .fixed-header {
-    width: 100%;
+    overflow: visible;
+    // overflow-y: auto;
   }
 </style>

+ 111 - 0
src/layout/index_old.vue

@@ -0,0 +1,111 @@
+<template>
+  <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
+    <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
+    <sidebar v-if="!sidebar.hide" class="sidebar-container" />
+    <div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
+      <div :class="{'fixed-header':fixedHeader}">
+        <navbar />
+        <tags-view v-if="needTagsView" />
+      </div>
+      <app-main />
+      <right-panel>
+        <settings />
+      </right-panel>
+    </div>
+  </div>
+</template>
+
+<script>
+import RightPanel from '@/components/RightPanel'
+import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
+import ResizeMixin from './mixin/ResizeHandler'
+import { mapState } from 'vuex'
+import variables from '@/assets/styles/variables.scss'
+
+export default {
+  name: 'Layout',
+  components: {
+    AppMain,
+    Navbar,
+    RightPanel,
+    Settings,
+    Sidebar,
+    TagsView
+  },
+  mixins: [ResizeMixin],
+  computed: {
+    ...mapState({
+      theme: state => state.settings.theme,
+      sideTheme: state => state.settings.sideTheme,
+      sidebar: state => state.app.sidebar,
+      device: state => state.app.device,
+      needTagsView: state => state.settings.tagsView,
+      fixedHeader: state => state.settings.fixedHeader
+    }),
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened,
+        withoutAnimation: this.sidebar.withoutAnimation,
+        mobile: this.device === 'mobile'
+      }
+    },
+    variables() {
+      return variables;
+    }
+  },
+  methods: {
+    handleClickOutside() {
+      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  @import "~@/assets/styles/mixin.scss";
+  @import "~@/assets/styles/variables.scss";
+
+  .app-wrapper {
+    @include clearfix;
+    position: relative;
+    height: 100%;
+    width: 100%;
+
+    &.mobile.openSidebar {
+      position: fixed;
+      top: 0;
+    }
+  }
+
+  .drawer-bg {
+    background: #000;
+    opacity: 0.3;
+    width: 100%;
+    top: 0;
+    height: 100%;
+    position: absolute;
+    z-index: 999;
+  }
+
+  .fixed-header {
+    position: fixed;
+    top: 0;
+    right: 0;
+    z-index: 9;
+    width: calc(100% - #{$base-sidebar-width});
+    transition: width 0.28s;
+  }
+
+  .hideSidebar .fixed-header {
+    width: calc(100% - 54px);
+  }
+
+  .sidebarHide .fixed-header {
+    width: 100%;
+  }
+
+  .mobile .fixed-header {
+    width: 100%;
+  }
+</style>

+ 44 - 35
src/router/index.js

@@ -34,14 +34,52 @@ export const constantRoutes = [
     path: "",
     hidden: true,
     redirect: "/home",
-    children: [],
+    component: Layout,
+    children: [
+      {
+        path: "/home",
+        component: () => import("@/views/home"),
+        name: "Home",
+      },
+      // 对话界面
+      {
+        path: "/chat",
+        component: () => import("@/views/chat"),
+        name: "Chat",
+      },
+      // 创建角色
+      {
+        path: "/create",
+        component: () => import("@/views/create"),
+        name: "Create",
+      },
+      // 创建场景
+      {
+        path: "/createScene",
+        component: () => import("@/views/create/createScene"),
+        name: "CreateScene",
+      },
+      // 个人中心
+      {
+        path: "/profile",
+        component: () => import("@/views/profile/index"),
+        name: "profile",
+      },
+      // 账户详情
+      {
+        path: "/user",
+        component: () => import("@/views/user/index"),
+        name: "user",
+      },
+    ],
   },
+  // 隐私政策
   {
-    path: "/home",
-    component: () => import("@/views/home"),
-    name: "Home",
+    path: "/privacyPolicy",
+    component: () => import("@/views/privacyPolicy"),
+    name: "privacyPolicy",
   },
-  // 角色详情界面
+  // 角色详情界面(废弃)
   {
     path: "/detail",
     component: () => import("@/views/detail"),
@@ -52,34 +90,17 @@ export const constantRoutes = [
     component: () => import("@/views/detail/indexH5.vue"),
     name: "DetailH5",
   },
-  // 对话界面
-  {
-    path: "/chat",
-    component: () => import("@/views/chat"),
-    name: "Chat",
-  },
   {
     path: "/chatH5",
     component: () => import("@/views/chat/indexH5"),
     name: "ChatH5",
   },
-  // 创建角色
-  {
-    path: "/create",
-    component: () => import("@/views/create"),
-    name: "Create",
-  },
   {
     path: "/createH5",
     component: () => import("@/views/create/indexH5"),
     name: "CreateH5",
   },
-  // 创建场景
-  {
-    path: "/createScene",
-    component: () => import("@/views/create/createScene"),
-    name: "CreateScene",
-  },
+  
   // 注册移动端
   {
     path: "/registerH5",
@@ -98,18 +119,6 @@ export const constantRoutes = [
     component: () => import("@/views/vip/index"),
     name: "vip",
   },
-  // 个人中心
-  {
-    path: "/profile",
-    component: () => import("@/views/profile/index"),
-    name: "profile",
-  },
-  // 账户详情
-  {
-    path: "/user",
-    component: () => import("@/views/user/index"),
-    name: "user",
-  },
 ];
 
 // 动态路由,基于用户权限动态去加载

+ 7 - 2
src/views/homeComponents/loginPopup.vue

@@ -11,7 +11,7 @@
       {{ popupType == 'login' ? '登录' : '注册'}}
     </div>
     <LoginContent v-if="popupType == 'login'" @showRegister="showRegister" />
-    <RegisterContent v-if="popupType == 'register'" />
+    <RegisterContent v-if="popupType == 'register'" @showRegister="showRegister" />
   </el-dialog>
 </template>
 
@@ -44,7 +44,12 @@ export default {
       this.$store.commit('app/TOGGLE_POPUP', false)
     },
     showRegister(value) {
-      this.popupType = 'register'
+      if (value) {
+        this.popupType = 'register'
+      } else {
+        this.popupType = 'login'
+      }
+      
     }
   }
 }

+ 8 - 0
src/views/homeComponents/register.vue

@@ -21,6 +21,11 @@
         >
           注册
         </el-button>
+        <el-form-item label="">
+          <span style="font-size: 1rem;">
+            <span class="textButton" @click="toLogin">返回登录</span>
+          </span>
+        </el-form-item>
       </el-form-item>
     </el-form>
   </div>
@@ -72,6 +77,9 @@ export default {
   mounted() {
   },
   methods: {
+    toLogin() {
+      this.$emit('showRegister', false)
+    },
     clickRegister() {
       this.$refs.formRegister.validate((valid) => {
         if (valid) {

+ 89 - 0
src/views/privacyPolicy.vue

@@ -0,0 +1,89 @@
+<template>
+  <div class=" w-full h-full">
+    <div class=" mx-auto py-10" style="max-width: 800px;">
+      <h1>元宇宙网站隐私政策</h1>
+      <p>最后更新日期:[请填写日期]</p>
+
+      <h2>一、引言与定义</h2>
+      <p>欢迎您来到元宇宙网站(以下简称“我们”或“网站”)。本隐私政策旨在阐述我们如何收集、使用、保护您的个人信息。在本政策中,“个人信息”指能够单独或与其他信息结合识别特定自然人身份的各种信息。</p>
+
+      <h2>二、数据收集</h2>
+      <h3>2.1 收集方式</h3>
+      <p>我们可能通过以下方式收集您的个人信息:</p>
+      <ul>
+        <li>当您注册账户时,提交的姓名、邮箱地址、电话号码等;</li>
+        <li>使用网站服务过程中,系统自动记录的行为数据,如浏览记录、IP地址等;</li>
+        <li>通过cookies和其他追踪技术收集的浏览偏好信息。</li>
+      </ul>
+
+      <h3>2.2 收集目的</h3>
+      <p>我们收集您的个人信息主要用于以下目的:</p>
+      <ul>
+        <li>提供、维护和改进我们的服务;</li>
+        <li>个性化用户体验,推荐相关内容或服务;</li>
+        <li>进行数据分析,了解用户需求,优化产品功能;</li>
+        <li>保障网站安全,防止欺诈和滥用行为。</li>
+      </ul>
+
+      <h2>三、数据使用</h2>
+      <p>我们承诺在以下原则下使用您的个人信息:</p>
+      <ul>
+        <li>合法、正当、必要原则;</li>
+        <li>明示同意原则,未经您明确同意,我们不会用于除上述目的之外的其他用途;</li>
+        <li>保护您的信息安全,采取合理措施防止信息泄露、毁损或丢失。</li>
+      </ul>
+
+      <h2>四、信息共享与披露</h2>
+      <p>除非满足以下条件,否则我们不会与第三方共享您的个人信息:</p>
+      <ul>
+        <li>获得您的明确同意;</li>
+        <li>基于法律法规要求或司法机关的命令;</li>
+        <li>为保护您或其他人的合法权益所必需。</li>
+      </ul>
+
+      <h2>五、您的权利</h2>
+      <p>您拥有以下关于您个人信息的权利:</p>
+      <ul>
+        <li>访问、更正您的个人信息;</li>
+        <li>请求删除您的个人信息;</li>
+        <li>撤回对个人信息处理的同意;</li>
+        <li>投诉或举报我们对个人信息处理的违规行为。</li>
+      </ul>
+
+      <h2>六、联系我们</h2>
+      <p>对于本隐私政策或您的个人信息有任何疑问、意见或请求,您可以通过[请填写联系方式]与我们联系。</p>
+
+      <p>我们保留在必要时修改本隐私政策的权利。任何更改将在网站上公布,不再单独通知。继续使用我们的服务即代表您接受最新版本的隐私政策。</p>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style lang="scss" scoped>
+h1 {
+  font-size: 22px;
+  font-weight: 600;
+  margin-bottom: 10px;
+}
+
+h2 {
+  font-size: 18px;
+  font-weight: 600;
+  margin-bottom: 10px;
+}
+
+h3 {
+  font-size: 16px;
+  font-weight: 600;
+  margin-bottom: 10px;
+}
+
+p, ul {
+  margin-bottom: 10px;
+}
+</style>

+ 89 - 0
src/views/termOfUse.vue

@@ -0,0 +1,89 @@
+<template>
+  <div class=" w-full h-full">
+    <div class=" mx-auto py-10" style="max-width: 800px;">
+      <h1>元宇宙网站隐私政策</h1>
+      <p>最后更新日期:[请填写日期]</p>
+
+      <h2>一、引言与定义</h2>
+      <p>欢迎您来到元宇宙网站(以下简称“我们”或“网站”)。本隐私政策旨在阐述我们如何收集、使用、保护您的个人信息。在本政策中,“个人信息”指能够单独或与其他信息结合识别特定自然人身份的各种信息。</p>
+
+      <h2>二、数据收集</h2>
+      <h3>2.1 收集方式</h3>
+      <p>我们可能通过以下方式收集您的个人信息:</p>
+      <ul>
+        <li>当您注册账户时,提交的姓名、邮箱地址、电话号码等;</li>
+        <li>使用网站服务过程中,系统自动记录的行为数据,如浏览记录、IP地址等;</li>
+        <li>通过cookies和其他追踪技术收集的浏览偏好信息。</li>
+      </ul>
+
+      <h3>2.2 收集目的</h3>
+      <p>我们收集您的个人信息主要用于以下目的:</p>
+      <ul>
+        <li>提供、维护和改进我们的服务;</li>
+        <li>个性化用户体验,推荐相关内容或服务;</li>
+        <li>进行数据分析,了解用户需求,优化产品功能;</li>
+        <li>保障网站安全,防止欺诈和滥用行为。</li>
+      </ul>
+
+      <h2>三、数据使用</h2>
+      <p>我们承诺在以下原则下使用您的个人信息:</p>
+      <ul>
+        <li>合法、正当、必要原则;</li>
+        <li>明示同意原则,未经您明确同意,我们不会用于除上述目的之外的其他用途;</li>
+        <li>保护您的信息安全,采取合理措施防止信息泄露、毁损或丢失。</li>
+      </ul>
+
+      <h2>四、信息共享与披露</h2>
+      <p>除非满足以下条件,否则我们不会与第三方共享您的个人信息:</p>
+      <ul>
+        <li>获得您的明确同意;</li>
+        <li>基于法律法规要求或司法机关的命令;</li>
+        <li>为保护您或其他人的合法权益所必需。</li>
+      </ul>
+
+      <h2>五、您的权利</h2>
+      <p>您拥有以下关于您个人信息的权利:</p>
+      <ul>
+        <li>访问、更正您的个人信息;</li>
+        <li>请求删除您的个人信息;</li>
+        <li>撤回对个人信息处理的同意;</li>
+        <li>投诉或举报我们对个人信息处理的违规行为。</li>
+      </ul>
+
+      <h2>六、联系我们</h2>
+      <p>对于本隐私政策或您的个人信息有任何疑问、意见或请求,您可以通过[请填写联系方式]与我们联系。</p>
+
+      <p>我们保留在必要时修改本隐私政策的权利。任何更改将在网站上公布,不再单独通知。继续使用我们的服务即代表您接受最新版本的隐私政策。</p>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style lang="scss" scoped>
+h1 {
+  font-size: 22px;
+  font-weight: 600;
+  margin-bottom: 10px;
+}
+
+h2 {
+  font-size: 18px;
+  font-weight: 600;
+  margin-bottom: 10px;
+}
+
+h3 {
+  font-size: 16px;
+  font-weight: 600;
+  margin-bottom: 10px;
+}
+
+p, ul {
+  margin-bottom: 10px;
+}
+</style>