lex 1 anno fa
parent
commit
4e913b297a

+ 8 - 8
src/main.ts

@@ -34,18 +34,18 @@ postMessage({ api: 'getNavHeight' }, (res: any) => {
 
 const url = window.location.href;
 const urlIsTeacher =
-  /gym.lexiaoya.cn\/lessonPlayTeacher/.test(url) || /test.gym.lexiaoya.cn\/lessonPlayTeacher/.test(url)
+  /gym.lexiaoya.cn\/lessonPlayTeacher/.test(url) || /test.gym.lexiaoya.cn\/lessonPlayTeacher/.test(url) || /192.168.3.220/.test(url)
     ? true
     : false;
 // const paymentType = (window as any).paymentType; // 浏览器设置
 // 判断是哪个环境
-// if (urlIsTeacher) {
-state.platformType = 'TEACHER';
-state.platformApi = '/api-teacher';
-// } else {
-//   state.platformType = 'STUDENT';
-//   state.platformApi = '/api-student';
-// }
+if (urlIsTeacher) {
+  state.platformType = 'TEACHER';
+  state.platformApi = '/api-teacher';
+} else {
+  state.platformType = 'STUDENT';
+  state.platformApi = '/api-student';
+}
 
 const app = createApp(App);
 

+ 2 - 3
src/state.ts

@@ -1,5 +1,5 @@
 import { reactive } from 'vue';
-import { browser, setAuth } from './helpers/utils';
+import { browser } from './helpers/utils';
 import { postMessage } from './helpers/native-message';
 
 type status = 'init' | 'login' | 'logout' | 'error';
@@ -81,8 +81,7 @@ export const goWechatAuth = (wxAppId: string, urlString?: string) => {
   // 开发环境
   if (import.meta.env.DEV) {
     const replaceUrl =
-      `https://online.lexiaoya.cn/getWxCode?appid=${
-        wxAppId || 'wx8654c671631cfade'
+      `https://online.lexiaoya.cn/getWxCode?appid=${wxAppId || 'wx8654c671631cfade'
       }&state=STATE&redirect_uri=` +
       encodeURIComponent(urlString || window.location.href);
     window.location.replace(replaceUrl);

+ 11 - 12
src/views/choise-homework/music-list/index.tsx

@@ -1,6 +1,5 @@
 import { defineComponent } from 'vue';
 import {
-  Sticky,
   Search,
   List,
   Empty,
@@ -31,9 +30,6 @@ import { browser } from '@/helpers/utils';
 import OHeader from '@/components/o-header';
 import OSticky from '@/components/o-sticky';
 
-const searchParse = qs.parse(location.search);
-// const isTestTeacher = false;
-
 export default defineComponent({
   name: 'music-list',
   data() {
@@ -213,7 +209,7 @@ export default defineComponent({
       try {
         state.subjectId = appState.subjectId;
         const params = state.params;
-        const parentId = this.$route.params.id;
+        // const parentId = this.$route.params.id;
         // 如果根级分类没有,则取父级分类
         // let categoriesId = 181
         // console.log(3);
@@ -348,13 +344,13 @@ export default defineComponent({
       this.selectedPartIndex = 0;
       const partNames = await this.getPartNames(row.xmlUrl);
       this.partNames = partNames;
-      let multitrack = false;
-      try {
-        const _multitrack = JSON.parse(row.extConfigJson).multitrack;
-        multitrack = _multitrack > 1 ? true : false;
-      } catch (error) {
-        //
-      }
+      // let multitrack = false;
+      // try {
+      //   const _multitrack = JSON.parse(row.extConfigJson).multitrack;
+      //   multitrack = _multitrack > 1 ? true : false;
+      // } catch (error) {
+      //   //
+      // }
       // 多声轨,  不是单声部多声轨, 不是老师布置作业选择曲谱
 
       this.selectedPartName = partNames[0];
@@ -491,6 +487,7 @@ export default defineComponent({
             onUpdate:model-value={(text: string) => (state.search = text)}
             showAction
             onSearch={this.onSearch}
+            // eslint-disable-next-line @typescript-eslint/ban-ts-comment
             // @ts-ignore
             vSlots={{
               'left-icon': () => (
@@ -537,6 +534,7 @@ export default defineComponent({
               onLoad={() => {
                 if (!this.firstLoading) this.FetchList();
               }}
+              // eslint-disable-next-line @typescript-eslint/ban-ts-comment
               // @ts-ignore
               vSlots={{
                 error: () => (
@@ -549,6 +547,7 @@ export default defineComponent({
                     style={{ display: item.id ? '' : 'none' }}
                     size="large"
                     onClick={() => this.toDetail(item)}
+                    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
                     // @ts-ignore
                     vSlots={{
                       icon: () => (

+ 4 - 5
src/views/courseList/index.tsx

@@ -13,8 +13,7 @@ import {
   onMounted,
   reactive,
   onUnmounted,
-  TransitionGroup,
-  computed
+  TransitionGroup
 } from 'vue';
 import styles from './index.module.less';
 import { useRoute, useRouter } from 'vue-router';
@@ -129,9 +128,9 @@ export default defineComponent({
     };
 
     // 去购买
-    const onGoVip = () => {
-      // window.location.href = location.origin + '/#/member';
-    };
+    // const onGoVip = () => {
+    //   // window.location.href = location.origin + '/#/member';
+    // };
 
     onMounted(() => {
       getDetail();