新增 删除 衣服

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

@@ -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')