|
@@ -198,36 +198,36 @@ export const getFuseImage = async (
|
|
|
break;
|
|
|
case FuseImageType.KANKAN:
|
|
|
console.error("截图尺寸", width, height);
|
|
|
- // if(typeMap.sdk.Camera.mode == 'floorplan') {//判断户型图模式是否为平面图模式,如果是则获取平面图的截图进行裁剪处理
|
|
|
- // if(typeMap.sdk.store?.getValue('metadata')?.floorPlanUser) {
|
|
|
- // let num = typeMap.sdk.store?.getValue('metadata').num
|
|
|
- // let floorId = typeMap.sdk.core.get('Player').model.currentFloor.floorIndex
|
|
|
- // let img = ''
|
|
|
- // if (typeMap.sdk.store.getValue('flooruser').type === 'image') {
|
|
|
- // img = `floor-upload-${floorId}.jpg`
|
|
|
- // } else {
|
|
|
- // img = `cad-style-3-${floorId}.jpg`
|
|
|
- // }
|
|
|
- // newUrl = `${getUrlSrc({type: 102})}/profile/scene_view_data/${num}/user/${img}?t=${Date.now()}`
|
|
|
- // // /oss/scene_view_data/YZL-jm-3EOpLfZxim9/user/cad-style-3.jpg
|
|
|
- // let newBlob = await urlToBlob(newUrl)
|
|
|
- // if(newBlob.type != 'text/html'){
|
|
|
- // blob = await imageCropper({
|
|
|
- // img: newBlob,
|
|
|
- // fixed: [width, height]
|
|
|
- // })
|
|
|
- // }
|
|
|
- // console.error("截图尺寸2", blob);
|
|
|
- // } else {
|
|
|
- // alert("暂未获取到平面图,请前往三维场景制作并保存");
|
|
|
- // }
|
|
|
- // } else {
|
|
|
+ if(typeMap.sdk.Camera.mode == 'floorplan') {//判断户型图模式是否为平面图模式,如果是则获取平面图的截图进行裁剪处理
|
|
|
+ if(typeMap.sdk.store?.getValue('metadata')?.floorPlanUser) {
|
|
|
+ let num = typeMap.sdk.store?.getValue('metadata').num
|
|
|
+ let floorId = typeMap.sdk.core.get('Player').model.currentFloor.floorIndex
|
|
|
+ let img = ''
|
|
|
+ if (typeMap.sdk.store.getValue('flooruser').type === 'image') {
|
|
|
+ img = `floor-upload-${floorId}.jpg`
|
|
|
+ } else {
|
|
|
+ img = `cad-style-3-${floorId}.jpg`
|
|
|
+ }
|
|
|
+ newUrl = `${getUrlSrc({type: 102})}/profile/scene_view_data/${num}/user/${img}?t=${Date.now()}`
|
|
|
+ // /oss/scene_view_data/YZL-jm-3EOpLfZxim9/user/cad-style-3.jpg
|
|
|
+ let newBlob = await urlToBlob(newUrl)
|
|
|
+ if(newBlob.type != 'text/html'){
|
|
|
+ blob = await imageCropper({
|
|
|
+ img: newBlob,
|
|
|
+ fixed: [width, height]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.error("截图尺寸2", blob);
|
|
|
+ } else {
|
|
|
+ alert("暂未获取到平面图,请前往三维场景制作并保存");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
const result = await typeMap.sdk.Camera.screenshot(
|
|
|
[{ width: width, height: height, name: "2k", bgOpacity: 0 }],
|
|
|
false
|
|
|
);
|
|
|
blob = base64ToBlob(result[0].data);
|
|
|
- // }
|
|
|
+ }
|
|
|
|
|
|
break;
|
|
|
break;
|