Browse Source

fix: bug修复

TIANYONG 5 months ago
parent
commit
946ba1ffb0

+ 13 - 6
src/page-instrument/component/the-music-list/list.tsx

@@ -98,25 +98,32 @@ export default defineComponent({
     });
 
     const openAccomapina = async (item: any) => {
-      // 学生端或者老师端需要校验点播和会员曲目
-      if (vipVerify.value) {
+      if (item.id === state.examSongId) return;
+      // 学生端或者老师端需要校验点播和会员曲目;通过专辑进入的,不需要校验点播和会员曲目,默认都可以使用
+      if (vipVerify.value && !state.tenantAlbumId) {
+        // 是否需要校验vip
+        let needCheckVip = true;
         // 如果是点播的曲子,需要弹窗提醒
-        if (item.paymentType === "CHARGE") {
+        if (item.paymentType.includes("CHARGE")) {
           if (loading.value === true) return
           loading.value = true
           // 查询是否购买了
           const { data } = await api_musicIsBuy(item.id)
           loading.value = false
           if (data.buyed === false) {
-            permissionPopup.active = "demand"
+            permissionPopup.active = item.paymentType === "CHARGE" ? "demand" : "memberAndDemand"
             permissionPopup.musicId = item.id
             permissionPopup.musicPrice = item.musicPrice
             permissionPopup.show = true
             return
           }
+          // 已经购买
+          if (data.buyed === true) {
+            needCheckVip = false;
+          }
         }
         // 如果是vip的曲子,当前用户不是会员时,需要弹窗提醒
-        if (state.vipType === "NOT_VIP" && item.paymentType !== "FREE") {
+        if (state.vipType === "NOT_VIP" && item.paymentType !== "FREE" && needCheckVip) {
           permissionPopup.active = item.paymentType.includes('CHARGE') ? "memberAndDemand" : "member"
           permissionPopup.musicId = item.id
           permissionPopup.musicPrice = item.musicPrice
@@ -124,7 +131,7 @@ export default defineComponent({
           return
         }
       }
-      if (item.id === state.examSongId) return;
+      
       // 暂停播放
       togglePlay("paused");
       postMessage({

+ 1 - 1
src/page-instrument/component/vip/permission.tsx

@@ -19,7 +19,7 @@ export const permissionPopup = reactive({
 
 const pageVisibility = usePageVisibility()
 watch(pageVisibility, async (value) => {
-  if (value === "visible") {
+  if (value === "visible" && permissionPopup.show) {
     const res = await studentQueryUserInfo()
     state.vipType = res.data.vipType
     if (permissionPopup.active === 'member' && (state.vipType === 'VIP' || state.vipType.includes('SVIP'))) {

BIN
src/page-instrument/custom-plugins/guide-driver/images/report/r3.png


+ 10 - 4
src/page-instrument/custom-plugins/guide-driver/index.tsx

@@ -1278,12 +1278,15 @@ export const EvaluatingReportDriver = defineComponent({
               title: "",
               description: "",
               popoverClass: "popoverClass popoverClassReport3",
-              align: "start",
+              align: "end",
               side: "bottom",
               nextBtnText: "下一步 (3/4)",
               showButtons: ["next"],
               onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
-                driverInitialPosition(popover, options);
+                try {
+                  const rect = options.state.activeElement?.getBoundingClientRect();
+                  popover.wrapper.style.marginLeft = ((rect?.width || 0) / 2) * -1 + 4 + "px";
+                } catch {}
               },
             },
           },
@@ -1322,13 +1325,16 @@ export const EvaluatingReportDriver = defineComponent({
             title: "",
             description: "",
             popoverClass: "popoverClass popoverClassReport3 popoverClose",
-            align: "start",
+            align: "end",
             side: "bottom",
             prevBtnText: "再看一遍",
             doneBtnText: "完成",
             showButtons: ["next", "previous"],
             onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
-              driverInitialPosition(popover, options);
+              try {
+                const rect = options.state.activeElement?.getBoundingClientRect();
+                popover.wrapper.style.marginLeft = ((rect?.width || 0) / 2) * -1 + 4 + "px";
+              } catch {}
             },
             onPrevClick: () => {
               driverObj.drive(0);

+ 1 - 1
src/page-instrument/custom-plugins/helper-model/screen-model/index.tsx

@@ -16,7 +16,7 @@ export default defineComponent({
 							<iframe src={location.origin + '/student/#/guide'} />
 						</Tab>
 						<Tab name="帮助" title="帮助">
-							<iframe src={location.origin + '/student/#/helpCenter?platformType=ANALYSIS'} />
+							<iframe src={location.origin + '/student/#/helpCenter?platformType=ANALYSIS&hideTitle=1'} />
 						</Tab>
 					</Tabs>
 				</div>

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

@@ -359,7 +359,7 @@
 
 .disabled {
     pointer-events: none;
-    opacity: 0;
+    opacity: 0.5;
 }
 
 .playBtn {

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

@@ -41,8 +41,8 @@ const ModeView = defineAsyncComponent(() =>
 /** 校验是否能切换模式,会员的曲子,酷乐秀跟练模式、评测模式需要svip */
 export const checkMusicBuy = (item: any, type?: string) => {
   let checked = true;
-  // 学生端或者老师端需要校验点播和会员曲目
-  if (state.systemType === "student" || state.systemType === "teacher") {
+  // 学生端或者老师端需要校验点播和会员曲目;通过专辑进入的,不需要校验点播和会员曲目,默认都可以使用
+  if ((state.systemType === "student" || state.systemType === "teacher") && !state.tenantAlbumId) {
     // 如果是点播的曲子,并且还没有购买,需要弹窗提醒
     if (item.paymentType === "CHARGE" && !item.buyed) {
       permissionPopup.active = "demand"
@@ -457,6 +457,8 @@ export default defineComponent({
     });
     /** 模式切换按钮 */
     const toggleBtn = computed(() => {
+      // 乐教通不限
+      if (query["isYjt"] == "1") return { display: false, disabled: false };
       // 老师端,打击乐&节奏练习不显示
       if (state.isPercussion && state.platform === IPlatform.PC) return { display: false, disabled: false };
       if(state.isCombineRender) return { display: false, disabled: false };

+ 1 - 1
vite.config.ts

@@ -52,7 +52,7 @@ export default defineConfig({
     // https: true,
     proxy: {
       "^/instrument/.*": {
-        target: "https://dev.colexiu.com",
+        target: "https://test.colexiu.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/instrument/, ""),
       },