public.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. var businessType = require('../../../../public/business-type.js')
  2. var _order = null
  3. function getOrder() {
  4. return _order
  5. }
  6. function setOrder(order) {
  7. _order = order
  8. }
  9. function setOrderPack(isPack) {
  10. _order.pack = isPack
  11. if (isPack) {
  12. if (_order.purchaseType == businessType.PurchaseType.socialInsurance) {
  13. _order.purchaseType = businessType.PurchaseType.socialInsurancePackage
  14. } else if (_order.purchaseType == businessType.PurchaseType.accumulationFund) {
  15. _order.purchaseType = businessType.PurchaseType.accumulationFundPackage
  16. }
  17. } else {
  18. if (_order.purchaseType == businessType.PurchaseType.socialInsurancePackage) {
  19. _order.purchaseType = businessType.PurchaseType.socialInsurance
  20. _order.isFirstBuyFund = false
  21. } else if (_order.purchaseType == businessType.PurchaseType.accumulationFundPackage) {
  22. _order.purchaseType = businessType.PurchaseType.accumulationFund
  23. _order.SSCard = 0
  24. _order.isFirstBuyShebao = false
  25. }
  26. }
  27. }
  28. module.exports = {
  29. getOrder: getOrder,
  30. setOrder: setOrder,
  31. setOrderPack: setOrderPack
  32. }