Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/b109b07d758576865e0e979b26feb307447eb391f8d1caeb2e783abac53ec0ab.json
2023-08-11 10:45:20 +08:00

1 line
4.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"ast":null,"code":"const formatDate = date => {\n let tempDate = new Date(date);\n const year = tempDate.getFullYear();\n const month = tempDate.getMonth() + 1;\n const day = tempDate.getDate();\n return `${[year, month, day].map(formatNumber).join('-')}`;\n};\nconst formatNumber = n => {\n n = n.toString();\n return n[1] ? n : `0${n}`;\n};\nconst leftCopy = (obj, source) => {\n let sourceKey = Object.keys(source);\n if (obj && source) {\n Object.keys(obj).forEach(key => {\n if (sourceKey.includes(key)) {\n obj[key] = source[key] == null ? '' : source[key];\n }\n });\n }\n};\nconst getFeeTitle = (serverId, finishedPrice, trailUndergroundFee, finishedLimitedMileage, finishedExcessUnitPrice) => {\n let feeStr = '';\n switch (serverId) {\n case 1043:\n feeStr = `搭电¥${finishedPrice}起/次`;\n break;\n case 1042:\n feeStr = `换胎¥${finishedPrice}起/次`;\n break;\n case 1041:\n feeStr = `拖车¥${finishedPrice}起/次,地库+${trailUndergroundFee}元,拖车费用仅包含${finishedLimitedMileage}公里,超出部分将按照${finishedExcessUnitPrice}元/公里收费`;\n break;\n case 2160:\n feeStr = `上门充电¥${finishedPrice}/次包括充10度电。`;\n break;\n }\n return feeStr;\n};\nmodule.exports = {\n formatNumber,\n formatDate,\n leftCopy,\n getFeeTitle\n};","map":{"version":3,"names":["formatDate","date","tempDate","Date","year","getFullYear","month","getMonth","day","getDate","map","formatNumber","join","n","toString","leftCopy","obj","source","sourceKey","Object","keys","forEach","key","includes","getFeeTitle","serverId","finishedPrice","trailUndergroundFee","finishedLimitedMileage","finishedExcessUnitPrice","feeStr","module","exports"],"sources":["E:/work/sino/sino-h5/src/utils/common.js"],"sourcesContent":["const formatDate = date => {\r\n let tempDate = new Date(date)\r\n const year = tempDate.getFullYear()\r\n const month = tempDate.getMonth() + 1\r\n const day = tempDate.getDate()\r\n return `${[year, month, day].map(formatNumber).join('-')}`\r\n}\r\n\r\nconst formatNumber = n => {\r\n n = n.toString()\r\n return n[1] ? n : `0${n}`\r\n}\r\n\r\nconst leftCopy = (obj, source) => {\r\n let sourceKey = Object.keys(source)\r\n if (obj && source) {\r\n Object.keys(obj).forEach(key => {\r\n if (sourceKey.includes(key)) {\r\n obj[key] = source[key] == null ? '' : source[key]\r\n }\r\n })\r\n }\r\n}\r\n\r\nconst getFeeTitle = (serverId, finishedPrice, trailUndergroundFee, finishedLimitedMileage, finishedExcessUnitPrice) => {\r\n let feeStr = ''\r\n switch (serverId) {\r\n case 1043:\r\n feeStr = `搭电¥${ finishedPrice }起/次`;\r\n break;\r\n case 1042:\r\n feeStr = `换胎¥${ finishedPrice }起/次`;\r\n break;\r\n case 1041:\r\n feeStr = `拖车¥${ finishedPrice }起/次,地库+${ trailUndergroundFee }元,拖车费用仅包含${finishedLimitedMileage}公里,超出部分将按照${finishedExcessUnitPrice}元/公里收费`;\r\n break;\r\n case 2160:\r\n feeStr = `上门充电¥${ finishedPrice }/次包括充10度电。`;\r\n break;\r\n }\r\n return feeStr;\r\n}\r\n\r\n\r\n\r\nmodule.exports = {\r\n formatNumber,\r\n formatDate,\r\n leftCopy,\r\n getFeeTitle\r\n}\r\n"],"mappings":"AAAA,MAAMA,UAAU,GAAGC,IAAI,IAAI;EACzB,IAAIC,QAAQ,GAAG,IAAIC,IAAI,CAACF,IAAI,CAAC;EAC7B,MAAMG,IAAI,GAAGF,QAAQ,CAACG,WAAW,CAAC,CAAC;EACnC,MAAMC,KAAK,GAAGJ,QAAQ,CAACK,QAAQ,CAAC,CAAC,GAAG,CAAC;EACrC,MAAMC,GAAG,GAAGN,QAAQ,CAACO,OAAO,CAAC,CAAC;EAC9B,OAAQ,GAAE,CAACL,IAAI,EAAEE,KAAK,EAAEE,GAA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