constants_services.dart 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. import 'package:cs_resources/generated/l10n.dart';
  2. import 'modules/services/homeService/home_service_vm.dart';
  3. class servicesConstants {
  4. static const String dollarUnit = "\$";
  5. // homesevice sortBy options
  6. static Map<String, String> sortByOptionsMap = {
  7. S.current.most_likes: SortByType.likes_count.name,
  8. S.current.most_bookmarked: SortByType.orders_count.name,
  9. S.current.view_at_most: SortByType.clicks_count.name,
  10. };
  11. // 服务种类
  12. static Map<int, Map<String, dynamic>> servicesType = {
  13. 1: {
  14. "id": 1, // 业务做 标识 字段
  15. "name": "Home Service",
  16. "parent_id": 0,
  17. "type": "paid"
  18. },
  19. 4: {
  20. "id": 4, // 业务做 标识 字段
  21. "name": "Maintenance",
  22. "parent_id": 0,
  23. "type": "inquiry"
  24. }
  25. };
  26. // 付费服务类型
  27. static Map<String, Map<String, dynamic>> paidServicesType = {
  28. "houseCleaning": {
  29. "text": S.current.house_cleaning,
  30. "type": "paid",
  31. 'code': "House Cleaning", // 业务做 标识 字段
  32. },
  33. "airConditioner": {
  34. "text": S.current.air_conditioning_cleaning,
  35. "type": "paid",
  36. 'code': "Air Conditioning Cleaning", // 业务做 标识 字段
  37. },
  38. };
  39. // 咨询服务类型
  40. static Map<String, Map<String, dynamic>> inquiryServicesType = {
  41. "repairAirConditioner": {
  42. "text": S.current.maintenance,
  43. "type": "inquiry",
  44. 'code': "Repair air Conditioner", // 业务做 标识 字段
  45. }
  46. };
  47. static Map<String, dynamic> servicesStatus = {
  48. "0": {
  49. "text": S.current.wait_paid,
  50. "type": "Wait Paid",
  51. 'code': 0,
  52. },
  53. "1": {
  54. "text": S.current.wait_service,
  55. "type": "Wait Service",
  56. 'code': 1,
  57. },
  58. "2": {
  59. "text": S.current.completed,
  60. "type": "Completed",
  61. 'code': 2,
  62. },
  63. "3": {
  64. "text": S.current.canceled,
  65. "type": "Canceled",
  66. 'code': 3,
  67. }
  68. };
  69. static Map<String, List<Map<String, dynamic>>> servicesStatusActionBtnList = {
  70. // 0 waitPaid, 1 waitService, 2 completed, 3 canceled
  71. '0': [
  72. actionBtn['2'],
  73. actionBtn['3'],
  74. actionBtn['0'],
  75. ],
  76. '1': [
  77. actionBtn['1'],
  78. actionBtn['2'],
  79. actionBtn['3'],
  80. ],
  81. '2': [
  82. actionBtn['1'],
  83. actionBtn['5'],
  84. ],
  85. '3': [
  86. // actionBtn['4'],
  87. ]
  88. };
  89. static Map<String, dynamic> actionBtn = {
  90. "0": {
  91. "text": S.current.proceed_with_payment,
  92. "type": "proceedWidthPayment",
  93. 'code': 0,
  94. 'btnColor': '#FFFE6C00',
  95. 'btnWidth': 500.0,
  96. 'btnHeight': 35.0,
  97. 'widthFactor': 1,
  98. },
  99. "1": {
  100. "text": S.current.cancel,
  101. "type": "cancel",
  102. 'code': 1,
  103. 'btnColor': '#FFFE6C00',
  104. 'btnWidth': 65.0,
  105. 'btnHeight': 35.0,
  106. },
  107. "2": {
  108. "text": S.current.contact_merchant,
  109. "type": "contactMerchant",
  110. 'code': 2,
  111. 'btnColor': '#FF01B5EB',
  112. 'btnWidth': 115.0,
  113. 'btnHeight': 35.0,
  114. },
  115. "3": {
  116. "text": S.current.contact_service_personnel,
  117. "type": "contactServicePersonnel",
  118. 'code': 3,
  119. 'btnColor': '#FF01CA48',
  120. 'btnWidth': 115.0,
  121. 'btnHeight': 35.0,
  122. },
  123. "4": {
  124. "text": S.current.delete,
  125. "type": "delete",
  126. 'code': 4,
  127. 'btnColor': '#FFFE4066',
  128. 'btnWidth': 98.0,
  129. 'btnHeight': 30.0,
  130. },
  131. "5": {
  132. "text": S.current.evaluate,
  133. "type": "evaluate",
  134. 'code': 5,
  135. 'btnColor': '#FF01B5EB',
  136. 'btnWidth': 98.0,
  137. 'btnHeight': 30.0,
  138. }
  139. };
  140. // 咨询 类的 状态
  141. static Map<String, dynamic> servicesInquiryStatus = {
  142. "0": {
  143. "text": S.current.in_progress,
  144. "type": "inProgress",
  145. 'code': 0,
  146. },
  147. "1": {
  148. "text": S.current.completed,
  149. "type": "completed",
  150. 'code': 1,
  151. },
  152. };
  153. }