|
@@ -12,10 +12,12 @@
|
|
setStorage,
|
|
setStorage,
|
|
getStorage,
|
|
getStorage,
|
|
} from '@/utils/localStorage';
|
|
} from '@/utils/localStorage';
|
|
|
|
+ import contrastImg from'@/components/contrastImg/contrastImg.vue';
|
|
// import requestConfig from '@/static/lib/requestConfig';
|
|
// import requestConfig from '@/static/lib/requestConfig';
|
|
// const app = getApp(); //获取应用实例
|
|
// const app = getApp(); //获取应用实例
|
|
export default {
|
|
export default {
|
|
mixins: [touchHandle],
|
|
mixins: [touchHandle],
|
|
|
|
+ components:{contrastImg},
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
currentIndex:0, //当前看到的图片序号
|
|
currentIndex:0, //当前看到的图片序号
|
|
@@ -169,6 +171,8 @@
|
|
curSpaceId:'',
|
|
curSpaceId:'',
|
|
queryObj:null,
|
|
queryObj:null,
|
|
form:null,
|
|
form:null,
|
|
|
|
+ interval:3000,
|
|
|
|
+ duration:500,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
props:{
|
|
props:{
|
|
@@ -319,6 +323,20 @@
|
|
//切换空间
|
|
//切换空间
|
|
changeSpace(item){
|
|
changeSpace(item){
|
|
this.$parent.changeSpace(item.spaceId);
|
|
this.$parent.changeSpace(item.spaceId);
|
|
|
|
+ //已经生成的AI图片中找到切换到的空间
|
|
|
|
+ let _spaceIndex = this.aiImagesList.findIndex(it=>it.spaceId==item.spaceId);
|
|
|
|
+ this.showAIImage = false;//隐藏
|
|
|
|
+ console.warn("***changeSpace123***",_spaceIndex);//
|
|
|
|
+ if(_spaceIndex != -1){//存在,则显示AI图
|
|
|
|
+ // this.currentIndex = _spaceIndex;
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.showAIImage = true;
|
|
|
|
+ this.$refs.carousel.setActiveItem(_spaceIndex);//切换到具体的一张
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ },2000)
|
|
|
|
+ }else{
|
|
|
|
+ this.showAIImage = false;//没有,则隐藏
|
|
|
|
+ }
|
|
let param = {
|
|
let param = {
|
|
type: 'CLK', //埋点类型
|
|
type: 'CLK', //埋点类型
|
|
clkId: 'clk_2cmina_23080417', //点击ID
|
|
clkId: 'clk_2cmina_23080417', //点击ID
|
|
@@ -548,7 +566,8 @@
|
|
// const spaceName = this.spaceTypes[this.spaceObj.spaceType - 1].title;
|
|
// const spaceName = this.spaceTypes[this.spaceObj.spaceType - 1].title;
|
|
let res = await requestConfig("getHardboundEffects", {
|
|
let res = await requestConfig("getHardboundEffects", {
|
|
// "houseId": this.$route.query.houseId || this.$store.state.houseId,
|
|
// "houseId": this.$route.query.houseId || this.$store.state.houseId,
|
|
- "spaceType": this.spaceObj.layoutSpaceType || this.spaceObj.spaceType,
|
|
|
|
|
|
+ // "spaceType": this.spaceObj.layoutSpaceType || this.spaceObj.spaceType,
|
|
|
|
+ "spaceType": 2,
|
|
"spaceName": this.spaceObj.layoutSpaceName || this.spaceObj.spaceName,
|
|
"spaceName": this.spaceObj.layoutSpaceName || this.spaceObj.spaceName,
|
|
});
|
|
});
|
|
this.styleList = [];
|
|
this.styleList = [];
|
|
@@ -619,6 +638,7 @@
|
|
clkName: 'AIcreate_clk', //点击前往的页面名称
|
|
clkName: 'AIcreate_clk', //点击前往的页面名称
|
|
clkParams: {
|
|
clkParams: {
|
|
locusName: "AI生成",
|
|
locusName: "AI生成",
|
|
|
|
+ locusValue:shottingImg,
|
|
userparamter:{
|
|
userparamter:{
|
|
shottingImg:this.shottingImg,
|
|
shottingImg:this.shottingImg,
|
|
style:this.styleList[this.curStyleIndex].styleName
|
|
style:this.styleList[this.curStyleIndex].styleName
|
|
@@ -633,6 +653,7 @@
|
|
clkName: 'continueAIcreate_clk', //点击前往的页面名称
|
|
clkName: 'continueAIcreate_clk', //点击前往的页面名称
|
|
clkParams: {
|
|
clkParams: {
|
|
locusName: "继续生成",
|
|
locusName: "继续生成",
|
|
|
|
+ locusValue:shottingImg,
|
|
userparamter:{
|
|
userparamter:{
|
|
shottingImg:this.shottingImg,
|
|
shottingImg:this.shottingImg,
|
|
style:this.styleList[this.curStyleIndex].styleName
|
|
style:this.styleList[this.curStyleIndex].styleName
|
|
@@ -754,6 +775,7 @@
|
|
this.curSpaceId = this.spaceObj.spaceId;//生成时的空间id
|
|
this.curSpaceId = this.spaceObj.spaceId;//生成时的空间id
|
|
let result = await this.prevHandle(parmas);
|
|
let result = await this.prevHandle(parmas);
|
|
console.warn("***prevHandle***",result)
|
|
console.warn("***prevHandle***",result)
|
|
|
|
+ // result = "https://elab-marketing-web.oss-accelerate.aliyuncs.com/aiBeauty/1748419217691.png"
|
|
if(result && result.length>0){
|
|
if(result && result.length>0){
|
|
this.randomHandle(result)
|
|
this.randomHandle(result)
|
|
return false;
|
|
return false;
|
|
@@ -1063,7 +1085,9 @@
|
|
spaceId:this.curSpaceId,//记录下当前生成的AI图是哪个空间的,因为会切换空间
|
|
spaceId:this.curSpaceId,//记录下当前生成的AI图是哪个空间的,因为会切换空间
|
|
}
|
|
}
|
|
this.aiImagesList.push(_data);
|
|
this.aiImagesList.push(_data);
|
|
- this.showAIImage = true;//显示AI结果集合-因为生成了AI图片
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.showAIImage = true;//显示AI结果集合-因为生成了AI图片
|
|
|
|
+ })
|
|
if(this.$parent && typeof(this.$parent.clearHandle)=="function" ){
|
|
if(this.$parent && typeof(this.$parent.clearHandle)=="function" ){
|
|
this.$parent.clearHandle();
|
|
this.$parent.clearHandle();
|
|
}
|
|
}
|
|
@@ -1073,6 +1097,16 @@
|
|
this.$refs.carousel.setActiveItem(this.aiImagesList.length-1);//切换到最后一张
|
|
this.$refs.carousel.setActiveItem(this.aiImagesList.length-1);//切换到最后一张
|
|
}, 1000);
|
|
}, 1000);
|
|
}
|
|
}
|
|
|
|
+ let param = {
|
|
|
|
+ type: 'CLK', //埋点类型
|
|
|
|
+ clkId: 'clk_2cmina_2025052301', //点击ID
|
|
|
|
+ clkName: 'ai_picture_result', //点击前往的页面名称
|
|
|
|
+ behaviorName:"图片生成结果",
|
|
|
|
+ clkParams: {
|
|
|
|
+ locusValue: resultImg
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ util.trackRequest(param);
|
|
},
|
|
},
|
|
//空间数据整理
|
|
//空间数据整理
|
|
spaceAIHandle(){
|
|
spaceAIHandle(){
|