|
@@ -18,85 +18,91 @@ export default class CourseDetails {
|
|
|
// pageNo: '',
|
|
|
// pageSize: ''
|
|
|
// }).get();
|
|
|
- // return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts?columnId=${columnId}`, {
|
|
|
- // method: "get"
|
|
|
- // })
|
|
|
- return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts?columnId=${columnId}`,{
|
|
|
- method:"GET",
|
|
|
- headers:{
|
|
|
- "Accept": "application/json",
|
|
|
- "Content-Type": "application/json",
|
|
|
- "uid": ""
|
|
|
- }
|
|
|
+ return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts?columnId=${columnId}`, {
|
|
|
+ method: "get",
|
|
|
})
|
|
|
- .then((response)=>response.json())
|
|
|
+ // return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts?columnId=${columnId}`,{
|
|
|
+ // method:"GET",
|
|
|
+ // headers:{
|
|
|
+ // "Accept": "application/json",
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // "uid": "c2e13090a563447c8744a8c03171d1db"
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .then((response)=>response.json())
|
|
|
}
|
|
|
// 收藏
|
|
|
static setFavorites(data) {
|
|
|
- // return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites`, {
|
|
|
- // method:"post",
|
|
|
- // body: data,
|
|
|
- // })
|
|
|
- return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites`,{
|
|
|
- method:"POST",
|
|
|
- headers:{
|
|
|
- "Accept": "application/json",
|
|
|
- "Content-Type": "application/json",
|
|
|
- "uid": ""
|
|
|
- },
|
|
|
- body: JSON.stringify(data),
|
|
|
+ return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites`, {
|
|
|
+ method:"post",
|
|
|
+ body: data,
|
|
|
})
|
|
|
- .then((response)=>response.json())
|
|
|
+ // return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites`,{
|
|
|
+ // method:"POST",
|
|
|
+ // headers:{
|
|
|
+ // "Accept": "application/json",
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // "uid": "c2e13090a563447c8744a8c03171d1db"
|
|
|
+ // },
|
|
|
+ // body: JSON.stringify(data),
|
|
|
+ // })
|
|
|
+ // .then((response)=>response.json())
|
|
|
}
|
|
|
// 获取是否收藏
|
|
|
static getisFavorites(data) {
|
|
|
- // return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites/isFavorites`, {
|
|
|
- // method:"post",
|
|
|
- // body: data,
|
|
|
- // })
|
|
|
- return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites/isFavorites`,{
|
|
|
- method:"POST",
|
|
|
- headers:{
|
|
|
- "Accept": "application/json",
|
|
|
- "Content-Type": "application/json",
|
|
|
- "uid": ""
|
|
|
- },
|
|
|
- body: JSON.stringify(data),
|
|
|
+ return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites/isFavorites`, {
|
|
|
+ method:"post",
|
|
|
+ body: data,
|
|
|
})
|
|
|
- .then((response)=>response.json())
|
|
|
+ // return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/favorites/isFavorites`,{
|
|
|
+ // method:"POST",
|
|
|
+ // headers:{
|
|
|
+ // "Accept": "application/json",
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // "uid": "c2e13090a563447c8744a8c03171d1db"
|
|
|
+ // },
|
|
|
+ // body: JSON.stringify(data),
|
|
|
+ // })
|
|
|
+ // .then((response)=>response.json())
|
|
|
}
|
|
|
// 写评论
|
|
|
static addCommentList(data) {
|
|
|
- // return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts`, {
|
|
|
- // method:"post",
|
|
|
- // body: data,
|
|
|
- // })
|
|
|
- return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts`,{
|
|
|
- method:"POST",
|
|
|
- headers:{
|
|
|
- "Accept": "application/json",
|
|
|
- "Content-Type": "application/json",
|
|
|
- "uid": ""
|
|
|
- },
|
|
|
- body: JSON.stringify(data),
|
|
|
+ return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts`, {
|
|
|
+ method:"post",
|
|
|
+ body: data,
|
|
|
})
|
|
|
- .then((response)=>response.json())
|
|
|
+ // return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts`,{
|
|
|
+ // method:"POST",
|
|
|
+ // headers:{
|
|
|
+ // "Accept": "application/json",
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // "uid": "c2e13090a563447c8744a8c03171d1db"
|
|
|
+ // },
|
|
|
+ // body: JSON.stringify(data),
|
|
|
+ // })
|
|
|
+ // .then((response)=>response.json())
|
|
|
}
|
|
|
- // 输入评论
|
|
|
+ // 输入回复
|
|
|
static addReplyList(data) {
|
|
|
- // return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts/reply`, {
|
|
|
- // method:"post",
|
|
|
- // body: data,
|
|
|
+ return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts/reply`, {
|
|
|
+ method:"post",
|
|
|
+ body: data,
|
|
|
+ })
|
|
|
+ // return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts/reply`,{
|
|
|
+ // method:"POST",
|
|
|
+ // headers:{
|
|
|
+ // "Accept": "application/json",
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // "uid": "c2e13090a563447c8744a8c03171d1db"
|
|
|
+ // },
|
|
|
+ // body: JSON.stringify(data),
|
|
|
// })
|
|
|
- return fetch(`http://ott80test-base.yifangjiaoyu.cn/mobile/posts/reply`,{
|
|
|
- method:"POST",
|
|
|
- headers:{
|
|
|
- "Accept": "application/json",
|
|
|
- "Content-Type": "application/json",
|
|
|
- "uid": ""
|
|
|
- },
|
|
|
- body: JSON.stringify(data),
|
|
|
+ // .then((response)=>response.json())
|
|
|
+ }
|
|
|
+ static playLog(data) {
|
|
|
+ return request(`http://ott80test-base.yifangjiaoyu.cn/mobile/playLog`, {
|
|
|
+ method:"post",
|
|
|
+ body: data,
|
|
|
})
|
|
|
- .then((response)=>response.json())
|
|
|
}
|
|
|
}
|