This commit is contained in:
@@ -290,6 +290,7 @@
|
|||||||
|
|
||||||
// 加载配置
|
// 加载配置
|
||||||
function loadConfig() {
|
function loadConfig() {
|
||||||
|
console.log('开始加载配置...');
|
||||||
axios.get(apiBase, {
|
axios.get(apiBase, {
|
||||||
headers: { Authorization: `Bearer ${token}` }
|
headers: { Authorization: `Bearer ${token}` }
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -844,11 +845,13 @@
|
|||||||
|
|
||||||
const data = collectFormData();
|
const data = collectFormData();
|
||||||
|
|
||||||
console.log('保存的数据:', data); // 调试日志
|
console.log('保存的数据:', data);
|
||||||
|
console.log('保存的数据JSON:', JSON.stringify(data, null, 2)); // 调试日志
|
||||||
|
|
||||||
axios.post(apiBase, data, {
|
axios.post(apiBase, data, {
|
||||||
headers: { Authorization: `Bearer ${token}` }
|
headers: { Authorization: `Bearer ${token}` }
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log('服务器响应:', res.data);
|
||||||
alert(res.data.msg || '保存成功');
|
alert(res.data.msg || '保存成功');
|
||||||
// 使用服务器返回的数据更新config
|
// 使用服务器返回的数据更新config
|
||||||
config = res.data.data || data;
|
config = res.data.data || data;
|
||||||
|
|||||||
Reference in New Issue
Block a user