顾绍勇 5 yıl önce
ebeveyn
işleme
f776d0f640

+ 5
- 13
src/pages/activity/drainage/components/RedPacket.jsx Dosyayı Görüntüle

@@ -14,7 +14,6 @@ function RedPacket(props) {
14 14
     // const [taNoticeList, setTaNoticeList] = useState([])
15 15
     const [data, setData] = useState({})
16 16
 
17
-
18 17
     useEffect(() => {
19 18
         getMoneyDetail()
20 19
         // getList({ pageNum: 1, pageSize: 10 });
@@ -30,14 +29,7 @@ function RedPacket(props) {
30 29
     }
31 30
 
32 31
     const updateRedPacket = data => {
33
-        const taRedPacketClient = {
34
-            mchName: data.mchName,
35
-            blessing: data.blessing,
36
-            activityName: data.activityName,
37
-            remark: data.remark
38
-        }
39
-
40
-        request({ ...apis.redPacket.updateMoney, urlData: { id }, data: { ...data,taRedPacketClient } }).then(data => {
32
+        request({ ...apis.redPacket.updateMoney, urlData: { id }, data: { ...data } }).then(data => {
41 33
             // setData(data)
42 34
         })
43 35
     }
@@ -137,28 +129,28 @@ color:rgba(102,102,102,1); */}
137 129
                 </Row>
138 130
                 <Form.Item label="商品名称" >
139 131
                     {getFieldDecorator('mchName', {
140
-                        // initialValue: taRedPacketClient.mchName,
132
+                        initialValue: data.mchName,
141 133
                     })(
142 134
                         <Input placeholder="{小程序名}" />,
143 135
                     )}
144 136
                 </Form.Item>
145 137
                 <Form.Item label="红包祝福语">
146 138
                     {getFieldDecorator('blessing', {
147
-                        // initialValue: taRedPacketClient.blessing,
139
+                        initialValue: data.blessing,
148 140
                     })(
149 141
                         <Input placeholder="祝您中个大红包!" />,
150 142
                     )}
151 143
                 </Form.Item>
152 144
                 <Form.Item label="活动名称">
153 145
                     {getFieldDecorator('activityName', {
154
-                        // initialValue: taRedPacketClient.activityName,
146
+                        initialValue: data.activityName,
155 147
                     })(
156 148
                         <Input placeholder="{活动标题}" />,
157 149
                     )}
158 150
                 </Form.Item>
159 151
                 <Form.Item label="备注">
160 152
                     {getFieldDecorator('remark', {
161
-                        // initialValue: taRedPacketClient.remark,
153
+                        initialValue: data.remark,
162 154
                     })(
163 155
                         <Input placeholder="点我拆红包" />,
164 156
                     )}