Forráskód Böngészése

Merge branch 'master' of http://git.zanxiangnet.com/wjx/qc-gameDataStatistics

wjx 1 éve
szülő
commit
86d3f71179

+ 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>
 }

+ 2 - 2
src/pages/gameDataStatistics/player/role/tableConfig.tsx

@@ -9,12 +9,12 @@ function columns12() {
             label: '玩家列表',
             data: [
                 {
-                    title: '玩家ID', dataIndex: 'id', label: '玩家列表', align: 'center', default: 1, width: 55,
+                    title: '玩家ID', dataIndex: 'userId', label: '玩家列表', align: 'center', default: 1, width: 55,
                     render: (a: string, b: any) => {
                         if (b?.zj) {
                             return b?.zj
                         }
-                        return b?.id
+                        return b?.userId
                     }
                 },
                 { title: '玩家账号', dataIndex: 'username', label: '玩家列表', align: 'center', width: 120, default: 2, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },