- 传递参数时,用集合方式传递
- 例:
const params = reactive({ channelId: '', searchKey: 'title,createdBy,product,field,label', searchValue: '', page: 0, size: 10, status: '', // 内容状态 source: '', // 内容来源 sort: ['status,asc', 'publishDate,desc'], })
- 用封装的axios发送请求时
-
然后就OK了getContentData: (params) => { return request({ url: url, method: 'get', params, paramsSerializer: function (params) { return qs.stringify(params, { indices: false }) }, }) },