diff --git a/pages/goods/create/index.js b/pages/goods/create/index.js index c7c0e0c..f60c95c 100644 --- a/pages/goods/create/index.js +++ b/pages/goods/create/index.js @@ -143,7 +143,12 @@ Page({ } }) } - var unitPrice = app.globalData.kg ? result.data.unitPrice : math.times(result.data.unitPrice, 1000) + if(result.data.unitPrice){ + var unitPrice = app.globalData.kg ? result.data.unitPrice : math.times(result.data.unitPrice, 1000) + }else{ + var unitPrice='' + } + var stock = app.globalData.kg ? result.data.stock : math.divide(result.data.stock, 1000) var lowestNum = '' if(!util.isEmpty(result.data.lowestNum)){