Browse Source

调整AI生成逻辑

zjs_project 1 year ago
parent
commit
f1f46d916b

+ 10 - 0
src/assets/common.css

@@ -223,3 +223,13 @@ div {
    font-size: 13px;
    font-size: 13px;
     padding: 0 15px;
     padding: 0 15px;
 }
 }
+.el-button:focus, .el-button:hover{
+	color: unset;
+	border-color: unset;
+	background-color: unset;
+	/* background-image: linear-gradient(124deg, rgba(245, 201, 82, 0.4) 0%, rgba(239, 149, 57, 0.4) 100%); */
+}
+.el-button--primary{
+	background-color: #FD9429;
+	border-color: #F5C952;
+}

+ 3 - 2
src/components/newBottomCom/viewMask/viewMask.html

@@ -113,11 +113,12 @@
 		top="35vh"
 		top="35vh"
 		:modal="false"
 		:modal="false"
 		style="pointer-events: auto;"
 		style="pointer-events: auto;"
+		:before-close="cancelHandle"
 		>
 		>
 		<span>当前AI使用火爆,请继续尝试</span>
 		<span>当前AI使用火爆,请继续尝试</span>
 		<span slot="footer" class="dialog-footer">
 		<span slot="footer" class="dialog-footer">
-			<el-button @click.stop="dialogVisible = false;cancelHandle();">取消等待</el-button>
-			<el-button type="primary" @click.stop="dialogVisible = false;confirmHandle();">继续尝试</el-button>
+			<el-button @click.stop="cancelHandle();">取消等待</el-button>
+			<el-button type="primary" @click.stop="confirmHandle();">继续尝试</el-button>
 		</span>
 		</span>
 	</el-dialog>
 	</el-dialog>
 </div>
 </div>

+ 4 - 0
src/components/newBottomCom/viewMask/viewMask.vue

@@ -726,6 +726,8 @@
 						self.clearInterval();//停止轮询
 						self.clearInterval();//停止轮询
 						// self.$message.warning("AI开了个小差,请稍后再试");
 						// self.$message.warning("AI开了个小差,请稍后再试");
 						self.dialogVisible = true;
 						self.dialogVisible = true;
+						self.aiFlag = false;
+						self.aiImage = "";
 					}
 					}
 					clearTimeout(self.outTimer);
 					clearTimeout(self.outTimer);
 					self.outTimer = null
 					self.outTimer = null
@@ -733,11 +735,13 @@
 			},
 			},
 			confirmHandle(){
 			confirmHandle(){
 				console.log('用户点击确定')
 				console.log('用户点击确定')
+				this.dialogVisible = false;
 				this.subType = 1;
 				this.subType = 1;
 				this.startServer();
 				this.startServer();
 			},
 			},
 			cancelHandle(){
 			cancelHandle(){
 				console.log('用户点击取消')
 				console.log('用户点击取消')
+				this.dialogVisible = false;
 				this.subType = 0;
 				this.subType = 0;
 			},
 			},
 			// 轮询获取图片结果
 			// 轮询获取图片结果