mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 00:23:53 +08:00
Merge branch 'main' into MVP
This commit is contained in:
@@ -3,6 +3,7 @@ import agent from './module/agent.js'
|
||||
import device from './module/device.js'
|
||||
import user from './module/user.js'
|
||||
import ota from './module/ota.js'
|
||||
import admin from './module/admin.js'
|
||||
|
||||
/**
|
||||
* 接口地址
|
||||
@@ -29,5 +30,6 @@ export default {
|
||||
user,
|
||||
agent,
|
||||
device,
|
||||
ota
|
||||
ota,
|
||||
admin
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import RequestService from '../httpRequest'
|
||||
import {getServiceUrl} from '../api'
|
||||
|
||||
|
||||
export default {
|
||||
// 用户列表
|
||||
getUserList(callback) {
|
||||
RequestService.sendRequest().url(`${getServiceUrl()}/api/v1/admin/users`)
|
||||
.method('GET')
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime()
|
||||
callback(res)
|
||||
})
|
||||
.fail(() => {
|
||||
RequestService.reAjaxFun(() => {
|
||||
this.getList()
|
||||
})
|
||||
}).send()
|
||||
},
|
||||
}
|
||||
@@ -26,9 +26,9 @@ export default {
|
||||
.method('GET')
|
||||
.type('blob')
|
||||
.header({
|
||||
'Content-Type': 'image/gif',
|
||||
'Pragma': 'No-cache',
|
||||
'Cache-Control': 'no-cache'
|
||||
'Content-Type': 'image/gif',
|
||||
'Pragma': 'No-cache',
|
||||
'Cache-Control': 'no-cache'
|
||||
})
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime();
|
||||
|
||||
Reference in New Issue
Block a user