Browse Source

Merge remote-tracking branch 'origin/hqyDev' into feature-tianyong

TIANYONG 8 months ago
parent
commit
47bb98bf23

+ 2 - 1
src/page-instrument/api.ts

@@ -51,7 +51,8 @@ export const studentQueryUserInfo = async () => {
         clientType:"STUDENT",
         id:data.id,
         vipMember: true, // 管乐迷 会员现在在外面判断的 所以这里默认不开启会员验证
-        gender:""
+        gender:"",
+        membershipEndTime: data.membershipEndTime
       }
       return res
     }

+ 2 - 2
src/page-instrument/component/the-music-list/index.module.less

@@ -165,7 +165,7 @@
         flex-grow: 1;
         overflow: hidden;
         .name{
-            line-height: 17px;
+            line-height: 20px;
             font-weight: 600;
             font-size: 16px;
             color: #333333;
@@ -176,7 +176,7 @@
         .detail{
             display: flex;
             align-items: center;
-            margin-top: 8px;
+            margin-top: 6px;
             height: 14px;
             .usedNum{
                 display: flex;

+ 2 - 1
src/page-instrument/component/the-music-list/index.tsx

@@ -6,7 +6,7 @@ import { followData } from "/src/view/follow-practice";
 import state, {IPlatform} from "/src/state";
 import { evaluatingData } from "/src/view/evaluating";
 import { getQuery } from "/src/utils/queryString";
-
+import Vip from "../vip"
 const query: any = getQuery();
 export const isMusicList = computed(()=>{
 	return !(query.workRecord || query.modelType || state.platform === IPlatform.PC || query.isCbs)
@@ -17,6 +17,7 @@ export default defineComponent({
 	setup() {
 		return () => (
 			<>
+				<Vip></Vip>
 				<Popup class={styles.popup} position="left" v-model:show={musicListShow.value} round overlay-style={{background:'rgba(0, 0, 0, 0.7)'}}>
 					<div class={[styles.tabs]}>
 						<Tabs>

+ 11 - 0
src/page-instrument/component/the-music-list/list.tsx

@@ -9,6 +9,9 @@ import searImg from "./imgs/searImg.png"
 import huoimg from "./imgs/huo.png"
 import emptyImg from "./imgs/empty.png"
 import { getQuery } from "/src/utils/queryString";
+import dayjs from "dayjs";
+import { storeData } from "/src/store"
+import { vipShow } from "../vip"
 
 export default defineComponent({
   name: "TheMusicList-list",
@@ -74,6 +77,14 @@ export default defineComponent({
     });
 
     const openAccomapina = (item: any) => {
+      if(item.paymentType === "VIP" && state.systemType === "student" && !dayjs().isBefore(dayjs(storeData.user?.membershipEndTime))){
+        vipShow.value = true
+        return
+      }
+      if(item.paymentType === "VIP" && state.systemType === "web" && state.isSchool){
+        vipShow.value = true
+        return
+      }
       if (item.id === state.examSongId) return;
       // 暂停播放
       togglePlay("paused");

+ 27 - 0
src/page-instrument/component/vip/index.module.less

@@ -0,0 +1,27 @@
+.vip{
+  padding: 20px 30px;
+  padding-top: 30px;
+  min-width: 230px;
+  >img{
+    width: 161px;
+    margin: 0 auto 20px;
+    display: block;
+  }
+  >p{
+    margin: 0;
+    font-size: 14px;
+    color: #808080;
+    margin: 0 auto 20px;
+    text-align: center;
+  }
+  .btn{
+    font-size: 16px;
+    height: 40px;
+    line-height: 40px;
+    width: 100%;
+  }
+  &+i{
+    right: 10px;
+    top: 10px;
+  }
+}

+ 39 - 0
src/page-instrument/component/vip/index.tsx

@@ -0,0 +1,39 @@
+import { defineComponent, ref } from "vue";
+import { Button, Popup } from "vant";
+import state from "/src/state";
+import TipsIcon from "./tips.png";
+import styles from "./index.module.less";
+
+export const vipShow = ref(false)
+export default defineComponent({
+  name: "vip-popup",
+  data() {
+    return {
+      content: "您尚未开通云练习服务,请联系乐团老师开通",
+    };
+  },
+  methods: {
+    open() {
+      vipShow.value = false;
+    },
+    getContent() {
+      if (state.isSchool) {
+        this.content = "VIP曲目暂不可用";
+      }
+      return this.content;
+    },
+  },
+  render() {
+    return (
+      <Popup show={vipShow.value} get-container="body" closeable onClickCloseIcon={() => (vipShow.value = false)} round>
+        <div class={styles.vip}>
+          <img src={TipsIcon} />
+          <p>{this.getContent()}</p>
+          <Button class={styles.btn} onClick={this.open} round color="#01C1B5">
+            确定
+          </Button>
+        </div>
+      </Popup>
+    );
+  },
+});

BIN
src/page-instrument/component/vip/tips.png


+ 8 - 8
src/page-instrument/custom-plugins/ExerciseStatistics/index.module.less

@@ -1,6 +1,6 @@
 .exerciseStatistics {
     position: fixed;
-    left: 12px;
+    left: 17px;
     bottom: 28px;
     box-sizing: border-box;
     z-index: 110;
@@ -21,8 +21,8 @@
     .icon {
         position: relative;
         display: block;
-        width: 32px;
-        height: 32px;
+        width: 37px;
+        height: 37px;
         transition: all var(--animation-time);
         // box-shadow: 0px 2px 4px 0px rgba(2,91,86,0.63);
         filter: drop-shadow(0px 2px 4px rgba(2, 91, 86, 0.4));
@@ -31,14 +31,14 @@
     .btnTietle {
         position: absolute;
         left: -20%;
-        bottom: -25%;
+        bottom: -22%;
         background: linear-gradient(180deg, #FF9941 0%, #FFC174 100%);
         border-radius: 6px;
         box-shadow: 0px 2px 4px 0px rgba(2, 91, 86, 0.4);
-        font-size: 9px;
+        font-size: 11px;
         white-space: nowrap;
         padding: 0 4px;
-        line-height: 12px;
+        line-height: 16px;
         transition: all var(--animation-time);
         transform-origin: center center;
     }
@@ -53,8 +53,8 @@
         padding: 3px;
         background: rgba(0, 73, 68, .4);
         .icon {
-            width: 22px;
-            height: 22px;
+            width: 26px;
+            height: 26px;
             filter:none;
         }
         .btnTietle{

+ 1 - 1
src/page-instrument/evaluat-model/earphone/index.module.less

@@ -20,7 +20,7 @@
     .earphoneBtn {
         position: absolute;
         left: 50%;
-        bottom: 24px;
+        bottom: 28px;
         width: 133px;
         height: 39px;
         transform: translateX(-50%);

+ 1 - 1
src/page-instrument/evaluat-model/index.module.less

@@ -151,7 +151,7 @@
     .earphoneBtn {
         position: absolute;
         left: 50%;
-        bottom: 24px;
+        bottom: 28px;
         width: 133px;
         height: 39px;
         transform: translateX(-50%);

+ 1 - 1
src/page-instrument/follow-model/microphone/index.module.less

@@ -66,7 +66,7 @@
     .earphoneBtn {
         position: absolute;
         left: 50%;
-        bottom: 26px;
+        bottom: 28px;
         transform: translateX(-50%);
         display: flex;
         .earBtn{

+ 5 - 1
src/page-instrument/header-top/index.module.less

@@ -89,6 +89,10 @@
     left: 30px;
     display: flex;
     align-items: center;
+    transition: all 0.3s;
+    &.headTopLeftHide{
+        margin-top: -54px;
+    }
 
     .img {
         width: 32px;
@@ -328,7 +332,7 @@
         left: 50%;
         top: 50%;
         transform: translate(-50%, -50%);
-        width: 38px;
+        width: 36px; // 宽给小一点,底部不会切边
         height: 38px;
     }
 }

+ 2 - 2
src/page-instrument/header-top/index.tsx

@@ -668,8 +668,8 @@ export default defineComponent({
           }}
         >
           {/* 返回和标题 */}
-          {!(state.playState == "play" || followData.start || evaluatingData.startBegin) &&  (
-            <div id="noticeBarRollDom" class={styles.headTopLeftBox}>
+          {!(followData.start || evaluatingData.startBegin) &&  (
+            <div id="noticeBarRollDom" class={[styles.headTopLeftBox, state.playState == "play" && styles.headTopLeftHide]}>
               {
                 !query.isMove && !query.isHideBack && <img src={iconBack} class={["headTopBackBtn", styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
               }

+ 1 - 1
src/page-instrument/header-top/speed/index.module.less

@@ -1,7 +1,7 @@
 .speedContainer{
     width: 334px;
     &.isHideBeat .content{
-        height: 190px;
+        height: 172px;
     }
     .head{
         height: 42px;

+ 12 - 29
src/view/plugins/toggleMusicSheet/choosePartName/index.module.less

@@ -28,16 +28,23 @@
     padding: 36px 20px 12px 20px;
     .pickerBox{
       width: 100%;
-      height: calc(100% - 40px);
+      height: calc(100% - 52px);
+      margin-bottom: 12px;
       display: flex;
       flex-direction: column;
-      overflow: hidden;
+      overflow-y: auto;
+      &::-webkit-scrollbar {
+          width: 0;
+          display: none;
+      }
       .titCon{
         display: flex;
         align-items: center;
-        margin-top: 10px;
-        &:first-child{
-          margin-top: 0;
+        padding: 10px 0;
+        &.stickyTit{
+          position: sticky;
+          top: 0;
+          background-color: #fff;
         }
         .tit{
           font-weight: 600;
@@ -54,30 +61,6 @@
         }
       }
       .content{
-        margin-top: 10px;
-        &.sheetCon{
-          flex-grow: 1;
-          overflow: hidden;
-          position: relative;
-          /* 解决iphonex 不能滚动 */
-          .boxCon{
-            position: absolute;
-            left: 0;
-            top: 0;
-            bottom: 0;
-            right: 0;
-            overflow: hidden;
-          }
-          .con{
-            width: 100%;
-            height: calc(100% - 4px);
-            overflow-y: auto;
-            &::-webkit-scrollbar {
-                width: 0;
-                display: none;
-            }
-          }
-        }
         .selBtn{
           width: 100%;
           height: 34px;

+ 7 - 11
src/view/plugins/toggleMusicSheet/choosePartName/index.tsx

@@ -84,23 +84,19 @@ export default defineComponent({
                   </div>
                 </>
             }
-            <div class={styles.titCon}>
+            <div class={[styles.titCon, styles.stickyTit]}>
               <div class={styles.tit}>选择声部</div>
               {
                 state.modeType === 'practise' && 
                 <div class={styles.tips}>(最多可选4个)</div>
               }
             </div>
-            <div class={[styles.content, styles.sheetCon]}>
-              <div class={styles.boxCon}>
-                <div class={styles.con}>
-                  {
-                    props.partListNames.map((item: any)=>{
-                      return <div class={[styles.selBtn,selValues.value.includes(item.value) && styles.active]} onClick={()=>{hanldeSelSheet(item.value)}}>{item.text}</div>
-                    })
-                  }
-                </div>
-              </div>
+            <div class={[styles.content]}>
+              {
+                props.partListNames.map((item: any)=>{
+                  return <div class={[styles.selBtn,selValues.value.includes(item.value) && styles.active]} onClick={()=>{hanldeSelSheet(item.value)}}>{item.text}</div>
+                })
+              }
             </div>
           </div>
           <div class={styles.btnCon}>