|
@@ -4,7 +4,7 @@
|
|
|
<script>
|
|
|
const util = require('@/utils/util.js').default;
|
|
|
import router from "@/router";
|
|
|
- import { MessageBox } from 'mint-ui';
|
|
|
+ import { MessageBox,Toast } from 'mint-ui';
|
|
|
import spaceTypes from '@/static/spaceTypesIE.js';
|
|
|
// const config = require('@/services/url$config.js');
|
|
|
import touchHandle from '@/mixins/touchHandle.js';
|
|
@@ -167,12 +167,15 @@
|
|
|
// dialogVisible: false,
|
|
|
// dialogAIVisible: false,
|
|
|
datalist:[],
|
|
|
- connectUsImg:'',
|
|
|
+ connectUsImg:'https://dm.static.elab-plus.com/miniProgram/conect-us-icon.png',
|
|
|
curSpaceId:'',
|
|
|
queryObj:null,
|
|
|
form:null,
|
|
|
interval:3000,
|
|
|
duration:500,
|
|
|
+ highColor1:window.highColor1,
|
|
|
+ highColor2:window.highColor2,
|
|
|
+ backgroundColor:window.backgroundColor,
|
|
|
}
|
|
|
},
|
|
|
props:{
|
|
@@ -263,7 +266,7 @@
|
|
|
if(window.innerHeight && window.screen.height){
|
|
|
this.screenHeight = Math.min(window.innerHeight,window.screen.height)
|
|
|
}
|
|
|
- this.connectUsImg = 'https://dm.static.elab-plus.com/miniProgram/conentUs.png';
|
|
|
+ // this.connectUsImg = 'https://dm.static.elab-plus.com/miniProgram/conentUs.png';
|
|
|
let firstData = JSON.parse(getStorage('firstData'));
|
|
|
if(firstData && firstData[0]){
|
|
|
this.connectUsImg = firstData[0].selectOptionImageUrl;
|
|
@@ -296,6 +299,34 @@
|
|
|
},
|
|
|
},
|
|
|
methods:{
|
|
|
+ hexToRgba(hex, opacity) {
|
|
|
+ // console.warn("**hexToRgba****",hex,opacity)
|
|
|
+ if (!hex||!opacity){
|
|
|
+ return hex
|
|
|
+ }
|
|
|
+ let RGBA;
|
|
|
+ if (hex.includes('#')&&hex.length==7){
|
|
|
+ RGBA = "rgba(" + parseInt("0x" + hex.slice(1, 3)) + "," + parseInt("0x" + hex.slice(3, 5)) + "," +
|
|
|
+ parseInt("0x" + hex.slice(5, 7)) + "," + opacity + ")";
|
|
|
+ }else if (hex.includes('rgb(')){
|
|
|
+ var values = hex
|
|
|
+ .replace(/rgb?\(/, '')
|
|
|
+ .replace(/\)/, '')
|
|
|
+ .replace(/[\s+]/g, '')
|
|
|
+ .split(',')
|
|
|
+ return `rgba(${values[0]},${values[1]},${values[2]},${opacity})`
|
|
|
+ }else if(hex.includes('rgba(')){
|
|
|
+ var values = hex
|
|
|
+ .replace(/rgba?\(/, '')
|
|
|
+ .replace(/\)/, '')
|
|
|
+ .replace(/[\s+]/g, '')
|
|
|
+ .split(',')
|
|
|
+ return `rgba(${values[0]},${values[1]},${values[2]},${opacity})`
|
|
|
+ }else{
|
|
|
+ return hex
|
|
|
+ }
|
|
|
+ return RGBA
|
|
|
+ },
|
|
|
//更改空间显示名称 X空间 类型 根据布局所属类型来显示
|
|
|
updataLable(){
|
|
|
let list = this.layoutList;
|
|
@@ -334,7 +365,7 @@
|
|
|
this.themeIndex = aiObj.themeIndex;
|
|
|
console.warn("***syncData-space***",aiObj)
|
|
|
},
|
|
|
- //切换空间
|
|
|
+ //切换空间-会请求接口更新当前空间的风格数据
|
|
|
changeSpace(item){
|
|
|
this.$parent.changeSpace(item.spaceId);
|
|
|
//已经生成的AI图片中找到切换到的空间
|
|
@@ -491,35 +522,35 @@
|
|
|
},
|
|
|
|
|
|
//点赞喜欢
|
|
|
- // changeAIImg() {
|
|
|
- // // let lastPage = getCurrentPages()[getCurrentPages().length - 2] ? getCurrentPages()[getCurrentPages().length - 2].$vm : null;
|
|
|
- // this.checked = !this.checked;//变更选项
|
|
|
- // this.aiImagesList[this.currentIndex].checked = this.checked;
|
|
|
- // console.warn("***changeAIImg***",this.checked,this.aiData)
|
|
|
- // // if(this.aiData){//给上一个页面回传生成的数据
|
|
|
- // // let space = this.aiData.find(it=>{
|
|
|
- // // return it.spaceId == this.spaceObj.spaceId
|
|
|
- // // })
|
|
|
- // // if(space){
|
|
|
- // // space.aiImagesList[this.currentIndex].checked = this.checked;
|
|
|
- // // }
|
|
|
- // // }
|
|
|
- // if(this.checked){
|
|
|
- // let param = {
|
|
|
- // type: 'CLK', //埋点类型
|
|
|
- // clkId: 'clk_2cmina_23080418', //点击ID
|
|
|
- // clkName: 'chooseprogramme_clk', //点击前往的页面名称
|
|
|
- // behaviorName:"点赞喜欢",
|
|
|
- // clkParams: {
|
|
|
- // locusName: "选定风格/视角",
|
|
|
- // style:this.styleList[this.curStyleIndex].styleName,
|
|
|
- // img:this.aiImagesList[this.currentIndex].image,
|
|
|
- // locusValue:this.aiImagesList[this.currentIndex].image,
|
|
|
- // }
|
|
|
- // };
|
|
|
- // util.trackRequest(param);
|
|
|
- // }
|
|
|
- // },
|
|
|
+ changeAIImg() {
|
|
|
+ // let lastPage = getCurrentPages()[getCurrentPages().length - 2] ? getCurrentPages()[getCurrentPages().length - 2].$vm : null;
|
|
|
+ this.checked = !this.checked;//变更选项
|
|
|
+ this.aiImagesList[this.currentIndex].checked = this.checked;
|
|
|
+ console.warn("***changeAIImg***",this.checked,this.aiData)
|
|
|
+ // if(this.aiData){//给上一个页面回传生成的数据
|
|
|
+ // let space = this.aiData.find(it=>{
|
|
|
+ // return it.spaceId == this.spaceObj.spaceId
|
|
|
+ // })
|
|
|
+ // if(space){
|
|
|
+ // space.aiImagesList[this.currentIndex].checked = this.checked;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if(this.checked){
|
|
|
+ let param = {
|
|
|
+ type: 'CLK', //埋点类型
|
|
|
+ clkId: 'clk_2cmina_23080418', //点击ID
|
|
|
+ clkName: 'chooseprogramme_clk', //点击前往的页面名称
|
|
|
+ behaviorName:"点赞喜欢",
|
|
|
+ clkParams: {
|
|
|
+ locusName: "选定风格/视角",
|
|
|
+ style:this.styleList[this.curStyleIndex].styleName,
|
|
|
+ img:this.aiImagesList[this.currentIndex].image,
|
|
|
+ locusValue:this.aiImagesList[this.currentIndex].image,
|
|
|
+ }
|
|
|
+ };
|
|
|
+ util.trackRequest(param);
|
|
|
+ }
|
|
|
+ },
|
|
|
rightScroll(){//右滑
|
|
|
if(this.currentIndex <= (this.aiImagesList.length - 1) && this.currentIndex > 0){
|
|
|
// this.currentIndex --;
|
|
@@ -683,30 +714,6 @@
|
|
|
util.trackRequest(param);
|
|
|
}
|
|
|
},
|
|
|
- image2Base64(imgUrl) {//导入的图片路径
|
|
|
- var toBase64= new Promise(function(resolve, reject){
|
|
|
- window.URL = window.URL || window.webkitURL;
|
|
|
- var xhr = new XMLHttpRequest();
|
|
|
- xhr.open("get", imgUrl, true);
|
|
|
- // 至关重要
|
|
|
- xhr.responseType = "blob";//文件流
|
|
|
- xhr.onload = function (res) {
|
|
|
- if (res.currentTarget.status == 200) {
|
|
|
- //得到一个blob对象
|
|
|
- var blob = res.currentTarget.response;
|
|
|
- // 至关重要
|
|
|
- let oFileReader = new FileReader();
|
|
|
- oFileReader.onloadend = function (e) {
|
|
|
- let base64 = e.target.result;//base64
|
|
|
- resolve(base64)
|
|
|
- };
|
|
|
- oFileReader.readAsDataURL(blob);
|
|
|
- }
|
|
|
- }
|
|
|
- xhr.send();
|
|
|
- });
|
|
|
- return toBase64;
|
|
|
- },
|
|
|
changeImg2Base64(url, isRepeat) {
|
|
|
var self = this;
|
|
|
if(isRepeat && self.inputBase64Url){//重复使用
|
|
@@ -742,10 +749,10 @@
|
|
|
if(!this.styleList || this.curStyleIndex < 0 || !this.styleList[this.curStyleIndex].imgUrl){
|
|
|
return false
|
|
|
}
|
|
|
- if(this.$parent.pvCurPageName!="room_show"){//说明用户切换页面了
|
|
|
- console.warn("***用户已经退出页面***")
|
|
|
- return false;
|
|
|
- }
|
|
|
+ // if(this.$parent.pvCurPageName!="room_show"){//说明用户切换页面了
|
|
|
+ // console.warn("***用户已经退出页面***")
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
let imgUrl = this.styleList[this.curStyleIndex].imgUrl;
|
|
|
let subType = this.subType;
|
|
|
let session_hash = Date.now();
|
|
@@ -1090,6 +1097,12 @@
|
|
|
this.loadingMsg = '生成中…100%';
|
|
|
}
|
|
|
},
|
|
|
+ //评估按钮处理
|
|
|
+ assessmentHandle(){
|
|
|
+ Toast({
|
|
|
+ message: '敬请期待!',
|
|
|
+ });
|
|
|
+ },
|
|
|
//返回结果处理
|
|
|
resultHandle(resultImg){
|
|
|
this.currentImg = true;
|
|
@@ -1420,7 +1433,8 @@
|
|
|
houseId:houseId,
|
|
|
id:res.single,
|
|
|
}
|
|
|
- wx.miniProgram.redirectTo({url: '/webgl/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize?id='+data.id+"&houseId="+houseId})
|
|
|
+ // wx.miniProgram.redirectTo({url: '/webgl/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize?id='+data.id+"&houseId="+houseId})
|
|
|
+ wx.miniProgram.redirectTo({url: '/extraPackage/pages/aiPublishPageV2/aiPublishPageV2?id='+data.id+"&houseId="+houseId})
|
|
|
// router.push({
|
|
|
// name: "webgl_rxdz_text_customize",
|
|
|
// query:data
|