From f8a5f6c3947ad61ad3f172e81b30b5bf8b639b4c Mon Sep 17 00:00:00 2001 From: Kokomi <1379177109@qq.com> Date: Wed, 22 May 2024 02:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0model/index.js=E5=AF=B9path?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/models/index.js b/models/index.js index 15e73411..67237319 100644 --- a/models/index.js +++ b/models/index.js @@ -1,5 +1,4 @@ import fs from 'node:fs' - import Base from './Base.js' import Character from './Character.js' import Artifact from './Artifact.js' @@ -14,21 +13,20 @@ import Weapon from './Weapon.js' import User from './User.js' import MysApi from './MysApi.js' import Button from './Button.js' -import { rootPath } from '#miao.path' +import { miaoPath } from '#miao.path' for (let game of ['gs', 'sr']) { for (let type of ['artifact', 'character', 'material', 'weapon']) { - let file = `./plugins/miao-plugin/resources/meta-${game}/${type}/index.js` + let file = `${miaoPath}/resources/meta-${game}/${type}/index.js` if (fs.existsSync(file)) { try { - await import(`file://${rootPath}/${file}`) + await import(`file://${file}`) } catch (e) { console.log(e) } } } } - export { Base, Abyss,