Browse Source

修改bug

lex 2 năm trước cách đây
mục cha
commit
30dc301b90

+ 1 - 1
src/school/orchestra/create-orchestra/index.tsx

@@ -119,8 +119,8 @@ export default defineComponent({
       let largeUpSubject: any = {} // 上低音号和大号合集,目前根据编码处理,待定
       state.selectSubjects.forEach((item: any) => {
         console.log(item, 'item.name')
+        tempStudents.push(...item.students)
         if (item.code !== 'BARITONE' && item.code !== 'TUBA') {
-          tempStudents.push(...item.students)
           tempSelect.push(item)
         } else {
           // 获取学生

+ 2 - 0
src/school/train-planning/modal/class-list/index.module.less

@@ -37,9 +37,11 @@
   }
 
   .teacherName {
+    display: inline-block;
     font-size: 16px;
     font-weight: 500;
     color: #333333;
     line-height: 22px;
+    max-width: 80px;
   }
 }

+ 3 - 1
src/school/train-planning/modal/class-list/index.tsx

@@ -97,7 +97,9 @@ export default defineComponent({
                   <div class={[styles.name, 'van-ellipsis']}>{item.orchestraName}</div>
                 </div>
               ),
-              value: () => <span class={styles.teacherName}>{item.teacherName}</span>
+              value: () => (
+                <span class={[styles.teacherName, 'van-ellipsis']}>{item.teacherName}</span>
+              )
             }}
           </Cell>
         ))}

+ 28 - 5
src/student/music-group/layout/login.tsx

@@ -7,6 +7,7 @@ import { removeAuth, setAuth } from './utils'
 import styles from './index.module.less'
 import request from '@/helpers/request'
 import { browser, getUrlCode } from '@/helpers/utils'
+import qs from 'query-string'
 
 type loginType = 'PWD' | 'SMS'
 export default defineComponent({
@@ -81,13 +82,35 @@ export default defineComponent({
           },
           'jump pre registration'
         )
-        this.$router.replace({
-          path: returnUrl as any,
-          query: {
+        // console.log(returnUrl, isRegister, { ...rest })
+        // this.$router.replace({
+        //   path: returnUrl as any,
+        //   query: {
+        //     ...rest,
+        //     code: this.code
+        //   }
+        // })
+        const newUrl =
+          window.location.origin +
+          window.location.pathname +
+          '#' +
+          returnUrl +
+          '?' +
+          qs.stringify({
             ...rest,
             code: this.code
-          }
-        })
+          })
+        this.locationReplace(newUrl)
+      }
+    },
+    locationReplace(url: any) {
+      // 只允许同域名
+      console.log(history.replaceState, 'window.history.replaceState')
+      if (history.replaceState) {
+        history.replaceState(null, document.title, url)
+        history.go(0)
+      } else {
+        location.replace(url)
       }
     },
     async onLogin() {