2023-11-20-1
This commit is contained in:
@@ -516,7 +516,8 @@ export default defineComponent({
|
||||
},
|
||||
async mounted(){
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.isTest = getCookie('isTest') || ''
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)|| ''
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.uploadUrl = getUploadUrl()
|
||||
this.getLibraryList()
|
||||
@@ -633,8 +634,13 @@ export default defineComponent({
|
||||
fileUploadChange(data:any){
|
||||
let file = data.file
|
||||
// let Cropper:any = this.$refs.Cropper
|
||||
|
||||
if(this.selectCode == 'Models'){
|
||||
let reader = new FileReader();
|
||||
if(this.imgList.length+this.currentUploadFileNum > 10 && this.isTest){
|
||||
message.info(this.t('isTest.image'));
|
||||
return
|
||||
}
|
||||
reader.onload = (e:any) => {
|
||||
let data_new;
|
||||
if (typeof e.target.result === 'object') {
|
||||
@@ -893,6 +899,10 @@ export default defineComponent({
|
||||
if(this.selectCode == "Models"){
|
||||
return
|
||||
}
|
||||
if(this.imgList.length+this.currentUploadFileNum > 10 && this.isTest){
|
||||
message.info(this.t('isTest.image'));
|
||||
return
|
||||
}
|
||||
let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType : ''
|
||||
let new_data = {
|
||||
file:event.file,
|
||||
@@ -1015,7 +1025,7 @@ export default defineComponent({
|
||||
ifMaximumLength(){
|
||||
clearTimeout(this.inputTime)
|
||||
this.inputTime = setTimeout(()=>{
|
||||
if(this.captionGeneration.split(/\s+/).length > 75){
|
||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
||||
this.inputShow = true
|
||||
}else{
|
||||
this.inputShow = false
|
||||
@@ -1080,6 +1090,8 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
getgenerate(){
|
||||
console.log(this.isTest);
|
||||
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
message.info(
|
||||
this.t('isTest.available')
|
||||
|
||||
Reference in New Issue
Block a user