From 65dd58305cdd7a97bb3cd8fd47d5a338d6361f54 Mon Sep 17 00:00:00 2001 From: hyx Date: Mon, 10 Oct 2022 16:22:50 +0800 Subject: [PATCH] =?UTF-8?q?CN-742=20=E7=99=BB=E5=BD=95=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E5=90=8E=E9=87=8D=E6=96=B0=E7=99=BB=E5=BD=95=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E6=9C=89=E4=BA=9Burl=E5=8F=82=E6=95=B0=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 7b9128af..1cfc998d 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -56,8 +56,10 @@ const user = { if (tempArr[1]) { tempArr = tempArr[1].split('&') tempArr.forEach(t => { - const kv = t.split('=') - query[kv[0]] = kv[1] + let firstEqualIndex = t.indexOf('=') + let key = t.substring(0,firstEqualIndex) + let value = t.substring(firstEqualIndex+1) + query[key] = value }) } router.push({