Authored by 陈峰

commit

@@ -32,7 +32,7 @@ module.exports = { @@ -32,7 +32,7 @@ module.exports = {
32 app: 'h5', 32 app: 'h5',
33 appVersion: '6.6.0', // 调用api的版本 33 appVersion: '6.6.0', // 调用api的版本
34 appName: 'yohoapp-node', 34 appName: 'yohoapp-node',
35 - port: 6003, 35 + port: 6001,
36 siteUrl: '//m.yohobuy.com', 36 siteUrl: '//m.yohobuy.com',
37 assetUrl: '//localhost:5001/yohoapp-node/', 37 assetUrl: '//localhost:5001/yohoapp-node/',
38 testCode: 'yoho4946abcdef#$%&!@', 38 testCode: 'yoho4946abcdef#$%&!@',
@@ -21,6 +21,11 @@ const assetType = (value, type) => { @@ -21,6 +21,11 @@ const assetType = (value, type) => {
21 if (!valid && t === 'object') { 21 if (!valid && t === 'object') {
22 valid = value instanceof type; 22 valid = value instanceof type;
23 } 23 }
  24 + if (!valid && expectedType.toLowerCase() === 'number') {
  25 + const parseNumber = parseInt(value, 10);
  26 +
  27 + valid = parseNumber || parseNumber === 0;
  28 + }
24 } else if (expectedType === 'Object') { 29 } else if (expectedType === 'Object') {
25 valid = value.toString() === '[object Object]'; 30 valid = value.toString() === '[object Object]';
26 } else if (expectedType === 'Array') { 31 } else if (expectedType === 'Array') {