index.sjs 352 B

123456789101112131415
  1. // 返回购物车中是否为有效商品 是否可以去结算
  2. const canGotoConfirm = (car = {}) => {
  3. const { carts: carList = [] } = car;
  4. const carCheckedList = carList.filter(
  5. v => v.checkedState === 'Y' && v.status === 'Y'
  6. );
  7. if (!carCheckedList.length) {
  8. return false;
  9. }
  10. return true;
  11. };
  12. export default {
  13. canGotoConfirm,
  14. };