future 2 anos atrás
pai
commit
46593147a4

+ 56 - 11
pages/AI-draw/AI-draw.vue

@@ -1,7 +1,7 @@
 <template>
-	<view class="container" :style="{'top': (viewTop / 10) + 'vw', 'height': viewHeight + 'px'}">
+	<view class="container" :style="{'top': viewTop + 'px', 'height': viewHeight + 'px'}">
 		<view class="content">
-			<scroll-view scroll-y="true" :show-scrollbar="false" :scroll-top="scroll_top" style="top: 0%;width: 80vw; height:65%;position: absolute;">
+			    <scroll-view scroll-y="true" :show-scrollbar="false" :scroll-top="scroll_top" style="position: fixed; top: 70px;width: 80vw; bottom: 210upx;">
 					<view class="scroll-view-text">
 						<view  style="margin-left: 13%; display: flex; align-items: center;justify-content: center;width: 100%;  user-select: text;" v-for="(msgIndex,index) in recvMsgQueue " :key="index">
 							<!-- ai 的消息结构体 -->
@@ -27,10 +27,10 @@
 								</view>
 								
 						
-								
-								<view style=" display: flex;flex-wrap: wrap;width: 50%;">
-									<view  style="width: 23%;justify-content: center;align-items: center;display: flex;margin-top: 2%; margin-right: 2%;" v-for="(item,i) in recvMsgQueue[index].actions" key="key">
-										<view @click="clickitem(recvMsgQueue[index].actions[i],recvMsgQueue[index].image_id)" style="background-color: #32B3AA;display: flex; box-sizing: border-box; border-radius: 5px;align-items: center;justify-content: center;width: 100%; padding: 2%; font-size: 1.7vw; word-break: break-all; text-overflow: ellipsis; word-wrap: break-word; white-space: pre-wrap; text-align: center;">{{recvMsgQueue[index].actions[i]}}</view>
+								<view style=" display: flex;flex-wrap: wrap;width: 400px;">
+									<view  style="width: 23%;justify-content: center;align-items: center;display: flex;margin-top: 2%; margin-right: 2%;" v-for="(item,i) in recvMsgQueue[index].actions" :key="i">
+										<view @click="clickitem(recvMsgQueue[index].actions[i],recvMsgQueue[index].image_id)" 
+										style="background-color: #32B3AA;display: flex; box-sizing: border-box; border-radius: 5px;align-items: center;justify-content: center;width: 100%; padding: 2%; font-size: 16px; word-break: break-all; text-overflow: ellipsis; word-wrap: break-word; white-space: pre-wrap; text-align: center;">{{recvMsgQueue[index].actions[i].text}}</view>
 									</view>
 								</view>
 							
@@ -208,7 +208,10 @@
 					  					return hljs.highlightAuto(code).value;
 					 },
 					 langPrefix:"hljs language-"
-			});			
+			});	
+								
+			this.recvMsgQueue = uni.getStorageSync('recvMsgQueue')	
+			// console.log('this.recvMsgQueue[0].actions=',this.recvMsgQueue[0].actions)	
 		},
 		props: {
 			viewTop: {
@@ -296,7 +299,7 @@
 			 //  reader.readAsDataURL(file)  // 读取文件并启动onload回调函数
 			},
 			clickitem(action,image_id){
-				switch(action){
+				switch(action.id){
 					case "upsample1":
 					break;
 					case "upsample2":
@@ -316,7 +319,14 @@
 				}
 				console.log("clickitem",this.recvStatus,action,image_id)
 				if(!this.recvStatus){
-					this.sendSocketMessage(action,'','',action,image_id)
+					// this.sendSocketMessage(action,'','',action,image_id)
+					this.sendSocketMessage(action.text,'','',action.id,image_id)
+					// this.recvMsgQueue.push({who_msg:config.type_self,msg_type:0,msg_text:action.text,isFinish:true,'des_img':image_id})
+					// this.initAni()
+					let self = this
+					setTimeout(function() {
+						self.showLastMsg()
+					}, 500);
 				}
 				
 			},
@@ -577,10 +587,45 @@
 							self.recvMsgQueue[self.recvMsgQueue.length-1].actions = [];
 							let list = [];
 							list = res.data.actions;
+							// for (var i = 0; i < list.length; i++) {
+							// 	self.recvMsgQueue[self.recvMsgQueue.length-1].actions.push(list[i])
+							// }							
 							for (var i = 0; i < list.length; i++) {
-								self.recvMsgQueue[self.recvMsgQueue.length-1].actions.push(list[i])
+								let action = list[i]
+								let dic = {}
+								switch (action){
+									case 'upsample1':
+									    dic = {'id': action, 'text': '放大1'}
+										break;
+									case 'upsample2':
+									    dic = {'id': action, 'text': '放大2'}
+										break;
+									case 'upsample3':
+									    dic = {'id': action, 'text': '放大3'}
+										break;
+									case 'upsample4':
+									    dic = {'id': action, 'text': '放大4'}
+										break;
+									case 'variation1':
+									    dic = {'id': action, 'text': '优化1'}
+										break;
+									case 'variation2':
+									    dic = {'id': action, 'text': '优化2'}
+										break;
+									case 'variation3':
+									    dic = {'id': action, 'text': '优化3'}
+										break;
+									case 'variation4':
+									    dic = {'id': action, 'text': '优化4'}
+										break;
+									default:
+									    dic = {'id': action, 'text': action}
+										break;
+								}
+								// console.log('action.dic=',dic)
+								self.recvMsgQueue[self.recvMsgQueue.length-1].actions.push(dic)
 							}
-														
+								
 						}else{
 							uni.showModal({
 								content:res.data.detail+":"+res.statusCode,

+ 3 - 2
pages/AI_chat/AI_chat.vue

@@ -1,7 +1,8 @@
 <template>
-	<view class="container" :style="{'top': (viewTop / 10) + 'vw', 'height': viewHeight + 'px'}">
+	<view class="container" :style="{'top': viewTop + 'px', 'height': viewHeight + 'px'}">
 		<view class="content">
-			<scroll-view scroll-y="true" :show-scrollbar="false" :scroll-top="scroll_top" style="top: 0%;width: 80vw; height:65%;position: absolute;">
+			<!-- <scroll-view scroll-y="true" :show-scrollbar="false" :scroll-top="scroll_top" style="top: 0%;width: 80vw; height:65%;position: absolute;"> -->
+			<scroll-view scroll-y="true" :show-scrollbar="false" :scroll-top="scroll_top" style="position: fixed; top: 70px;width: 80vw; bottom: 210upx;">
 					<view class="scroll-view-text">
 						<view  style="margin-left: 13%; display: flex; align-items: center;justify-content: center;width: 100%;  user-select: text;" v-for="(msgIndex,index) in recvMsgQueue ">
 							<!-- ai 的消息结构体 -->

+ 3 - 3
pages/enter/enter-navigator.vue

@@ -108,7 +108,7 @@ import { nextTick } from "vue"
 		position: fixed;
 		z-index: 100;
 		width: 100%;
-		height: 6vw; //60px;
+		height: 60px; //6vw; 
 		top: 0%;
 		left: 0;
 		background: linear-gradient(to right, #303373, #C9A391);
@@ -118,8 +118,8 @@ import { nextTick } from "vue"
 		
 		.robot{
 			flex-shrink: 0;
-			width: 4%; // 48px;
-			height: 90%; // 48px;
+			width: 48px; //4%;
+			height: 48px; //90%; 
 			margin-left: 2%; // 15px;
 			image{
 				width: 100%;

+ 1 - 1
pages/home/home.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="container" :style="{'top': (viewTop / 10) + 'vw', 'height': viewHeight + 'px'}">
+	<view class="container" :style="{'top': viewTop + 'px', 'height': viewHeight + 'px'}">
 		<scroll-view style="width: 100%; height: 100%;" scroll-y="true">
 			<brief />
 			<serviceTrait />

+ 1 - 1
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>chatgpd</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.15388f02.js></script><script src=/static/js/index.8316cd10.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.15388f02.js></script><script src=/static/js/index.c303d126.js></script></body></html>

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/build/h5/static/js/index.c303d126.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-enter-enter.54551e64.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-enter-enter.b62d6997.js


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff