Commit 7290b389 by 姜雷

修改星期显示

parent ccabf1e5
......@@ -21,8 +21,7 @@ export function parseTime(time, cFormat) {
};
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key];
if (key === 'a')
return ['一', '二', '三', '四', '五', '六', '日'][value - 1];
if (key === 'a') return ['日', '一', '二', '三', '四', '五', '六'][value];
if (result.length > 0 && value < 10) {
value = '0' + value;
}
......@@ -358,8 +357,9 @@ export const formatterMoneyToDouble = val => {
export const formatPrice = price => {
var result = [],
counter = 0;
price = (price || 0).toString().split('');
for (var i = price.length - 1; i >= 0; i--) {
price = (price || 0).toFixed(2).split('');
result.push(price.slice(-3).join(''));
for (var i = price.length - 4; i >= 0; i--) {
counter++;
result.unshift(price[i]);
if (!(counter % 3) && i != 0) {
......
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