Browse Source

配置测试环境

黄琪勇 1 năm trước cách đây
mục cha
commit
be44969a79
4 tập tin đã thay đổi với 13 bổ sung3 xóa
  1. 3 0
      .env.development
  2. 5 2
      .env.staging
  3. 3 0
      src/config/index.ts
  4. 2 1
      src/views/coursewarePlay/component/tools/pen.tsx

+ 3 - 0
.env.development

@@ -3,3 +3,6 @@
 VUE_APP_URL = "https://dev.resource.colexiu.com/cbs-app"
 VUE_APP_URL_GYM = "/gym"
 VUE_APP_URL_GYT = "/gyt"
+
+# 标注画板地址
+VUE_APP_WHITEBOARD = "https://test.lexiaoya.cn/whiteboard-noCollab"

+ 5 - 2
.env.staging

@@ -1,5 +1,8 @@
 # 测试环境
-# NODE_ENV = production
 
-VUE_APP_URL = "测试"
+VUE_APP_URL = "https://dev.resource.colexiu.com/cbs-app"
+VUE_APP_URL_GYM = "https://dev.dayaedu.com"
+VUE_APP_URL_GYT = "https://dev.lexiaoya.cn"
 
+# 标注画板地址
+VUE_APP_WHITEBOARD = "https://test.lexiaoya.cn/whiteboard-noCollab"

+ 3 - 0
src/config/index.ts

@@ -1,3 +1,6 @@
 export const URL_API = process.env.VUE_APP_URL as string
 export const URL_API_GYT = process.env.VUE_APP_URL_GYT as string
 export const URL_API_GYM = process.env.VUE_APP_URL_GYM as string
+
+// 画板地址
+export const URL_WHITEBOARD = process.env.VUE_APP_WHITEBOARD as string

+ 2 - 1
src/views/coursewarePlay/component/tools/pen.tsx

@@ -3,6 +3,7 @@ import html2canvas from "html2canvas"
 import { closeToast, showFailToast, showLoadingToast, showSuccessToast } from "vant"
 import { defineComponent, toRefs, ref, reactive, onMounted, onUnmounted, nextTick } from "vue"
 import styles from "./pen.module.scss"
+import { URL_WHITEBOARD } from "@/config/index"
 
 export default defineComponent({
    name: "tools-pen",
@@ -23,7 +24,7 @@ export default defineComponent({
    setup(props) {
       const { show, isWhite } = toRefs(props)
       const firstRender = ref(true)
-      const src = /(localhost|192)/.test(location.host) ? "https://test.lexiaoya.cn/whiteboard-noCollab" : `${location.origin}/whiteboard-noCollab`
+      const src = URL_WHITEBOARD
 
       const exportImg = (event: MessageEvent) => {
          const data = event.data