浏览代码

Merge branch 'iteration-20240520' into ktyq-online-1.8.7

lex 1 年之前
父节点
当前提交
fed87273bd

+ 1 - 1
osmd-extended

@@ -1 +1 @@
-Subproject commit 4e2e9dce29b9bf1b8a49f50452e231444512ee0e
+Subproject commit 2d31dab2b737f516adf0077a9e74fed0a7e26e27

二进制
src/page-instrument/component/the-music-list/icon-music-vip.png


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

@@ -49,7 +49,8 @@
             overflow-x: hidden;
             overflow-y: auto;
         }
-        .van-tab--active::after{
+
+        .van-tab--active::after {
             content: '';
             position: absolute;
             bottom: 0;
@@ -60,7 +61,8 @@
             background: var(--van-tabs-bottom-bar-color);
             border-radius: var(--van-tabs-bottom-bar-height);
         }
-        .van-tabs__line{
+
+        .van-tabs__line {
             transition-duration: 0s !important;
             display: none;
         }
@@ -74,21 +76,59 @@
 .item {
     display: flex;
     align-items: center;
-    height: 41px;
-    border-radius: 7px;
+    // height: 41px;
+    // border-radius: 7px;
     font-size: 13px;
     font-family: PingFangSC-Regular, PingFang SC;
     font-weight: 400;
     color: #333333;
     line-height: 18px;
-    padding: 0 14px;
-    margin: 10px 0;
+    padding: 12px 12px;
+    // margin: 10px 0;
+
+    .titleImg {
+        width: 51px;
+        height: 51px;
+        margin-right: 10px;
+        border-radius: 9px !important;
+        overflow: hidden;
+        position: relative;
+        flex-shrink: 0;
+    }
+
+    .iconType {
+        position: absolute;
+        width: 28px;
+        height: 14px;
+        right: 0;
+        top: 0;
+        z-index: 9;
+        border-top-right-radius: 8px !important;
+
+        // &.FREE {
+        //   background: url('../co-ai/image/icon-music-default.png') no-repeat center;
+        //   background-size: contain;
+        // }
+
+        &.VIP {
+            background: url('./icon-music-vip.png') no-repeat center;
+            background-size: contain;
+        }
+    }
+
+    .author {
+        padding-top: 8px;
+        font-size: 13px;
+        color: #777777;
+        line-height: 1;
+    }
 }
 
 .itemActive {
     background: #ECF9FF;
 }
-.noData{
+
+.noData {
     display: flex;
     justify-content: center;
     align-items: center;

+ 98 - 94
src/page-instrument/component/the-music-list/list.tsx

@@ -2,104 +2,108 @@ import { defineComponent, onMounted, reactive, watch } from "vue";
 import styles from "./index.module.less";
 import { api_musicSheetPage } from "../../api";
 import state, { togglePlay } from "/src/state";
-import { List } from "vant";
+import { List, Image } from "vant";
 import { postMessage } from "/src/utils/native-message";
 import qs from "query-string";
 
 export default defineComponent({
-	name: "TheMusicList-list",
-	props: {
-		recentFlag: {
-			type: Boolean,
-			default: false,
-		},
-	},
-	setup(props) {
-		const forms = reactive({
-			page: 1,
-			rows: 20,
-			musicSheetCategoriesId: state.bizMusicCategoryId,
-			recentFlag: props.recentFlag ? true : null,
-			excludeMusicId: props.recentFlag ? null : state.examSongId,
-		});
-		const data = reactive({
-			list: [] as any[],
-			finished: false,
-			loading: false,
-			hasNext: true,
-		});
-		const getList = async () => {
-			if (!data.hasNext) return
-			data.loading = true;
-			try {
-				const res = await api_musicSheetPage({
-					...forms,
-				});
-				if (res?.code === 200 && Array.isArray(res.data?.rows)) {
-					data.list = [...data.list, ...res.data.rows];
-				}
-				data.finished = res.data?.rows?.length < forms.rows;
-				data.hasNext = res.data?.total > data.list.length
-			} catch (error) {
-				console.log(error);
-			}
+  name: "TheMusicList-list",
+  props: {
+    recentFlag: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  setup(props) {
+    const forms = reactive({
+      page: 1,
+      rows: 20,
+      musicSheetCategoriesId: state.bizMusicCategoryId,
+      recentFlag: props.recentFlag ? true : null,
+      excludeMusicId: props.recentFlag ? null : state.examSongId,
+    });
+    const data = reactive({
+      list: [] as any[],
+      finished: false,
+      loading: false,
+      hasNext: true,
+    });
+    const getList = async () => {
+      if (!data.hasNext) return;
+      data.loading = true;
+      try {
+        const res = await api_musicSheetPage({
+          ...forms,
+        });
+        if (res?.code === 200 && Array.isArray(res.data?.rows)) {
+          data.list = [...data.list, ...res.data.rows];
+        }
+        data.finished = res.data?.rows?.length < forms.rows;
+        data.hasNext = res.data?.total > data.list.length;
+      } catch (error) {
+        console.log(error);
+      }
 
-			data.loading = false;
-		};
-		watch(
-			() => props.recentFlag,
-			() => {
-				data.hasNext = true
-			}
-		);
-		onMounted(() => {
-			getList();
-		});
+      data.loading = false;
+    };
+    watch(
+      () => props.recentFlag,
+      () => {
+        data.hasNext = true;
+      }
+    );
+    onMounted(() => {
+      getList();
+    });
 
-		const openAccomapina = (item: any) => {
-			if (item.id === state.examSongId) return;
-			// 暂停播放
-			togglePlay("paused");
-			postMessage({
-				api: "cloudLoading",
-				content: {
-					show: true,
-					type: "fullscreen",
-				},
-			});
-			location.href =
-				location.origin +
-				location.pathname +
-				"?" +
-				qs.stringify({
-					id: item.id,
-					_t: Date.now(),
-				});
-		};
-		return () => (
-			<div class={styles.wrap}>
-				<List
-					loading={data.loading}
-					finished={data.finished}
-					immediateCheck={false}
-					onLoad={() => {
-						forms.page++;
-						getList();
-					}}
-				>
-					{data.list.map((item: any) => {
-						return (
-							<div
-								class={[styles.item, state.examSongId == item.id && styles.itemActive]}
-								onClick={() => openAccomapina(item)}
-							>
-								{item.musicSheetName}
-							</div>
-						);
-					})}
-					{!data.loading && data.list.length === 0 && <div class={styles.noData}>暂无数据</div>}
-				</List>
-			</div>
-		);
-	},
+    const openAccomapina = (item: any) => {
+      if (item.id === state.examSongId) return;
+      // 暂停播放
+      togglePlay("paused");
+      postMessage({
+        api: "cloudLoading",
+        content: {
+          show: true,
+          type: "fullscreen",
+        },
+      });
+      location.href =
+        location.origin +
+        location.pathname +
+        "?" +
+        qs.stringify({
+          id: item.id,
+          _t: Date.now(),
+        });
+    };
+    return () => (
+      <div class={styles.wrap}>
+        <List
+          loading={data.loading}
+          finished={data.finished}
+          immediateCheck={false}
+          onLoad={() => {
+            forms.page++;
+            getList();
+          }}
+        >
+          {data.list.map((item: any) => {
+            return (
+              <div class={[styles.item, state.examSongId == item.id && styles.itemActive]} onClick={() => openAccomapina(item)}>
+                <div class={styles.titleImg}>
+                  <i class={[styles.iconType, styles[item.paymentType]]}></i>
+                  <Image src={item.titleImg} class={styles.img} />
+                </div>
+                <div class={styles.content}>
+                  <p class={styles.name}>{item.musicSheetName}</p>
+                  {item.composer && <p class={styles.author}>{item.composer}</p>}
+                </div>
+              </div>
+            );
+          })}
+          {!data.loading && data.list.length === 0 && <div class={styles.noData}>暂无数据</div>}
+        </List>
+      </div>
+    );
+  },
 });

+ 43 - 11
src/page-instrument/view-evaluat-report/component/share-top/index.module.less

@@ -27,13 +27,16 @@
         height: 24px;
     }
 }
-.disabled{
+
+.disabled {
     //opacity: 0;
     pointer-events: none;
 }
+
 .left {
     display: flex;
     align-items: center;
+
     .leftContent {
         .lcName {
             font-size: 18px;
@@ -42,12 +45,14 @@
             line-height: 25px;
             margin-bottom: 2px;
             padding: 0 !important;
-            :global{
-                .van-notice-bar{
+
+            :global {
+                .van-notice-bar {
                     padding: 0 !important;
                 }
-              }
+            }
         }
+
         .lcScore {
             font-size: 12px;
             color: #777777;
@@ -91,6 +96,7 @@
         &>div:first-child {
             color: var(--van-primary-color) !important;
         }
+
         &>div:last-child {
             background-color: #ECF9FF;
             color: var(--van-primary-color);
@@ -106,7 +112,8 @@
     position: absolute;
     left: 50%;
     top: 50%;
-    transform: translate(-50%,-50%);
+    transform: translate(-50%, -50%);
+
     .cItem {
         width: 64px;
         height: 50px;
@@ -117,21 +124,26 @@
         padding: 4px 0;
         margin: 0 6px;
         cursor: pointer;
+
         .mScore {
             font-size: 16px;
             line-height: 22px;
             color: #AAAAAA;
         }
+
         .mLabel {
             font-size: 12px;
             line-height: 18px;
             color: #AAAAAA;
         }
     }
+
     .active {
         background: #CBEEFF;
         border-radius: 8px;
-        .mScore, .mLabel {
+
+        .mScore,
+        .mLabel {
             color: #000000;
             font-weight: 600;
         }
@@ -153,6 +165,7 @@
         font-weight: 400;
         padding: 0 10px;
         color: #999;
+        cursor: pointer;
 
         .iconBtn {
             display: block;
@@ -225,7 +238,7 @@
     padding: 0 16px;
     height: 30px;
     border-radius: 18px;
-    background-color: rgba(255,255,255, .9);
+    background-color: rgba(255, 255, 255, .9);
     z-index: 1;
     box-sizing: content-box;
 
@@ -233,14 +246,17 @@
         display: flex;
         align-items: center;
         margin-right: 16px;
+
         &:last-child {
             margin-right: 0;
         }
+
         &>span {
             margin-left: 4px;
         }
     }
 }
+
 .shiyiClose {
     width: 30px;
     height: 30px;
@@ -249,13 +265,15 @@
     top: -26px;
     cursor: pointer;
 }
-.shiyiPopup{
+
+.shiyiPopup {
     background: #fff;
     border-radius: 20px;
     width: 80vw;
     max-width: 460px;
     padding: 20px;
     position: relative;
+
     .shiyiTop {
         position: absolute;
         width: 154px;
@@ -264,63 +282,77 @@
         transform: translateX(-50%);
     }
 }
-.shiyiTitle{
+
+.shiyiTitle {
     font-size: 16px;
     color: #333;
     font-weight: 400;
     text-align: center;
 }
+
 .items {
     display: flex;
     flex-wrap: wrap;
     margin-top: 16px;
-    .item{
+
+    .item {
         width: 50%;
         display: flex;
         align-items: center;
         padding: 12px 0 12px 6px;
-        span{
+
+        span {
             margin-left: 12px;
             font-size: 12px;
             font-weight: 400;
         }
+
         svg {
             visibility: visible;
         }
+
         &:nth-child(2n) {
             transform: translateX(20px);
         }
     }
+
     .itemTone {
         width: 50%;
         display: flex;
         align-items: center;
         padding: 16px 0 16px 26px;
         position: relative;
+
         &:nth-child(2n) {
             transform: translateX(20px);
         }
+
         .firstIcon1 {
             width: 12px;
             height: 20px;
         }
+
         .firstIcon2 {
             width: 19px;
             height: 13px;
         }
+
         .firstIcon3 {
             width: 12px;
             height: 13px;
         }
+
         img {
             position: absolute;
             left: 0;
             top: 50%;
             transform: translateY(-50%);
         }
+
         .fiz {
             left: -5px;
         }
+
         span {
             font-size: 12px;
             font-weight: 400;

+ 2 - 2
vite.config.ts

@@ -78,8 +78,8 @@ export default defineConfig({
         // target: "https://kt.colexiu.com",
         // target: "https://test.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
         // target: "https://dev.resource.colexiu.com",
-        // target: "https://test.kt.colexiu.com",
-        target: "https://mec.colexiu.com",
+        target: "https://test.kt.colexiu.com",
+        // target: "https://mec.colexiu.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/instrument/, ""),
       },