2023-11-13-dist

This commit is contained in:
X1627315083
2023-11-13 17:33:41 +08:00
parent 6cad540fbb
commit e3a2f8d25d
35 changed files with 433 additions and 184 deletions

View File

@@ -272,21 +272,27 @@ export default defineComponent({
if(!this.tcxColor){
return
}
Https.axiosGet(Https.httpUrls.getRgbByTcx + '?tcx=' + this.tcxColor).then((rv) =>{
if(rv && rv.name){
// let hex = this.rgbaToHex([color.r,color.g,color.b])
let hex = this.rgbaToHex([rv.r,rv.g,rv.b,rv.a?rv.a:1])
this.reviewColor = rv?.r + ''? {rgba:{r:rv.r,g:rv.g,b:rv.b,a:1},hex:hex} : {hex:''}
this.selectColor = this.reviewColor
this.colorList[this.selectIndex] = {r:rv.r, g:rv.g, b:rv.b}
this.pantongName = rv.name
let colorList =this.colorList.filter((v) => Object.keys(v).length)
this.setColorboardList(colorList)
this.getColorBg = true
}else{
message.warning(this.t('ColorboardUpload.jsContent2'))
}
})
let pattern = /^\d{2}-\d{4}$/;
if(pattern.test(this.tcxColor)){
Https.axiosGet(Https.httpUrls.getRgbByTcx + '?tcx=' + this.tcxColor).then((rv) =>{
if(rv && rv.name){
// let hex = this.rgbaToHex([color.r,color.g,color.b])
let hex = this.rgbaToHex([rv.r,rv.g,rv.b,rv.a?rv.a:1])
this.reviewColor = rv?.r + ''? {rgba:{r:rv.r,g:rv.g,b:rv.b,a:1},hex:hex} : {hex:''}
this.selectColor = this.reviewColor
this.colorList[this.selectIndex] = {r:rv.r, g:rv.g, b:rv.b}
this.pantongName = rv.name
let colorList =this.colorList.filter((v) => Object.keys(v).length)
this.setColorboardList(colorList)
this.getColorBg = true
}else{
message.warning(this.t('ColorboardUpload.jsContent2'))
}
})
}else{
message.warning(this.t('ColorboardUpload.jsContent5'))
}
},
//清除当前的颜色
@@ -334,6 +340,7 @@ export default defineComponent({
(rv) => {
if(rv){
colorSort = rv.ratio
console.log(rv);
}
}
)

View File

@@ -188,15 +188,15 @@ export default defineComponent({
modalWarning: null,
isLanguage: false,
language:[
{name:'English',value:'en'},
{name:'中文',value:'zh'},
{name:'한국인',value:'ko'},
{name:'にほんご',value:'ja'},
{name:'Русский',value:'ru'},
{name:'Français',value:'fr'},
{name:'แบบไทย',value:'th'},
{name:'Tiếng Việt',value:'vi'},
{name:'Italiano',value:'it'},
{name:'English',value:'ENGLISH'},
{name:'中文',value:'CHINESE_SIMPLIFIED'},
{name:'한국인',value:'KOREAN'},
{name:'にほんご',value:'JAPANESE'},
{name:'Русский',value:'RUSSIAN'},
{name:'Français',value:'FRENCH'},
{name:'แบบไทย',value:'THAI'},
{name:'Tiếng Việt',value:'VIETNAMESE'},
{name:'Italiano',value:'ITALIAN'},
]
};
},
@@ -208,7 +208,6 @@ export default defineComponent({
this.accountIsLogin(this.userInfo);
}
this.isHaveBindEmail = this.userInfo?.email ? true : false;
this.getLang()
this.operateClick();
document.addEventListener("click", this.operateClick);
},
@@ -374,27 +373,29 @@ export default defineComponent({
},
//获取当前语言
getLang(){
let data = {}
// Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
// (rv) => {
// if (rv) {
// this.locale = rv
// }
// }
// );
let data
Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
(rv) => {
if (rv) {
this.locale = v
console.log(rv);
}
}
);
},
setLang(v){
let data = {
language:v
}
// Https.axiosPost(Https.httpUrls.changeUserLanguage, data).then(
// (rv) => {
// if (rv) {
// console.log(rv);
// this.getLang()
// }
// }
// );
Https.axiosPost(Https.httpUrls.changeUserLanguage, data).then(
(rv) => {
if (rv) {
let token = rv;
setCookie("token", token);
this.getLang(v)
}
}
);
},
setLocale(v){

View File

@@ -547,28 +547,27 @@ export default defineComponent({
return
}
}
// this.loadingShow = true
// Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
// (rv) => {
// if(rv){
// this.generateList = []
// let arr
// rv.generatedCollectionItems.forEach((v:any,index:number)=>{
// arr = {
// id:v.generateItemId,
// imgUrl:v.generateItemUrl,
// id_:GO.id++,
// like:rv.generatedCollectionItems[index].isLiked
// }
// this.generateList.push(arr)
// this.loadingShow = false
// })
// }
// }
// ).catch(res=>{
// this.loadingShow = false
// });
this.loadingShow = true
Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
(rv) => {
if(rv){
this.generateList = []
let arr
rv.generatedCollectionItems.forEach((v:any,index:number)=>{
arr = {
id:v.generateItemId,
imgUrl:v.generateItemUrl,
id_:GO.id++,
like:rv.generatedCollectionItems[index].isLiked
}
this.generateList.push(arr)
this.loadingShow = false
})
}
}
).catch(res=>{
this.loadingShow = false
});
},
randomRange(min:any, max:any, num:any) { // min最小值max最大值 num排除的值
let index = Math.floor(Math.random() * (max - min)) + min;