瀏覽代碼

[Update] 计价单位增加`天`

zhanghe 6 年之前
父節點
當前提交
9148a56c6e
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 1
      src/routes/Tag/Edit/index.js
  2. 2 0
      src/utils/config.js

+ 1 - 1
src/routes/Tag/Edit/index.js

@@ -177,7 +177,7 @@ export default class TagDetail extends PureComponent {
                     optionFilterProp="children"
                     filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                   >
-                    {tagType.list.map(item => <Select.Option value={item.code} key={item.code}>{`${item.name}`}</Select.Option>)}
+                    {tagType.list.map(item => <Select.Option value={item.code} key={item.code}>{`${item.code}/${item.name}`}</Select.Option>)}
                   </Select>
                 )}
               </Form.Item>

+ 2 - 0
src/utils/config.js

@@ -42,6 +42,7 @@ Codes.CODE_PJ = 3010;
 Codes.CODE_YEAR = '年';
 Codes.CODE_HALF_YEAR = '半年';
 Codes.CODE_SEASON = '季';
+Codes.CODE_DAY = '天';
 Codes.CODE_ITEM = '件';
 
 module.exports = {
@@ -117,6 +118,7 @@ module.exports = {
   },
   // 计价单位 名字: 时长
   chargeUnit: {
+    [Codes.CODE_DAY]: 1,
     [Codes.CODE_SEASON]: 90,
     [Codes.CODE_YEAR]: 365,
     [Codes.CODE_HALF_YEAR]: 180,