From 503c046e197d6d6f4ae8fc357c50ced4771bbe4a Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Thu, 22 Sep 2022 05:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3ProfileArtis.is=E5=AF=B9?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E6=A0=BC=E5=BC=8F=E4=BD=8D=E7=BD=AE=E7=9A=84?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Data.js | 2 ++ models/ProfileArtis.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/Data.js b/components/Data.js index 190fe67b..5c3843d2 100644 --- a/components/Data.js +++ b/components/Data.js @@ -195,6 +195,8 @@ let Data = { if (lodash.isString(arr)) { arr = arr.replace(/\s*(;|;|、|,)\s*/, ',') arr = arr.split(',') + } else if (typeof (arr) === 'number') { + arr = [arr.toString()] } lodash.forEach(arr, (str, idx) => { if (!lodash.isUndefined(str)) { diff --git a/models/ProfileArtis.js b/models/ProfileArtis.js index acb5a29d..52b13aa5 100644 --- a/models/ProfileArtis.js +++ b/models/ProfileArtis.js @@ -119,7 +119,7 @@ export default class ProfileArtis extends Base { isAttr (attr, pos = '3,4,5') { let mainAttr = this.mainAttr() let check = true - Data.eachStr(pos, (p) => { + Data.eachStr(pos.toString(), (p) => { if (!attr.split(',').includes(mainAttr[p])) { check = false return false