add OrderGoods component

This commit is contained in:
陈嘉涵
2017-08-30 11:54:21 +08:00
parent cfa0f649b6
commit 6d4f076c16
12 changed files with 1066 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
/**
* 拼接商品价格(金额和积分)
*/
export function getTotalPrice(price, points) {
const arr = [];
if (points) {
arr.push(points + '积分');
}
if (price) {
arr.push('¥' + (price / 100).toFixed(2));
}
return arr.join(' + ');
}