Merge pull request #22 from amplest/main

fix: get请求无法接收参数
This commit is contained in:
Ronnie Zhang 2022-08-12 22:59:43 +08:00 committed by GitHub
commit 3e54a82abb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
import request from '@/utils/http'
export default {
getPosts: (params = {}) => request.get('posts', params),
getPosts: (params = {}) => request.get('posts', { params }),
getPostById: (id) => request.get(`/post/${id}`),
savePost: (id, data = {}) => {
if (id) {