From 31817479d34a4125c26a1bab68465ef184d823d3 Mon Sep 17 00:00:00 2001 From: pengda <10266652509@qq.com> Date: Thu, 10 Oct 2024 18:52:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8D=AF=E6=9D=90=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/mFormula.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/model/mFormula.php b/model/mFormula.php index a6e1ad1..f994194 100644 --- a/model/mFormula.php +++ b/model/mFormula.php @@ -503,9 +503,13 @@ class mFormula extends mBase { foreach ($herbs as $key => $herb) { $org_herb[$key] = array( 'name' => trim($herb['name']), - 'num' => $this->convertToNum(trim($herb['name']), trim($herb['num'])), + 'num' => trim($herb['num']), 'desc' => trim($herb['desc']), ); + + //如果转义成功 则保存转义后的数据 + $num = $this->convertToNum(trim($herb['name']), trim($herb['num'])); + if ($num != 0) $org_herb[$key]['num'] = $num; } //更新原方和用法