|
@@ -25,7 +25,7 @@ class Product {
|
|
|
|
|
|
// 验证商品订制属性是否符合规则
|
|
|
checkDimension (dimensionData, schemeData) {
|
|
|
- console.log(schemeData,dimensionData)
|
|
|
+ console.log(dimensionData,schemeData)
|
|
|
const requiredProperties = ['length', 'width'];
|
|
|
for (const prop of requiredProperties) {
|
|
|
if ((schemeData[prop] < dimensionData[prop].min || schemeData[prop] > dimensionData[prop].max)) {
|
|
@@ -35,7 +35,7 @@ class Product {
|
|
|
if (!schemeData[prop]) {
|
|
|
message.error({ content: `${prop == 'length'?'长度':'宽度'}定制选项不能为空!`, key: 1 });
|
|
|
return false;
|
|
|
- }
|
|
|
+ }
|
|
|
if (!this.hasDecimal(schemeData[prop],prop)) {
|
|
|
return false;
|
|
|
}
|