fix: 设计器截图
This commit is contained in:
@@ -125,6 +125,7 @@ import { use_ext, clone_except_ext, get_is_hall_, append_default_shop_data_ } fr
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
import { updateMaterialCenter } from "../../../../api.js"
|
import { updateMaterialCenter } from "../../../../api.js"
|
||||||
|
import common from "@/api/common.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -196,12 +197,24 @@ export default {
|
|||||||
let clone = clone_except_ext(this.shopData)
|
let clone = clone_except_ext(this.shopData)
|
||||||
|
|
||||||
console.log(clone)
|
console.log(clone)
|
||||||
|
try{
|
||||||
updateMaterialCenter({
|
const target = this.$refs.se.editor_.renderer_.domElement;
|
||||||
id: this.$route.query.id,
|
target.toBlob(async(blob) => {
|
||||||
data: clone,
|
const res = await common.cosUpload3D(blob);
|
||||||
version: new Date().getTime()
|
await updateMaterialCenter({
|
||||||
});
|
id: this.$route.query.id,
|
||||||
|
data: clone,
|
||||||
|
version: new Date().getTime(),
|
||||||
|
cover: res.url
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$router.go(-1);
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(e){
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
|
||||||
// this.$store.dispatch("shopData/save", clone).then(data => {
|
// this.$store.dispatch("shopData/save", clone).then(data => {
|
||||||
// // TODO
|
// // TODO
|
||||||
|
|||||||
@@ -158,6 +158,10 @@ export default {
|
|||||||
container: this.$refs.c1,
|
container: this.$refs.c1,
|
||||||
shopData: this.shopData,
|
shopData: this.shopData,
|
||||||
activeEditModeName: activePropName_to_activeEditModeName(this.activePropName), // #20221216
|
activeEditModeName: activePropName_to_activeEditModeName(this.activePropName), // #20221216
|
||||||
|
render: {
|
||||||
|
alpha: true,
|
||||||
|
preserveDrawingBuffer :true
|
||||||
|
},
|
||||||
})
|
})
|
||||||
this.editor_.on("loadingCompletion", () => {
|
this.editor_.on("loadingCompletion", () => {
|
||||||
this.viewMode = this.editor_.viewMode
|
this.viewMode = this.editor_.viewMode
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ watch(
|
|||||||
border: 1px solid #D3D3D3;
|
border: 1px solid #D3D3D3;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.page-item-logo{
|
.page-item-logo{
|
||||||
flex: 10;
|
flex: 10;
|
||||||
|
|||||||
@@ -65,9 +65,12 @@ const { ref, reactive }=require("@vue/reactivity");
|
|||||||
import common from "@/api/common.js";
|
import common from "@/api/common.js";
|
||||||
import { createMaterialCenter } from "../api";
|
import { createMaterialCenter } from "../api";
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const emit = defineEmits(["complete"]);
|
const emit = defineEmits(["complete"]);
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
@@ -145,9 +148,15 @@ const ok = async () => {
|
|||||||
}
|
}
|
||||||
if(step.value >= 3) {
|
if(step.value >= 3) {
|
||||||
const data = JSON.parse(JSON.stringify(formData.value));
|
const data = JSON.parse(JSON.stringify(formData.value));
|
||||||
await createMaterialCenter(buildData(data));
|
const res = await createMaterialCenter(buildData(data));
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
emit("complete");
|
// emit("complete");
|
||||||
|
router.push({
|
||||||
|
path: "/edit-creative",
|
||||||
|
query: {
|
||||||
|
id: res.data.id
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(formData.value.type == CREATIVE_TYPE.RING_360) {
|
if(formData.value.type == CREATIVE_TYPE.RING_360) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user