Pārlūkot izejas kodu

Merge branch 'colexiu1.3' of http://git.dayaedu.com/lex/h5-colexiu into colexiu1.3

mo 1 gadu atpakaļ
vecāks
revīzija
d5873bc9f9
100 mainītis faili ar 4829 papildinājumiem un 386 dzēšanām
  1. 2 1
      package.json
  2. BIN
      src/common/images/icon_checkbox-tenant.png
  3. 161 154
      src/components/col-protocol/index.tsx
  4. BIN
      src/components/col-result/images/empty_tenant.png
  5. BIN
      src/components/col-result/images/network_tenant.png
  6. BIN
      src/components/col-result/images/notFond_tenant.png
  7. 49 33
      src/components/col-result/index.module.less
  8. 130 120
      src/components/col-result/index.tsx
  9. 17 1
      src/components/col-search/index.module.less
  10. 15 2
      src/components/col-search/index.tsx
  11. 42 0
      src/components/col-share/index.module.less
  12. 11 1
      src/components/col-share/index.tsx
  13. 0 0
      src/components/the-full-refresh/datas/data.json
  14. 21 0
      src/components/the-full-refresh/index.module.less
  15. 77 0
      src/components/the-full-refresh/index.tsx
  16. BIN
      src/components/the-full-refresh/loading.gif
  17. 1 0
      src/components/the-full-refresh/loading.json
  18. 26 0
      src/components/the-qrcode/index.module.less
  19. 65 0
      src/components/the-qrcode/index.tsx
  20. 18 0
      src/components/the-sticky/index.module.less
  21. 121 0
      src/components/the-sticky/index.tsx
  22. 72 71
      src/constant/index.ts
  23. 81 0
      src/helpers/utils.ts
  24. 67 0
      src/router/index-tenant.ts
  25. 7 0
      src/router/routes-teacher.ts
  26. 329 0
      src/router/routes-tenant.ts
  27. 70 2
      src/state.ts
  28. 7 1
      src/styles/index.less
  29. 17 0
      src/styles/tenant.less
  30. 11 0
      src/tenant/App.vue
  31. BIN
      src/tenant/activation-code/icon-1.png
  32. 139 0
      src/tenant/activation-code/index.module.less
  33. 197 0
      src/tenant/activation-code/index.tsx
  34. 558 0
      src/tenant/exercise-record/echats.ts
  35. 313 0
      src/tenant/exercise-record/exercis-detail.module.less
  36. 432 0
      src/tenant/exercise-record/exercis-detail.tsx
  37. BIN
      src/tenant/exercise-record/images/Image1.png
  38. BIN
      src/tenant/exercise-record/images/Image2.png
  39. BIN
      src/tenant/exercise-record/images/Image3.png
  40. BIN
      src/tenant/exercise-record/images/Image4.png
  41. BIN
      src/tenant/exercise-record/images/Image5.png
  42. BIN
      src/tenant/exercise-record/images/good-icon.png
  43. BIN
      src/tenant/exercise-record/images/icon-arrow.png
  44. BIN
      src/tenant/exercise-record/images/icon-play.png
  45. BIN
      src/tenant/exercise-record/images/icon-subject.png
  46. BIN
      src/tenant/exercise-record/images/train-title.png
  47. 114 0
      src/tenant/exercise-record/modals/detail-item.module.less
  48. 133 0
      src/tenant/exercise-record/modals/detail-item.tsx
  49. BIN
      src/tenant/images/bg-image.png
  50. BIN
      src/tenant/images/icon-album-cover.png
  51. BIN
      src/tenant/images/icon-search.png
  52. BIN
      src/tenant/images/icon-share.png
  53. 32 0
      src/tenant/layout/auth.module.less
  54. 115 0
      src/tenant/layout/auth.tsx
  55. BIN
      src/tenant/layout/images/bottom_bg.png
  56. BIN
      src/tenant/layout/images/top_bg.png
  57. 44 0
      src/tenant/layout/login.module.less
  58. 210 0
      src/tenant/layout/login.tsx
  59. 80 0
      src/tenant/main.ts
  60. BIN
      src/tenant/member-center/images/1.png
  61. BIN
      src/tenant/member-center/images/2.png
  62. BIN
      src/tenant/member-center/images/3.png
  63. BIN
      src/tenant/member-center/images/4.png
  64. BIN
      src/tenant/member-center/images/5.png
  65. BIN
      src/tenant/member-center/images/6.png
  66. BIN
      src/tenant/member-center/images/7.png
  67. BIN
      src/tenant/member-center/images/8.png
  68. BIN
      src/tenant/member-center/images/contnt-bg.png
  69. BIN
      src/tenant/member-center/images/discount_bg.png
  70. BIN
      src/tenant/member-center/images/function-title.png
  71. BIN
      src/tenant/member-center/images/icon-arrow-line.png
  72. BIN
      src/tenant/member-center/images/icon-arrow.png
  73. BIN
      src/tenant/member-center/images/icon-logo-default.png
  74. BIN
      src/tenant/member-center/images/icon-logo.png
  75. BIN
      src/tenant/member-center/images/icon-member-active.png
  76. BIN
      src/tenant/member-center/images/icon-member-s.png
  77. BIN
      src/tenant/member-center/images/icon-selected.png
  78. BIN
      src/tenant/member-center/images/icon_discount.png
  79. BIN
      src/tenant/member-center/images/icon_gift.png
  80. BIN
      src/tenant/member-center/images/icon_video.png
  81. BIN
      src/tenant/member-center/images/info-title.png
  82. BIN
      src/tenant/member-center/images/member-bg.png
  83. BIN
      src/tenant/member-center/images/member_bg.png
  84. BIN
      src/tenant/member-center/images/member_logo.png
  85. BIN
      src/tenant/member-center/images/price-bg.png
  86. BIN
      src/tenant/member-center/images/record_bg.png
  87. BIN
      src/tenant/member-center/images/tip_bg.png
  88. BIN
      src/tenant/member-center/images/vip-bg.png
  89. 563 0
      src/tenant/member-center/index.module.less
  90. 482 0
      src/tenant/member-center/index.tsx
  91. BIN
      src/tenant/music/album-detail/charge_bg.png
  92. BIN
      src/tenant/music/album-detail/header-bg.png
  93. BIN
      src/tenant/music/album-detail/iStart.png
  94. BIN
      src/tenant/music/album-detail/icon-hart-active.png
  95. BIN
      src/tenant/music/album-detail/icon-hart.png
  96. BIN
      src/tenant/music/album-detail/icon-menu.png
  97. BIN
      src/tenant/music/album-detail/icon-pan.png
  98. BIN
      src/tenant/music/album-detail/icon-start-active.png
  99. BIN
      src/tenant/music/album-detail/icon-start.png
  100. BIN
      src/tenant/music/album-detail/icon_music_list.png

+ 2 - 1
package.json

@@ -15,7 +15,8 @@
   "scripts": {
     "dev": "vite",
     "start": "npm run dev",
-    "build": "vue-tsc --noEmit && vite build",
+    "build:prod": "vue-tsc --noEmit && vite build",
+    "build:dev": "vue-tsc --noEmit && vite build --mode development",
     "serve": "vite preview",
     "lint": "eslint --ext .js,.jsx,.vue,.ts,.tsx src",
     "generate": "plop"

BIN
src/common/images/icon_checkbox-tenant.png


+ 161 - 154
src/components/col-protocol/index.tsx

@@ -1,154 +1,161 @@
-import { Checkbox, Icon, Popup } from 'vant'
-import { defineComponent, PropType } from 'vue'
-import styles from './index.module.less'
-import activeButtonIcon from '@common/images/icon_checkbox.png'
-import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
-import ColHeader from '../col-header'
-import { state } from '@/state'
-import request from '@/helpers/request'
-const protocolText = {
-  BUY_ORDER: '《酷乐秀平台服务协议》',
-  REGISTER: '《酷乐秀平台注册协议》'
-}
-export default defineComponent({
-  name: 'protocol',
-  props: {
-    showHeader: {
-      type: Boolean,
-      default: false
-    },
-    modelValue: {
-      type: Boolean,
-      default: false
-    },
-    prototcolType: {
-      type: String as PropType<'BUY_ORDER' | 'REGISTER'>,
-      default: 'BUY_ORDER'
-    }
-  },
-  data() {
-    return {
-      exists: true,
-      checked: this.modelValue,
-      popupStatus: false,
-      protocolHTML: '',
-      protocolPopup: null as any,
-      baseUrl:
-        state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
-    }
-  },
-  async mounted() {
-    try {
-      const res = await request.get(
-        this.baseUrl + '/sysUserContractRecord/checkContractSign',
-        {
-          params: {
-            contractType: this.prototcolType
-          }
-        }
-      )
-      // console.log(res)
-      this.exists = res.data
-      this.checked = this.checked || this.exists
-      this.$emit('update:modelValue', this.checked || this.exists)
-    } catch {}
-    this.checked = this.modelValue
-    // this.getContractDetail()
-    window.addEventListener('hashchange', this.onHash, false)
-  },
-  unmounted() {
-    window.removeEventListener('hashchange', this.onHash, false)
-  },
-  watch: {
-    checked(val) {
-      this.$emit('update:modelValue', val)
-    }
-  },
-  methods: {
-    async getContractDetail() {
-      try {
-        console.log('getContractDetail')
-        // 判断是否有协议内容
-        if (!this.protocolHTML) {
-          const res = await request.get(
-            this.baseUrl + '/sysUserContractRecord/queryContract',
-            {
-              params: {
-                contractType: this.prototcolType
-              }
-            }
-          )
-          this.protocolHTML = res.data
-          console.log(res)
-        }
-        this.onPopupClose()
-      } catch {}
-    },
-    onHash() {
-      this.popupStatus = false
-    },
-    onPopupClose() {
-      this.popupStatus = !this.popupStatus
-
-      // 打开弹窗
-      if (this.popupStatus) {
-        const route = this.$route
-        let times = 0
-        for (let i in route.query) {
-          times += 1
-        }
-        const origin = window.location.href
-        const url = times > 0 ? '&pto=' + +new Date() : '?pto=' + +new Date()
-        history.pushState('', '', `${origin}${url}`)
-      } else {
-        window.history.go(-1)
-      }
-      if (this.protocolPopup) {
-        ;(this.protocolPopup as any).scrollTop = 0
-      }
-    }
-  },
-  render() {
-    return (
-      <div class={styles.colProtocol}>
-        {!this.exists && (
-          <Checkbox
-            v-model={this.checked}
-            v-slots={{
-              icon: (props: any) => (
-                <Icon
-                  class={styles.boxStyle}
-                  name={props.checked ? activeButtonIcon : inactiveButtonIcon}
-                  size="15"
-                />
-              )
-            }}
-          >
-            我已阅读并同意
-          </Checkbox>
-        )}
-        {this.exists && <>查看</>}
-        <span onClick={this.getContractDetail} class={styles.protocolText}>
-          {protocolText[this.prototcolType]}
-        </span>
-
-        <Popup
-          ref={this.protocolPopup}
-          show={this.popupStatus}
-          position="bottom"
-          style={{ height: '100%' }}
-        >
-          {this.showHeader && <ColHeader title="酷乐秀平台服务协议" />}
-          {this.popupStatus && (
-            <div class={styles.protocolContent} id="mProtocol">
-              <div
-                class={styles.protocolContent}
-                v-html={this.protocolHTML}
-              ></div>
-            </div>
-          )}
-        </Popup>
-      </div>
-    )
-  }
-})
+import { Checkbox, Icon, Popup } from 'vant'
+import { defineComponent, PropType } from 'vue'
+import styles from './index.module.less'
+import activeButtonIcon from '@common/images/icon_checkbox.png'
+import activeButtonIconTenant from '@common/images/icon_checkbox-tenant.png'
+import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
+import ColHeader from '../col-header'
+import { state } from '@/state'
+import request from '@/helpers/request'
+const protocolText = {
+  BUY_ORDER: '《酷乐秀平台服务协议》',
+  REGISTER: '《酷乐秀平台注册协议》'
+}
+export default defineComponent({
+  name: 'protocol',
+  props: {
+    showHeader: {
+      type: Boolean,
+      default: false
+    },
+    modelValue: {
+      type: Boolean,
+      default: false
+    },
+    prototcolType: {
+      type: String as PropType<'BUY_ORDER' | 'REGISTER'>,
+      default: 'BUY_ORDER'
+    }
+  },
+  data() {
+    return {
+      exists: true,
+      checked: this.modelValue,
+      popupStatus: false,
+      protocolHTML: '',
+      protocolPopup: null as any,
+      baseUrl:
+        state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
+    }
+  },
+  async mounted() {
+    try {
+      const res = await request.get(
+        this.baseUrl + '/sysUserContractRecord/checkContractSign',
+        {
+          params: {
+            contractType: this.prototcolType
+          }
+        }
+      )
+      // console.log(res)
+      this.exists = res.data
+      this.checked = this.checked || this.exists
+      this.$emit('update:modelValue', this.checked || this.exists)
+    } catch {}
+    this.checked = this.modelValue
+    // this.getContractDetail()
+    window.addEventListener('hashchange', this.onHash, false)
+  },
+  unmounted() {
+    window.removeEventListener('hashchange', this.onHash, false)
+  },
+  watch: {
+    checked(val) {
+      this.$emit('update:modelValue', val)
+    }
+  },
+  methods: {
+    async getContractDetail() {
+      try {
+        console.log('getContractDetail')
+        // 判断是否有协议内容
+        if (!this.protocolHTML) {
+          const res = await request.get(
+            this.baseUrl + '/sysUserContractRecord/queryContract',
+            {
+              params: {
+                contractType: this.prototcolType
+              }
+            }
+          )
+          this.protocolHTML = res.data
+          console.log(res)
+        }
+        this.onPopupClose()
+      } catch {}
+    },
+    onHash() {
+      this.popupStatus = false
+    },
+    onPopupClose() {
+      this.popupStatus = !this.popupStatus
+
+      // 打开弹窗
+      if (this.popupStatus) {
+        const route = this.$route
+        let times = 0
+        for (const i in route.query) {
+          times += 1
+        }
+        const origin = window.location.href
+        const url = times > 0 ? '&pto=' + +new Date() : '?pto=' + +new Date()
+        history.pushState('', '', `${origin}${url}`)
+      } else {
+        window.history.go(-1)
+      }
+      if (this.protocolPopup) {
+        ;(this.protocolPopup as any).scrollTop = 0
+      }
+    }
+  },
+  render() {
+    return (
+      <div class={styles.colProtocol}>
+        {!this.exists && (
+          <Checkbox
+            v-model={this.checked}
+            v-slots={{
+              icon: (props: any) => (
+                <Icon
+                  class={styles.boxStyle}
+                  name={
+                    props.checked
+                      ? state.projectType === 'tenant'
+                        ? activeButtonIconTenant
+                        : activeButtonIcon
+                      : inactiveButtonIcon
+                  }
+                  size="15"
+                />
+              )
+            }}
+          >
+            我已阅读并同意
+          </Checkbox>
+        )}
+        {this.exists && <>查看</>}
+        <span onClick={this.getContractDetail} class={styles.protocolText}>
+          {protocolText[this.prototcolType]}
+        </span>
+
+        <Popup
+          ref={this.protocolPopup}
+          show={this.popupStatus}
+          position="bottom"
+          style={{ height: '100%' }}
+        >
+          {this.showHeader && <ColHeader title="酷乐秀平台服务协议" />}
+          {this.popupStatus && (
+            <div class={styles.protocolContent} id="mProtocol">
+              <div
+                class={styles.protocolContent}
+                v-html={this.protocolHTML}
+              ></div>
+            </div>
+          )}
+        </Popup>
+      </div>
+    )
+  }
+})

BIN
src/components/col-result/images/empty_tenant.png


BIN
src/components/col-result/images/network_tenant.png


BIN
src/components/col-result/images/notFond_tenant.png


+ 49 - 33
src/components/col-result/index.module.less

@@ -1,33 +1,49 @@
-.col-result {
-  padding: 30px 14px 14px;
-  text-align: center;
-  margin: 0 auto;
-  .tips {
-    font-size: 14px;
-    color: #333;
-    padding: 20px 0;
-  }
-  .btn {
-    width: 55%;
-    margin: 0 auto;
-  }
-  .SMALL {
-    :global {
-      .van-empty__image {
-        width: 182px;
-        height: 161px;
-      }
-    }
-  }
-  .CERT {
-    :global {
-      .van-empty__image {
-        width: 260px;
-        height: 230px;
-      }
-      .van-empty__description {
-        padding: 0 30px;
-      }
-    }
-  }
-}
+.col-result {
+  padding: 30px 14px 14px;
+  text-align: center;
+  margin: 0 auto;
+
+  .tips {
+    font-size: 14px;
+    color: #333;
+    padding: 20px 0;
+  }
+
+  .btn {
+    width: 55%;
+    margin: 0 auto;
+  }
+
+  :global {
+    .van-empty__image {
+      width: 260px;
+      height: 230px;
+    }
+
+    .van-empty__description {
+      padding: 0 30px;
+    }
+  }
+
+  .SMALL {
+    :global {
+      .van-empty__image {
+        width: 182px;
+        height: 161px;
+      }
+    }
+  }
+
+  .CERT {
+    :global {
+      .van-empty__image {
+        width: 260px;
+        height: 230px;
+      }
+
+      .van-empty__description {
+        padding: 0 30px;
+      }
+    }
+  }
+}

+ 130 - 120
src/components/col-result/index.tsx

@@ -1,120 +1,130 @@
-import { defineComponent, PropType } from 'vue'
-import styles from './index.module.less'
-import empty from '@common/images/icon_nodata.png'
-import { Button, Empty, Image } from 'vant'
-import { postMessage } from '@/helpers/native-message'
-
-export const getAssetsHomeFile = (fileName: string) => {
-  const path = `./images/${fileName}`
-  const modules = import.meta.globEager('./images/*')
-  return modules[path].default
-}
-
-export default defineComponent({
-  name: 'col-result',
-  props: {
-    tips: {
-      type: String
-    },
-    type: {
-      // 空 | 达人认证 | 音乐人认证 | 直播认证
-      type: String as PropType<
-        | 'empty'
-        | 'teacherCert'
-        | 'musicCert'
-        | 'liveCert'
-        | 'error'
-        | 'network'
-        | 'search'
-        | 'emptyContent'
-        | 'notFond'
-      >,
-      default: 'empty'
-    },
-    classImgSize: {
-      type: String as PropType<'CERT' | 'SMALL'>,
-      default: ''
-    },
-    plain: {
-      type: Boolean,
-      default: false
-    },
-    btnStatus: {
-      type: Boolean,
-      default: true
-    },
-    buttonText: {
-      type: String,
-      default: '我知道了'
-    },
-    onClick: Function
-  },
-  methods: {
-    onResult() {
-      if (this.onClick) {
-        this.onClick()
-      } else {
-        postMessage({ api: 'back', content: {} })
-      }
-    }
-  },
-  computed: {
-    image() {
-      let image = null as any
-      switch (this.type) {
-        case 'teacherCert':
-          image = getAssetsHomeFile('teacherCert.png')
-          break
-        case 'musicCert':
-          image = getAssetsHomeFile('musicCert.png')
-          break
-        case 'liveCert':
-          image = getAssetsHomeFile('liveCert.png')
-          break
-        case 'emptyContent':
-          image = getAssetsHomeFile('emptyContent.png')
-          break
-        case 'error':
-          image = 'error'
-          break
-        case 'network':
-          image = getAssetsHomeFile('network.png')
-          break
-        case 'search':
-          image = 'search'
-          break
-        case 'notFond':
-          image = getAssetsHomeFile('notFond.png')
-          break
-        default:
-          image = getAssetsHomeFile('empty.png')
-          break
-      }
-      return image
-    }
-  },
-  render() {
-    return (
-      <div class={[styles['col-result'], 'col-result-container']}>
-        <Empty
-          image={this.image}
-          class={styles[this.classImgSize]}
-          description={this.tips}
-        />
-
-        {this.btnStatus ? (
-          <Button
-            class={styles.btn}
-            round
-            block
-            type="primary"
-            plain={this.plain}
-            onClick={this.onResult}
-          >
-            {this.buttonText}
-          </Button>
-        ) : null}
-      </div>
-    )
-  }
-})
+import { defineComponent, PropType } from 'vue'
+import styles from './index.module.less'
+import empty from '@common/images/icon_nodata.png'
+import { Button, Empty, Image } from 'vant'
+import { postMessage } from '@/helpers/native-message'
+import { state } from '@/state'
+
+export const getAssetsHomeFile = (fileName: string) => {
+  const path = `./images/${fileName}`
+  const modules = import.meta.globEager('./images/*')
+  return modules[path].default
+}
+
+export default defineComponent({
+  name: 'col-result',
+  props: {
+    tips: {
+      type: String
+    },
+    type: {
+      // 空 | 达人认证 | 音乐人认证 | 直播认证
+      type: String as PropType<
+        | 'empty'
+        | 'teacherCert'
+        | 'musicCert'
+        | 'liveCert'
+        | 'error'
+        | 'network'
+        | 'search'
+        | 'emptyContent'
+        | 'notFond'
+      >,
+      default: 'empty'
+    },
+    classImgSize: {
+      type: String as PropType<'CERT' | 'SMALL'>,
+      default: ''
+    },
+    plain: {
+      type: Boolean,
+      default: false
+    },
+    btnStatus: {
+      type: Boolean,
+      default: true
+    },
+    buttonText: {
+      type: String,
+      default: '我知道了'
+    },
+    onClick: Function
+  },
+  methods: {
+    onResult() {
+      if (this.onClick) {
+        this.onClick()
+      } else {
+        postMessage({ api: 'back', content: {} })
+      }
+    }
+  },
+  computed: {
+    image() {
+      let image = null as any
+      switch (this.type) {
+        case 'teacherCert':
+          image = getAssetsHomeFile('teacherCert.png')
+          break
+        case 'musicCert':
+          image = getAssetsHomeFile('musicCert.png')
+          break
+        case 'liveCert':
+          image = getAssetsHomeFile('liveCert.png')
+          break
+        case 'emptyContent':
+          image = getAssetsHomeFile('emptyContent.png')
+          break
+        case 'error':
+          image = 'error'
+          break
+        case 'network':
+          image =
+            state.projectType === 'tenant'
+              ? getAssetsHomeFile('network_tenant.png')
+              : getAssetsHomeFile('network.png')
+          break
+        case 'search':
+          image = 'search'
+          break
+        case 'notFond':
+          image =
+            state.projectType === 'tenant'
+              ? getAssetsHomeFile('notFond_tenant.png')
+              : getAssetsHomeFile('notFond.png')
+          break
+        default:
+          image =
+            state.projectType === 'tenant'
+              ? getAssetsHomeFile('empty_tenant.png')
+              : getAssetsHomeFile('empty.png')
+          break
+      }
+      return image
+    }
+  },
+  render() {
+    return (
+      <div class={[styles['col-result'], 'col-result-container']}>
+        <Empty
+          image={this.image}
+          class={styles[this.classImgSize]}
+          description={this.tips}
+        />
+
+        {this.btnStatus ? (
+          <Button
+            class={styles.btn}
+            round
+            block
+            type="primary"
+            plain={this.plain}
+            onClick={this.onResult}
+          >
+            {this.buttonText}
+          </Button>
+        ) : null}
+      </div>
+    )
+  }
+})

+ 17 - 1
src/components/col-search/index.module.less

@@ -2,18 +2,22 @@
   .van-search {
     padding-left: 14px;
     padding-right: 14px;
+
     input {
       -webkit-user-select: text !important;
       user-select: text !important;
     }
+
     .van-search__field {
       padding: 0.13333rem var(--van-padding-xs) 0.13333rem 0 !important;
       background: transparent !important;
     }
   }
 }
+
 .col-search {
   --van-cell-background-color: transparent;
+
   // padding-left: 14px;
   // padding-right: 14px;
   :global {
@@ -21,16 +25,20 @@
       display: flex;
       align-items: center;
     }
+
     .van-field__right-icon {
       font-size: 0;
     }
+
     .van-search__action {
       display: flex;
     }
+
     .van-field__control {
       font-size: 14px;
     }
   }
+
   &.default {
     :global {
       .van-search__content {
@@ -51,12 +59,15 @@
     :global {
       .van-search__content {
         background: rgba(255, 255, 255, 0.16);
+
         input::placeholder {
           color: #fff;
         }
+
         input {
           color: #fff;
         }
+
         .van-field__clear {
           color: #fff;
         }
@@ -71,5 +82,10 @@
     font-size: 14px;
     --van-button-mini-height: 28px;
     --van-font-size-xs: 14px;
+
+    &.searchTenantBtn {
+      background: linear-gradient(270deg, #FF3C81 0%, #FF76A6 100%);
+      border: none;
+    }
   }
-}
+}

+ 15 - 2
src/components/col-search/index.tsx

@@ -2,6 +2,7 @@ import { Button, Icon, Search } from 'vant'
 import { defineComponent, PropType } from 'vue'
 import styles from './index.module.less'
 import iconSearch from '@common/images/icon_search.png'
+import iconSearchTenant from '@/tenant/images/icon-search.png'
 import iconFilter from '@common/images/icon_filter.png'
 
 type inputBackground = 'default' | 'white' | 'transparent'
@@ -9,6 +10,10 @@ type inputBackground = 'default' | 'white' | 'transparent'
 export default defineComponent({
   name: 'ColSearch',
   props: {
+    type: {
+      type: String as PropType<'person' | 'tenant'>,
+      default: ''
+    },
     modelValue: {
       type: String,
       default: ''
@@ -87,10 +92,18 @@ export default defineComponent({
           onClick={() => this.$emit('click')}
           v-slots={{
             left: () => this.$slots.left && this.$slots.left(),
-            'left-icon': () => <Icon name={this.leftIcon} size={16} />,
+            'left-icon': () => (
+              <Icon
+                name={this.type === 'tenant' ? iconSearchTenant : this.leftIcon}
+                size={16}
+              />
+            ),
             'right-icon': () => (
               <Button
-                class={styles.searchBtn}
+                class={[
+                  styles.searchBtn,
+                  this.type === 'tenant' && styles.searchTenantBtn
+                ]}
                 round
                 type="primary"
                 size="mini"

+ 42 - 0
src/components/col-share/index.module.less

@@ -4,25 +4,30 @@
   .swipe__indicators {
     color: #fff;
   }
+
   .indicators {
     display: flex;
     justify-content: center;
     align-items: center;
     margin-top: 10px;
   }
+
   .swipe__indicator {
     width: 48px;
     height: 4px;
     background-color: #fff;
     opacity: 0.5;
     border-radius: 0;
+
     &:first-child {
       border-radius: 4px 0 0 4px;
     }
+
     &:last-child {
       border-radius: 0 4px 4px 0;
     }
   }
+
   .swipe__indicator--active {
     opacity: 1;
   }
@@ -38,9 +43,11 @@
     .van-swipe {
       transform: translateZ(0);
     }
+
     .van-swipe-item {
       // margin: 0 5px;
     }
+
     // .van-swipe__indicators {
     //   border-radius: 2px;
     //   overflow: hidden;
@@ -68,6 +75,7 @@
     color: #333333;
     line-height: 35px;
   }
+
   .titleTip {
     padding-top: 5px;
     font-size: 14px;
@@ -82,18 +90,21 @@
   background: linear-gradient(270deg, #baffe7 0%, #c0dcff 100%);
   border-radius: 9px;
   color: #333;
+
   .teacherImg {
     margin-right: 12px;
     position: relative;
     width: 40px;
     text-align: center;
   }
+
   .recommend {
     position: absolute;
     height: 14px;
     left: 0;
     bottom: 3px;
   }
+
   .img {
     width: 33px;
     height: 33px;
@@ -120,49 +131,61 @@
   margin: 0 auto;
   box-sizing: border-box;
   background: #fff;
+
   &.video {
     background: url('./images/video1.png') no-repeat top center #fff;
     background-size: cover;
+
     &.yellow {
       background: url('./images/video2.png') no-repeat top center #fff;
       background-size: cover;
     }
+
     &.pink {
       background: url('./images/video3.png') no-repeat top center #fff;
       background-size: cover;
     }
   }
+
   &.live {
     background: url('./images/live1.png') no-repeat top center #fff;
     background-size: cover;
+
     &.yellow {
       background: url('./images/live2.png') no-repeat top center #fff;
       background-size: cover;
     }
+
     &.pink {
       background: url('./images/live3.png') no-repeat top center #fff;
       background-size: cover;
     }
   }
+
   &.mall {
     background: url('./images/shop1.png') no-repeat top center #fff;
     background-size: cover;
+
     &.yellow {
       background: url('./images/shop2.png') no-repeat top center #fff;
       background-size: cover;
     }
+
     &.pink {
       background: url('./images/shop3.png') no-repeat top center #fff;
       background-size: cover;
     }
   }
+
   &.music {
     background: url('./images/music1.png') no-repeat top center #fff;
     background-size: cover;
+
     &.yellow {
       background: url('./images/music2.png') no-repeat top center #fff;
       background-size: cover;
     }
+
     &.pink {
       background: url('./images/music3.png') no-repeat top center #fff;
       background-size: cover;
@@ -172,11 +195,13 @@
   &.vip {
     background: url('./images/vip1.png') no-repeat top center #fff;
     background-size: cover;
+
     &.yellow {
       background: url('./images/vip2.png') no-repeat top center #fff;
       background-size: cover;
     }
   }
+
   &.album {
     background: url('./images/album1.png') no-repeat top center #fff;
     background-size: contain;
@@ -192,6 +217,7 @@
   display: flex;
   align-items: center;
   justify-content: space-between;
+
   .logo {
     margin-left: 12px;
     padding-left: 14px;
@@ -201,6 +227,7 @@
     flex: 1;
     border-left: 1px solid #ccc;
     font-weight: 500;
+
     img {
       height: 20px;
       vertical-align: middle;
@@ -242,7 +269,22 @@
   align-items: center;
   justify-content: space-between;
   padding-top: 12px;
+
   :global(.van-button) {
     padding: 8px 46px;
   }
+
+  &.shareGroupTenantBtn {
+    :global {
+      .van-button--primary {
+        background: linear-gradient(270deg, #FF204B 0%, #FE5B71 100%);
+        border: none;
+      }
+
+      .van-button--plain.van-button--primary {
+        color: #FF204B;
+        background: #fff !important;
+      }
+    }
+  }
 }

+ 11 - 1
src/components/col-share/index.tsx

@@ -9,6 +9,10 @@ import request from '@/helpers/request'
 export default defineComponent({
   name: 'col-share',
   props: {
+    type: {
+      type: String as PropType<'default' | 'tenant'>,
+      default: 'default'
+    },
     teacherId: {
       type: Number
     },
@@ -254,7 +258,13 @@ export default defineComponent({
               </Swipe>
             </div>
 
-            <div class={['btnGroup', styles.shareGroupBtn]}>
+            <div
+              class={[
+                'btnGroup',
+                styles.shareGroupBtn,
+                this.type === 'tenant' ? styles.shareGroupTenantBtn : ''
+              ]}
+            >
               <Button
                 type="primary"
                 plain

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/components/the-full-refresh/datas/data.json


+ 21 - 0
src/components/the-full-refresh/index.module.less

@@ -0,0 +1,21 @@
+.animateWrap {
+  width: 55px !important;
+  height: 55px !important;
+}
+
+.loading {
+  height: 55px !important;
+  img {
+    height: 30px;
+    width: 120px;
+    margin-top: 20px;
+  }
+}
+
+.pullRefresh {
+  :global {
+    .van-pull-refresh__track {
+      min-height: inherit;
+    }
+  }
+}

+ 77 - 0
src/components/the-full-refresh/index.tsx

@@ -0,0 +1,77 @@
+import { Image, PullRefresh } from 'vant';
+import { defineComponent, reactive, watch } from 'vue';
+import styles from './index.module.less';
+import { Vue3Lottie } from 'vue3-lottie';
+import AstronautJSON from './datas/data.json';
+import 'vue3-lottie/dist/style.css';
+import loading from './loading.gif';
+import loadingJSon from './loading.json';
+export default defineComponent({
+  name: 'm-full-refresh',
+  props: {
+    title: String,
+    modelValue: {
+      type: Boolean,
+      default: false
+    }
+  },
+  emits: ['refresh', 'update:modelValue'],
+  setup(props, { emit, slots }) {
+    const state = reactive({
+      fullState: false
+    });
+    watch(
+      () => props.modelValue,
+      (val: boolean) => {
+        state.fullState = val;
+      }
+    );
+    watch(
+      () => state.fullState,
+      (val: boolean) => {
+        emit('update:modelValue', val);
+      }
+    );
+    return () => (
+      <PullRefresh
+        v-model:modelValue={state.fullState}
+        onRefresh={() => emit('refresh')}
+        loadingText=" "
+        class={styles.pullRefresh}>
+        {{
+          // loading: () => (
+          //   <div>
+          //     {
+          //       // <Image src={loadingJSon.loading} class={styles.loading} />
+          //       <Vue3Lottie
+          //         class={styles.animateWrap}
+          //         animationData={AstronautJSON}></Vue3Lottie>
+          //     }
+          //   </div>
+          // ),
+          // pulling: () => (
+          //   <div>
+          //     {
+          //       // <Image src={loading} class={styles.loading} />
+          //       <Vue3Lottie
+          //         class={styles.animateWrap}
+          //         animationData={AstronautJSON}></Vue3Lottie>
+          //     }
+          //   </div>
+          // ),
+          // loosing: () => (
+          //   <div>
+          //     {
+          //       // <Image src={loading} class={styles.loading} />
+          //       <Vue3Lottie
+          //         class={styles.animateWrap}
+          //         animationData={AstronautJSON}></Vue3Lottie>
+          //     }
+          //   </div>
+          // ),
+          default: () => <> {slots.default && slots.default()}</>
+        }}
+      </PullRefresh>
+    );
+  }
+});

BIN
src/components/the-full-refresh/loading.gif


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
src/components/the-full-refresh/loading.json


+ 26 - 0
src/components/the-qrcode/index.module.less

@@ -0,0 +1,26 @@
+.qrcode {
+  position: relative;
+
+  .qrcodeCanvas {
+    width: 100% !important;
+    height: 100% !important;
+  }
+
+  .qrcodeLogo {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    margin-left: -20px;
+    margin-top: -20px;
+    width: 40px !important;
+    height: 40px !important;
+    border-radius: 4px;
+
+    &.small {
+      margin-left: -10px;
+      margin-top: -10px;
+      width: 20px !important;
+      height: 20px !important;
+    }
+  }
+}

+ 65 - 0
src/components/the-qrcode/index.tsx

@@ -0,0 +1,65 @@
+import { defineComponent, nextTick, onMounted, ref, watch } from 'vue'
+import logo from '@common/images/icon_logo.png'
+//@ts-ignore
+import QRCode from 'qrcode'
+import styles from './index.module.less'
+
+export default defineComponent({
+  props: {
+    text: {
+      type: String,
+      default: ''
+    },
+    size: {
+      type: String,
+      default: '200px'
+    },
+    logoSize: {
+      type: String,
+      default: 'default'
+    }
+  },
+  setup(props) {
+    const canvas = ref()
+
+    const init = () => {
+      QRCode.toCanvas(
+        canvas.value,
+        props.text,
+        {
+          margin: 1
+        },
+        (error: any) => {
+          if (error) console.log(error)
+          console.log('success')
+        }
+      )
+    }
+    watch(
+      () => props.text,
+      () => {
+        init()
+      }
+    )
+    onMounted(() => {
+      nextTick(() => {
+        init()
+      })
+    })
+    return () => (
+      <div
+        class={styles.qrcode}
+        style={{ width: props.size, height: props.size }}
+      >
+        <canvas ref={canvas} class={styles.qrcodeCanvas}></canvas>
+        <img
+          src={logo}
+          class={[
+            styles.qrcodeLogo,
+            props.logoSize === 'small' && styles.small
+          ]}
+        />
+      </div>
+    )
+  }
+})

+ 18 - 0
src/components/the-sticky/index.module.less

@@ -0,0 +1,18 @@
+.sticky {
+  position: sticky;
+  top: 0;
+  z-index: 99;
+}
+
+.white {
+  background-color: #fff;
+
+  >div {
+    padding-top: 15px;
+    box-shadow: 0px 0px 10px 0px rgba(216, 216, 216, 0.5);
+  }
+}
+
+.animationStyle {
+  transition: all .2s;
+}

+ 121 - 0
src/components/the-sticky/index.tsx

@@ -0,0 +1,121 @@
+import {
+  PropType,
+  defineComponent,
+  nextTick,
+  onMounted,
+  reactive,
+  ref,
+  watch
+} from 'vue'
+import styles from './index.module.less'
+import { useRect } from '@vant/use'
+import { useResizeObserver } from '@vueuse/core'
+
+export default defineComponent({
+  name: 'm-sticky',
+  props: {
+    position: {
+      type: String as PropType<'top' | 'bottom'>,
+      default: 'top'
+    },
+    mode: {
+      type: String as PropType<'fixed' | 'sticky'>,
+      default: 'fixed'
+    },
+    offsetTop: {
+      type: String,
+      default: '0px'
+    },
+    offsetBottom: {
+      default: '0px'
+    },
+    // 变量名
+    varName: {
+      type: String,
+      default: '--header-height'
+    }
+  },
+  emits: ['barHeight'],
+  setup(props, { slots, emit }) {
+    const forms = reactive({
+      divStyle: {} as any,
+      heightV: 0,
+      sectionStyle: {
+        width: '100%',
+        height: 'auto',
+        left: '0'
+      }
+    })
+
+    const __initHeight = (height: any) => {
+      forms.sectionStyle.height = `${height}px`
+      forms.heightV = height
+      // 设置名称
+      document.documentElement.style.setProperty(props.varName, `${height}px`)
+      emit('barHeight', height)
+    }
+
+    const divRef = ref()
+    const div2Ref = ref()
+    onMounted(() => {
+      if (props.position === 'top') {
+        forms.divStyle.top = props.offsetTop || '0px'
+      } else {
+        forms.divStyle.bottom = props.offsetBottom || '0px'
+      }
+      // const resize = new ResizeObserver(() => {
+      //   const { height } = useRect(div2Ref.value);
+      //   __initHeight(height);
+      // });
+      // resize.observe(divRef.value);
+
+      try {
+        useResizeObserver(div2Ref.value, (entries: any) => {
+          const entry = entries[0]
+          // console.log(entry, 'entry')
+          const { height } = entry.contentRect
+          if (Math.abs(height - forms.heightV) > 1) {
+            setTimeout(() => {
+              __initHeight(height)
+            }, 10)
+          }
+        })
+      } catch {
+        //
+      }
+    })
+
+    watch(
+      () => props.offsetTop,
+      () => {
+        forms.divStyle.top = props.offsetTop
+      }
+    )
+    watch(
+      () => props.offsetBottom,
+      () => {
+        forms.divStyle.bottom = props.offsetBottom
+      }
+    )
+    return () => (
+      <div
+        style={[forms.sectionStyle]}
+        class={props.mode === 'sticky' && styles.sticky}
+      >
+        <div
+          ref={divRef}
+          class={[
+            'van-sticky',
+            props.mode === 'fixed' ? 'van-sticky--fixed' : '',
+            styles.animationStyle
+          ]}
+          style={[forms.divStyle, forms.sectionStyle]}
+        >
+          <div ref={div2Ref} style={{ position: 'relative' }}>
+            {slots.default && slots.default()}
+          </div>
+        </div>
+      </div>
+    )
+  }
+})

+ 72 - 71
src/constant/index.ts

@@ -1,71 +1,72 @@
-export const goodsType = {
-  LIVE: '直播课',
-  PRACTICE: '陪练课',
-  VIDEO: '视频课',
-  VIP: '开通会员',
-  MUSIC: '单曲点播',
-  ALBUM: '专辑购买',
-  PIANO_ROOM: '琴房时长充值',
-  ACTI_REGIST: '活动报名'
-}
-
-export const orderType = {
-  WAIT_PAY: '待支付',
-  PAYING: '支付中',
-  PAID: '已付款',
-  CLOSE: '已关闭',
-  FAIL: '支付失败'
-}
-
-export const returnType = {
-  DOING: '审核中',
-  PASS: '通过',
-  UNPASS: '不通过'
-}
-
-export const levelMember = {
-  BEGINNER: '入门级',
-  ADVANCED: '进阶级',
-  PERFORMER: '大师级'
-}
-
-export const memberType = {
-  MONTH: '月度会员',
-  QUARTERLY: '季度会员',
-  YEAR_HALF: '半年会员',
-  YEAR: '年度会员'
-}
-
-export const courseType = {
-  NOT_START: '未开始',
-  ING: '进行中',
-  COMPLETE: '已完成',
-  CANCEL: '已取消'
-}
-
-export const bizStatus = {
-  PRACTICE: '陪练课',
-  LIVE: '直播课',
-  VIDEO: '视频课',
-  MUSIC: '乐谱',
-  WITHDRAWAL: '提现',
-  LIVE_SHARE: '直播课分润',
-  VIDEO_SHARE: '视频课分润',
-  MUSIC_SHARE: '乐谱分润',
-  VIP_SHARE: '会员分润',
-  MALL_SHARE: '商品分润'
-}
-
-export const postStatus = {
-  WAIT: '待入账',
-  FROZEN: '冻结入账 ',
-  RECORDED: '已入账 ',
-  CANCEL: '取消'
-}
-
-// 评测难度
-export const difficulty = {
-  BEGINNER: '入门级',
-  ADVANCED: '进阶级',
-  PERFORMER: '大师级'
-}
+export const goodsType = {
+  LIVE: '直播课',
+  PRACTICE: '陪练课',
+  VIDEO: '视频课',
+  VIP: '开通会员',
+  MUSIC: '单曲点播',
+  ALBUM: '专辑购买',
+  PIANO_ROOM: '琴房时长充值',
+  ACTI_REGIST: '活动报名',
+  TENANT_ALBUM: '机构专辑'
+}
+
+export const orderType = {
+  WAIT_PAY: '待支付',
+  PAYING: '支付中',
+  PAID: '已付款',
+  CLOSE: '已关闭',
+  FAIL: '支付失败'
+}
+
+export const returnType = {
+  DOING: '审核中',
+  PASS: '通过',
+  UNPASS: '不通过'
+}
+
+export const levelMember = {
+  BEGINNER: '入门级',
+  ADVANCED: '进阶级',
+  PERFORMER: '大师级'
+}
+
+export const memberType = {
+  MONTH: '月度会员',
+  QUARTERLY: '季度会员',
+  YEAR_HALF: '半年会员',
+  YEAR: '年度会员'
+}
+
+export const courseType = {
+  NOT_START: '未开始',
+  ING: '进行中',
+  COMPLETE: '已完成',
+  CANCEL: '已取消'
+}
+
+export const bizStatus = {
+  PRACTICE: '陪练课',
+  LIVE: '直播课',
+  VIDEO: '视频课',
+  MUSIC: '乐谱',
+  WITHDRAWAL: '提现',
+  LIVE_SHARE: '直播课分润',
+  VIDEO_SHARE: '视频课分润',
+  MUSIC_SHARE: '乐谱分润',
+  VIP_SHARE: '会员分润',
+  MALL_SHARE: '商品分润'
+}
+
+export const postStatus = {
+  WAIT: '待入账',
+  FROZEN: '冻结入账 ',
+  RECORDED: '已入账 ',
+  CANCEL: '取消'
+}
+
+// 评测难度
+export const difficulty = {
+  BEGINNER: '入门级',
+  ADVANCED: '进阶级',
+  PERFORMER: '大师级'
+}

+ 81 - 0
src/helpers/utils.ts

@@ -2,6 +2,7 @@ import dayjs from 'dayjs'
 import numeral from 'numeral'
 import { Toast } from 'vant'
 import { state as helpState } from './helpState'
+import qs from 'query-string'
 
 export const browser = () => {
   const u = navigator.userAgent
@@ -41,11 +42,77 @@ export const browser = () => {
     iPad: u.indexOf('iPad') > -1, //是否iPad
     webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部
     weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)
+    alipay: u.indexOf('AlipayClient') > -1, //是否支付宝
     huawei: !!u.match(/huawei/i) || !!u.match(/honor/i),
     xiaomi: !!u.match(/mi\s/i) || !!u.match(/redmi/i) || !!u.match(/mix/i)
   }
 }
 
+/**
+ * @description 格式化日期控件显示内容
+ * @param type
+ * @param option
+ * @returns OBJECT
+ */
+export const formatterDatePicker = (type: any, option: any) => {
+  if (type === 'year') {
+    option.text += '年'
+  }
+  if (type === 'month') {
+    option.text += '月'
+  }
+  if (type === 'day') {
+    option.text += '日'
+  }
+  return option
+}
+
+/**
+ * 数字转成汉字
+ * @params num === 要转换的数字
+ * @return 汉字
+ * */
+export const toChinesNum = (num: any) => {
+  const changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']
+  const unit = ['', '十', '百', '千', '万']
+  num = parseInt(num)
+  const getWan = (temp: any) => {
+    const strArr = temp.toString().split('').reverse()
+    let newNum = ''
+    const newArr: string[] = []
+    strArr.forEach((item: any, index: any) => {
+      newArr.unshift(
+        item === '0' ? changeNum[item] : changeNum[item] + unit[index]
+      )
+    })
+    const numArr: number[] = []
+    newArr.forEach((m, n) => {
+      if (m !== '零') numArr.push(n)
+    })
+    if (newArr.length > 1) {
+      newArr.forEach((m, n) => {
+        if (newArr[newArr.length - 1] === '零') {
+          if (n <= numArr[numArr.length - 1]) {
+            newNum += m
+          }
+        } else {
+          newNum += m
+        }
+      })
+    } else {
+      newNum = newArr[0]
+    }
+
+    return newNum
+  }
+  const overWan = Math.floor(num / 10000)
+  let noWan: any = num % 10000
+  if (noWan.toString().length < 4) {
+    noWan = '0' + noWan
+  }
+  return overWan ? getWan(overWan) + '万' + getWan(noWan) : getWan(num)
+}
+
 export const getRandomKey = () => {
   const key = '' + new Date().getTime() + Math.floor(Math.random() * 1000000)
   return key
@@ -152,3 +219,17 @@ export const dateFormat = (
 ) => {
   return dayjs(value).format(format)
 }
+
+// 获取授权的code码
+export const getUrlCode = (name = 'code') => {
+  let search: any = {}
+  try {
+    search = {
+      ...qs.parse(location.search),
+      ...qs.parse(location.hash.split('?')[1])
+    }
+  } catch (error) {
+    //
+  }
+  return search[name]
+}

+ 67 - 0
src/router/index-tenant.ts

@@ -0,0 +1,67 @@
+import { browser } from '@/helpers/utils'
+import { state } from '@/state'
+import { Dialog } from 'vant'
+import { createRouter, createWebHashHistory, Router } from 'vue-router'
+import { postMessage } from '@/helpers/native-message'
+import routes from './routes-tenant'
+const router: Router = createRouter({
+  history: createWebHashHistory(),
+  routes
+})
+
+router.beforeEach((to, from, next) => {
+  const title = to.meta.title
+  document.title = (title || '酷乐秀') as any
+  next()
+  // if (browser().iPhone && !state.version) {
+  // try {
+  //   postMessage(
+  //     {
+  //       api: 'getVersion'
+  //     },
+  //     (res: any) => {
+  //       state.version = res.version
+  //       console.log(res, 'version')
+  //       setTimeout(() => {
+  //         next()
+  //       }, 50)
+  //     }
+  //   )
+  // } catch {}
+  // // 为了处理上面方法的没有返回
+  // setTimeout(() => {
+  // if (!state.version) {
+  //       next()
+  //     // }
+  //   // }, 5000)
+  // } else {
+  //   console.log(222)
+  //   next()
+  // }
+})
+
+let isOpen = false
+router.onError(error => {
+  if (error instanceof Error) {
+    const isChunkLoadFailed = error.name.indexOf('chunk')
+    const targetPath = router.currentRoute.value.fullPath
+    if (isChunkLoadFailed && !isOpen) {
+      isOpen = true
+      Dialog.alert({
+        title: '更新提示',
+        message: 'APP有更新请点击确定刷新页面?',
+        confirmButtonColor: 'var(--van-primary)'
+      }).then(() => {
+        // on close
+        if (browser().isApp) {
+          postMessage({ api: 'back' })
+        } else {
+          location.hash = targetPath
+          window.location.reload()
+        }
+      })
+    }
+  }
+})
+
+export default router

+ 7 - 0
src/router/routes-teacher.ts

@@ -318,6 +318,13 @@ export default [
         meta: {
           title: '老师主页'
         }
+      },
+      {
+        path: '/train-tool',
+        component: () => import('@/tenant/music/train-tool'),
+        meta: {
+          title: '训练工具'
+        }
       }
     ]
   },

+ 329 - 0
src/router/routes-tenant.ts

@@ -0,0 +1,329 @@
+import Auth from '@/student/layout/auth'
+import { router, rootRouter } from './routes-common'
+
+type metaType = {
+  isRegister: boolean
+}
+
+const noLoginRouter = [
+  {
+    path: '/share-music-sheet',
+    name: 'share-music-sheet',
+    component: () => import('@/teacher/share-page/share-music-sheet/index'),
+    meta: {
+      title: '分享乐曲'
+    }
+  },
+  {
+    path: '/leaderboard',
+    component: () => import('@/student/leaderboard/index'),
+    meta: {
+      title: '曲目挑战排行榜'
+      // isExternal: true // 是否外部浏览器可以打开
+    }
+  },
+  {
+    path: '/payCenter',
+    name: 'payCenter',
+    component: () => import('@/views/adapay/pay-center'),
+    meta: {
+      title: '支付'
+    }
+  },
+  {
+    path: '/payDefine',
+    name: 'payDefine',
+    component: () => import('@/views/adapay/pay-define'),
+    meta: {
+      title: '支付'
+    }
+  },
+  {
+    path: '/payResult',
+    name: 'payResult',
+    component: () => import('@/views/adapay/pay-result'),
+    meta: {
+      title: '支付'
+    }
+  },
+  {
+    path: '/tradeDetail',
+    name: 'tradeDetail',
+    component: () => import('@/views/trade/trade-detail'),
+    meta: {
+      title: '交易详情'
+    }
+  },
+  {
+    path: '/helpCenter',
+    name: 'helpCenter',
+    component: () => import('@/views/article-center/help-center')
+  },
+  {
+    path: '/helpCenterDetail',
+    name: 'helpCenterDetail',
+    component: () => import('@/views/article-center/help-center-detail')
+  }
+]
+
+export default [
+  {
+    path: '/',
+    component: Auth,
+    children: [
+      // ...router,
+      {
+        path: '/login',
+        name: 'login',
+        component: () => import('@/tenant/layout/login'),
+        meta: {
+          isRegister: false
+        } as metaType
+      },
+      {
+        path: '/music-album',
+        component: () => import('@/tenant/music/album/index'),
+        meta: {
+          title: '专辑'
+        }
+      },
+      {
+        path: '/music-album-detail/:id',
+        name: 'music-album-detail',
+        component: () => import('@/tenant/music/album-detail'),
+        meta: {
+          title: '专辑详情'
+        }
+      },
+      {
+        path: '/music-list',
+        component: () => import('@/tenant/music/list'),
+        meta: {
+          title: '曲谱列表'
+        }
+      },
+      {
+        path: '/train-list',
+        component: () => import('@/tenant/music/train-list'),
+        meta: {
+          title: '声部训练'
+        }
+      },
+      {
+        path: '/music-detail',
+        component: () => import('@/tenant/music/music-detail/new-index'),
+        meta: {
+          title: '曲谱详情'
+        }
+      },
+      {
+        path: '/memberCenter',
+        name: 'memberCenter',
+        component: () => import('@/tenant/member-center/index'),
+        meta: {
+          title: '会员中心'
+        }
+      },
+      {
+        path: '/orderDetail',
+        name: 'orderDetail',
+        component: () => import('@/views/order-detail/index'),
+        meta: {
+          title: '订单详情'
+        }
+      },
+      {
+        path: '/music-personal',
+        component: () => import('@/tenant/music/personal'),
+        meta: {
+          title: '我的曲库'
+        }
+      },
+      {
+        path: '/train-tool',
+        component: () => import('@/tenant/music/train-tool'),
+        meta: {
+          title: '训练工具'
+        }
+      },
+      {
+        path: '/look-album-list',
+        component: () => import('@/tenant/music/look-album-list'),
+        meta: {
+          title: '查看专辑'
+        }
+      },
+      {
+        path: '/exercise-record',
+        name: 'exercise-record',
+        component: () => import('@/tenant/exercise-record/exercis-detail'),
+        meta: {
+          title: '练习统计'
+        }
+      },
+      {
+        path: '/activation-code',
+        name: 'activation-code',
+        component: () => import('@/tenant/activation-code'),
+        meta: {
+          title: '激活码'
+        }
+      },
+      {
+        path: '/ranking-list',
+        name: 'ranking-list',
+        component: () => import('@/tenant/ranking-list'),
+        meta: {
+          title: '排行榜'
+        }
+      },
+      {
+        path: '/goodsOrder',
+        name: 'goodsOrder',
+        component: () => import('@/tenant/trade/index'),
+        meta: {
+          title: '交易记录'
+        }
+      },
+      {
+        path: '/music-songbook',
+        component: () => import('@/tenant/music/search/header'),
+        meta: {
+          title: '搜索顶部'
+        },
+        children: [
+          {
+            path: '/music-songbook/search',
+            name: 'musicSearch',
+            component: () => import('@/tenant/music/search'),
+            meta: {
+              title: '搜索结果'
+            }
+          },
+          {
+            path: '',
+            name: 'musicSongbook',
+            component: () => import('@/tenant/music/songbook'),
+            meta: {
+              title: '乐谱库'
+            }
+          }
+        ]
+      },
+      // {
+      //   path: '/practiceClass',
+      //   name: 'practiceClass',
+      //   component: () => import('@/student/practice-class/index'),
+      //   meta: {
+      //     title: '陪练课'
+      //   }
+      // },
+      // {
+      //   path: '/videoDetail',
+      //   name: 'videoDetail',
+      //   component: () => import('@/student/video-class/video-detail'),
+      //   meta: {
+      //     title: '视频课'
+      //   }
+      // },
+      // {
+      //   path: '/videoClassDetail',
+      //   name: 'videoClassDetail',
+      //   component: () => import('@/student/video-class/video-class-detail'),
+      //   meta: {
+      //     title: '视频课详情'
+      //   }
+      // },
+      // {
+      //   path: '/liveDetail',
+      //   name: 'liveDetail',
+      //   component: () => import('@/student/live-class/live-detail'),
+      //   meta: {
+      //     title: '直播课详情'
+      //   }
+      // },
+      // {
+      //   path: '/memberActive',
+      //   name: 'memberActive',
+      //   component: () => import('@/student/member-center/member-active'),
+      //   meta: {
+      //     title: '小酷Ai会员大放价'
+      //   }
+      // },
+      {
+        path: '/memberRecord',
+        name: 'memberRecord',
+        component: () => import('@/tenant/exercise-record/exercis-detail'),
+        meta: {
+          title: '训练统计'
+        }
+      }
+      // {
+      //   path: '/tradeRecord',
+      //   name: 'tradeRecord',
+      //   component: () => import('@/student/trade/index'),
+      //   meta: {
+      //     title: '交易记录'
+      //   }
+      // },
+      // {
+      //   path: '/teacherHome',
+      //   name: 'teacherHome',
+      //   component: () => import('@/student/teacher-dependent/teacher-home'),
+      //   meta: {
+      //     title: '老师主页'
+      //   }
+      // },
+      // {
+      //   path: '/teacherElegant',
+      //   name: 'teacherElegant',
+      //   component: () => import('@/student/teacher-dependent/teacher-elegant'),
+      //   meta: {
+      //     title: '老师风采'
+      //   }
+      // },
+      // {
+      //   path: '/music-upload',
+      //   component: () => import('@/teacher/music/upload'),
+      //   meta: {
+      //     title: '上传曲谱'
+      //   }
+      // },
+      // {
+      //   path: '/teacherFollow',
+      //   component: () => import('@/student/teacher-dependent/teacher-follow'),
+      //   meta: {
+      //     title: '我的关注'
+      //   }
+      // },
+      // {
+      //   path: '/track-review-activity',
+      //   component: () =>
+      //     import('@/student/share-active/track-review-activity/index'),
+      //   meta: {
+      //     title: '曲目评测活动',
+      //     isExternal: true // 是否外部浏览器可以打开
+      //   }
+      // },
+
+      // {
+      //   path: '/track-song',
+      //   component: () =>
+      //     import('@/student/share-active/track-review-activity/track-song'),
+      //   meta: {
+      //     title: '评测曲目'
+      //   }
+      // }
+    ]
+  },
+  ...noLoginRouter,
+  // ...rootRouter,
+  {
+    path: '/:pathMatch(.*)*',
+    component: () => import('@/views/404'),
+    meta: {
+      title: '404 Not Fund',
+      platform: 'STUDENT'
+    }
+  }
+]

+ 70 - 2
src/state.ts

@@ -10,12 +10,15 @@ export const state = reactive({
     data: {} as any
   },
   orchestraInfo: {
-    token: '' as any, phone: '' as any,
+    token: '' as any,
+    phone: '' as any,
     installStatus: 0 as any,
     nickname: '',
     avatar: '',
     unionId: 0 // 是否已关联账号
   } as any, // 管乐团信息
+  projectType: 'default' as 'default' | 'tenant', // 机构端,还是默认
+  payBackPath: '/tenant/',
   platformType: '' as 'STUDENT' | 'TEACHER',
   platformApi: '/api-student' as '/api-student' | '/api-teacher',
   version: '', // 版本号 例如: 1.0.0
@@ -64,4 +67,69 @@ export const openDefaultWebView = (url?: string, callBack?: any) => {
   } else {
     callBack && callBack()
   }
-}
+}
+
+/**
+ * @description 微信授权-会根据环境去判断
+ * @param wxAppId
+ * @param urlString 回调链接【默认当前页面地址】
+ * @returns void
+ */
+export const goWechatAuth = (wxAppId: string, urlString?: string) => {
+  // 开发环境
+  if (import.meta.env.DEV) {
+    const replaceUrl =
+      `https://kt.colexiu.com/getWxCode?appid=${
+        wxAppId || 'wx8654c671631cfade'
+      }&state=STATE&redirect_uri=` +
+      encodeURIComponent(urlString || window.location.href)
+    window.location.replace(replaceUrl)
+  }
+
+  // 生产环境
+  if (import.meta.env.PROD) {
+    goAuth(wxAppId, urlString)
+  }
+}
+
+const goAuth = (wxAppId: string, urlString?: string) => {
+  // 用户授权
+  const urlNow = encodeURIComponent(urlString || window.location.href)
+  // console.log(urlNow, 'urlNow');
+  const scope = 'snsapi_base' //snsapi_userinfo   //静默授权 用户无感知
+  const appid = wxAppId || 'wx8654c671631cfade'
+  const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${urlNow}&response_type=code&scope=${scope}&state=STATE&connect_redirect=1#wechat_redirect`
+  window.location.replace(url)
+}
+
+/**
+ * @description 支付宝授权-会根据环境去判断
+ * @param wxAppId
+ * @param urlString 回调链接【默认当前页面地址】
+ * @returns void
+ */
+export const goAliAuth = (alipayAppId: string, urlString?: string) => {
+  // 支付宝授权
+  const urlNow = encodeURIComponent(urlString || window.location.href)
+  const appid = alipayAppId || '2021004100630808'
+  // 开发环境
+  if (import.meta.env.DEV) {
+    const url = `https://kt.colexiu.com/getAliCode?app_id=${appid}&state=STATE&redirect_uri=${urlNow}`
+    window.location.replace(url)
+  }
+
+  // 生产环境
+  if (import.meta.env.PROD) {
+    alipayAuth(alipayAppId, urlString)
+  }
+}
+
+const alipayAuth = (alipayAppId: string, urlString?: string) => {
+  // 用户授权
+  const urlNow = encodeURIComponent(urlString || window.location.href)
+  const scope = 'auth_base' //snsapi_userinfo   //静默授权 用户无感知
+  const appid = alipayAppId || '2021004100630808'
+  // 判断是否是线上
+  const url = `https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${appid}&redirect_uri=${urlNow}&response_type=auth_code&scope=${scope}&state=STATE`
+  window.location.replace(url)
+}

+ 7 - 1
src/styles/index.less

@@ -122,16 +122,20 @@ body {
   padding: 0 28px;
   padding-bottom: 15px;
 }
+
 .btnMore {
   display: flex !important;
   justify-content: center !important;
+
   // :global {
   .van-button {
     width: 48% !important;
   }
-  .van-button + .van-button {
+
+  .van-button+.van-button {
     margin-left: 6px;
   }
+
   // }
 }
 
@@ -148,12 +152,14 @@ body {
 
 .sticky {
   position: relative;
+
   .van-sticky {
     height: inherit !important;
     top: var(--van-sticky-z-index) !important;
     position: fixed;
     width: 100%;
   }
+
   :global(.van-sticky--fixed) {
     box-shadow: 10px 10px 10px var(--box-shadow-color);
   }

+ 17 - 0
src/styles/tenant.less

@@ -0,0 +1,17 @@
+:root:root {
+  --van-primary: #FE2451 !important;
+  --van-picker-confirm-action-color: #FE2451 !important;
+  --van-primary-color: var(--van-primary) !important;
+  --tag-border-color: #FE2451;
+  --tag-color: #FE2451;
+}
+
+body {
+  background-color: #fafafa;
+  user-select: none;
+  margin-top: 0 !important;
+}
+
+.btnMore {
+  justify-content: space-between !important;
+}

+ 11 - 0
src/tenant/App.vue

@@ -0,0 +1,11 @@
+<template>
+  <router-view></router-view>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+
+export default defineComponent({
+  name: 'App'
+});
+</script>

BIN
src/tenant/activation-code/icon-1.png


+ 139 - 0
src/tenant/activation-code/index.module.less

@@ -0,0 +1,139 @@
+.bgImg {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 214px;
+  // object-fit: cover;
+  z-index: -1;
+}
+
+.sticky {
+  :global {
+    .van-sticky {
+      background: url('../images/bg-image.png') no-repeat top center;
+      background-size: 100% 214px;
+    }
+  }
+}
+
+.codeContainer {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+  padding: 20px 40px 20px;
+
+  .codeInput {
+    background: #FFFFFF;
+    border-radius: 10px;
+    border: 2px solid rgba(255, 60, 129, 1);
+    // border-image: linear-gradient(270deg, rgba(255, 60, 129, 1), rgba(255, 118, 166, 1)) 2 2;
+    height: 48px;
+    width: 100%;
+    text-align: center;
+    font-size: 16px;
+    font-weight: 400;
+    color: #333;
+
+    &::placeholder {
+      color: #AAAAAA
+    }
+  }
+
+  .codeBtn {
+    margin-top: 25px;
+    background: linear-gradient(270deg, #FF7B57 0%, #FF3460 100%);
+    border-radius: 22px;
+    border: none;
+    height: 44px;
+    font-size: 16px;
+    font-weight: 500;
+    color: #FFFFFF;
+  }
+}
+
+.colGroup {
+  margin: 20px 13px;
+  background: #FFFFFF;
+  border-radius: 10px;
+  padding: 0 12px;
+
+  .title {
+    display: flex;
+    align-items: center;
+    padding: 16px 0;
+    font-size: 16px;
+    font-weight: 600;
+    color: #131415;
+    line-height: 1;
+
+    img {
+      margin-top: -1px;
+      width: 18px;
+      height: 18px;
+      margin-right: 4px;
+    }
+  }
+
+
+  .colRow {
+    :global {
+      .van-col {
+        font-size: 14px;
+        font-weight: 500;
+        color: #333333;
+      }
+
+      .van-col--9 {
+        text-align: center;
+      }
+    }
+  }
+
+  .codeList {
+    min-height: 40vh;
+
+    :global {
+      .van-row {
+        padding: 16px 0;
+        font-size: 12px;
+        font-weight: 400;
+        color: #444444;
+        border-bottom: 1px solid #F2F2F2;
+
+        &:last-child {
+          border: none;
+        }
+      }
+
+      .van-col {
+        display: flex;
+        align-items: center;
+      }
+
+      .van-col--9 {
+        text-align: center;
+        justify-content: center;
+      }
+    }
+
+    .c1 {
+      color: #248FFE;
+    }
+
+    .c2 {
+      color: #FE2451;
+    }
+
+    .c3 {
+      color: #AAAAAA;
+    }
+
+    .liveBtn {
+      background: #FE2451;
+      border-radius: 6px;
+      padding: 0 20px;
+      height: 25px;
+    }
+  }
+}

+ 197 - 0
src/tenant/activation-code/index.tsx

@@ -0,0 +1,197 @@
+import TheSticky from '@/components/the-sticky'
+import { defineComponent, onMounted, reactive } from 'vue'
+import styles from './index.module.less'
+import ColHeader from '@/components/col-header'
+import bgImg from '../images/bg-image.png'
+import { Button, List, Row, Col, Toast } from 'vant'
+import icon1 from './icon-1.png'
+import request from '@/helpers/request'
+import ColResult from '@/components/col-result'
+
+export default defineComponent({
+  name: 'activation-code',
+  setup() {
+    // tenantActivationCode/page
+    const state = reactive({
+      refreshing: false,
+      height: 0, // 页面头部高度,为了处理下拉刷新用的
+      list: [],
+      dataShow: true, // 判断是否有数据
+      loading: false,
+      finished: false,
+      params: {
+        page: 1,
+        rows: 10
+      },
+      isClick: false,
+      code: ''
+    })
+    const getList = async (hideLoading = false) => {
+      try {
+        if (state.isClick) return
+        state.isClick = true
+        const res = await request.post(
+          '/api-student/tenantActivationCode/page',
+          {
+            data: {
+              ...state.params
+            },
+            hideLoading: hideLoading
+          }
+        )
+        state.isClick = false
+        state.loading = false
+        state.refreshing = false
+        const result = res.data || {}
+        // 处理重复请求数据
+        if (state.list.length > 0 && result.current === 1) {
+          return
+        }
+        state.list = state.list.concat(result.rows || [])
+        state.finished = result.current >= result.pages
+        state.params.page = result.current + 1
+        state.dataShow = state.list.length > 0
+      } catch {
+        state.isClick = false
+        state.dataShow = false
+        state.refreshing = false
+        state.finished = true
+      }
+    }
+
+    const onSubmit = async () => {
+      try {
+        if (!state.code) {
+          Toast('请输入激活码')
+          return
+        }
+
+        await request.post(
+          '/api-student/tenantActivationCode/active?activationCode=' +
+            state.code
+        )
+        Toast.success('激活成功')
+        state.params.page = 1
+        state.list = []
+        getList(true)
+      } catch {
+        //
+      }
+    }
+
+    //
+    const onActiveation = async (item: any) => {
+      try {
+        await request.post(
+          '/api-student/tenantActivationCode/activeById?id=' + item.id
+        )
+        Toast.success('激活成功')
+        state.params.page = 1
+        state.list = []
+        getList(true)
+      } catch {
+        //
+      }
+    }
+
+    onMounted(() => {
+      getList()
+    })
+    return () => (
+      <div class={styles.activationCode}>
+        <div class={styles.sticky}>
+          <TheSticky position="top">
+            <ColHeader
+              background="transparent"
+              isFixed={false}
+              border={false}
+              color="#131415"
+            />
+            <div class={styles.codeContainer}>
+              <input
+                v-model={state.code}
+                placeholder="请输入激活码"
+                class={styles.codeInput}
+                maxlength={7}
+              />
+
+              <Button
+                type="primary"
+                round
+                class={styles.codeBtn}
+                block
+                onClick={onSubmit}
+              >
+                立即兑换
+              </Button>
+            </div>
+          </TheSticky>
+          <img class={styles.bgImg} src={bgImg} />
+
+          <List
+            loading-text=" "
+            finished={state.finished}
+            finished-text=" "
+            onLoad={getList}
+            style={{ overflow: 'hidden' }}
+          >
+            <div class={styles.colGroup}>
+              <div class={styles.title}>
+                <img src={icon1} />
+                激活记录
+              </div>
+              <Row class={styles.colRow}>
+                <Col span={5}>激活码</Col>
+                <Col span={4}>周期</Col>
+                <Col span={6}>激活状态</Col>
+                <Col span={9}>激活时间</Col>
+              </Row>
+
+              <div class={styles.codeList}>
+                {state.list.map((item: any) => (
+                  <Row>
+                    <Col span={5}>{item.activationCode}</Col>
+                    <Col span={4}>6个月</Col>
+                    <Col
+                      span={6}
+                      class={item.activationStatus ? styles.c1 : styles.c3}
+                    >
+                      {item.activationStatus ? '已激活' : '待激活'}
+                    </Col>
+                    <Col span={9}>
+                      {item.activationStatus ? (
+                        item.activationTime
+                      ) : (
+                        <Button
+                          class={styles.liveBtn}
+                          color="#FE2451"
+                          onClick={() => onActiveation(item)}
+                        >
+                          激活
+                        </Button>
+                      )}
+
+                      {/* 2023-07-22 12:00:02 */}
+                    </Col>
+                  </Row>
+                ))}
+                {!state.dataShow && (
+                  <div class={styles.emptyContainer}>
+                    <ColResult tips="暂无激活码" btnStatus={false} />
+                  </div>
+                )}
+              </div>
+            </div>
+          </List>
+          {/* ) : (
+            <div
+              class={styles.emptyContainer}
+            >
+              <ColResult tips="暂无学练统计" btnStatus={false} />
+            </div>
+          )} */}
+        </div>
+      </div>
+    )
+  }
+})

+ 558 - 0
src/tenant/exercise-record/echats.ts

@@ -0,0 +1,558 @@
+export const lineChartOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      lineStyle: {
+        width: 2,
+        color: '#FFA3C2'
+      }
+    }
+  },
+  legend: {
+    show: false,
+    selected: {
+      //在这里设置默认展示就ok了
+      训练时长: true,
+      使用次数: true
+    }
+  },
+  xAxis: {
+    type: 'category',
+    boundaryGap: true,
+    axisLabel: {
+      show: true,
+      interval: 0
+    },
+    data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+    // splitLine: {
+    //   show: true,
+    //   lineStyle: {
+    //     width: 2,
+    //     type: 'solid',
+    //     color: 'rgba(226,226,226,0.5)'
+    //   }
+    // }
+    // axisTick: {
+    //   show: false
+    // }
+  },
+  yAxis: [
+    {
+      type: 'value',
+      axisLabel: {
+        formatter: '{value}'
+      },
+      axisTick: {
+        show: false
+      },
+      splitArea: {
+        show: false,
+        areaStyle: {
+          color: ['rgba(255,255,255,0.2)']
+        }
+      },
+      minInterval: 1,
+      splitNumber: 5
+    }
+  ],
+  grid: {
+    left: '1%',
+    right: '1%',
+    top: '2  %',
+    bottom: 0,
+    containLabel: true
+  },
+  series: [
+    {
+      // smooth: true,
+      data: ['0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'],
+      symbolSize: 10,
+      type: 'line',
+      name: '训练时长',
+      symbol: 'circle',
+      smooth: true,
+      itemStyle: {
+        color: '#FF7AA7',
+        borderColor: '#fff',
+        borderWidth: 3
+      },
+      lineStyle: {
+        width: 3 //设置线条粗细
+      },
+      areaStyle: {
+        color: {
+          type: 'linear',
+          x: 0,
+          y: 0,
+          x2: 0,
+          y2: 1,
+          colorStops: [
+            {
+              offset: 0,
+              color: 'rgba(255, 243, 246, 1)'
+              // 0% 处的颜色
+            },
+            {
+              offset: 1,
+              // 100% 处的颜色
+              color: 'rgba(255, 246, 248, 0)'
+            }
+          ]
+        }
+      },
+      emphasis: {
+        disabled: true
+      }
+    },
+    {
+      data: ['0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'],
+      type: 'line',
+      name: '使用次数',
+      symbolSize: 10,
+      symbol: 'circle',
+      smooth: true,
+      itemStyle: {
+        color: '#3583FA',
+        borderColor: '#fff',
+        borderWidth: 3
+      },
+      lineStyle: {
+        width: 2 //设置线条粗细
+      },
+      areaStyle: {
+        color: {
+          type: 'linear',
+          x: 0,
+          y: 0,
+          x2: 0,
+          y2: 1,
+          colorStops: [
+            {
+              offset: 0,
+              color: 'rgba(212, 231, 255, 1)'
+              // 0% 处的颜色
+            },
+            {
+              offset: 1,
+              color: 'rgba(221, 235, 254, 0)' // 100% 处的颜色
+            }
+          ]
+        }
+      },
+      emphasis: {
+        disabled: true
+      }
+    }
+  ],
+  formatter: (item: any) => {
+    if (Array.isArray(item)) {
+      return [
+        item[0].axisValueLabel,
+        ...item.map(
+          (d: any, index: number) =>
+            `<br/>${
+              d.marker
+            }<span style="margin-top:10px;margin-left:5px;font-size: 13px;font-weight: 500;
+                  color: #333333;
+                  line-height: 18px;">${d.seriesName}: ${d.value}${
+              index === 0 ? '分钟' : '次'
+            } </span>`
+        )
+      ].join('')
+    } else {
+      return item
+    }
+  }
+  // dataZoom: [
+  //   {
+  //     type: 'slider',
+  //     start: 5,
+  //     end: 100,
+  //     filterMode: 'empty'
+  //   }
+  // ]
+}
+
+// export const lineChartOption = {
+//   legend: { show: false },
+//   emphasis: { lineStyle: { width: 2 } },
+//   xAxis: {
+//     boundaryGap: false,
+//     data: [
+//       '01月',
+//       '02月',
+//       '03月',
+//       '04月',
+//       '05月',
+//       '06月',
+//       '07月',
+//       '08月',
+//       '09月',
+//       '10月',
+//       '11月',
+//       '12月'
+//     ],
+//     type: 'category',
+//     axisLine: { lineStyle: { color: '#8C8C8C' } }
+//   },
+//   color: [
+//     '#5B8FF9',
+//     '#2DC7AA',
+//     '#91DD1C',
+//     '#FFA92C',
+//     '#BE7E2E',
+//     '#1C96DD',
+//     '#D22CFF',
+//     '#FF3C3C',
+//     '#1AEE3E',
+//     '#00c9ff',
+//     '#7c47ff'
+//   ],
+//   series: [
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '陪练课',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '直播课',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '视频课',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '乐谱',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '小酷Ai推广',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '直播课推荐',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '视频课推荐',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '商品推荐',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '乐谱推荐',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '专辑推荐',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     },
+//     {
+//       lineStyle: { width: 1 },
+//       data: [
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00',
+//         '0.00'
+//       ],
+//       symbol: 'circle',
+//       name: '活动报名',
+//       type: 'line',
+//       emphasis: { lineStyle: { width: 1 } }
+//     }
+//   ],
+//   title: { show: false },
+//   grid: {
+//     bottom: '3%',
+//     containLabel: true,
+//     left: '3%',
+//     right: '5%',
+//     top: '7%'
+//   },
+//   tooltip: {
+//     trigger: 'axis',
+//     confine: true
+//     // position: function (point, params, dom, rect, size) {
+//     //   // 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下
+//     //   // 提示框位置
+//     //   var x = 0 // x坐标位置
+//     //   var y = 0 // y坐标位置
+
+//     //   // 当前鼠标位置
+//     //   var pointX = point[0]
+//     //   var pointY = point[1]
+
+//     //   // 外层div大小
+//     //   // var viewWidth = size.viewSize[0];
+//     //   // var viewHeight = size.viewSize[1];
+
+//     //   // 提示框大小
+//     //   var boxWidth = size.contentSize[0]
+//     //   var boxHeight = size.contentSize[1]
+
+//     //   // boxWidth > pointX 说明鼠标左边放不下提示框 --- 情况
+//     //   if (boxWidth > pointX) {
+//     //     x = 5 // 自己定个x坐标值,以防出屏
+//     //     y -= 15 // 防止点被覆盖住,可根据情况自行调节
+//     //   } else {
+//     //     // 左边放的下
+//     //     x = pointX - boxWidth - 15
+//     //   }
+
+//     //   // boxHeight > pointY 说明鼠标上边放不下提示框 --- 情况
+//     //   if (boxHeight + 20 > pointY) {
+//     //     y = pointY + 15
+//     //   } else if (boxHeight > pointY) {
+//     //     y = 5
+//     //   } else {
+//     //     // 上边放得下
+//     //     y += pointY - boxHeight
+//     //   }
+//     //   //return [x, y]
+//     //   return [x, '20%'] //这里采用固定y轴 x轴随鼠标位置变化
+//     //   // return [point[0], '10%']
+//     // }
+//   },
+//   yAxis: {
+//     type: 'value',
+//     splitLine: {
+//       axisLine: { lineStyle: { color: '#8C8C8C' } },
+//       lineStyle: { color: ['#E2E2E2'] }
+//     }
+//   },
+//   dataZoom: [{ type: 'inside', throttle: 100 }],
+//   toolbox: { feature: { saveAsImage: { show: false } } }
+// }
+
+export const pieChartOption = {
+  tooltip: {
+    position: ['30%', '30%'],
+    trigger: 'item',
+    padding: 3,
+    textStyle: { fontSize: 12 },
+    borderWidth: 0,
+    formatter: '{b} : {c} ({d}%)'
+  },
+  series: [
+    {
+      avoidLabelOverlap: false,
+      label: { show: false },
+      data: [
+        { name: '陪练课', value: '0.00' },
+        { name: '直播课', value: '0.00' },
+        { name: '视频课', value: '0.00' },
+        { name: '乐谱', value: '0.00' },
+        { name: '小酷Ai推广', value: '0.00' },
+        { name: '直播课推荐', value: '0.00' },
+        { name: '视频课推荐', value: '0.00' },
+        { name: '商品推荐', value: '0.00' },
+        { name: '乐谱推荐', value: '0.00' },
+        { name: '专辑推荐', value: '0.00' },
+        { name: '活动报名', value: '0.00' }
+      ],
+      type: 'pie',
+      radius: ['50%', '80%']
+    }
+  ],
+  grid: {
+    bottom: '0%',
+    containLabel: true,
+    left: '0%',
+    right: '0%',
+    top: '0%'
+  },
+  toolbox: { feature: { saveAsImage: { show: false } } },
+  color: [
+    '#5B8FF9',
+    '#2DC7AA',
+    '#91DD1C',
+    '#FFA92C',
+    '#BE7E2E',
+    '#1C96DD',
+    '#D22CFF',
+    '#FF3C3C',
+    '#1AEE3E',
+    '#00c9ff',
+    '#7c47ff'
+  ]
+}

+ 313 - 0
src/tenant/exercise-record/exercis-detail.module.less

@@ -0,0 +1,313 @@
+.exercisContainer {
+  :global {
+
+    .van-calendar__day--end,
+    .van-calendar__day--start,
+    .van-calendar__day--start-end,
+    .van-calendar__day--multiple-middle,
+    .van-calendar__day--multiple-selected {
+      background: #FF5074;
+    }
+  }
+
+  .bgImg {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 214px;
+    z-index: -1;
+  }
+}
+
+.userMember {
+  background-color: transparent !important;
+  width: auto;
+  padding: 0;
+  // border-radius: 10px;
+  padding: 18px;
+
+
+  .level {
+    width: 44px;
+    height: 17px;
+  }
+
+  .userImgSection {
+    position: relative;
+    padding: 3px;
+    background: #fff;
+    margin-right: 12px;
+    border-radius: 50%;
+
+    &::before {
+      content: ' ';
+      position: absolute;
+      left: 1px;
+      top: 1px;
+      bottom: 1px;
+      right: 1px;
+      background-color: #fff;
+      border-radius: 50%;
+    }
+  }
+
+  .userImg {
+    width: 46px;
+    height: 46px;
+    border-radius: 50%;
+    vertical-align: middle;
+    overflow: hidden;
+  }
+
+  .userInfo {
+    display: flex;
+    align-items: center;
+    color: #fff;
+    padding-bottom: 5px;
+
+    .name {
+      padding-right: 5px;
+      max-width: 100px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      font-size: 18px;
+      font-weight: 600;
+      color: #742626;
+    }
+  }
+
+  .timeRemaining {
+    margin-top: 0;
+    font-size: 14px;
+    color: #c0c0c0;
+  }
+
+  .subjectTag {
+    font-size: 12px;
+    font-weight: 500;
+    color: #FE2451;
+    padding: 1px 7px;
+    background: rgba(255, 255, 255, 0.3);
+    border-radius: 20px;
+    border: 1px solid #FFFFFF;
+    display: inline-flex;
+    align-items: center;
+    line-height: 1;
+
+    .iconSubject {
+      width: 13px;
+      height: 13px;
+      margin-right: 4px;
+    }
+  }
+}
+
+.itemBottom {
+  margin: 0 13px 15px;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-around;
+  text-align: center;
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 20px 0;
+
+  .itemBottomDot {
+    width: 25%;
+
+    .dotMain {
+      font-size: 24px;
+      color: #333333;
+      line-height: 30px;
+      margin-bottom: 4px;
+      font-family: DINAlternate-Bold, DINAlternate;
+      font-weight: bold;
+
+      span {
+        margin-left: 1px;
+        font-size: 12px;
+        font-weight: 400;
+        color: #333333;
+        line-height: 17px;
+      }
+    }
+
+    .dotSub {
+      font-size: 12px;
+      font-weight: 400;
+      color: #777777;
+      line-height: 17px;
+    }
+  }
+}
+
+.topWrap {
+  :global {
+    .van-sticky {
+      background: url('../images/bg-image.png') no-repeat top center;
+      background-size: 100% 214px;
+    }
+  }
+
+  .topInfoRight {
+    // width: 50%;
+    margin-bottom: 18px;
+    padding: 0 10%;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: center;
+
+    .infoDay,
+    .infoTime {
+      width: 50%;
+    }
+
+    .infoDay {
+      position: relative;
+      margin-right: 20px;
+
+      &::after {
+        position: absolute;
+        content: ' ';
+        right: -12px;
+        top: 12px;
+        width: 1px;
+        height: 35px;
+        background-color: #E0E5E8;
+      }
+    }
+
+    .infoDayMain {
+      font-size: 24px;
+      color: #333333;
+      line-height: 28px;
+      margin-bottom: 7px;
+      font-family: DINAlternate-Bold, DINAlternate;
+      font-weight: 600;
+      text-align: center;
+
+      span {
+        margin-left: 2px;
+        font-size: 12px;
+        font-weight: 400;
+        color: #333333;
+        line-height: 17px;
+      }
+    }
+
+    .infoDaysub {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-size: 12px;
+      font-weight: 400;
+      color: #333333;
+      line-height: 17px;
+      text-align: center;
+
+      img {
+        width: 14px;
+        height: 14px;
+        margin-right: 3px;
+      }
+    }
+  }
+
+}
+
+.trainWeek {
+  margin: 15px 13px 12px;
+  min-height: 267px;
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 20px 15px;
+
+  .exerciseWeek {
+    height: 200px;
+  }
+
+  .TrainDataTopRight {
+    display: flex;
+    align-items: center;
+    margin-bottom: 18px;
+  }
+
+  .DataTopRightItem {
+    display: flex;
+    align-items: center;
+    font-size: 13px;
+    color: #777777;
+    line-height: 1;
+
+    &:first-child {
+      margin-right: 20px;
+
+      .DataTopRightDot {
+        background-color: #FF7AA7;
+      }
+    }
+
+    &:last-child {
+      .DataTopRightDot {
+        background-color: #3583FA;
+      }
+    }
+
+    &.DataTopRightItemDis {
+      .DataTopRightDot {
+        background-color: #e8e8e8 !important
+      }
+    }
+
+    .DataTopRightDot {
+      width: 12px;
+      height: 12px;
+      border-radius: 2px;
+      background-color: #ccc;
+      margin-right: 4px;
+    }
+  }
+
+  .trainTitle {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding-bottom: 16px;
+
+    img {
+      width: 64px;
+      height: 15px;
+    }
+
+    .timeRange {
+      display: flex;
+      align-items: center;
+      font-size: 14px;
+      color: #131415;
+
+
+      .iconArrow {
+        display: inline-block;
+        width: 9px;
+        height: 5px;
+        margin-left: 3px;
+        background: url('./images/icon-arrow.png') no-repeat center;
+        background-size: contain;
+      }
+    }
+  }
+}
+
+.fullRefresh {
+  min-height: calc(100vh - var(--header-height) - 275px)
+}
+
+.emptyContainer {
+  height: calc(100vh - var(--header-height) - 275px);
+  display: flex;
+  align-items: center;
+}

+ 432 - 0
src/tenant/exercise-record/exercis-detail.tsx

@@ -0,0 +1,432 @@
+import dayjs from 'dayjs'
+import isBetween from 'dayjs/plugin/isBetween'
+dayjs.extend(isBetween)
+import { List, Image, Calendar, Cell } from 'vant'
+import OFullRefresh from '@/components/the-full-refresh'
+import DetailItem from './modals/detail-item'
+import {
+  defineComponent,
+  onMounted,
+  reactive,
+  ref,
+  computed,
+  markRaw,
+  nextTick
+} from 'vue'
+import { useRoute } from 'vue-router'
+import styles from './exercis-detail.module.less'
+import request from '@/helpers/request'
+import { state as baseState } from '@/state'
+import TheSticky from '@/components/the-sticky'
+import ColHeader from '@/components/col-header'
+import ColResult from '@/components/col-result'
+import bgImg from '../images/bg-image.png'
+import iconStudent from '@common/images/icon_student.png'
+import iconLogo from '../member-center/images/icon-logo-default.png'
+import iconLogoActive from '../member-center/images/icon-logo.png'
+import iconSubject from './images/icon-subject.png'
+import iconTrainTitle from './images/train-title.png'
+
+import * as echarts from 'echarts/core'
+import {
+  BarChart,
+  // 系列类型的定义后缀都为 SeriesOption
+  BarSeriesOption,
+  LineChart,
+  LineSeriesOption
+} from 'echarts/charts'
+import { PieChart } from 'echarts/charts'
+import {
+  TitleComponent,
+  // 组件类型的定义后缀都为 ComponentOption
+  TitleComponentOption,
+  TooltipComponent,
+  TooltipComponentOption,
+  GridComponent,
+  GridComponentOption,
+  // 数据集组件
+  DatasetComponent,
+  DatasetComponentOption,
+  // 内置数据转换器组件 (filter, sort)
+  TransformComponent,
+  LegendComponent,
+  ToolboxComponent,
+  DataZoomComponent
+} from 'echarts/components'
+import { LabelLayout, UniversalTransition } from 'echarts/features'
+import { CanvasRenderer } from 'echarts/renderers'
+import { lineChartOption } from './echats'
+
+// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
+type ECOption = echarts.ComposeOption<
+  | BarSeriesOption
+  | LineSeriesOption
+  | TitleComponentOption
+  | TooltipComponentOption
+  | GridComponentOption
+  | DatasetComponentOption
+>
+
+// 注册必须的组件
+echarts.use([
+  TitleComponent,
+  TooltipComponent,
+  GridComponent,
+  DatasetComponent,
+  TransformComponent,
+  BarChart,
+  LabelLayout,
+  UniversalTransition,
+  CanvasRenderer,
+  PieChart,
+  ToolboxComponent,
+  LegendComponent,
+  DataZoomComponent,
+  LineChart
+])
+
+export default defineComponent({
+  name: 'exercis-detail',
+  setup() {
+    const route = useRoute()
+    const state = reactive({
+      showPopoverTime: false,
+      currentDate: [dayjs().format('YYYY'), dayjs().format('MM')],
+      isClick: false,
+      practiceMonthName: route.query.practiceMonthName
+        ? route.query.practiceMonthName
+        : dayjs().format('YYYY') + '年' + dayjs().format('MM') + '月',
+      userTrainOverView: {
+        trainDays: 0,
+        trainNum: 0,
+        trainTime: 0,
+        avgTrainTime: 0
+      },
+      userTrainChartData: [] as any,
+      myChart: null as any
+    })
+    const qualifiedFlag = ref(true)
+    const unqualifiedFlag = ref(true)
+
+    // const chartRef = ref<HTMLDivElement | null>(null)
+    // const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>)
+
+    const userInfo = computed(() => {
+      const users = baseState.user.data
+      return {
+        username: users?.username,
+        phone: users?.phone,
+        avatar: users?.heardUrl,
+        id: users?.userId,
+        memberRankSettingId: users?.memberRankSettingId,
+        isVip: users?.isVip,
+        membershipDays: users?.membershipDays,
+        membershipEndTime: users?.membershipEndTime
+      }
+    })
+    const forms = reactive({
+      startTime: dayjs().day(1).format('YYYY-MM-DD'),
+      endTime: dayjs().day(7).format('YYYY-MM-DD'),
+      page: 1,
+      rows: 20
+    })
+    const refreshing = ref(false)
+    const loading = ref(false)
+    const finished = ref(false)
+    const showContact = ref(false)
+    const list = ref([])
+    const getList = async () => {
+      if (state.isClick) {
+        return
+      }
+      state.isClick = true
+      if (refreshing.value) {
+        list.value = []
+        forms.page = 1
+        refreshing.value = false
+      }
+      try {
+        const { data } = await request.get(
+          `/api-student/sysMusicRecord/studentTrainDataByWeek`,
+          {
+            params: { ...forms }
+          }
+        )
+
+        // 在第一页的时候才处理数据显示
+        if (data.detail.pageNo === 1) {
+          state.userTrainOverView = data.userTrainOverView
+        }
+        if (list.value.length > 0 && data.detail.pageNo === 1) {
+          return
+        }
+        state.userTrainChartData = data.userTrainChartData || []
+        list.value = list.value.concat(data.detail.rows || [])
+        forms.page = data.detail.pageNo + 1
+        showContact.value = list.value.length > 0
+        loading.value = false
+        finished.value = data.detail.pageNo >= data.detail.totalPage
+      } catch {
+        showContact.value = false
+        finished.value = true
+      }
+      state.isClick = false
+
+      // if (showContact.value) {
+      nextTick(() => {
+        if (document.getElementById('exerciseWeek')) {
+          state.myChart = markRaw(
+            echarts.init(
+              document.getElementById('exerciseWeek') as HTMLDivElement
+            )
+          )
+
+          const cloudTime: any = []
+          const cloudNum: any = []
+          state.userTrainChartData.forEach((data: any) => {
+            const indexData = data.indexMonthData || []
+            if (data.dataType === 'CLOUD_STUDY_TRAIN_TIME') {
+              indexData.forEach((d: any) => {
+                cloudTime.push(d.totalNum)
+              })
+            } else if (data.dataType === 'CLOUD_STUDY_TRAIN_NUM') {
+              indexData.forEach((d: any) => {
+                cloudNum.push(d.totalNum)
+              })
+            }
+          })
+          lineChartOption.series[0].data = cloudTime
+          lineChartOption.series[1].data = cloudNum
+
+          state.myChart.clear()
+          state.myChart.setOption(lineChartOption)
+        }
+      })
+      // }
+    }
+    const onRefresh = () => {
+      finished.value = false
+      // 重新加载数据
+      // 将 loading 设置为 true,表示处于加载状态
+      loading.value = true
+      getList()
+    }
+
+    onMounted(async () => {
+      await getList()
+    })
+
+    return () => (
+      <div class={[styles.exercisContainer]}>
+        <div class={styles.topWrap}>
+          <TheSticky position="top">
+            <ColHeader
+              border={false}
+              background={'transparent'}
+              color={'#333333'}
+            />
+            <Cell
+              class={styles.userMember}
+              labelClass={styles.timeRemaining}
+              border={false}
+              v-slots={{
+                icon: () => (
+                  <div class={styles.userImgSection}>
+                    <Image
+                      class={styles.userImg}
+                      src={userInfo.value.avatar || iconStudent}
+                      fit="cover"
+                    />
+                  </div>
+                ),
+                title: () => (
+                  <div class={styles.userInfo}>
+                    <span class={styles.name}>{userInfo.value.username}</span>
+                    <Image
+                      class={styles.level}
+                      src={userInfo.value.isVip ? iconLogoActive : iconLogo}
+                    />
+                  </div>
+                ),
+                label: () => (
+                  <div class={styles.subjectName}>
+                    <span class={styles.subjectTag}>
+                      <img src={iconSubject} class={styles.iconSubject} />
+                      口风琴
+                    </span>
+                  </div>
+                )
+              }}
+            ></Cell>
+
+            <div class={styles.itemBottom}>
+              <div class={styles.itemBottomDot}>
+                <p class={styles.dotMain}>
+                  {state.userTrainOverView.trainTime || 0}
+                  <span>分钟</span>{' '}
+                </p>
+                <p class={styles.dotSub}> 累计练习时长</p>
+              </div>
+              <div class={styles.itemBottomDot}>
+                <p class={styles.dotMain}>
+                  {state.userTrainOverView.trainDays || 0}
+                  <span>天</span>{' '}
+                </p>
+                <p class={styles.dotSub}>累计练习天数 </p>
+              </div>
+              <div class={styles.itemBottomDot}>
+                <p class={styles.dotMain}>
+                  {state.userTrainOverView.avgTrainTime || 0}
+                  <span>分钟</span>{' '}
+                </p>
+                <p class={styles.dotSub}>平均训练时长 </p>
+              </div>
+              <div class={styles.itemBottomDot}>
+                <p class={styles.dotMain}>
+                  {state.userTrainOverView.trainNum || 0}
+                  <span>次</span>{' '}
+                </p>
+                <p class={styles.dotSub}>累计训练次数 </p>
+              </div>
+            </div>
+          </TheSticky>
+        </div>
+        <img class={styles.bgImg} src={bgImg} />
+
+        <div class={styles.trainWeek}>
+          <div class={styles.trainTitle}>
+            <img src={iconTrainTitle} />
+
+            <span
+              class={styles.timeRange}
+              onClick={() => (state.showPopoverTime = true)}
+            >
+              {dayjs(forms.startTime).format('YYYY-MM-DD')}至
+              {dayjs(forms.endTime).format('YYYY-MM-DD')}
+              <i class={styles.iconArrow}></i>
+            </span>
+          </div>
+          <div class={styles.TrainDataTopRight}>
+            <div
+              onClick={() => {
+                qualifiedFlag.value = !qualifiedFlag.value
+                lineChartOption.legend.selected['训练时长'] =
+                  qualifiedFlag.value
+                state.myChart.setOption(lineChartOption)
+              }}
+              class={[
+                styles.DataTopRightItem,
+                qualifiedFlag.value ? '' : styles.DataTopRightItemDis
+              ]}
+            >
+              <div class={styles.DataTopRightDot}></div>
+              <p>训练时长</p>
+            </div>
+            <div
+              onClick={() => {
+                unqualifiedFlag.value = !unqualifiedFlag.value
+                lineChartOption.legend.selected['使用次数'] =
+                  unqualifiedFlag.value
+                state.myChart.setOption(lineChartOption)
+              }}
+              class={[
+                styles.DataTopRightItem,
+                unqualifiedFlag.value ? '' : styles.DataTopRightItemDis
+              ]}
+            >
+              <div class={[styles.DataTopRightDot, styles.red]}></div>
+              <p>使用次数</p>
+            </div>
+          </div>
+          <div id="exerciseWeek" class={styles.exerciseWeek}></div>
+        </div>
+        {showContact.value ? (
+          <OFullRefresh
+            v-model:modelValue={refreshing.value}
+            onRefresh={onRefresh}
+            class={styles.fullRefresh}
+          >
+            <List
+              loading-text=" "
+              finished={finished.value}
+              finished-text=" "
+              onLoad={getList}
+              style={{ overflow: 'hidden' }}
+            >
+              {list.value.map((item: any) => (
+                <DetailItem item={item} />
+              ))}
+            </List>
+          </OFullRefresh>
+        ) : (
+          <div
+            // style={{
+            //   height: `calc(100vh - var(--header-height))`,
+            //   display: 'flex',
+            //   alignItems: 'center'
+            // }}
+            class={styles.emptyContainer}
+          >
+            <ColResult
+              tips="暂无学练统计"
+              classImgSize="SMALL"
+              btnStatus={false}
+            />
+          </div>
+        )}
+
+        <Calendar
+          v-model:show={state.showPopoverTime}
+          firstDayOfWeek={1}
+          showConfirm={false}
+          type="range"
+          title="周期选择"
+          maxRange={7}
+          minDate={new Date('2023-02-27')}
+          defaultDate={[
+            dayjs(forms.startTime).toDate(),
+            dayjs(forms.endTime).toDate()
+          ]}
+          style={{
+            height: '70%'
+          }}
+          onSelect={(item: any) => {
+            forms.startTime = ''
+            forms.endTime = ''
+            if (
+              !dayjs(item[0]).isBetween(
+                dayjs(forms.startTime),
+                dayjs(forms.endTime)
+              )
+            ) {
+              const week = dayjs(item[0]).day()
+              if (week === 0) {
+                // 星期天
+                forms.startTime = dayjs(item[0])
+                  .subtract(6, 'day')
+                  .format('YYYY-MM-DD')
+                forms.endTime = dayjs(item[0]).format('YYYY-MM-DD')
+              } else if (week === 1) {
+                // 星期一
+                forms.startTime = dayjs(item[0]).format('YYYY-MM-DD')
+                forms.endTime = dayjs(item[0])
+                  .add(6, 'day')
+                  .format('YYYY-MM-DD')
+              } else {
+                forms.startTime = dayjs(item[0])
+                  .subtract(week - 1, 'day')
+                  .format('YYYY-MM-DD')
+                forms.endTime = dayjs(item[0])
+                  .add(7 - week, 'day')
+                  .format('YYYY-MM-DD')
+              }
+            }
+            state.showPopoverTime = false
+            refreshing.value = true
+            getList()
+          }}
+        />
+      </div>
+    )
+  }
+})

BIN
src/tenant/exercise-record/images/Image1.png


BIN
src/tenant/exercise-record/images/Image2.png


BIN
src/tenant/exercise-record/images/Image3.png


BIN
src/tenant/exercise-record/images/Image4.png


BIN
src/tenant/exercise-record/images/Image5.png


BIN
src/tenant/exercise-record/images/good-icon.png


BIN
src/tenant/exercise-record/images/icon-arrow.png


BIN
src/tenant/exercise-record/images/icon-play.png


BIN
src/tenant/exercise-record/images/icon-subject.png


BIN
src/tenant/exercise-record/images/train-title.png


+ 114 - 0
src/tenant/exercise-record/modals/detail-item.module.less

@@ -0,0 +1,114 @@
+.itemWrap {
+  background: #ffffff;
+  border-radius: 10px;
+  padding: 12px 15px 20px;
+  margin: 0 13px 13px;
+
+  .itemTop {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    border-bottom: 1px solid #f2f2f2;
+    padding-bottom: 12px;
+
+    .itemTopLeft {
+      .itemTopMain {
+        display: flex;
+        align-items: center;
+        margin-bottom: 6px;
+
+        span {
+          display: inline-block;
+          height: 22px;
+          font-size: 16px;
+          font-weight: 500;
+          color: #333333;
+          line-height: 22px;
+
+          max-width: 150px;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+
+        .iconPlay {
+          margin-top: -1px;
+          font-size: 20px;
+          width: 20px;
+          height: 20px;
+          margin-left: 6px;
+        }
+      }
+
+
+      .itemTopSub {
+        font-size: 12px !important;
+        font-weight: 400;
+        color: #777777;
+        line-height: 17px;
+      }
+    }
+
+    .itemTopRight {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+
+      .imgWrap {
+        width: 100px;
+        height: 33px;
+        background: #e9e3ff;
+        border-radius: 19px;
+
+        img {
+          width: 100%;
+          height: 100%;
+        }
+      }
+
+      .imgIcon {
+        font-size: 16px;
+        color: #d8d8d8;
+        margin-left: 6px;
+      }
+    }
+  }
+
+  .itemBottom {
+    margin-top: 15px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: space-around;
+    text-align: center;
+
+    .itemBottomDot {
+      width: 25%;
+
+      .dotMain {
+        font-size: 26px;
+        color: #333333;
+        line-height: 30px;
+        margin-bottom: 4px;
+        font-family: DINAlternate-Bold, DINAlternate;
+        font-weight: bold;
+
+        span {
+          margin-left: 1px;
+          font-size: 12px;
+          font-weight: 400;
+          color: #333333;
+          line-height: 17px;
+        }
+      }
+
+      .dotSub {
+        font-size: 12px;
+        font-weight: 400;
+        color: #777777;
+        line-height: 17px;
+      }
+    }
+  }
+}

+ 133 - 0
src/tenant/exercise-record/modals/detail-item.tsx

@@ -0,0 +1,133 @@
+import { defineComponent } from 'vue'
+import styles from './detail-item.module.less'
+import { postMessage } from '@/helpers/native-message'
+import { Icon } from 'vant'
+import Image1 from '../images/Image1.png'
+import Image2 from '../images/Image2.png'
+import Image3 from '../images/Image3.png'
+import Image4 from '../images/Image4.png'
+import Image5 from '../images/Image5.png'
+import iconPlay from '../images/icon-play.png'
+
+const scoreInfos: any = {
+  1: {
+    img: Image1,
+    tips: '你的演奏不太好,音准和完整性还需加强,再练一练吧~',
+    mome: '敢于尝试'
+  },
+  2: {
+    img: Image2,
+    tips: '你的演奏还不熟练,音准和完整性还需加强,加紧训练才能有好成绩哦~',
+    mome: '还要加油哦~'
+  },
+  3: {
+    img: Image3,
+    tips: '你的演奏还不流畅,音准和节奏还需加强,科学的练习才能更完美哦~',
+    mome: '突破自我'
+  },
+  4: {
+    img: Image4,
+    tips: '你的演奏还不错,继续加油吧,加强音准,离完美就差一步啦~',
+    mome: '崭露头角'
+  },
+  5: {
+    img: Image5,
+    tips: '你的演奏非常不错,音准的把握和节奏稍有瑕疵,完整性把握的很好~',
+    mome: '你很棒'
+  }
+}
+export default defineComponent({
+  props: ['item'],
+  name: 'detail-item',
+
+  setup(props) {
+    const getLeveByScoreId = (score?: number) => {
+      if (!score && typeof score !== 'number') {
+        return {}
+      }
+      let leve: any = 1
+      if (score > 20 && score <= 40) {
+        leve = 2
+      } else if (score > 40 && score <= 60) {
+        leve = 3
+      } else if (score > 60 && score <= 80) {
+        leve = 4
+      } else if (score > 80) {
+        leve = 5
+      }
+      return leve
+    }
+    const gotoDetail = () => {
+      const behaviorId = +new Date()
+      postMessage({
+        api: 'openAccompanyWebView',
+        content: {
+          url:
+            location.origin +
+            '/accompany/colexiu-report.html?id=' +
+            props.item.id +
+            '&behaviorId=' +
+            behaviorId,
+          orientation: 0,
+          isHideTitle: true,
+          statusBarTextColor: false,
+          isOpenLight: true
+        }
+      })
+    }
+    return () => (
+      <div class={styles.itemWrap} onClick={gotoDetail}>
+        <div class={styles.itemTop}>
+          <div class={styles.itemTopLeft}>
+            <p class={styles.itemTopMain}>
+              <span>{props.item.sysMusicScoreName}</span>
+              {props.item.videoFilePath && (
+                <Icon class={styles.iconPlay} name={iconPlay} />
+              )}
+            </p>
+            <p class={styles.itemTopSub}>{props.item.createTime}</p>
+          </div>
+          <div class={styles.itemTopRight}>
+            <div class={styles.imgWrap}>
+              <img
+                src={scoreInfos[getLeveByScoreId(props.item.score || 0)].img}
+                alt=""
+              />
+            </div>
+            <Icon name="arrow" class={styles.imgIcon} />
+          </div>
+        </div>
+        <div class={styles.itemBottom}>
+          <div class={styles.itemBottomDot}>
+            <p class={styles.dotMain} style={{ color: '#ff5a56' }}>
+              {props.item.score || 0}
+              <span>分</span>{' '}
+            </p>
+            <p class={styles.dotSub}> 综合得分</p>
+          </div>
+          <div class={styles.itemBottomDot}>
+            <p class={styles.dotMain}>
+              {props.item.intonation || 0}
+              <span>分</span>{' '}
+            </p>
+            <p class={styles.dotSub}>音准 </p>
+          </div>
+          <div class={styles.itemBottomDot}>
+            <p class={styles.dotMain}>
+              {props.item.cadence || 0}
+              <span>分</span>{' '}
+            </p>
+            <p class={styles.dotSub}>节奏 </p>
+          </div>
+          <div class={styles.itemBottomDot}>
+            <p class={styles.dotMain}>
+              {props.item.integrity || 0}
+              <span>分</span>{' '}
+            </p>
+            <p class={styles.dotSub}>完成度 </p>
+          </div>
+        </div>
+      </div>
+    )
+  }
+})

BIN
src/tenant/images/bg-image.png


BIN
src/tenant/images/icon-album-cover.png


BIN
src/tenant/images/icon-search.png


BIN
src/tenant/images/icon-share.png


+ 32 - 0
src/tenant/layout/auth.module.less

@@ -0,0 +1,32 @@
+.error {
+  background-color: #fff;
+  display: flex;
+  // padding-top: 20px;
+  flex-direction: column;
+  min-height: calc(100vh);
+  align-items: center;
+  justify-content: center;
+  .info {
+    display: flex;
+    align-items: center;
+    margin-bottom: 30px;
+
+    span {
+      display: inline-block;
+      margin-left: 10px;
+      color: #58727e;
+      font-size: 18px;
+    }
+  }
+
+  :global {
+    .col-result-container,
+    .van-empty {
+      padding-top: 0;
+    }
+
+    .van-button {
+      width: 50%;
+    }
+  }
+}

+ 115 - 0
src/tenant/layout/auth.tsx

@@ -0,0 +1,115 @@
+import { defineComponent } from 'vue'
+import styles from './auth.module.less'
+import { state, setLogin, setLogout, setLoginError } from '@/state'
+import { browser, setAuth } from '@/helpers/utils'
+import { postMessage } from '@/helpers/native-message'
+import { RouterView } from 'vue-router'
+import { Button, Icon } from 'vant'
+import request from '@/helpers/request'
+import ColResult from '@/components/col-result'
+
+const browserInfo = browser()
+export default defineComponent({
+  name: 'Auth',
+  data() {
+    return {
+      loading: false as boolean
+    }
+  },
+  computed: {
+    isExternal() {
+      // 该路由在外部连接打开是否需要登录
+      // 只判断是否在学生端打开
+      return (this.$route.meta.isExternal && !browserInfo.isStudent) || false
+    },
+    isNeedView() {
+      return (
+        state.user.status === 'login' ||
+        this.$route.path === '/login' ||
+        (this as any).isExternal
+      )
+    }
+  },
+  mounted() {
+    !this.isExternal && this.setAuth()
+  },
+  methods: {
+    async setAuth() {
+      const { query } = this.$route
+      const token = query.userInfo || query.Authorization
+      if (token) {
+        setAuth(token)
+      }
+      if (this.loading) {
+        return
+      }
+      if (state.user.status === 'init' || state.user.status === 'error') {
+        this.loading = true
+        try {
+          const res = await request.get('/api-student/student/queryUserInfo', {
+            initRequest: true // 初始化接口
+          })
+          setLogin(res.data)
+        } catch (e: any) {
+          const message = e.message
+          if (
+            message.indexOf('403') === -1 &&
+            message.indexOf('authentication') === -1
+          ) {
+            setLoginError()
+          } else {
+            setLogout()
+          }
+        }
+        this.loading = false
+      }
+      if (state.user.status === 'logout') {
+        if (browser().isApp) {
+          postMessage({ api: 'login' })
+        } else {
+          try {
+            const route = this.$route
+            const query = {
+              returnUrl: this.$route.path,
+              ...this.$route.query
+            } as any
+            if (route.meta.isRegister) {
+              query.isRegister = route.meta.isRegister
+            }
+            this.$router.replace({
+              path: '/login',
+              query: query
+            })
+          } catch (error) {}
+        }
+      }
+    }
+  },
+  render() {
+    return (
+      <>
+        {state.user.status === 'error' ? (
+          <div class={styles.error}>
+            {/* <div class={styles.info}>
+              <Icon name="clear" size="36" color="#ee0a24" />
+              <span>加载失败,请重新尝试</span>
+            </div>
+            <Button type="primary" round onClick={this.setAuth}>
+              重新加载
+            </Button> */}
+            <ColResult
+              type="notFond"
+              classImgSize="CERT"
+              tips="加载失败,请稍后重试"
+              buttonText="重新加载"
+              plain={true}
+              onClick={this.setAuth}
+            />
+          </div>
+        ) : this.isNeedView ? (
+          <RouterView></RouterView>
+        ) : null}
+      </>
+    )
+  }
+})

BIN
src/tenant/layout/images/bottom_bg.png


BIN
src/tenant/layout/images/top_bg.png


+ 44 - 0
src/tenant/layout/login.module.less

@@ -0,0 +1,44 @@
+.login {
+  min-height: 100vh;
+  background: url('./images/top_bg.png') no-repeat top center,
+    url('./images/bottom_bg.png') no-repeat bottom center;
+  background-color: #fff;
+  background-size: 100%;
+
+  .loginTitle {
+    padding-top: 100px;
+    font-size: 26px;
+    padding-left: 35px;
+    padding-bottom: 70px;
+    line-height: 37px;
+    font-weight: 500;
+  }
+
+  .codeText {
+    color: var(--van-primary);
+  }
+
+  .margin34 {
+    margin: 0 34px;
+  }
+
+  .formTitle {
+    font-size: 18px;
+    color: #000;
+    font-weight: 500;
+  }
+
+  :global {
+    .van-cell-group {
+      margin-bottom: 35px;
+    }
+    .van-field {
+      padding-left: 0;
+      padding-right: 0;
+    }
+    .van-button + .van-button {
+      margin-top: 20px;
+      color: #000 !important;
+    }
+  }
+}

+ 210 - 0
src/tenant/layout/login.tsx

@@ -0,0 +1,210 @@
+import { defineComponent } from 'vue'
+import { CellGroup, Field, Button, CountDown, Row, Col, Toast } from 'vant'
+import ImgCode from '@/components/col-img-code'
+import { checkPhone } from '@/helpers/validate'
+import request from '@/helpers/request'
+import { setLogin, state } from '@/state'
+import { removeAuth, setAuth } from '@/helpers/utils'
+import styles from './login.module.less'
+
+type loginType = 'PWD' | 'SMS'
+export default defineComponent({
+  name: 'login',
+  data() {
+    return {
+      loginType: 'SMS' as loginType,
+      username: '',
+      password: '',
+      smsCode: '',
+      countDownStatus: true, // 是否发送验证码
+      countDownTime: 1000 * 120, // 倒计时时间
+      countDownRef: null as any, // 倒计时实例
+      imgCodeStatus: false
+    }
+  },
+  computed: {
+    codeDisable() {
+      let status = true
+      if (this.loginType === 'PWD') {
+        this.username && this.password && (status = false)
+      } else {
+        this.username && this.smsCode && (status = false)
+      }
+      return status
+    }
+  },
+  mounted() {
+    removeAuth()
+    this.directNext()
+  },
+  methods: {
+    directNext() {
+      if (state.user.status === 'login' || state.user.status === 'error') {
+        const { returnUrl, isRegister, ...rest } = this.$route.query
+        this.$router.replace({
+          path: returnUrl as any,
+          query: {
+            ...rest
+          }
+        })
+      }
+    },
+    async onLogin() {
+      try {
+        let res: any
+        if (this.loginType === 'PWD') {
+          res = await request.post('/api-auth/usernameLogin', {
+            requestType: 'form',
+            data: {
+              username: this.username,
+              password: this.password,
+              clientId: 'student',
+              clientSecret: 'student'
+            }
+          })
+        } else {
+          res = await request.post('/api-auth/smsLogin', {
+            requestType: 'form',
+            data: {
+              clientId: 'student',
+              clientSecret: 'student',
+              phone: this.username,
+              smsCode: this.smsCode
+            }
+          })
+        }
+
+        const { authentication } = res.data
+        setAuth(authentication.token_type + ' ' + authentication.access_token)
+
+        let userCash = await request.get('/api-student/student/queryUserInfo', {
+          initRequest: true // 初始化接口
+        })
+        setLogin(userCash.data)
+
+        this.directNext()
+      } catch {}
+    },
+    async onSendCode() {
+      // 发送验证码
+      if (!checkPhone(this.username)) {
+        return Toast('请输入正确的手机号码')
+      }
+      this.imgCodeStatus = true
+    },
+    onCodeSend() {
+      this.countDownStatus = false
+      this.countDownRef.start()
+    },
+    onFinished() {
+      this.countDownStatus = true
+      this.countDownRef.reset()
+    },
+    onChange() {
+      if (this.loginType === 'PWD') {
+        this.loginType = 'SMS'
+      } else if (this.loginType === 'SMS') {
+        this.loginType = 'PWD'
+      }
+    }
+  },
+  render() {
+    return (
+      <div class={styles.login}>
+        <div class={styles.loginTitle}>
+          您好,
+          <br /> 欢迎使用酷乐秀
+        </div>
+        <CellGroup class={styles.margin34} border={false}>
+          <Row style={{ marginBottom: '16px' }}>
+            <Col span={24} class={styles.formTitle}>
+              手机号
+            </Col>
+            <Col span={24} class="van-hairline--bottom">
+              <Field
+                v-model={this.username}
+                name="手机号"
+                placeholder="请输入您的手机号"
+                type="tel"
+                maxlength={11}
+              />
+            </Col>
+          </Row>
+
+          {this.loginType === 'PWD' ? (
+            <Row>
+              <Col span={24} class={styles.formTitle}>
+                密码
+              </Col>
+              <Col span={24} class="van-hairline--bottom">
+                <Field
+                  v-model={this.password}
+                  type="password"
+                  name="密码"
+                  placeholder="请输入密码"
+                />
+              </Col>
+            </Row>
+          ) : (
+            <Row>
+              <Col span={24} class={styles.formTitle}>
+                验证码
+              </Col>
+              <Col span={24} class="van-hairline--bottom">
+                <Field
+                  v-model={this.smsCode}
+                  name="验证码"
+                  placeholder="请输入验证码"
+                  type="tel"
+                  maxlength={6}
+                  // @ts-ignore
+                  vSlots={{
+                    button: () =>
+                      this.countDownStatus ? (
+                        <span class={styles.codeText} onClick={this.onSendCode}>
+                          获取验证码
+                        </span>
+                      ) : (
+                        <CountDown
+                          ref={this.countDownRef}
+                          auto-start={false}
+                          time={this.countDownTime}
+                          onFinish={this.onFinished}
+                          format="ss秒"
+                        />
+                      )
+                  }}
+                />
+              </Col>
+            </Row>
+          )}
+        </CellGroup>
+        <div class={styles.margin34}>
+          <Button
+            round
+            block
+            type="primary"
+            disabled={this.codeDisable}
+            onClick={this.onLogin}
+          >
+            提交
+          </Button>
+          <Button block round color="#F5F7FB" onClick={this.onChange}>
+            {this.loginType === 'PWD' ? '验证码登录' : '密码登录'}
+          </Button>
+        </div>
+
+        {this.imgCodeStatus ? (
+          <ImgCode
+            v-model:value={this.imgCodeStatus}
+            phone={this.username}
+            onClose={() => {
+              this.imgCodeStatus = false
+            }}
+            onSendCode={this.onCodeSend}
+          />
+        ) : null}
+      </div>
+    )
+  }
+})

+ 80 - 0
src/tenant/main.ts

@@ -0,0 +1,80 @@
+import { createApp } from 'vue'
+import App from './App.vue'
+import dayjs from 'dayjs'
+import 'dayjs/locale/zh-cn'
+import router from '../router/index-tenant'
+import vueFilter from '@/helpers/vueFilter'
+import { postMessage, promisefiyPostMessage } from '@/helpers/native-message'
+
+import 'normalize.css'
+
+import '../styles/index.less'
+import '../styles/tenant.less'
+import { state } from '@/state'
+import { browser, setAuth } from '@/helpers/utils'
+
+const app = createApp(App)
+
+// import Vconsole from 'vconsole'
+// const vconsole = new Vconsole()
+postMessage(
+  {
+    api: 'getVersion'
+  },
+  (res: any) => {
+    state.version = res.content.version
+  }
+)
+
+// 判断是否是管乐团学生端,用来获取基础数据
+if (browser().isOrchestraStudent) {
+  // await promisefiyPostMessage({
+  //   api: 'setCache',
+  //   content: {
+  //     key: 'h5-colexiu-token',
+  //     value: ''
+  //   }
+  // })
+
+  // 获取管乐团token
+  promisefiyPostMessage({ api: 'getUserAccount' }).then((res: any) => {
+    const content = res.content
+    state.orchestraInfo.token = content.token.split(' ')[1]
+    state.orchestraInfo.phone = content.phone
+    state.orchestraInfo.nickname = content.nickname
+    state.orchestraInfo.avatar = content.avatar
+    state.orchestraInfo.unionId = content.unionId || 0
+  })
+
+  // 从缓存里面获取token
+  promisefiyPostMessage({
+    api: 'getCache',
+    content: { key: 'h5-colexiu-token' }
+  }).then((res: any) => {
+    const content = res.content
+    if (content.value) {
+      setAuth(content.value)
+    }
+  })
+}
+
+if (browser().isTeacher) {
+  state.platformType = 'TEACHER'
+} else if (browser().isStudent) {
+  state.platformType = 'STUDENT'
+} else {
+  state.platformType = 'STUDENT'
+}
+if (state.platformType === 'TEACHER') {
+  state.platformApi = '/api-teacher'
+} else {
+  state.platformApi = '/api-student'
+}
+state.projectType = 'tenant'
+
+dayjs.locale('zh-ch')
+app.config.globalProperties.$dayjs = dayjs
+app.config.globalProperties.$filters = vueFilter
+app.use(router)
+
+app.mount('#app')

BIN
src/tenant/member-center/images/1.png


BIN
src/tenant/member-center/images/2.png


BIN
src/tenant/member-center/images/3.png


BIN
src/tenant/member-center/images/4.png


BIN
src/tenant/member-center/images/5.png


BIN
src/tenant/member-center/images/6.png


BIN
src/tenant/member-center/images/7.png


BIN
src/tenant/member-center/images/8.png


BIN
src/tenant/member-center/images/contnt-bg.png


BIN
src/tenant/member-center/images/discount_bg.png


BIN
src/tenant/member-center/images/function-title.png


BIN
src/tenant/member-center/images/icon-arrow-line.png


BIN
src/tenant/member-center/images/icon-arrow.png


BIN
src/tenant/member-center/images/icon-logo-default.png


BIN
src/tenant/member-center/images/icon-logo.png


BIN
src/tenant/member-center/images/icon-member-active.png


BIN
src/tenant/member-center/images/icon-member-s.png


BIN
src/tenant/member-center/images/icon-selected.png


BIN
src/tenant/member-center/images/icon_discount.png


BIN
src/tenant/member-center/images/icon_gift.png


BIN
src/tenant/member-center/images/icon_video.png


BIN
src/tenant/member-center/images/info-title.png


BIN
src/tenant/member-center/images/member-bg.png


BIN
src/tenant/member-center/images/member_bg.png


BIN
src/tenant/member-center/images/member_logo.png


BIN
src/tenant/member-center/images/price-bg.png


BIN
src/tenant/member-center/images/record_bg.png


BIN
src/tenant/member-center/images/tip_bg.png


BIN
src/tenant/member-center/images/vip-bg.png


+ 563 - 0
src/tenant/member-center/index.module.less

@@ -0,0 +1,563 @@
+.memberH {
+  :global {
+    .van-sticky {
+      background: url('./images/member-bg.png') no-repeat top center;
+      background-size: 100% 214px;
+    }
+  }
+
+}
+
+.member-center {
+  // background: url('./images/member-bg.png') no-repeat top center #FFEAE9;
+
+  background: #FFEAE9; //linear-gradient(180deg, #FFEBE9 0%, #F7C6D2 33%, #FFD0D0 100%);
+  // background-size: contain;
+  min-height: 100vh;
+  position: relative;
+
+
+
+  .bgImg {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 214px;
+    // object-fit: cover;
+    z-index: 0;
+  }
+
+  :global {
+    .van-nav-bar {
+      background-color: transparent;
+    }
+  }
+
+  .member_container {
+    position: relative;
+    // padding: 10px 14px 0;
+    background: url('./images/vip-bg.png') no-repeat center;
+    background-size: contain;
+    height: 156px;
+
+    .title {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      line-height: 28px;
+      font-weight: 500;
+      color: #333333;
+
+      &::before {
+        content: ' ';
+        width: 4px;
+        height: 17px;
+        background: #01c1b5;
+        display: inline-block;
+        margin-right: 7px;
+        border-radius: 8px;
+      }
+    }
+
+    .iconMember {
+      position: absolute;
+      top: 16px;
+      right: 6px;
+      width: 135px;
+      height: 108px;
+    }
+  }
+
+  .level {
+    width: 44px;
+    height: 17px;
+  }
+
+  .userMember {
+    background-color: transparent;
+    width: auto;
+    padding: 0;
+    // border-radius: 10px;
+    padding: 18px 12px 30px 26px;
+
+    .userImgSection {
+      position: relative;
+      padding: 3px;
+      background: linear-gradient(270deg, rgba(255, 123, 87, 1), rgba(255, 138, 91, 1), rgba(255, 52, 96, 1));
+      margin-right: 12px;
+      border-radius: 50%;
+
+      &::before {
+        content: ' ';
+        position: absolute;
+        left: 1px;
+        top: 1px;
+        bottom: 1px;
+        right: 1px;
+        background-color: #fff;
+        border-radius: 50%;
+      }
+    }
+
+    .userImg {
+      width: 46px;
+      height: 46px;
+      border-radius: 50%;
+      vertical-align: middle;
+      overflow: hidden;
+    }
+
+    .userInfo {
+      padding-top: 4px;
+      display: flex;
+      align-items: center;
+      color: #fff;
+      padding-bottom: 5px;
+
+      .name {
+        padding-right: 5px;
+        max-width: 100px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        font-size: 18px;
+        font-weight: 600;
+        color: #742626;
+      }
+
+
+    }
+
+    .phone {
+      font-size: 13px;
+      font-weight: 500;
+      color: #91555E;
+    }
+
+    .timeRemaining {
+      margin-top: 0;
+      font-size: 14px;
+      color: #c0c0c0;
+    }
+
+  }
+
+  .member_time {
+    display: flex;
+    align-items: center;
+    padding-left: 26px;
+    font-size: 13px;
+    color: #742626;
+
+    &::after {
+      content: ' ';
+      width: 5px;
+      height: 7px;
+      background: url('./images/icon-arrow.png') no-repeat center;
+      background-size: contain;
+      margin-left: 6px;
+      margin-top: -2px;
+    }
+
+    .remaining {
+      color: #FE2451;
+      padding: 0 5px;
+      font-weight: bold;
+    }
+  }
+
+  .intro {
+    background: #FFFFFF;
+    border-radius: 16px;
+    font-size: 14px;
+    color: #bb6e3a;
+    overflow: hidden;
+
+    &::before {
+      content: ' ';
+      width: 196px;
+      height: 40px;
+      background: url('./images/info-title.png') no-repeat;
+      background-size: contain;
+      display: inline-block;
+      margin-left: 50%;
+      transform: translateX(-98px);
+    }
+
+
+    p {
+      background: linear-gradient(44deg, #FCE3E1 0%, #FEF3EC 29%, #FDDDD5 59%, #FEDBE3 100%);
+      border-radius: 12px;
+      // opacity: 0.27;
+      margin: 13px 12px 20px;
+      padding: 15px;
+      text-align: justify;
+      line-height: 22px;
+      font-size: 14px;
+      color: #2D1A18;
+
+      span {
+        color: #EF2F56;
+      }
+    }
+  }
+
+
+  .memberContainer {
+    background: rgba(255, 255, 255, 0.5);
+    border-radius: 20px;
+    border: 2px solid #FFFFFF;
+    position: relative;
+    // margin-top: -15px;
+    padding: 12px 12px 12px;
+    margin-bottom: 12px;
+    z-index: 99;
+  }
+
+
+  .memberItem {
+    padding-top: 20px;
+
+
+
+    .title {
+      font-size: 16px;
+      color: #333333;
+      font-weight: 500;
+
+      span {
+        color: #f7b500;
+      }
+    }
+  }
+
+  .vipFunction {
+    margin-top: 12px;
+    border-radius: 16px;
+    background-color: #fff;
+    padding: 0 12px 20px;
+    overflow: hidden;
+
+    &::before {
+      content: ' ';
+      width: 196px;
+      height: 40px;
+      background: url('./images/function-title.png') no-repeat;
+      background-size: contain;
+      display: inline-block;
+      margin-left: 50%;
+      transform: translateX(-98px);
+    }
+  }
+
+  .member_function {
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+
+    .function_item__content {
+      height: 100%;
+    }
+
+    .function_item {
+      width: 76px;
+      padding: 12px 0;
+      margin-top: 8px;
+      border-radius: 8px;
+      overflow: hidden;
+      background-color: #faefe3;
+      text-align: center;
+    }
+
+    .function_text {
+      font-size: 12px;
+      color: #814014;
+      line-height: 16px;
+    }
+  }
+
+  .system-list::-webkit-scrollbar {
+    display: none;
+    /* Chrome Safari */
+  }
+
+  .system-list {
+    width: 100%;
+    overflow-x: auto;
+    overflow-y: hidden;
+    display: flex;
+    position: relative;
+    user-select: none;
+    box-sizing: content-box;
+    margin-bottom: 20px;
+    height: auto;
+    transition: all .2s;
+
+    &.systemHide {
+      height: 0;
+      transition: all .2s;
+      margin-bottom: 0px;
+    }
+  }
+
+  .system-item {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    flex: 1 0 auto;
+    width: 96px;
+    min-height: 120px;
+    box-sizing: border-box;
+    background: #ffffff;
+    border-radius: 12px;
+    border: 1px solid #e5e5e5;
+    margin-left: 10px;
+
+    &:last-child {
+      margin-right: 10px;
+    }
+
+    .title {
+      font-size: 14px;
+      font-weight: 500;
+      color: #333333;
+      line-height: 20px;
+    }
+
+    .price {
+      color: #EF2F56;
+      font-size: 25px;
+      line-height: 1.5;
+      font-family: DINAlternate-Bold, DINAlternate;
+      font-weight: bold;
+
+      span {
+        font-size: 16px;
+      }
+    }
+
+    .originalPrice {
+      color: #999999;
+      font-size: 13px;
+    }
+
+    &.active {
+      background: linear-gradient(223deg, #FEECE3 0%, #FEE4E3 52%, #FFDCE6 100%);
+      border: 1px solid #FF4264;
+      position: relative;
+
+      .title {
+        color: #EF2F56;
+      }
+
+
+      .originalPrice {
+        color: #EF2F56;
+      }
+
+      &::before {
+        content: ' ';
+        font: 14px/1 'vant-icon';
+        width: 27px;
+        height: 18px;
+
+        position: absolute;
+        top: -1px;
+        right: -1px;
+        background: url('./images/icon-selected.png') no-repeat center;
+        background-size: contain;
+      }
+    }
+  }
+
+  .bottom_function {
+    background: url('./images/price-bg.png') no-repeat top center #fff;
+    background-size: contain;
+    box-shadow: inset 0px 1px 0px 0px #FFFFFF;
+    border-radius: 16px 16px 0px 0px;
+    border: 2px solid #FFFFFF;
+  }
+
+  .memberMeal {
+    .titleMeal {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      font-size: 16px;
+      font-weight: 600;
+      color: #131415;
+      line-height: 22px;
+      padding: 16px 15px;
+
+      .iconArrowLine {
+        display: inline-block;
+        width: 14px;
+        height: 14px;
+        background: url('./images/icon-arrow-line.png') no-repeat center;
+        background-size: contain;
+      }
+    }
+  }
+
+  .btnGroup {
+    // position: fixed;
+    // bottom: 0;
+    // left: 0;
+    // right: 0;
+    // z-index: 100;
+    background-color: #fff;
+    display: flex;
+    align-items: center;
+    padding: 0 16px 12px;
+    justify-content: space-between;
+
+    .btn {
+      padding: 0 22px;
+      height: 44px;
+      color: #fff !important;
+      background: linear-gradient(270deg, #FF204B 0%, #FE5B71 100%);
+      border-radius: 39px;
+      font-size: 18px;
+      font-weight: bold;
+      border: none;
+
+      .unit {
+        font-size: 14px;
+      }
+    }
+
+    .priceSection {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      color: #1a1a1a;
+
+      .price {
+        font-size: 18px;
+        font-weight: bold;
+        color: #ff3535;
+
+        .priceUnit {
+          font-size: 14px;
+        }
+      }
+    }
+  }
+}
+
+.memberDiscount {
+  margin-top: 16px;
+  position: relative;
+  background: url('./images/discount_bg.png') no-repeat center;
+  background-size: contain;
+  display: flex;
+  align-items: center;
+  height: 44px;
+  font-size: 16px;
+  color: #ff7100;
+  line-height: 18px;
+
+  .discountAvatar {
+    margin-left: 15px;
+    width: 36px;
+    height: 36px;
+    border-radius: 50%;
+    overflow: hidden;
+    border: 1px solid #ffaf59;
+  }
+
+  .discountName {
+    padding-left: 30px;
+    max-width: 200px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+
+  .discountGift {
+    position: absolute;
+    right: 26px;
+    top: 7px;
+    width: 29px;
+    height: 29px;
+  }
+}
+
+.discountItem {
+  height: 14px;
+  padding-bottom: 2px;
+
+  img {
+    height: 100%;
+  }
+}
+
+.discountBuy {
+  height: 18px;
+  padding-bottom: 0;
+  margin-left: 8px;
+}
+
+.shareBtn {
+  display: flex;
+  align-items: flex-start;
+  color: #666;
+  font-size: 14px;
+  line-height: 20px !important;
+
+  :global(.van-image) {
+    width: 18px;
+    height: 18px;
+    margin-right: 6px;
+  }
+}
+
+.shareVip {
+  position: relative;
+  margin-top: 50px;
+  display: flex;
+  flex: 1;
+  align-items: center;
+  padding: 11px 6px 11px;
+  background: #ffffff;
+  border-radius: 10px;
+
+  .icon {
+    width: 36px;
+    height: 36px;
+    border-radius: 10px;
+  }
+
+  .info {
+    margin-left: 6px;
+    flex: 1;
+    word-break: break-all;
+
+    >h4 {
+      color: var(--music-list-item-title-color);
+      font-size: 14px;
+      font-weight: 600;
+    }
+
+    >p {
+      color: var(--music-list-item-mate-color);
+      line-height: 17px;
+    }
+  }
+}
+
+.tagDiscount {
+  position: absolute;
+  top: -23px;
+  left: 15px;
+  padding: 0 10px;
+  height: 23px;
+  background: linear-gradient(180deg, #ffb635 0%, #ff4e18 100%);
+  border-radius: 8px 8px 0px 0px;
+  font-size: 14px;
+  font-weight: 600;
+  color: #ffffff;
+  line-height: 24px;
+}

+ 482 - 0
src/tenant/member-center/index.tsx

@@ -0,0 +1,482 @@
+import ColHeader from '@/components/col-header'
+import { Button, Cell, Icon, Image, Popup, Toast } from 'vant'
+import { defineComponent } from 'vue'
+import styles from './index.module.less'
+import request from '@/helpers/request'
+import { setLogin, state } from '@/state'
+import iconStudent from '@common/images/icon_student.png'
+import iconTeacher from '@common/images/icon_teacher.png'
+import iconGift from './images/icon_gift.png'
+import iconShare from '../music/album/icon_share2.svg'
+import iconDiscount from './images/icon_discount.png'
+import iconMemberLogo from './images/member_logo.png'
+import iconLogo from './images/icon-logo-default.png'
+import iconLogoActive from './images/icon-logo.png'
+import iconMember from './images/icon-member-s.png'
+import iconMmeberActive from './images/icon-member-active.png'
+import { orderStatus } from '@/views/order-detail/orderStatus'
+import dayjs from 'dayjs'
+import { memberType } from '@/constant'
+import { moneyFormat } from '@/helpers/utils'
+import ColShare from '@/components/col-share'
+import TheSticky from '@/components/the-sticky'
+import bgImg from './images/member-bg.png'
+
+export const getAssetsHomeFile = (fileName: string) => {
+  const path = `./images/${fileName}`
+  const modules = import.meta.globEager('./images/*')
+  return modules[path].default
+}
+
+export default defineComponent({
+  name: 'MemberCenter',
+  data() {
+    const query = this.$route.query
+    return {
+      activityId: query.activityId,
+      recomUserId: query.recomUserId,
+      apiSuffix:
+        state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher',
+      agreeStatus: false,
+      functionList: [],
+      memberList: [],
+      selectMember: {} as any,
+      params: {
+        page: 1,
+        rows: 20
+      },
+      discountTeacher: {
+        avatar: '',
+        discount: 0,
+        username: ''
+      },
+      shareStatus: false,
+      shareUrl: '',
+      shareDiscount: 0, // 是否有优惠活动
+      hidePriceStatus: false
+    }
+  },
+  computed: {
+    userInfo() {
+      const users = state.user.data
+      return {
+        username: users?.username,
+        phone: users?.phone,
+        avatar: users?.heardUrl,
+        id: users?.userId,
+        memberRankSettingId: users?.memberRankSettingId,
+        isVip: users?.isVip,
+        membershipDays: users?.membershipDays,
+        membershipEndTime: users?.membershipEndTime
+      }
+    }
+  },
+  async mounted() {
+    try {
+      const userInfo = await request.get(
+        state.platformType === 'TEACHER'
+          ? '/api-teacher/teacher/queryUserInfo'
+          : '/api-student/student/queryUserInfo'
+      )
+      setLogin(userInfo.data)
+
+      const res = await request.post(
+        `${this.apiSuffix}/memberPriceSettings/vipPermissions`
+      )
+      const result = res.data || []
+      this.functionList = result.map((item: any) => {
+        return {
+          title: item.paramName,
+          icon: getAssetsHomeFile(`${item.paramValue}.png`)
+        }
+      })
+
+      const setting = await request.post(
+        `${this.apiSuffix}/memberPriceSettings/list`,
+        {
+          data: {
+            activityId: Number(this.activityId),
+            userId: this.recomUserId
+          }
+        }
+      )
+      const { list, ...more } = setting.data
+      this.discountTeacher = {
+        ...more
+      }
+      const settingResult = list || []
+      let settingList: any = []
+      settingResult.forEach((item: any) => {
+        const tempItem = {
+          title: '',
+          salePrice: item.salePrice,
+          originalPrice: item.originalPrice,
+          period: item.period,
+          id: item.id,
+          discount: item.discount,
+          discountPrice: item.discountPrice,
+          status: false
+        }
+
+        tempItem.title = memberType[item.period]
+
+        item.period !== 'DAY' && settingList.push(tempItem)
+      })
+
+      settingList = settingList ? settingList.reverse() : []
+      if (settingList.length > 0) {
+        settingList[0].status = true
+        this.selectMember = settingList[0]
+      }
+      this.memberList = settingList
+    } catch {}
+  },
+  methods: {
+    // async onShare() {
+    //   try {
+    //     const res = await request.post('/api-teacher/open/vipProfit', {
+    //       data: {
+    //         userId: this.userInfo.id
+    //       }
+    //     })
+
+    //     this.shareUrl = `${location.origin}/teacher#/shareVip?recomUserId=${this.userInfo.id}&userType=${state.platformType}`
+    //     // 判断是否有我分享的编号
+    //     if (res.data && res.data.activityId) {
+    //       this.shareUrl = this.shareUrl + '&activityId=' + res.data.activityId
+    //     }
+    //     this.shareStatus = true
+    //     this.shareDiscount = res.data.discount || 0
+    //     return
+    //   } catch {
+    //     //
+    //   }
+    // },
+    calcSalePrice(item: any) {
+      // discount
+      if (item.discount === 1) {
+        const tempPrice = Number(
+          (item.salePrice - item.discountPrice).toFixed(2)
+        )
+        return tempPrice >= 0 ? tempPrice : 0
+      }
+      return item.salePrice
+    },
+    onSubmit() {
+      const member: any = this.selectMember
+      // 判断是否有会员
+      const startTime = this.userInfo.isVip
+        ? dayjs(this.userInfo.membershipEndTime).toDate()
+        : new Date()
+      let endTime = new Date()
+      if (member.period === 'MONTH') {
+        endTime = dayjs(startTime).add(1, 'month').toDate()
+      } else if (member.period === 'QUARTERLY') {
+        endTime = dayjs(startTime).add(3, 'month').toDate()
+      } else if (member.period === 'YEAR_HALF') {
+        endTime = dayjs(startTime).add(6, 'month').toDate()
+      } else if (member.period === 'YEAR') {
+        endTime = dayjs(startTime).add(1, 'year').toDate()
+      }
+
+      orderStatus.orderObject.orderType = 'VIP'
+      orderStatus.orderObject.orderName = '小酷Ai' + member.title
+      orderStatus.orderObject.orderDesc = '小酷Ai' + member.title
+      orderStatus.orderObject.actualPrice = this.calcSalePrice(member)
+      orderStatus.orderObject.recomUserId = this.recomUserId
+      orderStatus.orderObject.activityId = this.activityId
+      orderStatus.orderObject.orderNo = ''
+      orderStatus.orderObject.orderList = [
+        {
+          orderType: 'VIP',
+          goodsName: '小酷Ai' + member.title,
+          id: member.id,
+          title: member.title,
+          price: this.calcSalePrice(member),
+          startTime: dayjs(startTime).format('YYYY-MM-DD'),
+          endTime: dayjs(endTime).format('YYYY-MM-DD'),
+          recomUserId: this.recomUserId
+        }
+      ]
+      this.$router.push({
+        path: '/orderDetail',
+        query: {
+          orderType: 'VIP'
+        }
+      })
+    }
+  },
+  render() {
+    return (
+      <div class={styles['member-center']}>
+        <div class={styles.memberH}>
+          <TheSticky position="top">
+            <ColHeader
+              background={'transparent'}
+              color={'#fff'}
+              border={false}
+              isFixed={false}
+              // v-slots={{
+              //   right: () => (
+              //     <div class={styles.shareBtn} onClick={this.onShare}>
+              //       <Image src={iconShare} />
+              //       分享
+              //     </div>
+              //   )
+              // }}
+            />
+          </TheSticky>
+        </div>
+        <img class={styles.bgImg} src={bgImg} />
+        <div class={styles.member_container}>
+          {this.userInfo.isVip ? (
+            <img src={iconMmeberActive} class={styles.iconMember} />
+          ) : (
+            <img src={iconMember} class={styles.iconMember} />
+          )}
+
+          <Cell
+            class={styles.userMember}
+            labelClass={styles.timeRemaining}
+            v-slots={{
+              icon: () => (
+                <div class={styles.userImgSection}>
+                  <Image
+                    class={styles.userImg}
+                    src={this.userInfo.avatar || iconStudent}
+                    fit="cover"
+                  />
+                </div>
+              ),
+              title: () => (
+                <div class={styles.userInfo}>
+                  <span class={styles.name}>{this.userInfo.username}</span>
+                  <Image
+                    class={styles.level}
+                    src={this.userInfo.isVip ? iconLogoActive : iconLogo}
+                  />
+                </div>
+              ),
+              label: () => (
+                <span
+                  class={styles.phone}
+                  v-html={`${this.userInfo.phone}`}
+                ></span>
+              )
+            }}
+          ></Cell>
+
+          <div class={styles.member_time}>
+            {this.userInfo.isVip ? (
+              <div>
+                会员权益有效期剩余
+                <span class={styles.remaining}>
+                  {this.userInfo.membershipDays}
+                </span>
+                天
+              </div>
+            ) : (
+              <div>亲,您还不是平台会员哦</div>
+            )}
+          </div>
+        </div>
+
+        <div class={styles.memberContainer}>
+          <div class={[styles.intro]}>
+            <p>
+              酷乐秀会员可使用包括平台提供的所有训练乐谱,并
+              <span>专享“小酷AI”八大核心功能</span>
+              ,让孩子<span>在家就能轻松完成乐器自主规范练习</span>,让家长
+              <span>即时掌握练习情况</span>。
+            </p>
+          </div>
+
+          {this.functionList.length > 0 && (
+            <div class={[styles.memberItem, styles.vipFunction]}>
+              <div class={styles.member_function}>
+                {this.functionList.map((item: any) => (
+                  <div class={styles.function_item}>
+                    <Icon name={item.icon} size={34} />
+                    <div class={styles.function_text} v-html={item.title}></div>
+                  </div>
+                ))}
+              </div>
+            </div>
+          )}
+
+          {/*  */}
+
+          {/* <ColProtocol
+            v-model={this.agreeStatus}
+            showHeader
+            style={{ paddingLeft: 0, paddingRight: 0, marginBottom: '64px' }}
+          /> */}
+        </div>
+        {this.memberList.length > 0 && (
+          <TheSticky position="bottom">
+            <div
+              class={styles.bottom_function}
+              style={{ visibility: 'hidden' }}
+            >
+              <div class={styles.memberMeal}>
+                <div class={styles.titleMeal}>
+                  <span>会员套餐</span>
+                  <i
+                    class={[
+                      styles.iconArrowLine,
+                      this.hidePriceStatus && styles.iconArrowLineHide
+                    ]}
+                    onClick={() =>
+                      (this.hidePriceStatus = !this.hidePriceStatus)
+                    }
+                  ></i>
+                </div>
+
+                {!this.hidePriceStatus && (
+                  <div class={styles['system-list']}>
+                    {this.memberList.map((item: any) => (
+                      <div
+                        class={[
+                          styles['system-item'],
+                          item.status && styles.active
+                        ]}
+                        onClick={() => {
+                          this.memberList.forEach((item: any) => {
+                            item.status = false
+                          })
+                          item.status = true
+                          this.selectMember = item
+                        }}
+                      >
+                        <p class={styles.title}>{item.title}</p>
+                        <p class={styles.price}>
+                          <span>¥</span>
+                          {moneyFormat(this.calcSalePrice(item), '0,0[.]00')}
+                        </p>
+                        <del class={styles.originalPrice}>
+                          ¥{moneyFormat(item.originalPrice, '0,0[.]00')}
+                        </del>
+                      </div>
+                    ))}
+                  </div>
+                )}
+              </div>
+              <div class={styles.btnGroup}>
+                <Button round block class={styles.btn} onClick={this.onSubmit}>
+                  <span class={styles.unit}>¥</span>
+                  {(this as any).$filters.moneyFormat(
+                    this.calcSalePrice(this.selectMember) || 0
+                  )}
+                  元立即开通
+                </Button>
+              </div>
+            </div>
+            <div
+              class={styles.bottom_function}
+              style={{ position: 'absolute', bottom: 0, left: 0, right: 0 }}
+            >
+              <div class={styles.memberMeal}>
+                <div class={styles.titleMeal}>
+                  <span>会员套餐</span>
+                  <i
+                    class={[
+                      styles.iconArrowLine,
+                      this.hidePriceStatus && styles.iconArrowLineHide
+                    ]}
+                    onClick={() =>
+                      (this.hidePriceStatus = !this.hidePriceStatus)
+                    }
+                  ></i>
+                </div>
+
+                <div
+                  class={[
+                    styles['system-list'],
+                    this.hidePriceStatus && styles.systemHide
+                  ]}
+                >
+                  {this.memberList.map((item: any) => (
+                    <div
+                      class={[
+                        styles['system-item'],
+                        item.status && styles.active
+                      ]}
+                      onClick={() => {
+                        this.memberList.forEach((item: any) => {
+                          item.status = false
+                        })
+                        item.status = true
+                        this.selectMember = item
+                      }}
+                    >
+                      {/* <div class={styles.discountItem}>
+                        {item.discount == 1 && <img src={iconDiscount} />}
+                      </div> */}
+                      <p class={styles.title}>{item.title}</p>
+                      <p class={styles.price}>
+                        <span>¥</span>
+                        {moneyFormat(this.calcSalePrice(item), '0,0[.]00')}
+                      </p>
+                      <del class={styles.originalPrice}>
+                        ¥{moneyFormat(item.originalPrice, '0,0[.]00')}
+                      </del>
+                    </div>
+                  ))}
+                </div>
+              </div>
+              <div class={styles.btnGroup}>
+                {/* <div class={styles.priceSection}>
+                  支付金额:
+                  <div class={styles.price}>
+                    <span class={styles.priceUnit}>¥</span>
+                    <span class={styles.priceNum}>
+                      {(this as any).$filters.moneyFormat(
+                        this.calcSalePrice(this.selectMember) || 0
+                      )}
+                    </span>
+                  </div>
+                  {this.selectMember?.discount == 1 && (
+                    <div class={[styles.discountItem, styles.discountBuy]}>
+                      <img src={iconDiscount} />
+                    </div>
+                  )}
+                </div> */}
+                <Button round block class={styles.btn} onClick={this.onSubmit}>
+                  <span class={styles.unit}>¥</span>
+                  {(this as any).$filters.moneyFormat(
+                    this.calcSalePrice(this.selectMember) || 0
+                  )}
+                  元立即开通
+                </Button>
+              </div>
+            </div>
+          </TheSticky>
+        )}
+
+        {/* <Popup
+          v-model:show={this.shareStatus}
+          style={{ background: 'transparent' }}
+        >
+          <ColShare
+            teacherId={this.userInfo.id}
+            shareUrl={this.shareUrl}
+            shareType="vip"
+            shareLength={2}
+          >
+            <div class={styles.shareVip}>
+              {this.shareDiscount === 1 && (
+                <div class={styles.tagDiscount}>专属优惠</div>
+              )}
+
+              <img class={styles.icon} src={iconMemberLogo} />
+              <div class={styles.info}>
+                <h4 class="van-multi-ellipsis--l2">小酷Ai会员</h4>
+                <p>海量曲谱、智能评测,专为器乐学习者量身打造</p>
+              </div>
+            </div>
+          </ColShare>
+        </Popup> */}
+      </div>
+    )
+  }
+})

BIN
src/tenant/music/album-detail/charge_bg.png


BIN
src/tenant/music/album-detail/header-bg.png


BIN
src/tenant/music/album-detail/iStart.png


BIN
src/tenant/music/album-detail/icon-hart-active.png


BIN
src/tenant/music/album-detail/icon-hart.png


BIN
src/tenant/music/album-detail/icon-menu.png


BIN
src/tenant/music/album-detail/icon-pan.png


BIN
src/tenant/music/album-detail/icon-start-active.png


BIN
src/tenant/music/album-detail/icon-start.png


BIN
src/tenant/music/album-detail/icon_music_list.png


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels