From 1aef45e316a0ef6f9912951feda03105b0935760 Mon Sep 17 00:00:00 2001 From: CodFrm Date: Sat, 18 May 2019 13:34:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/config.js b/src/config.js index 2efe586..f9170db 100644 --- a/src/config.js +++ b/src/config.js @@ -9,14 +9,22 @@ module.exports = { }, injection: '', hotversion: { - v2_10: 2.10, + v2_10: 2.101, v2_08: 2.083, v2_07: 2.071, v2_06: 2.06, }, getHotVersion: function (ver) { - let dealver = 'v' + ('' + ver || this.version).replace('.', '_'); + let dealver = 'v' + pushZero(ver || this.version).replace('.', '_'); hotversion = this.hotversion[dealver] || this.version; return hotversion; } -} \ No newline at end of file +} + +function pushZero(num) { + num = "" + num; + for (; num.length < 4;) { + num = num + "0"; + } + return num; +} -- GitLab