index.js 808 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // lionfish_comshop/components/orderStatus/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. status: {
  8. type: String,
  9. default: "",
  10. observer: function (t, e, s) {
  11. var a = this.statusChange(t);
  12. this.setData({
  13. showStatus: a
  14. });
  15. }
  16. }
  17. },
  18. /**
  19. * 组件的初始数据
  20. */
  21. data: {
  22. showStatus: ""
  23. },
  24. /**
  25. * 组件的方法列表
  26. */
  27. methods: {
  28. statusChange: function (t) {
  29. switch (t) {
  30. case "0":
  31. return "待付款";
  32. case "1":
  33. return "待提货";
  34. case "2":
  35. return "已完成";
  36. case "3":
  37. return "已取消";
  38. case "4":
  39. return "待配送";
  40. default:
  41. return "";
  42. }
  43. }
  44. }
  45. })