|
@@ -106,14 +106,14 @@
|
|
|
return false;
|
|
|
}
|
|
|
// console.log("***leftScroll***",this.currentIndex,this.aiImagesList.length)
|
|
|
- let obj = {
|
|
|
- imgUrl:this.AIImg,
|
|
|
- prompt:this.options[this.optionIndex].remark,
|
|
|
- negativePrompt:this.options[this.optionIndex].tips,
|
|
|
- tabIndex:this.tabIndex,
|
|
|
- optionIndex:this.optionIndex,
|
|
|
- }
|
|
|
- this.startServer(obj);//继续生成下一张
|
|
|
+ // let obj = {
|
|
|
+ // imgUrl:this.AIImg,
|
|
|
+ // prompt:this.options[this.optionIndex].remark,
|
|
|
+ // negativePrompt:this.options[this.optionIndex].tips,
|
|
|
+ // tabIndex:this.tabIndex,
|
|
|
+ // optionIndex:this.optionIndex,
|
|
|
+ // }
|
|
|
+ // this.startServer(obj);//继续生成下一张
|
|
|
},
|
|
|
//点赞喜欢
|
|
|
changeAIImg() {
|
|
@@ -143,12 +143,21 @@
|
|
|
list.forEach(it => {
|
|
|
it.checkedIndex = -1;////增加当前题目用户选择的需要,默认不选中
|
|
|
it.options.forEach(option=>{
|
|
|
- option.hardboundEffect = [
|
|
|
- {
|
|
|
- imageUrl :option.imageUrl,
|
|
|
- type:'system',//人为添加的
|
|
|
- }
|
|
|
- ];//AI生成图存放对象
|
|
|
+ if(option.imageUrls){
|
|
|
+ option.hardboundEffect = option.imageUrls.map(it=>{
|
|
|
+ return {
|
|
|
+ imageUrl: it,
|
|
|
+ checked: false,
|
|
|
+ type:'system',//表示系统生成的
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // option.hardboundEffect = [
|
|
|
+ // {
|
|
|
+ // imageUrl :option.imageUrl,
|
|
|
+ // type:'system',//人为添加的
|
|
|
+ // }
|
|
|
+ // ];//AI生成图存放对象
|
|
|
})
|
|
|
});
|
|
|
let envData = getStorage('envData') ? JSON.parse(getStorage('envData')) : null;
|
|
@@ -186,6 +195,10 @@
|
|
|
this.tabIndex = id;
|
|
|
this.options = this.tabData[this.tabIndex].options; //选项数据
|
|
|
this.optionIndex = this.tabData[this.tabIndex].checkedIndex; //获取用户已经选中的选项
|
|
|
+ if(this.optionIndex>-1){
|
|
|
+ this.aiImagesList = this.options[this.optionIndex].hardboundEffect;
|
|
|
+ this.checked = this.aiImagesList[this.currentIndex].checked;
|
|
|
+ }
|
|
|
// let param = {
|
|
|
// type: 'CLK', //埋点类型
|
|
|
// clkId: 'clk_2cmina_24012601', //点击ID
|
|
@@ -214,6 +227,7 @@
|
|
|
this.aiImagesList = this.options[this.optionIndex].hardboundEffect;
|
|
|
this.currentIndex = 0;
|
|
|
this.$refs.carousel.setActiveItem(0); //切换到第一张
|
|
|
+ this.checked = this.aiImagesList[this.currentIndex].checked;
|
|
|
console.warn("***changeOption***", this.tabData,this.AIImg,this.subDataList)
|
|
|
// let param = {
|
|
|
// type: 'CLK', //埋点类型
|