|
@@ -28,7 +28,7 @@ import { list } from "@/store/measure";
|
|
import { FixType, GFixPoint, fixPoints } from "@/store/fixPoint";
|
|
import { FixType, GFixPoint, fixPoints } from "@/store/fixPoint";
|
|
import { baseLines } from "@/store/baseLine";
|
|
import { baseLines } from "@/store/baseLine";
|
|
import { basePoints } from "@/store/basePoint";
|
|
import { basePoints } from "@/store/basePoint";
|
|
-import { photos } from "@/store/photos";
|
|
|
|
|
|
+import { PhotoRaw, photos } from "@/store/photos";
|
|
import { useSDK } from "@/hook/useLaser";
|
|
import { useSDK } from "@/hook/useLaser";
|
|
|
|
|
|
import { disabledMap } from "@/hook/custom";
|
|
import { disabledMap } from "@/hook/custom";
|
|
@@ -125,7 +125,7 @@ const photo = async () => {
|
|
tempPhoto.value = await api.getFile(data.rawUrl);
|
|
tempPhoto.value = await api.getFile(data.rawUrl);
|
|
console.log("获取到临时文件");
|
|
console.log("获取到临时文件");
|
|
await nextTick();
|
|
await nextTick();
|
|
- return new Promise((resolve, reject) => {
|
|
|
|
|
|
+ return new Promise<PhotoRaw>((resolve, reject) => {
|
|
const handler = async () => {
|
|
const handler = async () => {
|
|
if (!isSDK) {
|
|
if (!isSDK) {
|
|
coverRef.value.removeEventListener("animationend", handler);
|
|
coverRef.value.removeEventListener("animationend", handler);
|
|
@@ -185,7 +185,13 @@ const photo = async () => {
|
|
};
|
|
};
|
|
|
|
|
|
if (import.meta.env.VITE_APP_SDK === "true") {
|
|
if (import.meta.env.VITE_APP_SDK === "true") {
|
|
- (window as any).photo = photo;
|
|
|
|
|
|
+ import("@/openSDK").then((data) => {
|
|
|
|
+ watchEffect(() => {
|
|
|
|
+ data.sdkAPI.photo = async (callback) => {
|
|
|
|
+ callback(JSON.parse(JSON.stringify(await photo())));
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ });
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|