constants_services.dart 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. 'id': 2, // 房屋清洁类 id // 业务做 标识 字段
  33. },
  34. "airConditioner": {
  35. "text": S.current.air_conditioning_cleaning,
  36. "type": "paid",
  37. 'code': "Air Conditioning Cleaning",
  38. 'id': 3, // 空调类清洁类 id // 业务做 标识 字段
  39. },
  40. };
  41. // 咨询服务类型
  42. static Map<String, Map<String, dynamic>> inquiryServicesType = {
  43. "repairAirConditioner": {
  44. "text": S.current.maintenance,
  45. "type": "inquiry",
  46. 'code': "Repair air Conditioner",
  47. 'id': 5, // 咨询类的 id // 业务做 标识 字段
  48. }
  49. };
  50. static Map<String, dynamic> servicesStatus = {
  51. "0": {
  52. "text": S.current.wait_paid,
  53. "type": "Wait Paid",
  54. 'code': 0,
  55. },
  56. "1": {
  57. "text": S.current.wait_service,
  58. "type": "Wait Service",
  59. 'code': 1,
  60. },
  61. "2": {
  62. "text": S.current.completed,
  63. "type": "Completed",
  64. 'code': 2,
  65. },
  66. "3": {
  67. "text": S.current.canceled,
  68. "type": "Canceled",
  69. 'code': 3,
  70. }
  71. };
  72. static Map<String, List<Map<String, dynamic>>> servicesStatusActionBtnList = {
  73. // 0 waitPaid, 1 waitService, 2 completed, 3 canceled
  74. '0': [
  75. actionBtn['2'],
  76. actionBtn['3'],
  77. actionBtn['0'],
  78. ],
  79. '1': [
  80. actionBtn['1'],
  81. actionBtn['2'],
  82. actionBtn['3'],
  83. ],
  84. '2': [
  85. actionBtn['1'],
  86. actionBtn['5'],
  87. ],
  88. '3': [
  89. // actionBtn['4'],
  90. ]
  91. };
  92. static Map<String, dynamic> actionBtn = {
  93. "0": {
  94. "text": S.current.proceed_with_payment,
  95. "type": "proceedWidthPayment",
  96. 'code': 0,
  97. 'btnColor': '#FFFE6C00',
  98. 'btnWidth': 500.0,
  99. 'btnHeight': 35.0,
  100. 'widthFactor': 1,
  101. },
  102. "1": {
  103. "text": S.current.cancel,
  104. "type": "cancel",
  105. 'code': 1,
  106. 'btnColor': '#FFFE6C00',
  107. 'btnWidth': 65.0,
  108. 'btnHeight': 35.0,
  109. },
  110. "2": {
  111. "text": S.current.contact_merchant,
  112. "type": "contactMerchant",
  113. 'code': 2,
  114. 'btnColor': '#FF01B5EB',
  115. 'btnWidth': 115.0,
  116. 'btnHeight': 35.0,
  117. },
  118. "3": {
  119. "text": S.current.contact_service_personnel,
  120. "type": "contactServicePersonnel",
  121. 'code': 3,
  122. 'btnColor': '#FF01CA48',
  123. 'btnWidth': 115.0,
  124. 'btnHeight': 35.0,
  125. },
  126. "4": {
  127. "text": S.current.delete,
  128. "type": "delete",
  129. 'code': 4,
  130. 'btnColor': '#FFFE4066',
  131. 'btnWidth': 98.0,
  132. 'btnHeight': 30.0,
  133. },
  134. "5": {
  135. "text": S.current.evaluate,
  136. "type": "evaluate",
  137. 'code': 5,
  138. 'btnColor': '#FF01B5EB',
  139. 'btnWidth': 98.0,
  140. 'btnHeight': 30.0,
  141. }
  142. };
  143. // 咨询 类的 状态
  144. static Map<String, dynamic> servicesInquiryStatus = {
  145. "0": {
  146. "text": S.current.in_progress,
  147. "type": "inProgress",
  148. 'code': 0,
  149. },
  150. "1": {
  151. "text": S.current.completed,
  152. "type": "completed",
  153. 'code': 1,
  154. },
  155. };
  156. }