import { defineComponent } from 'vue'; import { Image } from 'vant'; import styles from './index.module.less'; import OSticky from '@/components/o-sticky'; import OHeader from '@/components/o-header'; export default defineComponent({ name: 'classify-list', data() { return { list: [] as any[], liveConfig: false }; }, mounted() { // localStorage.setItem('behaviorId', getRandomKey()) // this.FetchList() const musicScoreList = sessionStorage.getItem('musicScoreList'); if (musicScoreList) { const tempMusicScoreList = JSON.parse(musicScoreList); this.list = tempMusicScoreList; // 从上面页面获取分类信息 } else { (this as any).$router.replace('/'); } // appState.subjectOptions = [{value: 0, text: '全部声部'}] // appState.subjectId = appState.origanSubjectId; // const parseSearch: any = qs.parse(location.search); // this.liveConfig = !!parseSearch.liveConfig; }, methods: { toDetail(item: any) { (this as any).$router.push({ path: '/music-list/' + item.id, query: { ...this.$route.query } }); }, goBack() { (this as any).$router.push({ path: '/', query: { ...this.$route.query } }); } }, render() { return (
教材
{this.list.map(item => (
this.toDetail(item)}>
{item.name}
))}
); } });