From b25676d35e2ab1915a394a58705bce93d03082f2 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 21 Jan 2026 17:46:30 +0800
Subject: [PATCH] feat(ai): 添加AI题目生成加载提示功能
---
src/main/resources/templates/febs/views/modules/ai/productQuestion/aiAdd.html | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/templates/febs/views/modules/ai/productQuestion/aiAdd.html b/src/main/resources/templates/febs/views/modules/ai/productQuestion/aiAdd.html
index a4e8b34..aff4d63 100644
--- a/src/main/resources/templates/febs/views/modules/ai/productQuestion/aiAdd.html
+++ b/src/main/resources/templates/febs/views/modules/ai/productQuestion/aiAdd.html
@@ -121,6 +121,12 @@
form.on('submit(productQuestion-add-form-submit)', function (data) {
data.field.productCategoryId = category.getValue('valueStr');
+ // 显示加载框
+ var loadIndex = layer.load(1, {
+ shade: [0.3, '#000'],
+ content: '正在生成题目,请稍候...',
+ shadeClose: false
+ });
$.ajax({
'url':ctx + 'admin/productQuestion/aiAdd',
'type':'post',
@@ -129,6 +135,8 @@
'traditional': true,//ajax传递数组必须添加属性
'data':JSON.stringify(data.field),
'success':function (data) {
+ // 关闭加载框
+ layer.close(loadIndex);
if(data.code==200){
layer.closeAll();
febs.alert.success(data.message);
@@ -138,6 +146,8 @@
}
},
'error':function () {
+ // 关闭加载框
+ layer.close(loadIndex);
febs.alert.warn('服务器繁忙');
}
})
--
Gitblit v1.9.1