Browse Source

改样式

fanmiyou
nili 9 months ago
parent
commit
d83dd20a4b
  1. 4
      dist/86.b26c32d8.async.js
  2. 20
      dist/991.a4a764f4.async.js
  3. 2
      dist/index.html
  4. 2
      dist/p__AdminManagement.8c0c25d4.async.js
  5. 1
      dist/p__AdvRecordList.4fda3f71.async.js
  6. 1
      dist/p__AdvRecordList.5b127676.async.js
  7. 1
      dist/p__AppManagement.16d305c4.async.js
  8. 1
      dist/p__AppManagement.edc3d5dd.async.js
  9. 1
      dist/p__Overview.45034db4.async.js
  10. 1
      dist/p__Overview.d185e3a6.async.js
  11. 433
      dist/umi.4a415c12.js
  12. 433
      dist/umi.4ab9ff3d.js
  13. 4
      src/app.tsx
  14. 8
      src/pages/AdminManagement.tsx
  15. 23
      src/pages/AdvRecordList.tsx
  16. 21
      src/pages/AppManagement.tsx
  17. 32
      src/pages/Overview.tsx

4
dist/17.a8d28792.async.js → dist/86.b26c32d8.async.js

File diff suppressed because one or more lines are too long

20
dist/991.9f137da9.async.js → dist/991.a4a764f4.async.js

File diff suppressed because one or more lines are too long

2
dist/index.html

@ -9,6 +9,6 @@
</head>
<body>
<div id="root"></div>
<script src="/umi.4ab9ff3d.js"></script>
<script src="/umi.4a415c12.js"></script>
</body></html>

2
dist/p__AdminManagement.8ca066a9.async.js → dist/p__AdminManagement.8c0c25d4.async.js

File diff suppressed because one or more lines are too long

1
dist/p__AdvRecordList.4fda3f71.async.js

@ -1 +0,0 @@
"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),h=e(90930),E=e(85601),f=e(35312),I=e(67294),m=e(48357),c=e(85893),T=function(){var x=(0,I.useRef)(),M=(0,f.useIntl)(),D=function(){var u=o()(d()().mark(function t(){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(a){r.push({label:a.name,value:a.code})}),n.abrupt("return",r);case 6:case"end":return n.stop()}},t)}));return function(){return u.apply(this,arguments)}}(),P=[{title:"\u5E94\u7528\u540D\u79F0",hideInTable:!0,dataIndex:"code",valueType:"select",request:D},{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"},5:{text:"\u5FEB\u624B"},7:{text:"Sigmob"}}},{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(t){return t/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,c.jsx)(h._z,{children:(0,c.jsx)(E.Z,{headerTitle:M.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:x,rowKey:"key",search:{labelWidth:120},request:function(){var u=o()(d()().mark(function t(s){var _,r,l;return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,m._5)(s);case 2:return l=a.sent,a.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 a.stop()}},t)}));return function(t){return u.apply(this,arguments)}}(),columns:P})})};i.default=T}}]);

1
dist/p__AdvRecordList.5b127676.async.js

@ -0,0 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(P,o,e){e.r(o);var p=e(15009),u=e.n(p),v=e(99289),m=e.n(v),E=e(90930),h=e(85601),f=e(35312),x=e(67294),c=e(48357),l=e(85893),I=function(){var T=(0,x.useRef)(),M=(0,f.useIntl)(),D=function(){var d=m()(u()().mark(function t(){var r,s,n;return u()().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,(0,c.ln)();case 2:return s=_.sent,n=[],(r=s.data)===null||r===void 0||r.forEach(function(a){n.push({label:a.name,value:a.code})}),_.abrupt("return",n);case 6:case"end":return _.stop()}},t)}));return function(){return d.apply(this,arguments)}}(),O=[{title:"\u5E94\u7528\u540D\u79F0",hideInTable:!0,dataIndex:"code",valueType:"select",request:D},{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"},5:{text:"\u5FEB\u624B"},7:{text:"Sigmob"}}},{title:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"advType",valueEnum:{1:{text:"\u6A2A\u5E45"},2:{text:"\u63D2\u9875"},3:{text:"\u6FC0\u52B1\u89C6\u9891"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(t){return t/100}},{title:"\u8BBE\u5907",dataIndex:"device",hideInSearch:!0,valueType:"textarea",renderText:function(t,r){return(0,l.jsxs)("p",{children:[r.deviceBrand," ",(0,l.jsx)("br",{})," ",r.deviceName]})}},{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,l.jsx)(E._z,{children:(0,l.jsx)(h.Z,{headerTitle:M.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:T,rowKey:"key",search:{labelWidth:120},request:function(){var d=m()(u()().mark(function t(r){var s,n,i;return u()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,c._5)(r);case 2:return i=a.sent,a.abrupt("return",{data:(s=i.data)===null||s===void 0?void 0:s.data,total:(n=i.data)===null||n===void 0?void 0:n.total,success:!0});case 4:case"end":return a.stop()}},t)}));return function(t){return d.apply(this,arguments)}}(),columns:O})})};o.default=I}}]);

1
dist/p__AppManagement.16d305c4.async.js

@ -0,0 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[39],{84702:function(H,p,e){e.r(p);var j=e(15009),u=e.n(j),P=e(99289),v=e.n(P),A=e(5574),m=e.n(A),U=e(90930),C=e(85601),T=e(35312),t=e(8232),x=e(10397),I=e(14726),B=e(17788),i=e(96365),E=e(67294),f=e(48357),r=e(85893),b=function(){var R=(0,E.useState)(!1),h=m()(R,2),W=h[0],d=h[1],K=t.Z.useForm(),L=m()(K,1),o=L[0],y=(0,E.useState)([]),M=m()(y,2),F=M[0],Z=M[1],S=(0,T.useModel)("@@initialState"),c=S.initialState,l=c==null?void 0:c.currentUser,g=l&&l.role&&l.role<2,$=function(_){o.setFieldsValue(_),d(!0)},O=[{title:"\u6E38\u620F",dataIndex:"name"},{title:"\u4E0B\u8F7D\u5730\u5740",dataIndex:"url",renderText:function(_){return(0,r.jsx)(x.Z,{size:120,value:_||"",bordered:!1})}}],z=[].concat(O,[{title:"secret",dataIndex:"secret",ellipsis:!0,copyable:!0},{title:"\u64CD\u4F5C",width:80,renderText:function(_){return(0,r.jsx)("a",{onClick:function(){return $(_)},children:"\u7F16\u8F91"},"edit")}}]),G=function(){o.submit()},N=function(){d(!1)},D=function(){var a=v()(u()().mark(function _(){var s;return u()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,f.ln)();case 2:s=n.sent,s.data&&Z(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return a.apply(this,arguments)}}();(0,E.useEffect)(function(){D()},[]);var V=function(){o.resetFields(),d(!0)},J=function(){var a=v()(u()().mark(function _(s){return u()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,(0,f.XJ)(s);case 3:n.next=8;break;case 5:return n.prev=5,n.t0=n.catch(0),n.abrupt("return");case 8:d(!1),D();case 10:case"end":return n.stop()}},_,null,[[0,5]])}));return function(s){return a.apply(this,arguments)}}();return(0,r.jsxs)(U._z,{children:[l&&l.role&&l.role<2&&(0,r.jsx)(I.ZP,{style:{marginBottom:"20px"},onClick:V,children:"\u65B0\u5EFA\u5E94\u7528"}),(0,r.jsx)(C.Z,{search:!1,columns:g?z:O,dataSource:F}),(0,r.jsx)(B.Z,{title:"\u7F16\u8F91",visible:W,onOk:G,onCancel:N,children:(0,r.jsxs)(t.Z,{form:o,onFinish:J,children:[(0,r.jsx)(t.Z.Item,{name:"id",style:{display:"none"},children:(0,r.jsx)(i.Z,{type:"hidden"})}),(0,r.jsx)(t.Z.Item,{name:"code",style:{display:"none"},children:(0,r.jsx)(i.Z,{type:"hidden"})}),(0,r.jsx)(t.Z.Item,{label:"\u5E94\u7528\u540D",name:"name",children:(0,r.jsx)(i.Z,{})}),(0,r.jsx)(t.Z.Item,{label:"\u4E0B\u8F7D\u5730\u5740",name:"url",children:(0,r.jsx)(i.Z,{})})]})})]})};p.default=b}}]);

1
dist/p__AppManagement.edc3d5dd.async.js

@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[39],{84702:function(Q,v,e){e.r(v);var j=e(15009),d=e.n(j),P=e(99289),p=e.n(P),A=e(5574),m=e.n(A),x=e(90930),I=e(85601),U=e(35312),s=e(8232),C=e(55241),T=e(10397),B=e(14726),R=e(17788),i=e(96365),E=e(67294),h=e(48357),n=e(85893),W=function(){var b=(0,E.useState)(!1),f=m()(b,2),K=f[0],u=f[1],L=s.Z.useForm(),y=m()(L,1),o=y[0],Z=(0,E.useState)([]),M=m()(Z,2),F=M[0],S=M[1],g=(0,U.useModel)("@@initialState"),c=g.initialState,l=c==null?void 0:c.currentUser,$=l&&l.role&&l.role<2,G=function(r){o.setFieldsValue(r),u(!0)},O=[{title:"\u5E94\u7528\u540D",dataIndex:"name"},{title:"code",dataIndex:"code"},{title:"\u4E0B\u8F7D\u5730\u5740",dataIndex:"url",renderText:function(r){return(0,n.jsx)(C.Z,{overlayInnerStyle:{padding:0},content:(0,n.jsx)(T.Z,{value:r||"",bordered:!1}),children:(0,n.jsx)("a",{children:r})})}}],N=[].concat(O,[{title:"secret",dataIndex:"secret",ellipsis:!0,copyable:!0},{title:"\u64CD\u4F5C",width:80,renderText:function(r){return(0,n.jsx)("a",{onClick:function(){return G(r)},children:"\u7F16\u8F91"},"edit")}}]),V=function(){o.submit()},z=function(){u(!1)},D=function(){var _=p()(d()().mark(function r(){var t;return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,h.ln)();case 2:t=a.sent,t.data&&S(t.data);case 4:case"end":return a.stop()}},r)}));return function(){return _.apply(this,arguments)}}();(0,E.useEffect)(function(){D()},[]);var J=function(){o.resetFields(),u(!0)},X=function(){var _=p()(d()().mark(function r(t){return d()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,(0,h.XJ)(t);case 3:a.next=8;break;case 5:return a.prev=5,a.t0=a.catch(0),a.abrupt("return");case 8:u(!1),D();case 10:case"end":return a.stop()}},r,null,[[0,5]])}));return function(t){return _.apply(this,arguments)}}();return(0,n.jsxs)(x._z,{children:[l&&l.role&&l.role<2&&(0,n.jsx)(B.ZP,{style:{marginBottom:"20px"},onClick:J,children:"\u65B0\u5EFA\u5E94\u7528"}),(0,n.jsx)(I.Z,{search:!1,columns:$?N:O,dataSource:F}),(0,n.jsx)(R.Z,{title:"\u7F16\u8F91",visible:K,onOk:V,onCancel:z,children:(0,n.jsxs)(s.Z,{form:o,onFinish:X,children:[(0,n.jsx)(s.Z.Item,{name:"id",style:{display:"none"},children:(0,n.jsx)(i.Z,{type:"hidden"})}),(0,n.jsx)(s.Z.Item,{name:"code",style:{display:"none"},children:(0,n.jsx)(i.Z,{type:"hidden"})}),(0,n.jsx)(s.Z.Item,{label:"\u5E94\u7528\u540D",name:"name",children:(0,n.jsx)(i.Z,{})}),(0,n.jsx)(s.Z.Item,{label:"\u4E0B\u8F7D\u5730\u5740",name:"url",children:(0,n.jsx)(i.Z,{})})]})})]})};v.default=W}}]);

1
dist/p__Overview.45034db4.async.js

@ -0,0 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[628],{58451:function(_e,p,_){_.r(p);var U=_(97857),A=_.n(U),C=_(15009),r=_.n(C),T=_(99289),v=_.n(T),R=_(5574),m=_.n(R),E=_(48357),I=_(4025),o=_(31847),x=_(90930),B=_(57470),f=_(64317),W=_(34540),g=_(27484),K=_.n(g),L=_(9220),l=_(67294),y=_(96974),a=_(85893),S=function(){var Z=(0,l.useState)(),D=m()(Z,2),i=D[0],F=D[1],z=(0,l.useState)([]),O=m()(z,2),h=O[0],G=O[1],$=(0,l.useState)([]),P=m()($,2),H=P[0],J=P[1],ae=o.Z.Divider,N=(0,l.useState)(!1),M=m()(N,2),Q=M[0],V=M[1],X=(0,y.UO)(),j=X.code,Y=function(){var t=v()(r()().mark(function e(){var n;return r()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,E.d1)({appCode:j});case 2:n=s.sent,n.data&&F(n.data);case 4:case"end":return s.stop()}},e)}));return function(){return t.apply(this,arguments)}}(),w=function(){var t=v()(r()().mark(function e(){var n;return r()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,E.ln)();case 2:n=s.sent,n.data&&J(n.data);case 4:case"end":return s.stop()}},e)}));return function(){return t.apply(this,arguments)}}(),b=function(){var t=v()(r()().mark(function e(n){var u;return r()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,E.Zb)(n);case 2:u=d.sent,u.data&&G(u.data);case 4:case"end":return d.stop()}},e)}));return function(n){return t.apply(this,arguments)}}();(0,l.useEffect)(function(){Y(),w(),b({code:j})},[]);var c=function(e){return e?parseFloat((e/1e5).toFixed(2)):0},k=function(e){var n=e+"";return n.slice(4,6)+"/"+n.slice(6,8)},q=h.map(function(t){return{date:k(t.date),income:c(t.income)}}),ee={data:q,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"},income:{title:"\u6536\u5165\uFF08\u5143\uFF09"}},title:"\u533A\u95F4\u7D2F\u8BA1"+c(h.reduce(function(t,e){return t+(e.income?e.income:0)},0))+"\u5143",height:400,label:{text:function(e){return e.income>0?e.income:""},textBaseline:"bottom",visible:!0,type:"point"},line:{style:{stroke:"#eb0fcc",strokeWidth:2},shapeField:"smooth"},shapeField:"smooth",style:{fill:"linear-gradient(-90deg, white 0%, #eb0fcc 100%)"}};return(0,a.jsxs)(x._z,{children:[(0,a.jsx)(L.Z,{onResize:function(e){V(e.width<596)},children:(0,a.jsx)(o.Z,{children:(0,a.jsxs)(o.Z.Group,{direction:Q?"column":"row",children:[(0,a.jsx)(o.Z,{statistic:{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",value:c(i==null?void 0:i.totalIncome)}}),(0,a.jsx)(o.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:c(i==null?void 0:i.yesterdayIncome)}})]})})},"resize-observer"),(0,a.jsxs)("div",{style:{marginTop:"20px",padding:"40px",backgroundColor:"white"},children:[(0,a.jsxs)(B.t,{defaultCollapsed:!0,split:!0,onFinish:b,children:[(0,a.jsx)(f.Z,{name:"code",label:"\u5E94\u7528",options:H.map(function(t){return{label:t.name,value:t.code}})}),(0,a.jsx)(f.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",5:"\u5FEB\u624B",7:"Sigmob"}}),(0,a.jsx)(f.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,a.jsx)(W.Z,{fieldProps:{disabledDate:function(e){return e&&e>=K()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,a.jsx)(I.Z,A()({},ee))]})]})};p.default=S}}]);

1
dist/p__Overview.d185e3a6.async.js

@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[628],{58451:function(_e,f,e){e.r(f);var b=e(97857),C=e.n(b),T=e(15009),r=e.n(T),R=e(99289),v=e.n(R),x=e(5574),m=e.n(x),E=e(48357),I=e(64289),o=e(31847),B=e(90930),K=e(57470),p=e(64317),L=e(34540),W=e(27484),g=e.n(W),y=e(9220),l=e(67294),S=e(96974),a=e(85893),Z=function(){var F=(0,l.useState)(),D=m()(F,2),i=D[0],z=D[1],G=(0,l.useState)([]),O=m()(G,2),P=O[0],$=O[1],H=(0,l.useState)([]),M=m()(H,2),J=M[0],N=M[1],Q=o.Z.Divider,V=(0,l.useState)(!1),j=m()(V,2),h=j[0],X=j[1],Y=(0,S.UO)(),U=Y.code,w=function(){var t=v()(r()().mark(function _(){var s;return r()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,E.d1)({appCode:U});case 2:s=n.sent,s.data&&z(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return t.apply(this,arguments)}}(),k=function(){var t=v()(r()().mark(function _(){var s;return r()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,E.ln)();case 2:s=n.sent,s.data&&N(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return t.apply(this,arguments)}}(),A=function(){var t=v()(r()().mark(function _(s){var u;return r()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,E.Zb)(s);case 2:u=d.sent,u.data&&$(u.data);case 4:case"end":return d.stop()}},_)}));return function(s){return t.apply(this,arguments)}}();(0,l.useEffect)(function(){w(),k(),A({code:U})},[]);var c=function(_){return _?parseFloat((_/1e5).toFixed(2)):0},q=P.map(function(t){return{date:t.date+"",income:c(t.income)}}),ee={data:q,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"},income:{title:"\u6536\u5165\uFF08\u5143\uFF09"}},title:"\u533A\u95F4\u7D2F\u8BA1"+c(P.reduce(function(t,_){return t+(_.income?_.income:0)},0))+"\u5143",height:400,label:{text:function(_){return _.\u6536\u5165>0?_.\u6536\u5165:""},textBaseline:"bottom"}};return(0,a.jsxs)(B._z,{children:[(0,a.jsx)(y.Z,{onResize:function(_){X(_.width<596)},children:(0,a.jsx)(o.Z,{children:(0,a.jsxs)(o.Z.Group,{direction:h?"column":"row",children:[(0,a.jsx)(o.Z,{statistic:{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",value:c(i==null?void 0:i.totalIncome)}}),(0,a.jsx)(Q,{type:h?"horizontal":"vertical"}),(0,a.jsx)(o.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:c(i==null?void 0:i.yesterdayIncome)}})]})})},"resize-observer"),(0,a.jsxs)("div",{style:{marginTop:"20px",padding:"40px"},children:[(0,a.jsxs)(K.t,{defaultCollapsed:!0,split:!0,onFinish:A,children:[(0,a.jsx)(p.Z,{name:"code",label:"\u5E94\u7528",options:J.map(function(t){return{label:t.name,value:t.code}})}),(0,a.jsx)(p.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",5:"\u5FEB\u624B",7:"Sigmob"}}),(0,a.jsx)(p.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,a.jsx)(L.Z,{fieldProps:{disabledDate:function(_){return _&&_>=g()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,a.jsx)(I.Z,C()({},ee))]})]})};f.default=Z}}]);

433
dist/umi.4a415c12.js

File diff suppressed because one or more lines are too long

433
dist/umi.4ab9ff3d.js

File diff suppressed because one or more lines are too long

4
src/app.tsx

@ -1,4 +1,4 @@
import { AvatarDropdown, AvatarName, Question, SelectLang } from '@/components';
import { AvatarDropdown, AvatarName } from '@/components';
import { current } from '@/services/matrix/admin';
import { LinkOutlined } from '@ant-design/icons';
import { SettingDrawer } from '@ant-design/pro-components';
@ -51,7 +51,7 @@ export async function getInitialState(): Promise<{
// ProLayout 支持的api https://procomponents.ant.design/components/layout
export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => {
return {
actionsRender: () => [<Question key="doc" />, <SelectLang key="SelectLang" />],
// actionsRender: () => [<Question key="doc" />, <SelectLang key="SelectLang" />],
avatarProps: {
// src: initialState?.currentUser?.avatar,
title: <AvatarName />,

8
src/pages/AdminManagement.tsx

@ -29,12 +29,12 @@ const AdminManagement = () => {
const columns: ColumnsType<API.MatrixAdminBo> = [
{
title: '姓名',
title: '账号',
dataIndex: 'name',
},
{
title: '应用IDs',
title: '游戏',
dataIndex: 'appIds',
render: (text: []) => (
<div>
@ -134,13 +134,13 @@ const AdminManagement = () => {
<Form.Item name="id" style={{ display: 'none' }}>
<Input type="hidden" />
</Form.Item>
<Form.Item label="用户名" name="name">
<Form.Item label="账号" name="name">
<Input disabled={editing} />
</Form.Item>
<Form.Item label="密码" name="password">
<Input.Password disabled={editing} />
</Form.Item>
<Form.Item label="应用" name="appIds">
<Form.Item label="游戏" name="appIds">
<Select mode="multiple">
{appArr.map((app) => (
<Select.Option key={app.id} value={app.id}>

23
src/pages/AdvRecordList.tsx

@ -33,7 +33,7 @@ const AdvRecordList: React.FC = () => {
request: appNameMap,
},
{
title: '设备Id',
title: '设备id',
dataIndex: 'deviceId',
valueType: 'textarea',
ellipsis: true,
@ -69,15 +69,15 @@ const AdvRecordList: React.FC = () => {
valueEnum: {
1: {
text: '横幅',
status: 'Default',
// status: 'Default',
},
2: {
text: '插页',
status: 'Processing',
// status: 'Processing',
},
3: {
text: '激励视频',
status: 'Success',
// status: 'Success',
},
},
},
@ -90,16 +90,17 @@ const AdvRecordList: React.FC = () => {
},
},
{
title: '设备品牌',
dataIndex: 'deviceBrand',
title: '设备',
dataIndex: 'device',
hideInSearch: true,
valueType: 'textarea',
renderText: (_, r) => {
return (
<p>
{r.deviceBrand} <br /> {r.deviceName}
</p>
);
},
{
title: '设备名',
dataIndex: 'deviceName',
hideInSearch: true,
valueType: 'textarea',
},
{
title: 'ip',

21
src/pages/AppManagement.tsx

@ -1,6 +1,6 @@
import { PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
import { useModel } from '@umijs/max';
import { Button, Form, Input, Modal, Popover, QRCode } from 'antd';
import { Button, Form, Input, Modal, QRCode } from 'antd';
import { useEffect, useState } from 'react';
import { appList, saveApp } from '@/services/matrix/admin';
@ -20,24 +20,17 @@ const AppManagement = () => {
const columns: ProColumns<API.MatrixApp>[] = [
{
title: '应用名',
title: '游戏',
dataIndex: 'name',
},
{
title: 'code',
dataIndex: 'code',
},
// {
// title: 'code',
// dataIndex: 'code',
// },
{
title: '下载地址',
dataIndex: 'url',
renderText: (url: string) => (
<Popover
overlayInnerStyle={{ padding: 0 }}
content={<QRCode value={url || ''} bordered={false} />}
>
<a>{url}</a>
</Popover>
),
renderText: (url: string) => <QRCode size={120} value={url || ''} bordered={false} />,
},
];

32
src/pages/Overview.tsx

@ -1,5 +1,6 @@
import { appList, incomeDaily, incomeOverview } from '@/services/matrix/admin';
import { Line } from '@ant-design/charts';
import { Area } from '@ant-design/charts';
import {
PageContainer,
ProFormDateRangePicker,
@ -55,9 +56,14 @@ const Overview: React.FC = () => {
return parseFloat((v / 1000_00).toFixed(2));
};
const formatDate = (x: number | undefined) => {
const str = x + '';
return str.slice(4, 6) + '/' + str.slice(6, 8);
};
// 在渲染折线图组件时,对数据进行处理
const processedChartData: { date: string | number; income: number }[] = daily.map((item) => ({
date: item.date + '',
date: formatDate(item.date),
income: formatIncome(item.income),
}));
@ -85,9 +91,23 @@ const Overview: React.FC = () => {
'元',
height: 400,
label: {
text: (d: any) => (d. > 0 ? d. : ''),
text: (d: any) => (d.income > 0 ? d.income : ''),
textBaseline: 'bottom',
visible: true,
type: 'point',
},
line: {
style: {
stroke: '#eb0fcc',
strokeWidth: 2,
},
shapeField: 'smooth',
},
shapeField: 'smooth',
style: {
fill: 'linear-gradient(-90deg, white 0%, #eb0fcc 100%)',
},
// point: { visible: true },
};
return (
@ -106,7 +126,7 @@ const Overview: React.FC = () => {
value: formatIncome(overview?.totalIncome),
}}
/>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<StatisticCard
statistic={{
title: '昨日收入(元)',
@ -117,7 +137,7 @@ const Overview: React.FC = () => {
</StatisticCard>
</RcResizeObserver>
<div style={{ marginTop: '20px', padding: '40px' }}>
<div style={{ marginTop: '20px', padding: '40px', backgroundColor: 'white' }}>
<QueryFilter defaultCollapsed split onFinish={fetchDaily}>
<ProFormSelect
name="code"
@ -154,7 +174,7 @@ const Overview: React.FC = () => {
label="时间"
/>
</QueryFilter>
<Line {...config} />
<Area {...config} />
</div>
</PageContainer>
);

Loading…
Cancel
Save