fix: 替换获取服务器时间接口
This commit is contained in:
@@ -1,23 +1,15 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 获取服务器时间
|
||||
* 服务器时间
|
||||
* @returns object
|
||||
*/
|
||||
export async function getServerTime() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/OMC/objectType/time`,
|
||||
return request({
|
||||
url: `/time`,
|
||||
method: 'GET',
|
||||
whithToken: false,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data) {
|
||||
return Object.assign(result, {
|
||||
data: result.data.data,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user