wJianX 1 tahun lalu
induk
melakukan
7999e7fcde
1 mengubah file dengan 16 tambahan dan 4 penghapusan
  1. 16 4
      src/pages/gameDataStatistics/player/list/exportH5Modal.tsx

+ 16 - 4
src/pages/gameDataStatistics/player/list/exportH5Modal.tsx

@@ -1,6 +1,6 @@
 import { useAjax } from "@/Hook/useAjax"
 import { exportUserH5Api } from "@/services/gameData/player"
-import { Form, Input, Modal, message } from "antd"
+import { Form, Input, Modal, Radio, message } from "antd"
 import React from "react"
 
 
@@ -27,7 +27,7 @@ const ExportH5Modal: React.FC<Props> = ({ initialValues = {}, visible, onChange,
         let data = await form.validateFields()
         console.log(data)
         exportUserH5.run({ ...data, userId: initialValues.userId }).then(res => {
-            if (res.data) {
+            if (res) {
                 message.success('导量成功')
                 onChange?.()
             }
@@ -41,7 +41,7 @@ const ExportH5Modal: React.FC<Props> = ({ initialValues = {}, visible, onChange,
             labelCol={{ span: 4 }}
             wrapperCol={{ span: 20 }}
             autoComplete="off"
-            initialValues={{ ...initialValues }}
+            initialValues={{ ...initialValues, type: 1 }}
         >
             <Form.Item
                 label="手机号码"
@@ -50,7 +50,7 @@ const ExportH5Modal: React.FC<Props> = ({ initialValues = {}, visible, onChange,
                     {
                         required: true,
                         validator(_rule, value) {
-                            let reg = new RegExp(/^1[3-9]\d{9}$/,'g')
+                            let reg = new RegExp(/^1[3-9]\d{9}$/, 'g')
                             if (!value) {
                                 return Promise.reject(new Error('请输入手机号!'))
                             } else if (!reg.test(value)) {
@@ -62,6 +62,18 @@ const ExportH5Modal: React.FC<Props> = ({ initialValues = {}, visible, onChange,
                 ]}>
                 <Input placeholder="请输入手机号码" allowClear />
             </Form.Item>
+            <Form.Item
+                label="选择平台"
+                name="type"
+            >
+                <Radio.Group >
+                    {
+                        [{ id: 1, name: "h5" }, { id: 2, name: "安卓" }, { id: 3, name: "IOS" }].map((item: any) => {
+                            return <Radio value={item.id} key={item.id}>{item.name}</Radio>
+                        })
+                    }
+                </Radio.Group>
+            </Form.Item>
         </Form>
     </Modal>
 }