optimize: make page share reward
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user