新增 删除 衣服

This commit is contained in:
X1627315083
2023-12-13 16:09:17 +08:00
parent e6c8fe3866
commit a0a8ab9a17
27 changed files with 608 additions and 260 deletions

View File

@@ -107,7 +107,7 @@
<i class="fi fi-rs-comments"></i><span class="content_header_des">{{ $t('HomeView.SelectedDesign') }}</span>
</div>
<div class="right_content_export" v-show="likeDesignCollectionList.length">
<div class="button_second" @click="exportCanvas()">
<div class="button_second Guide_1_31" @click="exportCanvas()">
{{ $t('HomeView.Export') }}
</div>
<div
@@ -421,11 +421,8 @@ export default defineComponent({
let collectionModal: any = this.$refs.collectionModal;
this.store.commit("clearAllData");
collectionModal.changeCollectionModal(true);
console.log(this.driver__.driver);
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
@@ -902,6 +899,11 @@ export default defineComponent({
let rightContentImgBlock: any = document.querySelector(
"#right_content_img_block"
);
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
let a = document.createElement("a");
this.isShowMark = true;
let img:any = []
@@ -941,6 +943,21 @@ export default defineComponent({
num++
}
}
this.likeDesignCollectionList.forEach((item:any)=>{
let nameTail = item?.designOutfitUrl?.split(".").pop().split("?").shift();
let data = {
imgUrl: item.designOutfitUrl,
name:
'result' +
index +
"." +
nameTail,
};
img.push(data);
index++;
})
// a.setAttribute('href', URL.createObjectURL(blob));
// a.setAttribute('download', `collection.png`);
// a.click();
@@ -968,8 +985,10 @@ export default defineComponent({
// });
// }
// );
this.downImg(img);
// console.log(img);
return
this.downImg(img);
},
//打开图片详情

View File

@@ -536,6 +536,11 @@ export default defineComponent({
token: "",
};
},
watch:{
sex(newVal,oldVal){
this.upload.gender = newVal.value
},
},
async mounted(){
let userInfo:any = getCookie("userInfo")
let isTest:any = getCookie('isTest')
@@ -632,6 +637,7 @@ export default defineComponent({
// this.designType = 'Outwear',
this.selectImgList = []
this.selectSingleImg = {}
this.value.labelValue = []
this.getLibraryList()
this.getClass()
this.uploadGenerate = 'Upload'
@@ -1056,13 +1062,22 @@ export default defineComponent({
},
generateFileUploadChange(data:any){
let file = data.file;
let bor = true
if (file.status === "done") {
let res = JSON.parse(file.xhr.response);
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
let res:any = JSON.parse(file.xhr.response);
if(res.errCode == 0){
file.id = res.data.id;
file.imgUrl = res.data.url;
file.resData = res.data;
file.type_ = "upload";
}else{
bor = false
}
} else if (file.status === "error") {
bor = false
}
if(!bor){
let res:any = JSON.parse(file.xhr.response);
let index = -1;
this.selectGenerateList.forEach((ele: any, index1: any) => {
if (file.uid === ele.uid) {
@@ -1072,8 +1087,9 @@ export default defineComponent({
if (index > -1) {
this.selectGenerateList.splice(index, 1);
}
message.warning(file.name + this.t('LibraryPage.jsContent8'));
}
// message.warning(file.name + this.t('LibraryPage.jsContent8'));
message.warning(res.errMsg);
}
},
deleteFile(index: any) {
this.selectGenerateList.splice(index, 1);
@@ -1134,7 +1150,7 @@ export default defineComponent({
}
if(generateType == 'image'||generateType == 'text-image'){
if(generageImg?.id){
data.text = ''
}else{
message.warning(
this.t('LibraryPage.jsContent9')

View File

@@ -455,6 +455,7 @@ export default defineComponent({
setCookie("token", token);
setCookie("isTest", isTest);
setCookie("isBeginner", isBeginner);
setCookie("isBeginnerNum", 0);
setCookie("userInfo", JSON.stringify(rv));
this.turnToHomePage();
}