|
@ -107,7 +107,9 @@ |
|
|
{/foreach} |
|
|
{/foreach} |
|
|
</div> |
|
|
</div> |
|
|
<div style="line-height: 20px;padding-top: 10px">用法:{$item.method}</div> |
|
|
<div style="line-height: 20px;padding-top: 10px">用法:{$item.method}</div> |
|
|
{if $item.remark}<div style="line-height: 20px;padding-top: 10px;color: #0069d6">备注:{$item.remark}</div>{/if} |
|
|
<div style="line-height: 20px;padding-top: 10px"> |
|
|
|
|
|
备注:<textarea cols="80" class="remark_{$item.id}" style="color: #0069d6">{$item.remark}</textarea> <a onclick="saveRemark({$item.id})">保存</a> |
|
|
|
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
<td class="status_{$item.id}" data-status="{$item.is_delete}" style="{if $item.is_delete == 0}color:#57a957{/if}{if $item.is_delete == 3}color:red{/if}"> |
|
|
<td class="status_{$item.id}" data-status="{$item.is_delete}" style="{if $item.is_delete == 0}color:#57a957{/if}{if $item.is_delete == 3}color:red{/if}"> |
|
|
{if $item.uid==0} |
|
|
{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) { |
|
|
function adjustFlexWidth(container) { |
|
|
const items = container.querySelectorAll('.item'); |
|
|
const items = container.querySelectorAll('.item'); |
|
|
let maxWidth = 0; |
|
|
let maxWidth = 0; |
|
|