Browse Source

:art: 增加阅读历史过滤标记

zhanghe 6 years ago
parent
commit
1a59a287b4
2 changed files with 16 additions and 1 deletions
  1. 12 1
      src/routes/Product/Course/CourseCreate.js
  2. 4 0
      src/utils/config.js

+ 12 - 1
src/routes/Product/Course/CourseCreate.js

@@ -26,6 +26,7 @@ const fieldLabels = {
   coverUrl: '课程封面图',
   bgUrl: '课程背景图',
   status: '课程状态',
+  courseType: '阅读历史过滤',
 };
 const formItemLayout = {
   labelCol: {
@@ -245,7 +246,7 @@ export default class CourseItemCreatePage extends Component {
     const { currentItem } = product;
     const {
       code, title, subTitle, name, digest, detail, status, coverUrl, bgUrl, cpId,
-      breadCrumb, subItemList = [], supportList = [],
+      courseType, breadCrumb, subItemList = [], supportList = [],
     } = currentItem;
     const { getFieldDecorator } = form;
 
@@ -493,6 +494,16 @@ export default class CourseItemCreatePage extends Component {
                 </Select>
               )}
             </Form.Item>
+            <Form.Item hasFeedback label={fieldLabels.courseType} {...formItemLayout}>
+              {getFieldDecorator('courseType', {
+                initialValue: courseType || Hotax.FILTER_NO,
+              })(
+                <Select placeholder="请选择">
+                  <Select.Option value={Hotax.FILTER_YES}>是</Select.Option>
+                  <Select.Option value={Hotax.FILTER_NO}>否</Select.Option>
+                </Select>
+              )}
+            </Form.Item>
             <Form.Item label={fieldLabels.digest} {...formItemLayout}>
               {getFieldDecorator('digest', {
                 initialValue: digest,

+ 4 - 0
src/utils/config.js

@@ -30,6 +30,10 @@ Hotax.PRODUCT_PACKAGE = 'PACKAGE';
 Hotax.STATUS_NORMAL = 'NORMAL';
 Hotax.STATUS_DELETE = 'DEL';
 
+// 推荐位过滤标记值
+Hotax.FILTER_NO = 0;
+Hotax.FILTER_YES = 1;
+
 // 订单状态 <待支付|已作废|已支付|待发货|已发货|待收货|已收货|待退款|已完成>
 Hotax.ORDER_UNPAID = 'UNPAID';
 Hotax.ORDER_CANCEL = 'CANCEL';