mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-10-16 15:33:44 +08:00
优化插件管理逻辑
This commit is contained in:
@@ -126,10 +126,11 @@
|
||||
const field = data.field;
|
||||
(async () => {
|
||||
const saveRes = await fetch('/install/install', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(field) });
|
||||
if (saveRes.status != 200) { layer.msg('保存数据库配置失败'); return; }
|
||||
const saveJson = await saveRes.json();
|
||||
if (saveJson.code == 0) {
|
||||
const initRes = await fetch('/install/init', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(field) });
|
||||
if (initRes.status != 200) { layer.msg('初始化失败,请检查配置'); return; }
|
||||
if (initRes.status != 200) { layer.msg('初始化数据失败,请检查配置'); return; }
|
||||
const initJson = await initRes.json();
|
||||
if (initJson.code == 0) {
|
||||
layer.msg(initJson.msg, {
|
||||
|
Reference in New Issue
Block a user