Browse Source

优化 优化 优化

future 2 years ago
parent
commit
49930b5e60
48 changed files with 169 additions and 24 deletions
  1. 45 10
      pages/AI-draw/AI-draw.vue
  2. 5 3
      pages/home/home-bottom.vue
  3. 66 0
      pages/home/home-brief.vue
  4. 1 1
      pages/home/home-serviceTrait.vue
  5. 5 3
      pages/home/home.vue
  6. 7 7
      pages/login/login.vue
  7. 0 0
      unpackage/dist/build/.automator/app-plus/.automator.json
  8. 0 0
      unpackage/dist/build/app-plus/__uniappchooselocation.js
  9. BIN
      unpackage/dist/build/app-plus/__uniapperror.png
  10. 0 0
      unpackage/dist/build/app-plus/__uniappes6.js
  11. 0 0
      unpackage/dist/build/app-plus/__uniappopenlocation.js
  12. 0 0
      unpackage/dist/build/app-plus/__uniapppicker.js
  13. 6 0
      unpackage/dist/build/app-plus/__uniappquill.js
  14. 0 0
      unpackage/dist/build/app-plus/__uniappquillimageresize.js
  15. 0 0
      unpackage/dist/build/app-plus/__uniappscan.js
  16. BIN
      unpackage/dist/build/app-plus/__uniappsuccess.png
  17. 25 0
      unpackage/dist/build/app-plus/__uniappview.html
  18. 8 0
      unpackage/dist/build/app-plus/app-config-service.js
  19. 1 0
      unpackage/dist/build/app-plus/app-config.js
  20. 0 0
      unpackage/dist/build/app-plus/app-service.js
  21. 0 0
      unpackage/dist/build/app-plus/app-view.js
  22. 0 0
      unpackage/dist/build/app-plus/manifest.json
  23. BIN
      unpackage/dist/build/app-plus/static/PubImgs_avatar_avatar7.png
  24. BIN
      unpackage/dist/build/app-plus/static/PubImgs_avatar_avatar8.png
  25. BIN
      unpackage/dist/build/app-plus/static/apple.png
  26. BIN
      unpackage/dist/build/app-plus/static/closed.png
  27. BIN
      unpackage/dist/build/app-plus/static/goback.png
  28. BIN
      unpackage/dist/build/app-plus/static/home/home_robot.png
  29. BIN
      unpackage/dist/build/app-plus/static/home/home_service1.png
  30. BIN
      unpackage/dist/build/app-plus/static/home/home_service2.png
  31. BIN
      unpackage/dist/build/app-plus/static/home/home_service3.png
  32. BIN
      unpackage/dist/build/app-plus/static/home/home_service4.png
  33. BIN
      unpackage/dist/build/app-plus/static/img-off.png
  34. BIN
      unpackage/dist/build/app-plus/static/img-on.png
  35. BIN
      unpackage/dist/build/app-plus/static/img_delete.png
  36. BIN
      unpackage/dist/build/app-plus/static/img_jian.png
  37. BIN
      unpackage/dist/build/app-plus/static/img_send.png
  38. BIN
      unpackage/dist/build/app-plus/static/img_upload.png
  39. BIN
      unpackage/dist/build/app-plus/static/import-img.png
  40. BIN
      unpackage/dist/build/app-plus/static/logo.png
  41. BIN
      unpackage/dist/build/app-plus/static/msg-opt-1.png
  42. BIN
      unpackage/dist/build/app-plus/static/msg-opt-2.png
  43. BIN
      unpackage/dist/build/app-plus/static/msg-opt-3.png
  44. BIN
      unpackage/dist/build/app-plus/static/msg-opt-4.png
  45. BIN
      unpackage/dist/build/app-plus/static/nav_robot.png
  46. BIN
      unpackage/dist/build/app-plus/static/password_hidden.png
  47. 0 0
      unpackage/dist/build/app-plus/view.css
  48. 0 0
      unpackage/dist/build/app-plus/view.umd.min.js

+ 45 - 10
pages/AI-draw/AI-draw.vue

@@ -13,7 +13,7 @@
 									<view @tap="handleClick()" style="width: 100%;background-color: #2A2832;color: white;" class="htmlContent" ref="htmlContent" v-html="returnText(recvMsgQueue[index].msg_text)" >
 										
 									</view>
-									<image v-if="getImg(index)!=''" :src="getImg(index)"></image>
+									<image v-if="getImg(index)!=''" :src="getImg(index)" @click="onclickAiGetImg(index)"></image>
 									<view @click="stopRecv()" v-if="recvStatus&&recvMsgQueue[index].isFinish==false" style="display: flex;width: 100%;align-items: center;justify-content: center;">
 										<image src="../../static/closed.png" style="width: 50upx;height: 50upx;align-self: center;"></image>
 									</view>
@@ -28,9 +28,9 @@
 								
 						
 								
-								<view style=" display: flex;flex-wrap: wrap;width: 40%;">
-									<view  style="width:  25%;justify-content: center;align-items: center;display: flex;margin-top: 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: #24BF74;display: flex;border-radius: 25px 25px 25px 25px;align-items: center;justify-content: center;width: 100%;margin: 1%;">{{recvMsgQueue[index].actions[i]}}</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>
 								</view>
 							
@@ -47,7 +47,7 @@
 									<view style="width: 100%;background-color: #2A2832;color: white;" class="htmlContent" ref="htmlContent" >
 										{{recvMsgQueue[index].msg_text}}
 									</view>
-									<image v-if="recvMsgQueue[index].des_img!=''" :src="recvMsgQueue[index].des_img"></image>
+									<image v-if="recvMsgQueue[index].des_img!=''" :src="recvMsgQueue[index].des_img" style="background-color: #111111; margin-top: 1%;" mode="aspectFit" @click="onclickSendImg(index)"></image>
 								</view>
 								
 								<view v-if="false" style="margin-left: 65%;">
@@ -85,18 +85,19 @@
 			</view>
 		</view>
 					<view style="position: absolute;top: 10%;right: 5%;width: 200upx;display: flex;align-items: center;justify-content: center;">
-						<view style="color: white;margin-right: 10upx;">开启速</view>
+						<view style="color: white;margin-right: 10upx;">开启速</view>
 						<image @click="is_open_relax=false" v-show="is_open_relax==true" src="../../static/img-on.png" style="width: 60upx;height: 30upx;"></image>
 						<image @click="is_open_relax=true" v-show="is_open_relax==false" src="../../static/img-off.png" style="width: 60upx;height: 30upx;"></image>
 					</view>
 					
-					<view @click="is_show_import_img_view=true" style="position: absolute;top: 20%;right: 5%;width: 200upx;display: flex;align-items: center;justify-content: center;">
+					<view v-if="false" @click="is_show_import_img_view=true" style="position: absolute;top: 20%;right: 5%;width: 200upx;display: flex;align-items: center;justify-content: center;">
 						<view style="color: white;margin-right: 10upx;">导入图片</view>
 						<image  src="../../static/import-img.png" style="width: 60upx;height: 60upx;"></image>
 					</view>
 					
 					
-					<view v-if="is_show_import_img_view==true" style=" display: flex; height: 100vh; position: absolute;top: 0;width: 500upx;background-color:#24BF74;">
+					// v-if="is_show_import_img_view==true"
+					<view v-if="false" style=" display: flex; height: 100vh; position: absolute;top: 0;width: 500upx;background-color:#24BF74;">
 						<view style="width: 100%;;">
 							<view @click="onFileInput" style="display: flex;align-items: center;justify-content: center;margin-top: 5%;center;margin-bottom: 5%;">
 								<image :src="cur_select_img" style="width: 100upx;height: 100upx;"></image>
@@ -209,7 +210,7 @@
 					  					return hljs.highlightAuto(code).value;
 					 },
 					 langPrefix:"hljs language-"
-			});
+			});			
 		},
 		props: {
 			viewTop: {
@@ -581,6 +582,7 @@
 							for (var i = 0; i < list.length; i++) {
 								self.recvMsgQueue[self.recvMsgQueue.length-1].actions.push(list[i])
 							}
+														
 						}else{
 							uni.showModal({
 								content:res.data.detail+":"+res.statusCode,
@@ -598,6 +600,35 @@
 					}
 				})
 			},
+			onclickSendImg(index){
+				let img_url = this.recvMsgQueue[index].des_img
+				if(img_url) {
+					uni.previewImage({
+						urls:[img_url]
+					})
+				} else {
+					uni.showToast({
+						icon:'error',
+						title:'预览图片失败',
+						duration:2000
+					})
+				}
+				
+			},
+			onclickAiGetImg(index){
+				let img_url = this.getImg(index)
+				if(img_url) {
+					uni.previewImage({
+						urls:[img_url]
+					})
+				} else {
+					uni.showToast({
+						icon:'error',
+						title:'预览图片失败',
+						duration:2000
+					})
+				}
+			},
 			onclickDeleteChooseImg() {
 				let self = this
 				uni.showModal({
@@ -648,7 +679,7 @@
 						// 'aiimg_url': self.cur_select_img
 					},
 					success: (uploadFileRes) => {
-						console.log("uploadFile",obj);
+						console.log("uploadFile",uploadFileRes);
 						self.is_up_img_file = false;
 						let obj = JSON.parse(uploadFileRes.data)
 						uni.showToast({
@@ -666,6 +697,10 @@
 								return
 							} 
 							
+							if(self.choose_img_tempFilePath != '') {
+								self.choose_img_tempFilePath = ''
+							}
+							
 							// 发送
 							self.sendSocketMessage(self.inputValue, img_url+" "+self.inputValue ,img_url)
 							

+ 5 - 3
pages/home/home-bottom.vue

@@ -53,13 +53,15 @@
 		box-sizing: border-box;
 		flex-direction: column;
 		width: 100%;
-		height: 205px;
-		background-color: #2A2832;
+		height: 350px;
 		padding: 25px 50px;
+		background-color: #2A2832;
+		
 		.info{
 			display: flex;
+			box-sizing: border-box;
 			width: 100%;
-			height: 104px;
+			// height: 104px;
 			justify-content: space-between;
 			.info_left{
 				display: flex;

+ 66 - 0
pages/home/home-brief.vue

@@ -38,6 +38,71 @@
 </script>
 
 <style lang="scss">
+	.brief_container{
+		display: flex;
+		box-sizing: border-box;
+		flex-direction: column;
+		width: 100%;
+		align-items: center;
+
+		.briefContent{
+			display: flex;
+			width: 100%;
+			// height: 50vw; //250px;
+			padding: 18px;
+			justify-content: space-between;
+			// background-color: #2A2832;
+			
+			.briefContent_info{
+				display: flex;
+				flex-direction: column;
+				width: 100%;
+				height: 100%;
+				margin-left: 15px;
+				margin-right: 10px;
+				.briefContent_info_title{
+					font-size: 25px;
+					font-weight: 700;
+					color: #ffffff;
+				}
+				.briefContent_info_content{
+					margin-top: 12px;
+					font-size: 18px;
+					font-weight: 400;
+					color: #ffffff;
+					overflow: hidden;
+					text-overflow: ellipsis;	
+				}
+			}
+			.briefContent_robotImg{
+				margin-top: 15px;
+				margin-right: 10px;
+				width: 440px;
+				height: 200px;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+		.tiyanButton{
+			margin-top: 10px;
+			margin-bottom: 20px;
+			display: flex;
+			width: 170px;
+			height: 45px;
+			border-radius: 8px;
+			font-size: 20px;
+			color: #ffffff;
+			background: linear-gradient(to right, #1BC8C8, #D4F906);
+			justify-content: center;
+			align-items: center;
+		}
+	}
+</style>
+
+
+<!-- <style lang="scss">
 	.brief_container{
 		display: flex;
 		box-sizing: border-box;
@@ -98,3 +163,4 @@
 		}
 	}
 </style>
+ -->

+ 1 - 1
pages/home/home-serviceTrait.vue

@@ -51,12 +51,12 @@
 			display: flex;
 			box-sizing: border-box;
 			flex-direction: row;
+			margin-bottom: 2vw;
 			.box{
 				display: flex;
 				box-sizing: border-box;
 				flex-direction: column;
 				width: 25%;
-				height: 170px;
 				align-items: center;
 				// background-color: red;
 				.box_icon{

+ 5 - 3
pages/home/home.vue

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

+ 7 - 7
pages/login/login.vue

@@ -97,17 +97,17 @@
 			display: flex;
 			box-sizing: border-box;
 			flex-direction: column;
-			width: 55%; //497px;
+			width: 50%; //497px;
 			border-radius: 2vw; //10px;
 			border: 1px solid #32B3AA;			
 			box-shadow: 0 0 15px #000000;
 			// padding: 50px 37px;
-			padding: 8vw 5vw;
-			margin-top: 3vw;
+			padding: 5vw 3.7vw;
+			margin-top: 2vw;
 			align-items: center;
 			.loginText{
 				display: flex;
-				font-size: 3vw; //24px;
+				font-size: 2.5vw; //24px;
 				font-weight: 500;
 				color: #C2C2C2;
 				justify-content: center;
@@ -115,7 +115,7 @@
 			.phone_input{
 				margin-top: 2vw;//30px;
 				width: 100%;
-				height: 8vw; //70px;
+				height: 7vw; //70px;
 				font-size: 2vw; //22px;
 				color: #ffffff;
 				border-bottom: 1px solid #32B3AA;
@@ -149,10 +149,10 @@
 			.loginButton{
 				display: flex;
 				margin-top: 8vw; //80px;
-				width: 27vw; //260px;
+				width: 26vw; //260px;
 				height: 5vw; //60px;
 				border-radius: 10px;
-				font-size: 2.5vw; //22px;
+				font-size: 2.2vw; //22px;
 				color: #ffffff;
 				background-color: #32B3AA;
 				justify-content: center;

+ 0 - 0
unpackage/dist/build/.automator/app-plus/.automator.json


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/__uniappchooselocation.js


BIN
unpackage/dist/build/app-plus/__uniapperror.png


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/__uniappes6.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/__uniappopenlocation.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/__uniapppicker.js


File diff suppressed because it is too large
+ 6 - 0
unpackage/dist/build/app-plus/__uniappquill.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/__uniappquillimageresize.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/__uniappscan.js


BIN
unpackage/dist/build/app-plus/__uniappsuccess.png


+ 25 - 0
unpackage/dist/build/app-plus/__uniappview.html

@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+  <head>
+    <meta charset="UTF-8" />
+    <script>
+      var __UniViewStartTime__ = Date.now();
+      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>
+    <title>View</title>
+    <link rel="stylesheet" href="view.css" />
+  </head>
+
+  <body>
+    <div id="app"></div>
+    <script src="__uniappes6.js"></script>
+    <script src="view.umd.min.js"></script>
+    <script src="app-view.js"></script>
+  </body>
+
+</html>

+ 8 - 0
unpackage/dist/build/app-plus/app-config-service.js

@@ -0,0 +1,8 @@
+
+var isReady=false;var onReadyCallbacks=[];
+var isServiceReady=false;var onServiceReadyCallbacks=[];
+var __uniConfig = {"pages":["pages/enter/enter","pages/index/index","pages/login/login"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","scrollIndicator":"none"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"chatgpd","compilerVersion":"3.8.4","entryPagePath":"pages/enter/enter","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
+var __uniRoutes = [{"path":"/pages/enter/enter","meta":{"isQuit":true},"window":{"navigationBarTitleText":"","disableScroll":true,"titleNView":false}},{"path":"/pages/index/index","meta":{},"window":{"navigationBarTitleText":"","disableScroll":true,"titleNView":false}},{"path":"/pages/login/login","meta":{},"window":{"navigationBarTitleText":"登录","disableScroll":true,"titleNView":false}}];
+__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
+__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
+service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

+ 1 - 0
unpackage/dist/build/app-plus/app-config.js

@@ -0,0 +1 @@
+(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


BIN
unpackage/dist/build/app-plus/static/PubImgs_avatar_avatar7.png


BIN
unpackage/dist/build/app-plus/static/PubImgs_avatar_avatar8.png


BIN
unpackage/dist/build/app-plus/static/apple.png


BIN
unpackage/dist/build/app-plus/static/closed.png


BIN
unpackage/dist/build/app-plus/static/goback.png


BIN
unpackage/dist/build/app-plus/static/home/home_robot.png


BIN
unpackage/dist/build/app-plus/static/home/home_service1.png


BIN
unpackage/dist/build/app-plus/static/home/home_service2.png


BIN
unpackage/dist/build/app-plus/static/home/home_service3.png


BIN
unpackage/dist/build/app-plus/static/home/home_service4.png


BIN
unpackage/dist/build/app-plus/static/img-off.png


BIN
unpackage/dist/build/app-plus/static/img-on.png


BIN
unpackage/dist/build/app-plus/static/img_delete.png


BIN
unpackage/dist/build/app-plus/static/img_jian.png


BIN
unpackage/dist/build/app-plus/static/img_send.png


BIN
unpackage/dist/build/app-plus/static/img_upload.png


BIN
unpackage/dist/build/app-plus/static/import-img.png


BIN
unpackage/dist/build/app-plus/static/logo.png


BIN
unpackage/dist/build/app-plus/static/msg-opt-1.png


BIN
unpackage/dist/build/app-plus/static/msg-opt-2.png


BIN
unpackage/dist/build/app-plus/static/msg-opt-3.png


BIN
unpackage/dist/build/app-plus/static/msg-opt-4.png


BIN
unpackage/dist/build/app-plus/static/nav_robot.png


BIN
unpackage/dist/build/app-plus/static/password_hidden.png


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/view.css


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/view.umd.min.js


Some files were not shown because too many files changed in this diff