使用用户generate使用次数每个只有两次
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
NODE_ENV = 'development'
|
||||
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||
# VUE_APP_BASE_URL = 'https://api.aida.com.hk'
|
||||
|
||||
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||
VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
||||
# VUE_APP_BASE_URL = 'http://192.168.1.6:7766'
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<div class="centent_div" v-if="current?.id" @click="openCurrent(1)">
|
||||
<img :src="current?.path" alt="" class="" @click="openCurrent(1)">
|
||||
</div>
|
||||
<i v-else class="fi fi-rr-picture centent" @click="openCurrent(1)"></i>
|
||||
<i v-else class="fi fi-rr-picture centent clothes_item_icon" @click="openCurrent(1)"></i>
|
||||
|
||||
</div>
|
||||
<div class="clothes_detail_item clothes_detail_item_print" :class="[current.id?'':'hideCursor']">
|
||||
@@ -91,7 +91,7 @@
|
||||
<div>{{ $t('DesignDetail.CurrentPrint') }}</div>
|
||||
<i class="fi fi-rr-edit" @click.stop="openCurrent(2)"></i>
|
||||
</div>
|
||||
<div class="Guide_1_20" :class="[driver__.driver?'showEvents':'']">
|
||||
<div class="Guide_1_20 clothes_item_icon" :class="[driver__.driver?'showEvents':'']">
|
||||
<div class="centent_div" v-if="current?.printObject?.prints?.[0]?.path" @click="openCurrent(2)">
|
||||
<img :src="current?.printObject?.prints[0]?.path" alt="">
|
||||
</div>
|
||||
@@ -1270,6 +1270,7 @@ export default defineComponent({
|
||||
}
|
||||
.clothes_detail_item{
|
||||
// margin-bottom: 5rem*1.2);
|
||||
position: relative;
|
||||
flex: 1;
|
||||
.centent_div{
|
||||
display: flex;
|
||||
@@ -1306,6 +1307,12 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
.clothes_item_icon{
|
||||
top: 50%;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
img{
|
||||
width: calc(10rem*1.2);
|
||||
height: calc(10rem*1.2);
|
||||
|
||||
@@ -511,12 +511,12 @@ export default defineComponent({
|
||||
getgenerate(){
|
||||
clearInterval(this.remGenerateTime)
|
||||
this.remGenerate = false
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
message.info(
|
||||
this.t('isTest.available')
|
||||
);
|
||||
return
|
||||
}
|
||||
// if(this.isTest){//试用用户禁止使用
|
||||
// message.info(
|
||||
// this.t('isTest.available')
|
||||
// );
|
||||
// return
|
||||
// }
|
||||
if(this.loadingShow){
|
||||
return
|
||||
}
|
||||
@@ -550,20 +550,26 @@ export default defineComponent({
|
||||
userId:this?.userInfo?.userId,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
version:1,//为1就是Print
|
||||
isTestUser:this.driver__.driver?false:this.isTest,
|
||||
gender:'',
|
||||
}
|
||||
this.loadingShow = true
|
||||
Https.axiosPost(Https.httpUrls.generatePrepare, data).then(
|
||||
(rv) => {
|
||||
if(rv){
|
||||
this.generateId = rv
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
}else{
|
||||
// this.loadingShow = false
|
||||
if(data.isTestUser){
|
||||
if(rv.leftUsageCount >= 1){
|
||||
message.warning(this.t('Generate.jsContent8',{num:rv.leftUsageCount-1,str:this.t('collectionModal.Moodboard')}));
|
||||
}else if(rv.leftUsageCount == 0){
|
||||
message.warning(this.t('Generate.jsContent9',{str:this.t('collectionModal.Moodboard')}));
|
||||
this.loadingShow = false
|
||||
return
|
||||
}
|
||||
}
|
||||
this.generateId = rv.uniqueId
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
|
||||
@@ -584,12 +584,12 @@ export default defineComponent({
|
||||
getgenerate(){
|
||||
clearInterval(this.remGenerateTime)
|
||||
this.remGenerate = false
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
message.warning(
|
||||
this.t('isTest.available')
|
||||
);
|
||||
return
|
||||
}
|
||||
// if(this.isTest){//试用用户禁止使用
|
||||
// message.warning(
|
||||
// this.t('isTest.available')
|
||||
// );
|
||||
// return
|
||||
// }
|
||||
if(this.loadingShow){
|
||||
return
|
||||
}
|
||||
@@ -611,6 +611,7 @@ export default defineComponent({
|
||||
text:`${generage.printModel.value},${this.captionGeneration}`,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
userId:this?.userInfo?.userId,
|
||||
isTestUser:this.driver__.driver?false:this.isTest,
|
||||
version:1,//为1就是Print
|
||||
gender:'',
|
||||
}
|
||||
@@ -671,15 +672,20 @@ export default defineComponent({
|
||||
// Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data,{cancelToken: this.source?.token}).then(
|
||||
Https.axiosPost(Https.httpUrls.generatePrepare, data).then(
|
||||
(rv) => {
|
||||
if(rv){
|
||||
this.generateId = rv
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
}else{
|
||||
// this.loadingShow = false
|
||||
if(data.isTestUser){
|
||||
if(rv.leftUsageCount >= 1){
|
||||
message.warning(this.t('Generate.jsContent8',{num:rv.leftUsageCount-1,str:this.t('collectionModal.Printboard')}));
|
||||
}else if(rv.leftUsageCount == 0){
|
||||
message.warning(this.t('Generate.jsContent9',{str:this.t('collectionModal.Printboard')}));
|
||||
this.loadingShow = false
|
||||
return
|
||||
}
|
||||
}
|
||||
this.generateId = rv.uniqueId
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
|
||||
@@ -293,20 +293,20 @@ export default defineComponent({
|
||||
// }
|
||||
},
|
||||
}
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
// message.warning(
|
||||
// this.t('isTest.available')
|
||||
// );
|
||||
this.record.push({
|
||||
state:1,
|
||||
str:this.t('isTest.src'),
|
||||
src:'https://code-create.com.hk/aida/'
|
||||
})
|
||||
this.createTimer()
|
||||
this.textScroll()
|
||||
this.chatCentent = ""
|
||||
return
|
||||
}
|
||||
// if(this.isTest){//试用用户禁止使用
|
||||
// // message.warning(
|
||||
// // this.t('isTest.available')
|
||||
// // );
|
||||
// this.record.push({
|
||||
// state:1,
|
||||
// str:this.t('isTest.src'),
|
||||
// src:'https://code-create.com.hk/aida/'
|
||||
// })
|
||||
// this.createTimer()
|
||||
// this.textScroll()
|
||||
// this.chatCentent = ""
|
||||
// return
|
||||
// }
|
||||
Https.axiosPost(Https.httpUrls.chatStreamTest, data).then(
|
||||
// Https.axiosPost(Https.httpUrls.pythonChatStream, data,interaction).then(
|
||||
(rv) => {
|
||||
|
||||
@@ -697,12 +697,12 @@ export default defineComponent({
|
||||
this.remGenerate = false
|
||||
// this.sketchCatecoryList = this.store.state.Workspace.workspacePosition
|
||||
let sketchCatecoryList = this.sketchCatecoryList
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
message.warning(
|
||||
this.t('isTest.available')
|
||||
);
|
||||
return
|
||||
}
|
||||
// if(this.isTest){//试用用户禁止使用
|
||||
// message.warning(
|
||||
// this.t('isTest.available')
|
||||
// );
|
||||
// return
|
||||
// }
|
||||
if(this.loadingShow){
|
||||
return
|
||||
}
|
||||
@@ -717,6 +717,7 @@ export default defineComponent({
|
||||
text:this.captionGeneration,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
userId:this?.userInfo?.userId,
|
||||
isTestUser:this.driver__.driver?false:this.isTest,
|
||||
version:1,//为1就是Print
|
||||
gender:this.workspace.sex,
|
||||
}
|
||||
@@ -775,13 +776,20 @@ export default defineComponent({
|
||||
this.loadingShow = true
|
||||
Https.axiosPost(Https.httpUrls.generatePrepare, data).then(
|
||||
(rv) => {
|
||||
if(rv){
|
||||
this.generateId = rv
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
if(data.isTestUser){
|
||||
if(rv.leftUsageCount >= 1){
|
||||
message.warning(this.t('Generate.jsContent8',{num:rv.leftUsageCount-1,str:this.t('collectionModal.Sketchboard')}));
|
||||
}else if(rv.leftUsageCount == 0){
|
||||
message.warning(this.t('Generate.jsContent9',{str:this.t('collectionModal.Sketchboard')}));
|
||||
this.loadingShow = false
|
||||
return
|
||||
}
|
||||
}
|
||||
this.generateId = rv.uniqueId
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
jsContent5:"请输入内容~",
|
||||
jsContent6:"您最多可以选择8张图片",
|
||||
jsContent7:"上传失败",
|
||||
jsContent8:"您{str}还有{num}次生成额度。",
|
||||
jsContent9:"您的{str}生成额度已用完。",
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:'情绪板',
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
jsContent5:"Please enter content",
|
||||
jsContent6:"You can select up to 8 images",
|
||||
jsContent7:"upload failed",
|
||||
jsContent8:"You have {num} remaining opportunity to generate {str}.",
|
||||
jsContent9:"You have exhausted your generation opportunities {str}.",
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:'Moodboard',
|
||||
|
||||
@@ -287,6 +287,8 @@ export default {
|
||||
jsContent5:"Veuillez saisir le contenu",
|
||||
jsContent6:"Vous pouvez sélectionner jusqu'à 8 images",
|
||||
jsContent7:"échec du téléchargement",
|
||||
jsContent8: "Il vous reste {num} opportunité(s) de génération {str}.",
|
||||
jsContent9: "Vous avez épuisé toutes vos opportunités de génération {str}."
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:"Conseil d'humeur",
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
jsContent5:"Inserisci il contenuto",
|
||||
jsContent6:"È possibile selezionare fino a 8 immagini",
|
||||
jsContent7:"caricamento fallito",
|
||||
jsContent8: "Hai {num} opportunità rimanenti per generare {str}.",
|
||||
jsContent9: "Hai esaurito le tue opportunità di generazione {str}."
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:"Tavola d'atmosfera",
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
jsContent5:"内容を入力してください",
|
||||
jsContent6:"最大8枚の画像を選択できます",
|
||||
jsContent7:"アップロードに失敗しました",
|
||||
jsContent8: "{num} 回の生成機会が残っています {str}。",
|
||||
jsContent9: "生成機会を使い切りました {str}。"
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:'ムードボード',
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
jsContent5:"내용을 입력해주세요",
|
||||
jsContent6:"최대 8개의 이미지를 선택할 수 있습니다.",
|
||||
jsContent7:"업로드 실패",
|
||||
jsContent8: "생성 기회가 {num}번 남았습니다 {str}.",
|
||||
jsContent9: "생성 기회를 모두 사용하셨습니다 {str}."
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:'무드보드',
|
||||
|
||||
@@ -288,6 +288,8 @@ export default {
|
||||
jsContent5:"Пожалуйста, введите содержание",
|
||||
jsContent6:"Вы можете выбрать до 8 изображений",
|
||||
jsContent7:"Загрузка не удалась",
|
||||
jsContent8: "У вас осталось {num} возможность(ей) для генерации {str}.",
|
||||
jsContent9: "Вы исчерпали все возможности генерации {str}."
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:'Мудборд',
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
jsContent5:"กรุณากรอกเนื้อหา",
|
||||
jsContent6:"คุณสามารถเลือกได้สูงสุด 8 ภาพ",
|
||||
jsContent7:"การอัพโหลดล้มเหลว",
|
||||
jsContent8: "คุณมีโอกาสสร้าง {num} ครั้งที่เหลืออยู่ {str}",
|
||||
jsContent9: "คุณใช้โอกาสสร้างหมดแล้ว {str}"
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:'มูดบอร์ด',
|
||||
|
||||
@@ -286,6 +286,8 @@ export default {
|
||||
jsContent5:"Vui lòng nhập nội dung",
|
||||
jsContent6:"Bạn có thể chọn tối đa 8 hình ảnh",
|
||||
jsContent7:"Tải lên thất bại",
|
||||
jsContent8: "Bạn còn {num} lần tạo ra cơ hội {str}.",
|
||||
jsContent9: "Bạn đã sử dụng hết các cơ hội tạo ra {str}."
|
||||
},
|
||||
collectionModal:{
|
||||
Moodboard:'Bảng tâm trạng',
|
||||
|
||||
@@ -232,7 +232,8 @@ const openGuide = () =>{
|
||||
// console.log(isBeginner);
|
||||
let isBeginnerNum = JSON.parse(getCookie('isBeginnerNum')?getCookie('isBeginnerNum'):'0')
|
||||
// console.log(isBeginner);
|
||||
if(isBeginner && !isTest){
|
||||
if(isBeginner){
|
||||
// if(isBeginner && !isTest){
|
||||
if(isBeginnerNum){
|
||||
driverObj__.drive(isBeginnerNum);
|
||||
}else{
|
||||
|
||||
@@ -385,7 +385,8 @@ export default defineComponent({
|
||||
let text = {
|
||||
|
||||
}
|
||||
if(!isTest && !isModalOne){//判断是否是试用用户
|
||||
if(!isModalOne){//判断是否是试用用户
|
||||
// if(!isTest && !isModalOne){//判断是否是试用用户
|
||||
await new Promise(async (resolve) => {
|
||||
await Https.axiosPost(Https.httpUrls.getExpiredTime,{}).then((rv: any) => {
|
||||
if (rv) {
|
||||
@@ -400,6 +401,7 @@ export default defineComponent({
|
||||
setTimeout(() => {
|
||||
let text = {
|
||||
str:`${this.t('HomeView.jsContent4',{days:days,hours:hours,minutes:minutes})}<a href="https://code-create.com.hk/aida/" target="_blank"><i class="fi fi-br-link-alt"></i></a>`,
|
||||
title:`${this.t('HomeView.jsContent7')}`,
|
||||
}
|
||||
this.affiche(text)
|
||||
}, 500);
|
||||
@@ -414,12 +416,12 @@ export default defineComponent({
|
||||
})
|
||||
})
|
||||
}else if(!isModalOne && isTest){
|
||||
setTimeout(() => {
|
||||
text = {
|
||||
str:`${this.t('HomeView.jsContent7')}<br>${this.t('HomeView.jsContent5')}<a href="https://code-create.com.hk/aida/" target="_blank">https://code-create.com.hk/aida/</a>${this.t('HomeView.jsContent6')}`,
|
||||
}
|
||||
this.affiche(text)
|
||||
}, 500);
|
||||
// setTimeout(() => {
|
||||
// text = {
|
||||
// str:`${this.t('HomeView.jsContent7')}<br>${this.t('HomeView.jsContent5')}<a href="https://code-create.com.hk/aida/" target="_blank">https://code-create.com.hk/aida/</a>${this.t('HomeView.jsContent6')}`,
|
||||
// }
|
||||
// this.affiche(text)
|
||||
// }, 500);
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
@@ -759,10 +759,11 @@ export default defineComponent({
|
||||
|
||||
if(this.selectCode == 'Models'){
|
||||
let reader = new FileReader();
|
||||
if(this.imgList.length+this.currentUploadFileNum > 10 && this.isTest){
|
||||
message.info(this.t('isTest.image'));
|
||||
return
|
||||
}
|
||||
//试用用户上传限制
|
||||
// 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') {
|
||||
@@ -1039,10 +1040,11 @@ export default defineComponent({
|
||||
if(this.selectCode == "Models"){
|
||||
return
|
||||
}
|
||||
if(this.imgList.length+this.currentUploadFileNum > 10 && this.isTest){
|
||||
message.info(this.t('isTest.image'));
|
||||
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.value : ''
|
||||
let new_data = {
|
||||
file:event.file,
|
||||
@@ -1244,12 +1246,12 @@ export default defineComponent({
|
||||
getgenerate(){
|
||||
clearInterval(this.remGenerateTime)
|
||||
this.remGenerate = false
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
message.info(
|
||||
this.t('isTest.available')
|
||||
);
|
||||
return
|
||||
}
|
||||
// if(this.isTest){//试用用户禁止使用
|
||||
// message.info(
|
||||
// this.t('isTest.available')
|
||||
// );
|
||||
// return
|
||||
// }
|
||||
if(this.isShowMark){
|
||||
return
|
||||
}
|
||||
@@ -1266,6 +1268,7 @@ export default defineComponent({
|
||||
level1Type:this.selectCode,
|
||||
level2Type:this.selectCode == 'Sketchboard'?this.designType.value:'',
|
||||
userId:(this?.userInfo as any).userId,
|
||||
isTestUser:this.driver__.driver?false:this.isTest,
|
||||
text:this.selectCode == 'Printboard'?`${arr[this.printModel.num-1]},${this.captionGeneration}`:this.captionGeneration,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
version:1,//为1就是Print
|
||||
@@ -1328,13 +1331,29 @@ export default defineComponent({
|
||||
this.isGenerate = true
|
||||
Https.axiosPost(Https.httpUrls.generatePrepare, data).then(
|
||||
(rv) => {
|
||||
if(rv){
|
||||
this.generateId = rv
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
if(data.isTestUser){
|
||||
let str:any
|
||||
if(this.selectCode == 'Moodboard'){
|
||||
str = this.t('collectionModal.Moodboard')
|
||||
}else if(this.selectCode == 'Printboard'){
|
||||
str = this.t('collectionModal.Printboard')
|
||||
}else if(this.selectCode == 'Sketchboard'){
|
||||
str = this.t('collectionModal.Sketchboard')
|
||||
}
|
||||
if(rv.leftUsageCount >= 1){
|
||||
message.warning(this.t('Generate.jsContent8',{num:rv.leftUsageCount-1,str:str}));
|
||||
}else if(rv.leftUsageCount == 0){
|
||||
message.warning(this.t('Generate.jsContent9',{str:str}));
|
||||
this.isGenerate = false
|
||||
this.isShowMark = false
|
||||
return
|
||||
}
|
||||
}
|
||||
this.generateId = rv.uniqueId
|
||||
this.setGenerate()
|
||||
this.remGenerateTime = setTimeout(()=>{
|
||||
this.remGenerate = true
|
||||
},10000)
|
||||
}
|
||||
).catch(res=>{
|
||||
this.isShowMark = false
|
||||
|
||||
Reference in New Issue
Block a user