xy 2 gadi atpakaļ
vecāks
revīzija
829b8561c3
1 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. 7 5
      pages/AI-draw/AI-draw.vue

+ 7 - 5
pages/AI-draw/AI-draw.vue

@@ -47,6 +47,7 @@
 									<view style="width: 100%;background-color: #2A2832;color: white;" class="htmlContent" ref="htmlContent" >
 										{{recvMsgQueue[index].msg_text}}
 									</view>
+									<image :src="recvMsgQueue[index].des_img"></image>
 								</view>
 								
 								<view v-if="false" style="margin-left: 65%;">
@@ -217,7 +218,8 @@
 				}
 				if(this.diy_inputValue.length>0){
 					this.is_show_import_img_view = false;
-					this.sendSocketMessage(this.diy_inputValue,this.cur_select_img+" "+this.diy_inputValue)
+					let des_img = this.cur_select_img;
+					this.sendSocketMessage(this.diy_inputValue,this.cur_select_img+" "+this.diy_inputValue,des_img)
 					this.diy_inputValue = '';
 				}else{
 					uni.showToast({
@@ -302,7 +304,7 @@
 				}
 				console.log("clickitem",this.recvStatus,action,image_id)
 				if(!this.recvStatus){
-					this.sendSocketMessage(action,'',action,image_id)
+					this.sendSocketMessage(action,'','',action,image_id)
 				}
 				
 			},
@@ -524,8 +526,8 @@
 				let self = this;
 				clearTimeout(self.startUpdateView)
 			},
-			sendSocketMessage(msg,prompt=msg,action='generate',image_id='') {
-				console.log("sendSocketMessage send")
+			sendSocketMessage(msg,prompt=msg,des_img='',action='generate',image_id='') {
+				console.log("sendSocketMessage send",des_img)
 				let self = this;
 				let isRelax = self.is_open_relax;
 				let token = isRelax?"7d995cf958f54d2c9c3264e645a9c4d9":"bdb957b8003e4a46b6b26a7174be5789";
@@ -535,7 +537,7 @@
 				self.disabled = true;
 				self.ani_style.rotate = 0;
 				self.inputValue = '';
-				self.recvMsgQueue.push({who_msg:config.type_self,msg_type:0,msg_text:msg,isFinish:true})
+				self.recvMsgQueue.push({who_msg:config.type_self,msg_type:0,msg_text:msg,isFinish:true,des_img:des_img})
 				self.recvMsgQueue.push({who_msg:config.type_ai,msg_type:0,msg_text:"正在生成...",msg_img:"",isFinish:false,actions:[],image_id:"",task_id:"",loading_title:1})
 				// self.recvMsgQueue[self.recvMsgQueue.length-1].actions=['upsample1', 'upsample2', 'upsample3', 'upsample4', 'variation1', 'variation2', 'variation3', 'variation4']
 				self.initAni();