zhoulisen 5 gadus atpakaļ
vecāks
revīzija
791d1ad111

+ 82
- 0
src/components/SelectButton/QrcodeType1.jsx Parādīt failu

@@ -0,0 +1,82 @@
1
+import React, { useMemo } from 'react';
2
+import { Select } from 'antd';
3
+
4
+const { Option } = Select;
5
+
6
+
7
+const qrcodeType = props => {
8
+    //   const [data, setData] = useState([])
9
+    //   useEffect(() => {
10
+
11
+    //   }, [props.value])
12
+    // const visible2 = props.visible || true
13
+    const all = props.all || false
14
+
15
+    const visible = useMemo(() => (props.visible), [props.visible]);
16
+    
17
+    const data = [
18
+        {
19
+            name: '项目',
20
+            value: 'building',
21
+            visible,
22
+        },
23
+        {
24
+            name: '报名活动',
25
+            value: 'activity',
26
+            visible,
27
+        },
28
+        {
29
+            name: '助力活动',
30
+            value: 'help',
31
+            visible,
32
+        },
33
+        {
34
+            name: '拼团活动',
35
+            value: 'group',
36
+            visible,
37
+        },
38
+        {
39
+            name: 'H5活动',
40
+            value: 'h5',
41
+            visible: true,
42
+        },
43
+        {
44
+            name: '直播活动',
45
+            value: 'live',
46
+            visible: true,
47
+        },
48
+        {
49
+            name: '资讯',
50
+            value: 'news',
51
+            visible,
52
+        },
53
+        {
54
+            name: '在线选房',
55
+            value: 'house',
56
+            visible,
57
+        },
58
+    ]
59
+
60
+
61
+    return (
62
+        // <>234</>
63
+        <Select
64
+            showSearch
65
+            value={props.value}
66
+            style={{ width: '250px' }}
67
+            placeholder="请选择二维码内容类型"
68
+            onChange={props.onChange}
69
+            // filterOption={(input, option) =>
70
+            //     // eslint-disable-next-line max-len
71
+            //     option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
72
+            // }
73
+        >
74
+            {all && <Option key="" value="">全部类型</Option>}
75
+            {data.map(Item => (
76
+
77
+                Item.visible ? <Option key={Item.vlaue} value={Item.value}> {Item.name} </Option> : ''
78
+            ))}
79
+        </Select>
80
+    )
81
+}
82
+export default qrcodeType

+ 3
- 3
src/pages/channel/newCustomer/index.jsx Parādīt failu

@@ -8,7 +8,7 @@ import EditIcon from '@/components/EditIcon';
8 8
 import Navigate from '@/components/Navigate';
9 9
 import styles from '../../style/GoodsList.less';
10 10
 import BuildSelect from '@/components/SelectButton/BuildSelect'
11
-import QrcodeType from '@/components/SelectButton/QrcodeType'
11
+import QrcodeType from '@/components/SelectButton/QrcodeType1'
12 12
 import ChannelSelect from '@/components/SelectButton/channelSelect'
13 13
 import apis from '../../../services/apis';
14 14
 import request from '../../../utils/request';
@@ -139,8 +139,8 @@ const qrcodelist = props => {
139 139
             dataIndex: 'targetType',
140 140
             key: 'targetType',
141 141
             align: 'center',
142
-            render: (text, record) => <span>{text == 'project' ? '项目' : text == 'activity' ? '常规活动' : text == 'help' ? '助力活动' : text == 'group' ? '拼团活动'
143
-                : text == 'h5' ? 'H5活动' : text == 'live' ? '直播活动' : text == 'news' ? '资讯' : text == 'salesBatch' ? '在线选房' : ''}</span>,
142
+            render: (text, record) => <span>{text == 'building' ? '项目' : text == 'activity' ? '报名活动' : text == 'help' ? '助力活动' : text == 'group' ? '拼团活动'
143
+                : text == 'h5' ? 'H5活动' : text == 'live' ? '直播活动' : text == 'news' ? '资讯' : text == 'house' ? '在线选房' : ''}</span>,
144 144
         },
145 145
         {
146 146
             title: '内容',