WorkCamera/uniapp/WorkCameraf/common/server.js
2025-12-27 15:07:12 +08:00

38 lines
814 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {
get,
post
} from "./request";
var base_url = "https://camera.api.suigongxj.top/";
export const getBaseUrl = () => {
return base_url;
}
// var base_url = "http://192.168.1.21:8888/";
/**
* 获取配置
* @returns
*/
export const getConfig = async () => {
var url = base_url + "config";
const res = await get(url, {});
return res.data;
}
export const addWatermarkRecord = async (data) => {
var url = base_url + "addworkrecord";
console.log(url, data);
const res = await post(url, data);
return res;
}
/**
* 添加工作记录(多图支持 v2
* @param {Object} data - 包含 Images 数组的数据
* @returns
*/
export const addWatermarkRecordV2 = async (data) => {
var url = base_url + "addworkrecordv2";
console.log(url, data);
const res = await post(url, data);
return res;
}