|
@@ -331,9 +331,17 @@ export default defineComponent({
|
|
|
* private String providerType;
|
|
|
* 表示收藏的是机构曲目,还是平台曲目,
|
|
|
*/
|
|
|
- const apiUrl = state.projectType === 'tenant' ? `/music/sheet/favorite/${musicDetail.value?.id}?providerType={}` : `/music/sheet/favorite/${musicDetail.value?.id}`
|
|
|
+ let apiUrl = '', providerType = ''
|
|
|
+ if (browser().isTeacher) {
|
|
|
+ providerType = state.projectType === 'tenant' ? 'TENANT' : 'PLATFORM'
|
|
|
+ }
|
|
|
+ apiUrl = `/music/sheet/favorite/${musicDetail.value?.id}`
|
|
|
try {
|
|
|
await request.post(apiUrl, {
|
|
|
+ requestType: 'form',
|
|
|
+ data: {
|
|
|
+ providerType
|
|
|
+ },
|
|
|
prefix:
|
|
|
state.platformType === 'TEACHER' ? '/api-teacher' : '/api-student'
|
|
|
})
|