shenwu преди 7 месеца
родител
ревизия
4f1fa02145

+ 1 - 1
src/pages/Distributor/DyMiniApp/index.tsx

@@ -22,7 +22,7 @@ const Page: React.FC = () => {
             // ghost={true}//幽灵模式
             // bordered
             expandable={{
-                rowExpandable: (record) => record.status,
+                rowExpandable: (record) => record?.appCarrierList?.length > 0,
                 expandRowByClick: true,
                 expandedRowRender: (record) => {
                     return <Table

+ 17 - 7
src/pages/Distributor/DyMiniApp/tableConfig.tsx

@@ -19,8 +19,8 @@ export const columns = (): ProColumns<any>[] => {
         },
         {
             title: "AppId",
-            dataIndex: 'appId',
-            key: "appId",
+            dataIndex: 'appKey',
+            key: "appKey",
             hideInSearch: true,
             align: "left",
         },
@@ -34,15 +34,25 @@ export const columns = (): ProColumns<any>[] => {
                 return b.appCategory === 1 ? "长篇" : "短篇"
             }
         },
-
+        {
+            title: "允许投放渠道",
+            dataIndex: 'advertisingChannels',
+            key: "advertisingChannels",
+            hideInSearch: true,
+            align: "left",
+            render:(a:any,b:any)=>{
+                return "需后端提供枚举"
+            }
+        },
         {
             title: "运营载体状态",
-            dataIndex: 'status',
-            key: "status",
+            dataIndex: 'appCarrierList',
+            key: "appCarrierList",
             hideInSearch: true,
             align: "center",
-            render: (a) => {
-                return <Badge status={a ? "processing" : "error"} text={a ? "有" : "无"} />
+            render: (a,b:any) => {
+                let isTrue = b?.appCarrierList?.length > 0 
+                return <Badge status={isTrue ? "processing" : "error"} text={isTrue ? "有" : "无"} />
             }
         },
         {

+ 1 - 1
src/pages/Distributor/WxMiniApp/index.tsx

@@ -22,7 +22,7 @@ const Page: React.FC = () => {
             // ghost={true}//幽灵模式
             // bordered
             expandable={{
-                rowExpandable: (record) => record.status,
+                rowExpandable: (record) => record?.appCarrierList?.length > 0,
                 expandRowByClick: true,
                 expandedRowRender: (record) => {
                     return <Table

+ 21 - 10
src/pages/Distributor/WxMiniApp/tableConfig.tsx

@@ -11,7 +11,7 @@ export const columns = (): ProColumns<any>[] => {
             key: "appName",
             align: "left",
             render: (a: any, b: any) => {
-                return <Space size={[3,0]}>
+                return <Space size={[3, 0]}>
                     <MyIcon type="icon-xiaochengxu-wx" />
                     {b.appName}
                 </Space>
@@ -19,8 +19,8 @@ export const columns = (): ProColumns<any>[] => {
         },
         {
             title: "AppId",
-            dataIndex: 'wechatAppId',
-            key: "wechatAppId",
+            dataIndex: 'appKey',
+            key: "appKey",
             hideInSearch: true,
             align: "left",
         },
@@ -30,18 +30,29 @@ export const columns = (): ProColumns<any>[] => {
             key: "appCategory",
             hideInSearch: true,
             align: "left",
-            render:(a:any,b:any)=>{
-                return b.appCategory === 1 ? "长篇":"短篇"
+            render: (a: any, b: any) => {
+                return b.appCategory === 1 ? "长篇" : "短篇"
+            }
+        },
+        {
+            title: "允许投放渠道",
+            dataIndex: 'advertisingChannels',
+            key: "advertisingChannels",
+            hideInSearch: true,
+            align: "left",
+            render: (a: any, b: any) => {
+                return "需后端提供枚举"
             }
         },
         {
             title: "运营载体状态",
-            dataIndex: 'status',
-            key: "status",
+            dataIndex: 'appCarrierList',
+            key: "appCarrierList",
             hideInSearch: true,
             align: "center",
-            render: (a) => {
-                return <Badge status={a ? "processing" : "error"} text={a ? "有" : "无"} />
+            render: (a, b: any) => {
+                let isTrue = b?.appCarrierList?.length > 0
+                return <Badge status={isTrue ? "processing" : "error"} text={isTrue ? "有" : "无"} />
             }
         },
         {
@@ -50,7 +61,7 @@ export const columns = (): ProColumns<any>[] => {
             valueType: 'option',
             align: "center",
             render: (_, record) => {
-                return <MenuChange menuType="miniApp" data={{ ...record, appType:1}}><a type='primary'>管理</a></MenuChange>
+                return <MenuChange menuType="miniApp" data={{ ...record, appType: 1 }}><a type='primary'>管理</a></MenuChange>
             },
         },
     ];