feat: #13 公开商品 API 补充 code/barcode/batch.quantity,报错反馈携带商品和门店信息
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,13 +70,22 @@ class _PublicProductScreenState extends State<PublicProductScreen> {
|
||||
title: title,
|
||||
hint: hint,
|
||||
onSubmit: (msg) async {
|
||||
final shopNo = (_data?['shop'] as Map<String, dynamic>?)?['code'] as String? ?? '';
|
||||
final productName = _data?['name'] as String? ?? '';
|
||||
final productCode = _data?['code'] as String? ?? '';
|
||||
final productInfo = [
|
||||
if (productName.isNotEmpty) productName,
|
||||
if (productCode.isNotEmpty) productCode,
|
||||
if (widget.publicId.isNotEmpty) widget.publicId,
|
||||
].join(' / ');
|
||||
await _dio.post(
|
||||
'${AppConfig.apiBaseUrl}/public/errors',
|
||||
data: {
|
||||
'error_type': errorType,
|
||||
'error_msg': msg,
|
||||
'platform': 'web-scan',
|
||||
'shop_no': (_data?['shop'] as Map<String, dynamic>?)?['code'] as String? ?? '',
|
||||
'shop_no': shopNo,
|
||||
if (productInfo.isNotEmpty) 'product_info': productInfo,
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user