基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

198 lines
8.1 KiB

  1. import 'package:zhiying_comm/zhiying_comm.dart';
  2. class FeedbackModel extends SkipModel{
  3. String appBarName;
  4. String appBarNameColor;
  5. String appBarBgColor;
  6. String bgColor;
  7. String feedbackBgColor;
  8. String feedbackTitle;
  9. String feedbackTypeNoSelectedBorderColor;
  10. String feedbackTypeNoSelectedTextColor;
  11. String feedbackTypeSelectedBorderColor;
  12. String feedbackTypeSelectedTextColor;
  13. String feedbackTypeSelectedBorderIcon;
  14. List<FeedbackTypes> feedbackTypes;
  15. String feedbackInputBgColor;
  16. String feedbackInputHintText;
  17. String feedbackInputHintTextColor;
  18. String feedbackInputLimitText;
  19. String feedbackInputLimitTextColor;
  20. String feedbackInputContentBgColor;
  21. String feedbackInputContentHintText;
  22. String feedbackInputContentLimitText;
  23. String feedbackInputContentHintTextColor;
  24. String feedbackInputContentLimitTextColor;
  25. String feedbackUploadImageTitle;
  26. String feedbackUploadImageSubtitle;
  27. String feedbackPostBtnText;
  28. String feedbackPostBtnBgColor;
  29. String feedbackPostBtnTextColor;
  30. String feedbackListBtnIcon;
  31. String feedbackListBtnText;
  32. String feedbackListBtnTextColor;
  33. String feedbackListBtnBgColor;
  34. String feedbackListBtnBorderColor;
  35. String requiredLogin;
  36. String requiredTaobaoAuth;
  37. String skipIdentifier;
  38. FeedbackModel(
  39. {this.appBarName,
  40. this.appBarNameColor,
  41. this.appBarBgColor,
  42. this.bgColor,
  43. this.feedbackBgColor,
  44. this.feedbackTitle,
  45. this.feedbackTypeNoSelectedBorderColor,
  46. this.feedbackTypeNoSelectedTextColor,
  47. this.feedbackTypeSelectedBorderColor,
  48. this.feedbackTypeSelectedTextColor,
  49. this.feedbackTypeSelectedBorderIcon,
  50. this.feedbackTypes,
  51. this.feedbackInputBgColor,
  52. this.feedbackInputHintText,
  53. this.feedbackInputHintTextColor,
  54. this.feedbackInputLimitText,
  55. this.feedbackInputLimitTextColor,
  56. this.feedbackInputContentBgColor,
  57. this.feedbackInputContentHintText,
  58. this.feedbackInputContentLimitText,
  59. this.feedbackInputContentHintTextColor,
  60. this.feedbackInputContentLimitTextColor,
  61. this.feedbackUploadImageTitle,
  62. this.feedbackUploadImageSubtitle,
  63. this.feedbackPostBtnText,
  64. this.feedbackPostBtnBgColor,
  65. this.feedbackPostBtnTextColor,
  66. this.feedbackListBtnIcon,
  67. this.feedbackListBtnText,
  68. this.feedbackListBtnTextColor,
  69. this.feedbackListBtnBgColor,
  70. this.feedbackListBtnBorderColor,
  71. this.requiredLogin,
  72. this.requiredTaobaoAuth,
  73. this.skipIdentifier});
  74. FeedbackModel.fromJson(Map<String, dynamic> json) {
  75. super.fromJson(json);
  76. appBarName = json['app_bar_name'];
  77. appBarNameColor = json['app_bar_name_color'];
  78. appBarBgColor = json['app_bar_bg_color'];
  79. bgColor = json['bg_color'];
  80. feedbackBgColor = json['feedback_bg_color'];
  81. feedbackTitle = json['feedback_title'];
  82. feedbackTypeNoSelectedBorderColor =
  83. json['feedback_type_no_selected_border_color'];
  84. feedbackTypeNoSelectedTextColor =
  85. json['feedback_type_no_selected_text_color'];
  86. feedbackTypeSelectedBorderColor =
  87. json['feedback_type_selected_border_color'];
  88. feedbackTypeSelectedTextColor = json['feedback_type_selected_text_color'];
  89. feedbackTypeSelectedBorderIcon = json['feedback_type_selected_border_icon'];
  90. if (json['feedback_types'] != null) {
  91. feedbackTypes = new List<FeedbackTypes>();
  92. json['feedback_types'].forEach((v) {
  93. feedbackTypes.add(new FeedbackTypes.fromJson(v));
  94. });
  95. }
  96. feedbackInputBgColor = json['feedback_input_bg_color'];
  97. feedbackInputHintText = json['feedback_input_hint_text'];
  98. feedbackInputHintTextColor = json['feedback_input_hint_text_color'];
  99. feedbackInputLimitText = json['feedback_input_limit_text'];
  100. feedbackInputLimitTextColor = json['feedback_input_limit_text_color'];
  101. feedbackInputContentBgColor = json['feedback_input_content_bg_color'];
  102. feedbackInputContentHintText = json['feedback_input_content_hint_text'];
  103. feedbackInputContentLimitText = json['feedback_input_content_limit_text'];
  104. feedbackInputContentHintTextColor =
  105. json['feedback_input_content_hint_text_color'];
  106. feedbackInputContentLimitTextColor =
  107. json['feedback_input_content_limit_text_color'];
  108. feedbackUploadImageTitle = json['feedback_upload_image_title'];
  109. feedbackUploadImageSubtitle = json['feedback_upload_image_subtitle'];
  110. feedbackPostBtnText = json['feedback_post_btn_text'];
  111. feedbackPostBtnBgColor = json['feedback_post_btn_bg_color'];
  112. feedbackPostBtnTextColor = json['feedback_post_btn_text_color'];
  113. feedbackListBtnIcon = json['feedback_list_btn_icon'];
  114. feedbackListBtnText = json['feedback_list_btn_text'];
  115. feedbackListBtnTextColor = json['feedback_list_btn_text_color'];
  116. feedbackListBtnBgColor = json['feedback_list_btn_bg_color'];
  117. feedbackListBtnBorderColor = json['feedback_list_btn_border_color'];
  118. requiredLogin = json['required_login'];
  119. requiredTaobaoAuth = json['required_taobao_auth'];
  120. skipIdentifier = json['skip_identifier'];
  121. }
  122. Map<String, dynamic> toJson() {
  123. final Map<String, dynamic> data = super.toJson();
  124. data['app_bar_name'] = this.appBarName;
  125. data['app_bar_name_color'] = this.appBarNameColor;
  126. data['app_bar_bg_color'] = this.appBarBgColor;
  127. data['bg_color'] = this.bgColor;
  128. data['feedback_bg_color'] = this.feedbackBgColor;
  129. data['feedback_title'] = this.feedbackTitle;
  130. data['feedback_type_no_selected_border_color'] =
  131. this.feedbackTypeNoSelectedBorderColor;
  132. data['feedback_type_no_selected_text_color'] =
  133. this.feedbackTypeNoSelectedTextColor;
  134. data['feedback_type_selected_border_color'] =
  135. this.feedbackTypeSelectedBorderColor;
  136. data['feedback_type_selected_text_color'] =
  137. this.feedbackTypeSelectedTextColor;
  138. data['feedback_type_selected_border_icon'] =
  139. this.feedbackTypeSelectedBorderIcon;
  140. if (this.feedbackTypes != null) {
  141. data['feedback_types'] =
  142. this.feedbackTypes.map((v) => v.toJson()).toList();
  143. }
  144. data['feedback_input_bg_color'] = this.feedbackInputBgColor;
  145. data['feedback_input_hint_text'] = this.feedbackInputHintText;
  146. data['feedback_input_hint_text_color'] = this.feedbackInputHintTextColor;
  147. data['feedback_input_limit_text'] = this.feedbackInputLimitText;
  148. data['feedback_input_limit_text_color'] = this.feedbackInputLimitTextColor;
  149. data['feedback_input_content_bg_color'] = this.feedbackInputContentBgColor;
  150. data['feedback_input_content_hint_text'] =
  151. this.feedbackInputContentHintText;
  152. data['feedback_input_content_limit_text'] =
  153. this.feedbackInputContentLimitText;
  154. data['feedback_input_content_hint_text_color'] =
  155. this.feedbackInputContentHintTextColor;
  156. data['feedback_input_content_limit_text_color'] =
  157. this.feedbackInputContentLimitTextColor;
  158. data['feedback_upload_image_title'] = this.feedbackUploadImageTitle;
  159. data['feedback_upload_image_subtitle'] = this.feedbackUploadImageSubtitle;
  160. data['feedback_post_btn_text'] = this.feedbackPostBtnText;
  161. data['feedback_post_btn_bg_color'] = this.feedbackPostBtnBgColor;
  162. data['feedback_post_btn_text_color'] = this.feedbackPostBtnTextColor;
  163. data['feedback_list_btn_icon'] = this.feedbackListBtnIcon;
  164. data['feedback_list_btn_text'] = this.feedbackListBtnText;
  165. data['feedback_list_btn_text_color'] = this.feedbackListBtnTextColor;
  166. data['feedback_list_btn_bg_color'] = this.feedbackListBtnBgColor;
  167. data['feedback_list_btn_border_color'] = this.feedbackListBtnBorderColor;
  168. data['required_login'] = this.requiredLogin;
  169. data['required_taobao_auth'] = this.requiredTaobaoAuth;
  170. data['skip_identifier'] = this.skipIdentifier;
  171. return data;
  172. }
  173. }
  174. class FeedbackTypes {
  175. String typeId;
  176. String name;
  177. bool isSelect = false;
  178. FeedbackTypes({this.typeId, this.name});
  179. FeedbackTypes.fromJson(Map<String, dynamic> json) {
  180. typeId = json['type_id'];
  181. name = json['name'];
  182. }
  183. Map<String, dynamic> toJson() {
  184. final Map<String, dynamic> data = new Map<String, dynamic>();
  185. data['type_id'] = this.typeId;
  186. data['name'] = this.name;
  187. return data;
  188. }
  189. }