gemercheung 2 سال پیش
والد
کامیت
475552f1a8
5فایلهای تغییر یافته به همراه26 افزوده شده و 6 حذف شده
  1. 4 1
      .env
  2. 0 1
      .env.development
  3. 7 2
      .env.production
  4. 10 2
      src/components/basic/guide.vue
  5. 5 0
      vite.config.ts

+ 4 - 1
.env

@@ -11,6 +11,9 @@ VITE_APP_SOCKET_URL=wss://ws.4dkankan.com
 VITE_APP_STATIC_DIR=viewer
 # 接口请求地址
 VITE_APP_APIS_URL=https://test.4dkankan.com/
+
+VITE_TAKE_LOOK_API=https://v4-test.4dkankan.com
 # VITE_APP_APIS_URL=https://v4-uat.4dkankan.com/
 VITE_USE_HTTPS=1
-VITE_PUBLIC_DIR=''
+VITE_PUBLIC_DIR='/'
+

+ 0 - 1
.env.development

@@ -1,2 +1 @@
 VITE_APP_SDK_DIR=https://4dkk.4dage.com/v4/sdk/4.2.1
-VITE_PUBLIC_DIR=''

+ 7 - 2
.env.production

@@ -8,8 +8,13 @@ VITE_APP_SDK_DIR=https://testeurs3.4dkankan.com/v4/www/sdk
 VITE_APP_SOCKET_URL=wss://ws.4dkankan.com
 # 静态资源目录
 VITE_APP_STATIC_DIR=viewer
+
+# 云存储环境
+VUE_APP_REGION_URL=aws
+
 # 接口请求地址
-VITE_APP_APIS_URL=https://test.4dkankan.com/
+VITE_APP_APIS_URL=https://testeur.4dkankan.com/
 # VITE_APP_APIS_URL=https://v4-uat.4dkankan.com/
+VITE_TAKE_LOOK_API=https://testeur.4dkankan.com/
 VITE_USE_HTTPS=1
-VITE_PUBLIC_DIR='livestream'
+VITE_PUBLIC_DIR='/livestream'

+ 10 - 2
src/components/basic/guide.vue

@@ -8,7 +8,7 @@
   </div>
 </template>
 <script lang="ts" setup>
-  import { computed } from 'vue';
+  import { computed, onMounted } from 'vue';
   import { useApp } from '/@/hooks/userApp';
   import { useAppStore } from '/@/store/modules/app';
   import browser from '/@/utils/browser';
@@ -19,9 +19,17 @@
   const show = computed(() => appStore.player.showUserGuide);
   // const store = useStore();
 
+  onMounted(() => {
+    const isGuide = localStorage.getItem('user_guide');
+    if (!isGuide) {
+      appStore.showUserGuide(true);
+    }
+  });
+
   const onSet = () => {
     // store.commit("showUserGuide", false);
-    // localStorage.setItem("user_guide", Date.now());
+    appStore.showUserGuide(false);
+    localStorage.setItem('user_guide', `${Date.now()}`);
   };
   // const getTips = (tips) => {
   //   let text = tips.split("<br />");

+ 5 - 0
vite.config.ts

@@ -16,6 +16,7 @@ function pathResolve(dir: string) {
 // https://vitejs.dev/config/
 export default ({ mode }) =>
   defineConfig({
+    base: loadEnv(mode, process.cwd()).VITE_PUBLIC_DIR,
     plugins: [
       // eslintPlugin({
       //   include: ['src/**/*.ts', 'src/**/*.vue', 'src/*.js', 'src/*.vue']
@@ -43,6 +44,10 @@ export default ({ mode }) =>
           find: /\/@\//,
           replacement: pathResolve('src') + '/',
         },
+        {
+          find: /\/#\//,
+          replacement: pathResolve('types') + '/',
+        },
       ],
     },
     server: {