auth.js 784 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // states
  2. const state = {
  3. // 客户权限
  4. permission: [
  5. /** 王雷 */ "0465670920955596",
  6. /** 冯超 */ "0501106304684470",
  7. /** 王曙 */ "2950340343943278",
  8. /** 徐梦影 */ "055759385524364827",
  9. /** 陈秋梅 */ "165549180737964898",
  10. /** 燕江 */ "095358016621619612"
  11. ]
  12. };
  13. // actions
  14. const actions = {
  15. // 客户分类
  16. category(_, userId) {
  17. if (
  18. [
  19. /** 冯超 */ "0501106304684470",
  20. /** 陈秋梅 */ "165549180737964898"
  21. ].includes(userId)
  22. )
  23. return "老客户";
  24. if (
  25. [
  26. /** 王曙 */ "2950340343943278",
  27. /** 徐梦影 */ "055759385524364827"
  28. ].includes(userId)
  29. )
  30. return "新客户";
  31. return "";
  32. }
  33. };
  34. export default {
  35. namespaced: true,
  36. state,
  37. actions
  38. };