From 42521f37d48e8da6a0aaf2bf1af6abc55527e2b5 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Fri, 9 Sep 2022 10:40:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9C=A3=E9=81=97=E7=89=A9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=96=B0=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=200=E3=80=820?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/ProfileArtis.js | 24 ++++++++++++++++++++++++ models/ProfileData.js | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/models/ProfileArtis.js b/models/ProfileArtis.js index 3505c8a3..f095f367 100644 --- a/models/ProfileArtis.js +++ b/models/ProfileArtis.js @@ -54,6 +54,30 @@ export default class ProfileArtis extends Base { }) } + get 1 () { + return this.artis[1] + } + + get 2 () { + return this.artis[2] + } + + get 3 () { + return this.artis[3] + } + + get 4 () { + return this.artis[4] + } + + get 5 () { + return this.artis[5] + } + + get length () { + return lodash.keys(this.artis).length + } + _get (key) { let artis = this.artis switch (key) { diff --git a/models/ProfileData.js b/models/ProfileData.js index 7d15568c..8014d070 100644 --- a/models/ProfileData.js +++ b/models/ProfileData.js @@ -108,7 +108,7 @@ export default class ProfileData extends Base { // toJSON 供保存使用 toJSON () { - return this.getData('id,name,level,cons,fetter,attr,weapon,talent,artis,dataSource,costume,elem,_time') + return this._proxy().getData('id,name,level,cons,fetter,attr,weapon,talent,artis,dataSource,costume,elem,_time') } get updateTime () {