更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -1,8 +1,5 @@
|
||||
import { request } from '@/api/request.js'
|
||||
|
||||
/**
|
||||
* 获取笔记列表
|
||||
*/
|
||||
export async function fetchNotes(params = {}) {
|
||||
const data = await request({
|
||||
url: '/api/notebook/list',
|
||||
@@ -19,9 +16,6 @@ export async function fetchNotes(params = {}) {
|
||||
return { list, total: data.total || 0 }
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单条笔记
|
||||
*/
|
||||
export async function getNote(id) {
|
||||
const data = await request({ url: `/api/notebook/${id}` })
|
||||
if (!data) return null
|
||||
@@ -33,9 +27,6 @@ export async function getNote(id) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建笔记
|
||||
*/
|
||||
export async function createNote(data) {
|
||||
const res = await request({
|
||||
url: '/api/notebook',
|
||||
@@ -49,9 +40,6 @@ export async function createNote(data) {
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新笔记
|
||||
*/
|
||||
export async function updateNote(id, data) {
|
||||
const res = await request({
|
||||
url: `/api/notebook/${id}`,
|
||||
@@ -65,17 +53,11 @@ export async function updateNote(id, data) {
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除笔记
|
||||
*/
|
||||
export async function deleteNote(id) {
|
||||
await request({ url: `/api/notebook/${id}`, method: 'DELETE' })
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换置顶
|
||||
*/
|
||||
export async function toggleNotePin(id) {
|
||||
const res = await request({
|
||||
url: `/api/notebook/${id}/togglePin`,
|
||||
|
||||
Reference in new issue
Block a user