/**
 * 笔记相关接口
 */

import request from '@/utils/request'
const baseUrl = '/v1/api'

export const getBookList = params => {
    return request({
        url: baseUrl + '/doc/bookmark/mine',
        method: 'get',
        params
    })
}
// 根据文章获取笔记
export const getBookMark = params => {
    return request({
        url: baseUrl + '/doc/bookmark',
        method: 'get',
        params
    })
}

export const getBookMarkByTag = params => {
    return request({
        url: baseUrl + '/doc/bookmark/tag',
        method: 'get',
        params
    })
}

export const removeMark = data => {
    return request({
        url: baseUrl + '/doc/bookmark/delete',
        method: 'post',
        data
    })
}

export const pdfRemoveMark = data => {
    return request({
        url: baseUrl + '/doc/bookmark/pdf/delete',
        method: 'post',
        data
    })
}
export const addOrUpdate = data => {
    return request({
        url: baseUrl + '/doc/bookmark/addOrUpdate',
        method: 'post',
        data
    })
}

export const pdfAddOrUpdate = data => {
    return request({
        url: baseUrl + '/doc/bookmark/pdf/addOrUpdate',
        method: 'post',
        data
    })
}