From e13ffbffb354c22675c7b4b3bb0d94b2b0244087 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Sun, 21 Aug 2022 22:40:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/gsCfg.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/model/gsCfg.js b/model/gsCfg.js index 5d38268..c14d542 100644 --- a/model/gsCfg.js +++ b/model/gsCfg.js @@ -26,7 +26,18 @@ class GsCfg { defSet: {} } } - + async getyunToken(e) { + let file = `${yunpath}/${e.user_id}.yaml` + try { + let ck = fs.readFileSync(file, 'utf-8') + ck = YAML.parse(ck) + e.devId = ck.devId; + e.yuntoken = ck.yuntoken; + return ck + } catch (error) { + return "" + } + } /** * @param app 功能 * @param name 配置文件名称