|
@@ -88,30 +88,30 @@ export default defineComponent({
|
|
|
id: users.defaultSubject || ''
|
|
|
}
|
|
|
} else {
|
|
|
- const subjects: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
+ // const subjects: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
// 判断是否已有数据
|
|
|
- if (!subjects.id) {
|
|
|
+ // if (!subjects.id) {
|
|
|
const users = baseState.user.data
|
|
|
- const subjectId = users.subjectId
|
|
|
- ? Number(users.subjectId.split(',')[0])
|
|
|
- : ''
|
|
|
- const subjectName = users.subjectName
|
|
|
- ? users.subjectName.split(',')[0]
|
|
|
- : ''
|
|
|
+ // const subjectId = users.subjectId
|
|
|
+ // ? Number(users.subjectId.split(',')[0])
|
|
|
+ // : ''
|
|
|
+ // const subjectName = users.subjectName
|
|
|
+ // ? users.subjectName.split(',')[0]
|
|
|
+ // : ''
|
|
|
// 存储instrumentId
|
|
|
const userInstrumentId = users.instrumentId
|
|
|
localStorage.setItem('userInstrumentId', userInstrumentId)
|
|
|
- if (subjectId) {
|
|
|
- useSubjectId(
|
|
|
- SubjectEnum.SEARCH,
|
|
|
- JSON.stringify({
|
|
|
- id: subjectId,
|
|
|
- name: subjectName
|
|
|
- }),
|
|
|
- 'set'
|
|
|
- )
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (subjectId) {
|
|
|
+ // useSubjectId(
|
|
|
+ // SubjectEnum.SEARCH,
|
|
|
+ // JSON.stringify({
|
|
|
+ // id: subjectId,
|
|
|
+ // name: subjectName
|
|
|
+ // }),
|
|
|
+ // 'set'
|
|
|
+ // )
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
localStorage.setItem('behaviorId', getRandomKey())
|
|
@@ -129,19 +129,21 @@ export default defineComponent({
|
|
|
if (baseState.platformType === 'TEACHER') {
|
|
|
tempParams.subjectIds = teacherDetaultSubject.value.id
|
|
|
} else {
|
|
|
- const getSubject: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
- tempParams.subjectIds = getSubject.id
|
|
|
+ // const getSubject: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
+ const users = baseState.user.data
|
|
|
+ const subjectId = users.subjectId
|
|
|
+ ? Number(users.subjectId.split(',')[0])
|
|
|
+ : ''
|
|
|
+ tempParams.subjectIds = subjectId
|
|
|
}
|
|
|
|
|
|
const getMusic: any = useSubjectId(SubjectEnum.MUSIC_FREE)
|
|
|
exquisiteFlag.value = getMusic.chargeType
|
|
|
}
|
|
|
- if(onlySearch) {
|
|
|
- const getSubject: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
- tempParams.subjectIds = getSubject.id
|
|
|
- // const getMusic: any = useSubjectId(SubjectEnum.MUSIC_FREE)
|
|
|
- // exquisiteFlag.value = getMusic.chargeType
|
|
|
- }
|
|
|
+ // if(onlySearch) {
|
|
|
+ // const getSubject: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
+ // tempParams.subjectIds = getSubject.id
|
|
|
+ // }
|
|
|
//
|
|
|
const params = reactive({
|
|
|
search: (route.query.search as string) || '',
|
|
@@ -239,49 +241,49 @@ export default defineComponent({
|
|
|
tagVisibility.value = false
|
|
|
}
|
|
|
const onComfirmSubject = item => {
|
|
|
- params.page = 1
|
|
|
- params.subjectIds = item.id
|
|
|
- data.value = null
|
|
|
- subject.instrumentId = item.instrumentId
|
|
|
- localStorage.setItem('userInstrumentId', item.instrumentId || "")
|
|
|
- if (baseState.platformType === 'TEACHER') {
|
|
|
- teacherDetaultSubject.value = {
|
|
|
- name: item.name,
|
|
|
- id: item.id
|
|
|
- }
|
|
|
- setDefaultSubject(item.id)
|
|
|
- } else {
|
|
|
- subject.id = item.id
|
|
|
- subject.name = item.name
|
|
|
- useSubjectId(
|
|
|
- SubjectEnum.SEARCH,
|
|
|
- JSON.stringify({
|
|
|
- id: item.id,
|
|
|
- name: item.name
|
|
|
- }),
|
|
|
- 'set'
|
|
|
- )
|
|
|
- }
|
|
|
+ // params.page = 1
|
|
|
+ // params.subjectIds = item.id
|
|
|
+ // data.value = null
|
|
|
+ // subject.instrumentId = item.instrumentId
|
|
|
+ // localStorage.setItem('userInstrumentId', item.instrumentId || "")
|
|
|
+ // if (baseState.platformType === 'TEACHER') {
|
|
|
+ // teacherDetaultSubject.value = {
|
|
|
+ // name: item.name,
|
|
|
+ // id: item.id
|
|
|
+ // }
|
|
|
+ // setDefaultSubject(item.id)
|
|
|
+ // } else {
|
|
|
+ // subject.id = item.id
|
|
|
+ // subject.name = item.name
|
|
|
+ // useSubjectId(
|
|
|
+ // SubjectEnum.SEARCH,
|
|
|
+ // JSON.stringify({
|
|
|
+ // id: item.id,
|
|
|
+ // name: item.name
|
|
|
+ // }),
|
|
|
+ // 'set'
|
|
|
+ // )
|
|
|
+ // }
|
|
|
|
|
|
- FetchList()
|
|
|
- subject.show = false
|
|
|
+ // FetchList()
|
|
|
+ // subject.show = false
|
|
|
}
|
|
|
|
|
|
- const getSubject: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
+ // const getSubject: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
|
|
|
- // 处理存值的问题 - 重置数量
|
|
|
- let tempInstrumentId = localStorage.getItem('userInstrumentId') || ''
|
|
|
- if(tempInstrumentId === 'undefined') {
|
|
|
- useSubjectId(SubjectEnum.SEARCH, "", "remove")
|
|
|
- tempInstrumentId = ""
|
|
|
- }
|
|
|
+ // // 处理存值的问题 - 重置数量
|
|
|
+ // let tempInstrumentId = localStorage.getItem('userInstrumentId') || ''
|
|
|
+ // if(tempInstrumentId === 'undefined') {
|
|
|
+ // useSubjectId(SubjectEnum.SEARCH, "", "remove")
|
|
|
+ // tempInstrumentId = ""
|
|
|
+ // }
|
|
|
|
|
|
- const subject = reactive({
|
|
|
- show: false,
|
|
|
- name: getSubject.id ? getSubject.name : '全部声部',
|
|
|
- id: getSubject.id || '',
|
|
|
- instrumentId: tempInstrumentId,
|
|
|
- })
|
|
|
+ // const subject = reactive({
|
|
|
+ // show: false,
|
|
|
+ // name: getSubject.id ? getSubject.name : '全部声部',
|
|
|
+ // id: getSubject.id || '',
|
|
|
+ // instrumentId: tempInstrumentId,
|
|
|
+ // })
|
|
|
|
|
|
onMounted(async () => {
|
|
|
try {
|
|
@@ -361,25 +363,25 @@ export default defineComponent({
|
|
|
background="transparent"
|
|
|
inputBackground="transparent"
|
|
|
leftIcon={iconSearch}
|
|
|
- v-slots={{
|
|
|
- left: () => (
|
|
|
- <div
|
|
|
- class={styles.label}
|
|
|
- onClick={() => (subject.show = true)}
|
|
|
- >
|
|
|
- {baseState.platformType === 'TEACHER'
|
|
|
- ? teacherDetaultSubject.value.name
|
|
|
- : subject.name}
|
|
|
+ // v-slots={{
|
|
|
+ // left: () => (
|
|
|
+ // <div
|
|
|
+ // class={styles.label}
|
|
|
+ // onClick={() => (subject.show = true)}
|
|
|
+ // >
|
|
|
+ // {baseState.platformType === 'TEACHER'
|
|
|
+ // ? teacherDetaultSubject.value.name
|
|
|
+ // : subject.name}
|
|
|
|
|
|
- <Icon
|
|
|
- classPrefix="iconfont"
|
|
|
- name="down"
|
|
|
- size={12}
|
|
|
- color="#fff"
|
|
|
- />
|
|
|
- </div>
|
|
|
- )
|
|
|
- }}
|
|
|
+ // <Icon
|
|
|
+ // classPrefix="iconfont"
|
|
|
+ // name="down"
|
|
|
+ // size={12}
|
|
|
+ // color="#fff"
|
|
|
+ // />
|
|
|
+ // </div>
|
|
|
+ // )
|
|
|
+ // }}
|
|
|
/>
|
|
|
<Tabs
|
|
|
shrink
|
|
@@ -407,25 +409,25 @@ export default defineComponent({
|
|
|
inputBackground='white'
|
|
|
// leftIcon={iconSearch}
|
|
|
class={styles.searchGroup}
|
|
|
- v-slots={{
|
|
|
- left: () => (
|
|
|
- <div
|
|
|
- class={[styles.label, styles.searchs]}
|
|
|
- onClick={() => (subject.show = true)}
|
|
|
- >
|
|
|
- {baseState.platformType === 'TEACHER'
|
|
|
- ? teacherDetaultSubject.value.name
|
|
|
- : subject.name}
|
|
|
+ // v-slots={{
|
|
|
+ // left: () => (
|
|
|
+ // <div
|
|
|
+ // class={[styles.label, styles.searchs]}
|
|
|
+ // onClick={() => (subject.show = true)}
|
|
|
+ // >
|
|
|
+ // {baseState.platformType === 'TEACHER'
|
|
|
+ // ? teacherDetaultSubject.value.name
|
|
|
+ // : subject.name}
|
|
|
|
|
|
- <Icon
|
|
|
- classPrefix="iconfont"
|
|
|
- name="down"
|
|
|
- size={12}
|
|
|
- color="#949597"
|
|
|
- />
|
|
|
- </div>
|
|
|
- )
|
|
|
- }}
|
|
|
+ // <Icon
|
|
|
+ // classPrefix="iconfont"
|
|
|
+ // name="down"
|
|
|
+ // size={12}
|
|
|
+ // color="#949597"
|
|
|
+ // />
|
|
|
+ // </div>
|
|
|
+ // )
|
|
|
+ // }}
|
|
|
/></Sticky> : ''}
|
|
|
|
|
|
<div class={[styles.alumnList, onlySearch && styles.alumnListOnly]}>
|
|
@@ -445,14 +447,14 @@ export default defineComponent({
|
|
|
location.origin +
|
|
|
location.pathname +
|
|
|
'#/music-detail?id=' +
|
|
|
- item.id +
|
|
|
- '&instrumentId=' + subject.instrumentId
|
|
|
+ item.id
|
|
|
+ // + '&instrumentId=' + subject.instrumentId
|
|
|
openDefaultWebView(url, () => {
|
|
|
router.push({
|
|
|
path: '/music-detail',
|
|
|
query: {
|
|
|
id: item.id,
|
|
|
- instrumentId: subject.instrumentId
|
|
|
+ // instrumentId: subject.instrumentId
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -492,7 +494,7 @@ export default defineComponent({
|
|
|
</Popup>
|
|
|
|
|
|
{/* 声部弹框 */}
|
|
|
- <Popup
|
|
|
+ {/* <Popup
|
|
|
show={subject.show}
|
|
|
position="bottom"
|
|
|
round
|
|
@@ -510,7 +512,7 @@ export default defineComponent({
|
|
|
}
|
|
|
onComfirm={onComfirmSubject}
|
|
|
/>
|
|
|
- </Popup>
|
|
|
+ </Popup> */}
|
|
|
</>
|
|
|
)
|
|
|
}
|