From ed558195dc57731e039e8e42d223076cdc129e28 Mon Sep 17 00:00:00 2001
From: pengda <10266652509@qq.com>
Date: Fri, 25 Oct 2024 17:31:33 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8D=AF=E6=96=B9=E5=A4=87=E6=B3=A8=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
view/templates/admin/formula_list.html | 36 +++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/view/templates/admin/formula_list.html b/view/templates/admin/formula_list.html
index 7642820..7f901eb 100644
--- a/view/templates/admin/formula_list.html
+++ b/view/templates/admin/formula_list.html
@@ -107,7 +107,9 @@
{/foreach}
用法:{$item.method}
- {if $item.remark}备注:{$item.remark}
{/if}
+
{if $item.uid==0}
@@ -239,6 +241,38 @@
});
}
+ function saveRemark(id){
+ let remark = $('.remark_'+id).val();
+ const data = {
+ id: id,
+ remark: remark,
+ };
+
+ $.ajax({
+ url: '/admin/ajax_update_formula', // 替换为你的服务器端处理文件
+ type: 'POST',
+ data: data,
+ dataType: 'json',
+ success: function (response) {
+ if (response.status == true) {
+ showAlert('保存成功')
+ return true;
+ }
+
+ if(response.data.code == 40002){
+ showAlert('请登录','/admin/login')
+ return true;
+ }
+
+ showAlert(response.info)
+ },
+ error: function (xhr, status, error) {
+ console.error('错误:', response);
+ alert('提交失败,请重试。');
+ }
+ });
+ }
+
function adjustFlexWidth(container) {
const items = container.querySelectorAll('.item');
let maxWidth = 0;
|