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; } //更新原方和用法