Showing
1 changed file
with
8 additions
and
4 deletions
@@ -89,9 +89,13 @@ const applysave = (req, res, next) => { | @@ -89,9 +89,13 @@ const applysave = (req, res, next) => { | ||
89 | categoryInfo = [], | 89 | categoryInfo = [], |
90 | storeInfo = []; | 90 | storeInfo = []; |
91 | 91 | ||
92 | - for (let key in req.body) { | ||
93 | - | ||
94 | - param[_.camelCase(key)] = req.body[key]; | 92 | + try { |
93 | + for (let key in req.body) { | ||
94 | + key = key + ''; | ||
95 | + param[_.camelCase(key)] = req.body[key]; | ||
96 | + } | ||
97 | + } catch (e) { | ||
98 | + console.log(e); | ||
95 | } | 99 | } |
96 | 100 | ||
97 | if (param.sellerRole === '') { | 101 | if (param.sellerRole === '') { |
@@ -138,7 +142,7 @@ const applysave = (req, res, next) => { | @@ -138,7 +142,7 @@ const applysave = (req, res, next) => { | ||
138 | param.producer = param.originCountry + ' ' + param.originProvince + ' ' + param.originCity; | 142 | param.producer = param.originCountry + ' ' + param.originProvince + ' ' + param.originCity; |
139 | param.quarterNum = parseInt(param.quarterNum, 10); | 143 | param.quarterNum = parseInt(param.quarterNum, 10); |
140 | param.haveStore = parseInt(param.haveStore, 10); | 144 | param.haveStore = parseInt(param.haveStore, 10); |
141 | - param.warehouseAddress = param.warehouseProvince + ' ' + param.warehouseCity; | 145 | + param.warehouseAddress = param.warehouseProvince + ' ' + param.warehouseCity; |
142 | 146 | ||
143 | if (param.newCycle === '') { | 147 | if (param.newCycle === '') { |
144 | param.newCycle = param.ortherNewCycle; | 148 | param.newCycle = param.ortherNewCycle; |
-
Please register or login to post a comment