From ddf117324de09a455500f25278b03fa50cf2c36b Mon Sep 17 00:00:00 2001 From: taotao Date: Mon, 14 Oct 2024 15:30:55 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20simpleadmin/www/index.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simpleadmin/www/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/simpleadmin/www/index.html b/simpleadmin/www/index.html index e7c5f78..e0a9315 100644 --- a/simpleadmin/www/index.html +++ b/simpleadmin/www/index.html @@ -741,14 +741,11 @@ .replace(/ /g, ""); // if network provider is composed of numbers and spaces, and no letters then use .split(",")[2] - if (network_provider.match(/^[0-9]+$/) != null) { - this.networkProvider = lines - .find((line) => line.includes("+QSPN:")) - .split(",")[2] - .replace(/"/g, ""); - } else { - this.networkProvider = network_provider; - } + + const mccmncMap = { + "46000": "中国移动", + "46001": "中国联通", "46003": "中国电信", "46009": "中国联通", + "46011": "中国电信", "46015": "中国广电", "46020": "中国铁通"}; // --- MCCMNC --- this.mccmnc = lines @@ -756,6 +753,9 @@ .split(",")[4] .replace(/"/g, ""); + this.networkProvider = mccmncMap[this.mccmnc] || "未知运营商"; + + // --- APN --- // find this example value from lines "+CGCONTRDP: 1,0,\"internet.dito.ph\",\"100.65.141.236\",\"36.5.141.64.76.204.39.68.23.210.251.16.49.239.42.149\", \"254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1\",\"131.226.72.19\",\"131.226.73.19\"\r" this.apn = lines