62 lines
1.5 KiB
JavaScript
62 lines
1.5 KiB
JavaScript
import fetch from '../fetch.js'
|
|
|
|
export default {
|
|
save(params) {
|
|
return fetch('/library/add', params, 'post', 'json')
|
|
},
|
|
update(params) {
|
|
return fetch('/library/update', params, 'post', 'json')
|
|
},
|
|
remove(params) {
|
|
return fetch('/library/delete', params, 'post', 'json')
|
|
},
|
|
|
|
list(params) {
|
|
return fetch('/library/page', params, 'post', 'json')
|
|
},
|
|
|
|
setImg(params) {
|
|
return fetch('/library/uploadImg', params, 'post', 'json')
|
|
},
|
|
|
|
linkClass(params) {
|
|
return fetch('/library/alterClass', params, 'post', 'json')
|
|
},
|
|
/**
|
|
* 热门
|
|
* @param params
|
|
* @returns {Promise | Promise<unknown>}
|
|
*/
|
|
changeHot(params) {
|
|
return fetch('/library/hot', params, 'post', 'json')
|
|
},
|
|
|
|
inviteList(params) {
|
|
return fetch('/personal/inviteCode/records', params, 'post', 'json')
|
|
},
|
|
|
|
wechat(params) {
|
|
return fetch('/config/qrcode/add', params, 'post', 'json')
|
|
},
|
|
wechatUpdate(params) {
|
|
return fetch('/config/qrcode/update', params, 'post', 'json')
|
|
},
|
|
|
|
wechatList(params) {
|
|
return fetch('/config/qrcode/list', params, 'post', 'json')
|
|
},
|
|
|
|
saveCategory(params) {
|
|
return fetch('/class/add', params, 'post', 'json')
|
|
},
|
|
|
|
updateCategory(params) {
|
|
return fetch('/class/update', params, 'post', 'json')
|
|
},
|
|
|
|
listCategory(params) {
|
|
return fetch('/class/list', params, 'post', 'json')
|
|
}
|
|
|
|
}
|