Commit d9e15187 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理商品图片上传翻译异常

parent c3a6e1cd
......@@ -196,6 +196,8 @@ export default {
'commodity.products.addProducts.onSave.error.2':'Please complete other product information! ',
'commodity.products.addProducts.onSave.error.3':'Commodity price is required! ',
'commodity.products.addProducts.onSave.error.4':'Commodity points are required! ',
'commodity.products.addProducts.onSave.error.5' : 'Please upload the product picture again!',
'commodity.products.addProducts.onSave.error.6' : 'Please upload the product picture!',
'commodity.products.addProducts.back':'Return',
'commodity.products.addProducts.title.1':'Edit product',
'commodity.products.addProducts.title.2':'New product',
......
......@@ -197,6 +197,8 @@ export default {
'commodity.products.addProducts.onSave.error.2' : '상품 기타 정보를 보완해 주세요!',
'commodity.products.addProducts.onSave.error.3' : '상품 가격은 필수입니다!',
'commodity.products.addProducts.onSave.error.4' : '상품 포인트는 필수입니다!',
'commodity.products.addProducts.onSave.error.5' : '상품 사진 다시 올려주세요!',
'commodity.products.addProducts.onSave.error.6' : '상품 사진 올려주세요!',
'commodity.products.addProducts.back' : '되돌아오다',
'commodity.products.addProducts.title.1' : '상품 편집',
'commodity.products.addProducts.title.2' : '신제품',
......
......@@ -197,6 +197,8 @@ export default {
'commodity.products.addProducts.onSave.error.2' : '请完善商品其他信息!',
'commodity.products.addProducts.onSave.error.3' : '商品价格为必填项!',
'commodity.products.addProducts.onSave.error.4' : '商品积分为必填项!',
'commodity.products.addProducts.onSave.error.5' : '请重新上传商品图片!',
'commodity.products.addProducts.onSave.error.6' : '请上传商品图片!',
'commodity.products.addProducts.back' : '返回',
'commodity.products.addProducts.title.1' : '编辑商品',
'commodity.products.addProducts.title.2' : '新建商品',
......
......@@ -272,7 +272,7 @@ const AddProducts: React.FC<{}> = (props) => {
_params.unitPriceAndPicList = priceAttributeParams.map((item, index) => {
const pic = productInfoByEdit.unitPriceAndPicList[index]?.commodityPic
if (!pic) {
throw new Error('请重新上传商品图片!')
throw new Error(intl.formatMessage({ id: 'commodity.products.addProducts.onSave.error.5' }))
}
return {
id: item.id,
......@@ -285,7 +285,7 @@ const AddProducts: React.FC<{}> = (props) => {
})
}
} else {
throw new Error('请上传商品图片!')
throw new Error(intl.formatMessage({ id: 'commodity.products.addProducts.onSave.error.6' }))
}
} catch (e) {
return e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment