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 { updateMaterialCenter } from "../../../../api.js"
|
||||
import common from "@/api/common.js";
|
||||
|
||||
|
||||
export default {
|
||||
@@ -196,12 +197,24 @@ export default {
|
||||
let clone = clone_except_ext(this.shopData)
|
||||
|
||||
console.log(clone)
|
||||
|
||||
updateMaterialCenter({
|
||||
id: this.$route.query.id,
|
||||
data: clone,
|
||||
version: new Date().getTime()
|
||||
});
|
||||
try{
|
||||
const target = this.$refs.se.editor_.renderer_.domElement;
|
||||
target.toBlob(async(blob) => {
|
||||
const res = await common.cosUpload3D(blob);
|
||||
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 => {
|
||||
// // TODO
|
||||
|
||||
@@ -158,6 +158,10 @@ export default {
|
||||
container: this.$refs.c1,
|
||||
shopData: this.shopData,
|
||||
activeEditModeName: activePropName_to_activeEditModeName(this.activePropName), // #20221216
|
||||
render: {
|
||||
alpha: true,
|
||||
preserveDrawingBuffer :true
|
||||
},
|
||||
})
|
||||
this.editor_.on("loadingCompletion", () => {
|
||||
this.viewMode = this.editor_.viewMode
|
||||
|
||||
@@ -235,6 +235,7 @@ watch(
|
||||
border: 1px solid #D3D3D3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.page-item-logo{
|
||||
flex: 10;
|
||||
|
||||
@@ -65,9 +65,12 @@ const { ref, reactive }=require("@vue/reactivity");
|
||||
import common from "@/api/common.js";
|
||||
import { createMaterialCenter } from "../api";
|
||||
import { message } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const emit = defineEmits(["complete"]);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const title = ref("");
|
||||
|
||||
const visible = ref(false);
|
||||
@@ -145,9 +148,15 @@ const ok = async () => {
|
||||
}
|
||||
if(step.value >= 3) {
|
||||
const data = JSON.parse(JSON.stringify(formData.value));
|
||||
await createMaterialCenter(buildData(data));
|
||||
const res = await createMaterialCenter(buildData(data));
|
||||
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) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user