Enhance backend functionality and frontend UI
- Updated main.py to include authentication for brand, model, and OTA routers. - Added new OTA schemas in schemas.py for version management. - Enhanced model retrieval with sorting options in models.py. - Improved model update functionality to support multipart/form-data uploads. - Updated frontend layout and styles for a more modern look, including new font integration. - Implemented login route and authentication checks in router/index.js. - Added sorting capabilities in model table and improved file handling in model view. - Updated requirements.txt to include PyJWT for token management.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* OTA 列表
|
||||
* @param {Object} params
|
||||
* @param {number} [params.skip]
|
||||
* @param {number} [params.limit]
|
||||
* @param {number} [params.verCode]
|
||||
* @param {string} [params.verName]
|
||||
* @param {string} [params.model]
|
||||
* @param {number} [params.status] 0 | 1
|
||||
*/
|
||||
export function getOtaList(params) {
|
||||
return request({
|
||||
url: '/ota/',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getOta(id) {
|
||||
return request({
|
||||
url: `/ota/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function createOta(data) {
|
||||
return request({
|
||||
url: '/ota/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateOta(id, data) {
|
||||
return request({
|
||||
url: `/ota/${id}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteOta(id) {
|
||||
return request({
|
||||
url: `/ota/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user