initialize.js 774 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import Vue from 'vue'
  2. import keys from "./keys.js";
  3. export default {
  4. install(Vue) {
  5. Vue.prototype.$keys = keys;
  6. Vue.prototype.$defaultHadPhoto =
  7. "https://yigefuwuapp.ycbrain.com/upload/2024/02/22/54e58f2149334f8b8e54f1d6150d601b.png";
  8. /**
  9. * 任务状态说明
  10. * checkStatus 审状态(0未提交,1待审核,2驳回,3审核通过)
  11. */
  12. Object.defineProperty(Vue.prototype, '$TaskStatusText', {
  13. value: (status) => {
  14. let text = "";
  15. if (status >= 0) {
  16. switch (status) {
  17. case 0:
  18. text = "未提交";
  19. break;
  20. case 1:
  21. text = "待审核";
  22. break;
  23. case 2:
  24. text = "驳回";
  25. break;
  26. case 3:
  27. text = "审核通过";
  28. break;
  29. }
  30. }
  31. return text
  32. }
  33. })
  34. }
  35. }