瀏覽代碼

Merge branch 'hqyDev' of http://git.dayaedu.com/lex/h5-colexiu

黄琪勇 1 年之前
父節點
當前提交
9ab8823050

+ 1 - 0
src/tenant/music/courseList/index.tsx

@@ -504,6 +504,7 @@ export default defineComponent({
           {data.detail.id && !data.detail.play && (
             <div class={styles.footers}>
               <Button
+                disabled={route.query.buyStatus === '1'}
                 round
                 block
                 type="primary"

+ 9 - 2
src/tenant/music/music-detail/new-index.tsx

@@ -414,7 +414,10 @@ export default defineComponent({
       }
     }
     onMounted(async () => {
-      postMessage({ api: 'setStatusBarTextColor', content: { statusBarTextColor: true } })
+      postMessage({
+        api: 'setStatusBarTextColor',
+        content: { statusBarTextColor: true }
+      })
       await FetchList()
       const { height } = useRect(headers as any)
       const footer = useRect(footers as any)
@@ -428,7 +431,10 @@ export default defineComponent({
       window.addEventListener('message', showLoading)
     })
     onUnmounted(() => {
-      postMessage({ api: 'setStatusBarTextColor', content: { statusBarTextColor: false } })
+      postMessage({
+        api: 'setStatusBarTextColor',
+        content: { statusBarTextColor: false }
+      })
       window.removeEventListener('message', showLoading)
     })
     const toggleFavorite = async () => {
@@ -1126,6 +1132,7 @@ export default defineComponent({
                   </Button>
                 ) : buyState.value.hasTenantAlbum && !buyState.value.play ? (
                   <Button
+                    disabled={route.query.buyStatus === '1'}
                     round
                     block
                     type="primary"

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

@@ -577,7 +577,8 @@ export default defineComponent({
                               query: {
                                 id: row.id,
                                 albumId: state.details.id,
-                                taId: state.details.tenantGroupAlbumId // 当通过我的曲目进来的时候 这个值为空
+                                taId: state.details.tenantGroupAlbumId, // 当通过我的曲目进来的时候 这个值为空
+                                buyStatus: state.hasBuyStatus ? '0' : '1' //默认能购买
                               }
                             })
                           }}
@@ -602,7 +603,8 @@ export default defineComponent({
                               query: {
                                 id: item.id,
                                 tenantAlbumId: item.tenantAlbumId,
-                                taId: state.details.tenantGroupAlbumId // 当通过我的曲目进来的时候 这个值为空
+                                taId: state.details.tenantGroupAlbumId, // 当通过我的曲目进来的时候 这个值为空
+                                buyStatus: state.hasBuyStatus ? '0' : '1' //默认能购买
                               }
                             })
                           }}