UNPKG

captain-ui

Version:

有赞vue wap业务组件库

21 lines (16 loc) 349 B
"use strict"; exports.__esModule = true; exports.getTotalPrice = getTotalPrice; /** * 拼接商品价格(金额和积分) */ function getTotalPrice(price, points) { var arr = []; if (points) { arr.push(points + '积分'); } if (price || !points) { arr.push('¥' + (price / 100).toFixed(2)); } return arr.join(' + '); }