optimize: make page share reward

This commit is contained in:
zzc
2026-01-27 18:18:04 +08:00
parent ce3a53067b
commit eb37c2d295
3 changed files with 48 additions and 48 deletions

View File

@@ -1,3 +1,6 @@
import { getDeviceInfo } from "@/utils/system";
import { saveRecord } from "@/api/system";
export const generateObjectId = (
m = Math,
d = Date,
@@ -33,3 +36,14 @@ export const uploadImage = (filePath) => {
});
});
};
export const saveRecordRequest = async (path, targetId, scene) => {
const imageUrl = await uploadImage(path);
const deviceInfo = getDeviceInfo();
saveRecord({
scene,
targetId,
imageUrl,
deviceInfo,
});
};