Browse Source

appId筛选

master
nili 9 months ago
parent
commit
2a3d02bfe9
  1. 2
      dist/index.html
  2. 1
      dist/p__AdvRecordList.0747dba9.async.js
  3. 1
      dist/p__AdvRecordList.9dd0bcc8.async.js
  4. 4
      dist/umi.d5108968.js
  5. 21
      src/pages/AdvRecordList.tsx
  6. 8
      src/services/matrix/admin.ts
  7. 8
      src/services/matrix/matrixController.ts
  8. 21
      src/services/matrix/typings.d.ts

2
dist/index.html

@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script src="/umi.cecb10de.js"></script>
<script src="/umi.d5108968.js"></script>
</body></html>

1
dist/p__AdvRecordList.0747dba9.async.js

@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(D,s,e){e.r(s);var l=e(15009),d=e.n(l),o=e(99289),m=e.n(o),c=e(48357),v=e(90930),p=e(76104),x=e(35312),E=e(67294),u=e(85893),I=function(){var h=(0,E.useRef)(),T=(0,x.useIntl)(),f=[{title:"\u8BBE\u5907Id",dataIndex:"deviceId",valueType:"textarea",ellipsis:!0,copyable:!0},{title:"\u5E94\u7528\u540D\u79F0",hideInSearch:!0,dataIndex:"appName",valueType:"textarea"},{title:"\u5E73\u53F0",dataIndex:"platform",valueEnum:{1:{text:"\u7A7F\u5C71\u7532"},2:{text:"\u817E\u8BAF"},3:{text:"\u767E\u5EA6\u8054\u76DF"},4:{text:"Mintegral"},5:{text:"\u5FEB\u624B"},6:{text:"\u6E38\u53EF\u8D62"},7:{text:"Sigmob"},8:{text:"Admob"}}},{title:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"advType",valueEnum:{1:{text:"\u6A2A\u5E45",status:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(a){return a/100}},{title:"\u8BBE\u5907\u54C1\u724C",dataIndex:"deviceBrand",hideInSearch:!0,valueType:"textarea"},{title:"\u8BBE\u5907\u540D",dataIndex:"deviceName",hideInSearch:!0,valueType:"textarea"},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"}];return(0,u.jsx)(v._z,{children:(0,u.jsx)(p.Z,{headerTitle:T.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:h,rowKey:"key",search:{labelWidth:120},request:function(){var i=m()(d()().mark(function a(M){var _,r,n;return d()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c._5)(M);case 2:return n=t.sent,t.abrupt("return",{data:(_=n.data)===null||_===void 0?void 0:_.data,total:(r=n.data)===null||r===void 0?void 0:r.total,success:!0});case 4:case"end":return t.stop()}},a)}));return function(a){return i.apply(this,arguments)}}(),columns:f})})};s.default=I}}]);

1
dist/p__AdvRecordList.9dd0bcc8.async.js

@ -0,0 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(O,i,e){e.r(i);var p=e(15009),d=e.n(p),v=e(99289),o=e.n(v),m=e(48357),h=e(90930),E=e(76104),I=e(35312),f=e(67294),c=e(85893),x=function(){var T=(0,f.useRef)(),M=(0,I.useIntl)(),D=function(){var u=o()(d()().mark(function a(){var s,_,r;return d()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,m.ln)();case 2:return _=n.sent,r=[],(s=_.data)===null||s===void 0||s.forEach(function(t){r.push({label:t.name,value:t.id})}),n.abrupt("return",r);case 6:case"end":return n.stop()}},a)}));return function(){return u.apply(this,arguments)}}(),P=[{title:"\u8BBE\u5907Id",dataIndex:"deviceId",valueType:"textarea",ellipsis:!0,copyable:!0},{title:"\u5E94\u7528\u540D\u79F0",hideInSearch:!0,dataIndex:"appName",valueType:"textarea"},{title:"\u5E73\u53F0",dataIndex:"platform",valueEnum:{1:{text:"\u7A7F\u5C71\u7532"},2:{text:"\u817E\u8BAF"},3:{text:"\u767E\u5EA6\u8054\u76DF"},4:{text:"Mintegral"},5:{text:"\u5FEB\u624B"},6:{text:"\u6E38\u53EF\u8D62"},7:{text:"Sigmob"},8:{text:"Admob"}}},{title:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"advType",valueEnum:{1:{text:"\u6A2A\u5E45",status:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(a){return a/100}},{title:"\u8BBE\u5907\u54C1\u724C",dataIndex:"deviceBrand",hideInSearch:!0,valueType:"textarea"},{title:"\u8BBE\u5907\u540D",dataIndex:"deviceName",hideInSearch:!0,valueType:"textarea"},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"},{title:"\u5E94\u7528\u540D\u79F0",hideInTable:!0,dataIndex:"appId",valueType:"select",request:D}];return(0,c.jsx)(h._z,{children:(0,c.jsx)(E.Z,{headerTitle:M.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:T,rowKey:"key",search:{labelWidth:120},request:function(){var u=o()(d()().mark(function a(s){var _,r,l;return d()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m._5)(s);case 2:return l=t.sent,t.abrupt("return",{data:(_=l.data)===null||_===void 0?void 0:_.data,total:(r=l.data)===null||r===void 0?void 0:r.total,success:!0});case 4:case"end":return t.stop()}},a)}));return function(a){return u.apply(this,arguments)}}(),columns:P})})};i.default=x}}]);

4
dist/umi.cecb10de.js → dist/umi.d5108968.js

File diff suppressed because one or more lines are too long

21
src/pages/AdvRecordList.tsx

@ -1,10 +1,10 @@
import { advList } from '@/services/matrix/admin';
import { advList, appList } from '@/services/matrix/admin';
import { PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
import { useIntl } from '@umijs/max';
import React, { useRef } from 'react';
import { RequestOptionsType, ProFieldRequestData } from "@ant-design/pro-utils";
import type { ActionType } from '@ant-design/pro-components';
const AdvRecordList: React.FC = () => {
const actionRef = useRef<ActionType>();
@ -15,6 +15,16 @@ const AdvRecordList: React.FC = () => {
* */
const intl = useIntl();
const appNameMap: ProFieldRequestData = async () => {
let res = await appList();
let data: RequestOptionsType[] = [];
res.data?.forEach(x=>{
data.push({label: x.name, value: x.id})
})
return data;
}
const columns: ProColumns<API.MatrixAdvRecordBo>[] = [
{
title: "设备Id",
@ -115,6 +125,13 @@ const AdvRecordList: React.FC = () => {
dataIndex: 'createdAt',
valueType: 'dateRange'
},
{
title: "应用名称",
hideInTable: true,
dataIndex: 'appId',
valueType: "select",
request: appNameMap
}
];

8
src/services/matrix/admin.ts

@ -14,6 +14,14 @@ export async function advList(body: API.AdvRecordQuery, options?: { [key: string
});
}
/** 此处后端没有提供注释 GET /api/admin/appList */
export async function appList(options?: { [key: string]: any }) {
return request<API.RListMatrixApp>('/api/admin/appList', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/admin/current */
export async function current(options?: { [key: string]: any }) {
return request<API.RMatrixAdmin>('/api/admin/current', {

8
src/services/matrix/matrixController.ts

@ -16,3 +16,11 @@ export async function saveAdvRecord(
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/game/matrix/whiteList */
export async function whiteList(options?: { [key: string]: any }) {
return request<API.RListString>('/api/game/matrix/whiteList', {
method: 'GET',
...(options || {}),
});
}

21
src/services/matrix/typings.d.ts

@ -10,6 +10,7 @@ declare namespace API {
advType?: number;
platform?: number;
deviceId?: string;
createdAt?: string[];
};
type AppInfo = {
@ -88,6 +89,14 @@ declare namespace API {
ip?: string;
};
type MatrixApp = {
id?: number;
name?: string;
code?: string;
url?: string;
ownerId?: number;
};
type PageResultMatrixAdvRecordBo = {
data?: MatrixAdvRecordBo[];
total?: number;
@ -123,6 +132,18 @@ declare namespace API {
data?: InviteInfo;
};
type RListMatrixApp = {
code?: number;
message?: string;
data?: MatrixApp[];
};
type RListString = {
code?: number;
message?: string;
data?: string[];
};
type RLoginBo = {
code?: number;
message?: string;

Loading…
Cancel
Save