lex 1 gadu atpakaļ
vecāks
revīzija
4cfdebff16

+ 19 - 1
src/student/invite-teacher/index.module.less

@@ -5,6 +5,17 @@
   background-color: #fff;
   background-size: 100%;
 
+  .backIcon {
+    position: fixed;
+    top: 20px;
+    font-size: 22px;
+    color: #333323;
+    left: 0.22667rem;
+    // background-color: rgba(0, 0, 0, .3);
+    border-radius: 50%;
+    padding: 6px;
+  }
+
   .loginTitle {
     display: flex;
     align-items: center;
@@ -23,6 +34,7 @@
       display: flex;
       flex-direction: column;
       font-size: 12px;
+
       .txt {
         font-size: 22px;
         font-weight: 500;
@@ -48,6 +60,7 @@
     .van-cell-group {
       margin-bottom: 35px;
     }
+
     .van-field {
       padding-left: 0;
       padding-right: 0;
@@ -58,12 +71,14 @@
       align-items: inherit;
       overflow: inherit;
     }
+
     .van-checkbox__icon {
       height: 15px;
       line-height: 15px;
       display: inline-block;
       vertical-align: middle;
     }
+
     .van-checkbox__label {
       line-height: 15px;
       color: #999;
@@ -82,6 +97,7 @@
       width: 54px;
       height: 54px;
       border-radius: 50%;
+
       img {
         width: 54px;
         height: 54px;
@@ -94,6 +110,7 @@
       color: #333;
       line-height: 20px;
       padding-left: 16px;
+
       span {
         font-weight: 500;
         font-size: 18px;
@@ -112,6 +129,7 @@
     padding: 30px 0 15px;
     text-align: center;
     color: #999;
+
     .protocolText {
       color: var(--van-primary);
       line-height: 15px;
@@ -124,4 +142,4 @@
       border: transparent !important;
     }
   }
-}
+}

+ 27 - 2
src/student/invite-teacher/index.tsx

@@ -13,7 +13,7 @@ import {
 import { checkPhone } from '@/helpers/validate'
 import request from '@/helpers/request'
 import { setLogin, state } from '@/state'
-import { removeAuth, setAuth } from '@/helpers/utils'
+import { browser, removeAuth, setAuth } from '@/helpers/utils'
 import styles from './index.module.less'
 import logo from './images/logo.png'
 import iconTeacher from '@/common/images/icon_teacher.png'
@@ -23,6 +23,7 @@ import ColPopup from '@/components/col-popup'
 import InviteCode from './invite-code'
 import TeacherChange from './teacher-change'
 import OWxTip from '@/components/the-wx-tip'
+import { postMessage } from '@/helpers/native-message'
 
 export default defineComponent({
   name: 'login',
@@ -36,7 +37,8 @@ export default defineComponent({
       checked: false,
       teacherChangeStatus: false,
       changeInfo: {} as any, // 更换老师信息
-      showTips: false
+      showTips: false,
+      navBarHeight: 0
     }
   },
   computed: {
@@ -47,6 +49,14 @@ export default defineComponent({
   },
   async mounted() {
     removeAuth()
+    postMessage({ api: 'getNavHeight' }, res => {
+      const { content } = res as any
+      const dpi = content.dpi || 2
+      if (content.navHeight) {
+        const navHeight = content.navHeight / dpi
+        this.navBarHeight = navHeight
+      }
+    })
     try {
       const res = await request.get('/api-student/open/getTeacher', {
         params: {
@@ -63,6 +73,13 @@ export default defineComponent({
     } catch {}
   },
   methods: {
+    onBack() {
+      if (browser().isApp) {
+        postMessage({ api: 'goBack' })
+      } else {
+        this.$router.back()
+      }
+    },
     async onSendCode() {
       // 发送验证码
       if (this.teacherInfo.lockFlag == 1) {
@@ -138,6 +155,14 @@ export default defineComponent({
   render() {
     return (
       <div class={styles.login}>
+        <Icon
+          name="arrow-left"
+          class={styles.backIcon}
+          style={{
+            top: `calc(${this.navBarHeight}px + 12px)`
+          }}
+          onClick={this.onBack}
+        />
         <div class={styles.loginTitle}>
           <img src={logo} alt="" />
           <p>

+ 5 - 2
src/tenant/layout/login.tsx

@@ -62,7 +62,6 @@ export default defineComponent({
         if (this.loginType === 'PWD') {
           res = await request.post('/api-auth/usernameLogin', {
             requestType: 'form',
-            hideErrorMessage: this.isTrainGroup,
             data: {
               username: this.username,
               password: this.password,
@@ -112,7 +111,11 @@ export default defineComponent({
       } catch (e: any) {
         // 说明用户不存在
 
-        if (e.message.indexOf('409') > -1) {
+        if (
+          e.message.indexOf('409') > -1 &&
+          this.isTrainGroup &&
+          this.loginType !== 'PWD'
+        ) {
           const { returnUrl, isRegister, ...rest } = this.$route.query
           this.$router.replace({
             path: '/tenantStudentRejest',

+ 49 - 5
src/tenant/music/music-detail/new-index.tsx

@@ -60,6 +60,7 @@ import Download from './download'
 import { getInstrumentName } from '@/constant/instruments'
 import { getUploadSign, onOnlyFileUpload } from '@/helpers/oss-file-upload'
 import { svgtopng } from './formatSvgToImg'
+import { shareCall } from '@/teacher/share-page/share'
 
 export default defineComponent({
   name: 'new-index',
@@ -660,6 +661,16 @@ export default defineComponent({
         }
       })
     })
+
+    const onDownloadApp = () => {
+      Dialog.alert({
+        title: '提示',
+        message: '请在酷乐秀APP中使用',
+        confirmButtonColor: '#2dc7aa'
+      }).then(() => {
+        window.location.href = location.origin + '/student/#/download'
+      })
+    }
     return () => (
       <div class={styles.detail}>
         <TheSticky position="top">
@@ -724,7 +735,16 @@ export default defineComponent({
               //   : ''
             ]}
           >
-            <div class={styles.alumCollectItem} onClick={onShare}>
+            <div
+              class={styles.alumCollectItem}
+              onClick={() => {
+                if (browser().isApp) {
+                  onShare()
+                } else {
+                  onDownloadApp()
+                }
+              }}
+            >
               <Image src={iconShare} />
               <span>分享</span>
             </div>
@@ -735,8 +755,12 @@ export default defineComponent({
                 showImg.value.length <= 0 ? styles.alumCollectItemActive : ''
               ]}
               onClick={() => {
-                if (showImg.value.length > 0) {
-                  downloadStatus.value = true
+                if (browser().isApp) {
+                  if (showImg.value.length > 0) {
+                    downloadStatus.value = true
+                  }
+                } else {
+                  onDownloadApp()
                 }
               }}
             >
@@ -894,6 +918,10 @@ export default defineComponent({
                     type="primary"
                     color="linear-gradient(270deg, #FF3C81 0%, #FF76A6 100%)"
                     onClick={() => {
+                      if (!browser().isApp) {
+                        onDownloadApp()
+                        return
+                      }
                       const throttleFn = useThrottleFn(() => {
                         player.value && player.value.stop()
                         const item: any = partColumns.value.find(
@@ -922,7 +950,13 @@ export default defineComponent({
                     block
                     type="primary"
                     color="linear-gradient(270deg, #FF3C81 0%, #FF76A6 100%)"
-                    onClick={() => router.back()}
+                    onClick={() => {
+                      if (!browser().isApp) {
+                        onDownloadApp()
+                        return
+                      }
+                      router.back()
+                    }}
                   >
                     开通训练教程
                   </Button>
@@ -935,7 +969,13 @@ export default defineComponent({
                         type="primary"
                         color="linear-gradient(270deg, #FF204B 0%, #FE5B71 100%)"
                         class={styles.primary}
-                        onClick={onBuy}
+                        onClick={() => {
+                          if (!browser().isApp) {
+                            onDownloadApp()
+                            return
+                          }
+                          onBuy()
+                        }}
                       >
                         立即点播
                       </Button>
@@ -950,6 +990,10 @@ export default defineComponent({
                         color="linear-gradient(270deg, #FF204B 0%, #FE5B71 100%)"
                         class={styles.memeber}
                         onClick={() => {
+                          if (!browser().isApp) {
+                            onDownloadApp()
+                            return
+                          }
                           router.push({
                             path: '/memberCenter',
                             query: {

+ 5 - 1
src/tenant/music/search/header.tsx

@@ -475,7 +475,11 @@ export default defineComponent({
                           router.push({
                             path: '/music-detail',
                             query: {
-                              id: item.id
+                              id: item.id,
+                              tenantAlbumId:
+                                route.path === '/music-songbook/searchAlbum'
+                                  ? item.tenantAlbumId
+                                  : ''
                             }
                           })
                         }

+ 5 - 2
src/tenant/music/search/searchAlbum.tsx

@@ -114,12 +114,15 @@ export default defineComponent({
                     location.origin +
                     location.pathname +
                     '#/music-detail?id=' +
-                    item.id
+                    item.id +
+                    '&tenantAlbumId=' +
+                    item.tenantAlbumId
                   openDefaultWebView(url, () => {
                     router.push({
                       path: '/music-detail',
                       query: {
-                        id: item.id
+                        id: item.id,
+                        tenantAlbumId: item.tenantAlbumId
                       }
                     })
                   })

+ 2 - 0
src/tenant/music/train-tool/index.tsx

@@ -244,6 +244,8 @@ export default defineComponent({
       await FetchList()
       state.loadingAlbum = false
       state.loading = false
+
+      document.body.scrollIntoView()
     })
 
     const onSubmit = async () => {

+ 12 - 0
src/views/order-detail/index.tsx

@@ -137,6 +137,18 @@ export default defineComponent({
       const { height } = useRect((this as any).$refs.paymentButtom)
       this.bottomHeight = height + 10
     })
+
+    if (!orderStatus.orderObject.orderType) {
+      Dialog.alert({
+        title: '提示',
+        message: '商品信息已更新,请返回后重新购买',
+        confirmButtonText: '确定',
+        confirmButtonColor: '#2dc7aa'
+      }).then(() => {
+        this.$router.back()
+      })
+      return
+    }
   },
   methods: {
     async getUserRegisterProtocol() {

+ 2 - 0
src/views/order-detail/order-tennat-album/index.module.less

@@ -42,6 +42,7 @@
       font-size: 14px;
       color: #131415;
       line-height: 24px;
+      max-width: 200px;
     }
 
     >p {
@@ -49,6 +50,7 @@
       font-size: 12px;
       color: #777777;
       line-height: 18px;
+
     }
 
     .musicNum {

+ 37 - 9
src/views/order-detail/userAuth/index.tsx

@@ -5,12 +5,23 @@ import request from '@/helpers/request'
 import { verifyIdCard } from '@/helpers/toolsValidate'
 import { postMessage } from '@/helpers/native-message'
 import { state } from '@/state'
-import { Button, CellGroup, Checkbox, Field, Form, Icon, Toast } from 'vant'
+import {
+  Button,
+  CellGroup,
+  Checkbox,
+  Field,
+  Form,
+  Icon,
+  Popup,
+  Toast
+} from 'vant'
 import { defineComponent } from 'vue'
 import activeButtonIcon from '@common/images/icon_checkbox.png'
 import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
 import activeButtonIconTenant from '@common/images/icon_checkbox-tenant.png'
 import styles from './index.module.less'
+import { browser } from '@/helpers/utils'
+import PreviewProtocol from '@/views/preview-protocol'
 
 export default defineComponent({
   name: 'UserAuth',
@@ -31,6 +42,8 @@ export default defineComponent({
   },
   data() {
     return {
+      popupShow: false,
+      iframeSrc: '',
       form: {
         realName: '',
         idCardNo: ''
@@ -75,14 +88,20 @@ export default defineComponent({
     getContractDetail() {
       // 查看协议
       const client = state.platformType === 'STUDENT' ? 'student' : 'teacher'
-      postMessage({
-        api: 'openWebView',
-        content: {
-          url: `${location.origin}/${client}/#/previewProtocol`,
-          orientation: 1,
-          isHideTitle: false
-        }
-      })
+      if (browser().isApp) {
+        postMessage({
+          api: 'openWebView',
+          content: {
+            url: `${location.origin}/${client}/#/previewProtocol`,
+            orientation: 1,
+            isHideTitle: false
+          }
+        })
+      } else {
+        // this.iframeSrc = `${location.origin}/#/previewProtocol`
+        // console.log(this.iframeSrc, 'this.iframeSrc')
+        this.popupShow = true
+      }
     }
   },
   render() {
@@ -155,6 +174,15 @@ export default defineComponent({
             确定
           </Button>
         </div>
+
+        <Popup
+          v-model:show={this.popupShow}
+          round
+          position="bottom"
+          style={{ height: '80vh' }}
+        >
+          <PreviewProtocol />
+        </Popup>
       </Form>
     )
   }

+ 1 - 1
vite.config.ts

@@ -12,7 +12,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.colexiu.com/';
-const proxyUrl = 'https://test.colexiu.com/'
+const proxyUrl = 'https://dev.colexiu.com/'
 // const proxyUrl = 'http://192.168.3.14:8000/'
 export default defineConfig({
   base: './',