shenwu 5 months ago
parent
commit
ccfa74c8f5

+ 2 - 2
src/pages/MiniApp/BookManage/Short/tableConfig.tsx

@@ -146,7 +146,7 @@ export const columns = (props: { authList?: any[], labelList?: any[], enumList?:
             align: 'center',
             align: 'center',
             hideInSearch: true,
             hideInSearch: true,
             render: (a: any, b: any) => {
             render: (a: any, b: any) => {
-                let arr = getDescriptions(enumList?.PAYMENT_TYPE?.values || [], [b?.paymentType] || [])
+                let arr = getDescriptions(enumList?.PAYMENT_TYPE?.values || [], b?.paymentType ? [b?.paymentType] : [])
                 let arr1 = new Map(enumList?.PAYMENT_OPTION?.values?.map(({ value, description }: any) => [value, description]))
                 let arr1 = new Map(enumList?.PAYMENT_OPTION?.values?.map(({ value, description }: any) => [value, description]))
                 return <Space size={[0, 5]} wrap>
                 return <Space size={[0, 5]} wrap>
                     {
                     {
@@ -216,7 +216,7 @@ export const columns = (props: { authList?: any[], labelList?: any[], enumList?:
             render: (a: any, b: any) => {
             render: (a: any, b: any) => {
                 return <Space>
                 return <Space>
                     <a onClick={() => { closeForm(true, b) }}>付费配置</a>
                     <a onClick={() => { closeForm(true, b) }}>付费配置</a>
-                    <BookExtend shortBookId={b?.bookId} bookName={b?.shortBookInfoVO?.bookName}/>
+                    <BookExtend shortBookId={b?.bookId} bookName={b?.shortBookInfoVO?.bookName} />
                 </Space>
                 </Space>
             }
             }
         },
         },

+ 1 - 1
src/pages/MiniApp/BookManage/components/extend/index.tsx

@@ -28,7 +28,7 @@ function BookExtend(props: { shortBookId?: any, bookName: any, longBookId?: any,
         }
         }
         PromotionLink.run(props?.shortBookId ? { ...data, shortBookId: props.shortBookId } : { ...data, longBookId: props.longBookId, longBookChapterId: props?.longBookChapterId }).then(res => {
         PromotionLink.run(props?.shortBookId ? { ...data, shortBookId: props.shortBookId } : { ...data, longBookId: props.longBookId, longBookChapterId: props?.longBookChapterId }).then(res => {
             if (res.code === 200) {
             if (res.code === 200) {
-                copy(res?.data?.data)
+                copy(res?.data?.linkUrl)
             }
             }
         })
         })
     }
     }

+ 21 - 6
src/pages/MiniApp/Extend/Book/tableConfig.tsx

@@ -24,23 +24,38 @@ export const columns = (appCategory: 1 | 2): ProColumns<any>[] => {
             hideInTable: appCategory === 2
             hideInTable: appCategory === 2
         },
         },
         {
         {
-            title: "创建时间",
-            dataIndex: 'createTime',
-            key: "createTime",
+            title: "推广页面",
+            dataIndex: 'pageName',
+            key: "pageName",
             align: "center",
             align: "center",
-            hideInSearch: true,
         },
         },
         {
         {
             title: "链接",
             title: "链接",
+            dataIndex: 'linkUrl',
+            key: "linkUrl",
+            hideInSearch: true,
+            align: "center",
+            render: (_, row) => {
+                return row.linkUrl ? <Paragraph copyable>{row.linkUrl}</Paragraph> : '-'
+            }
+        },
+        {
+            title: "小程序路径",
             dataIndex: 'pagePath',
             dataIndex: 'pagePath',
             key: "pagePath",
             key: "pagePath",
             hideInSearch: true,
             hideInSearch: true,
             align: "center",
             align: "center",
             render: (_, row) => {
             render: (_, row) => {
-                return <Paragraph copyable>{row.pagePath}</Paragraph>
+                return row.pagePath ? <Paragraph copyable>{row.pagePath}</Paragraph> : '-'
             }
             }
         },
         },
-
+        {
+            title: "创建时间",
+            dataIndex: 'createTime',
+            key: "createTime",
+            align: "center",
+            hideInSearch: true,
+        },
         // 搜索条件
         // 搜索条件
         {
         {
             title: "开始时间",
             title: "开始时间",

+ 2 - 1
src/pages/MiniApp/Extend/Page/extend/index.tsx

@@ -28,8 +28,9 @@ function PageExtend(props: { reload?: () => void }) {
         }
         }
         PromotionLink.run(data).then(res => {
         PromotionLink.run(data).then(res => {
             if (res.code === 200) {
             if (res.code === 200) {
-                copy(res?.data?.data)
+                copy(res?.data?.linkUrl)
                 props?.reload?.()
                 props?.reload?.()
+                setOpen(false)
             }
             }
         })
         })
     }
     }

+ 16 - 7
src/pages/MiniApp/Extend/Page/tableConfig.tsx

@@ -16,23 +16,32 @@ export const columns = (): ProColumns<any>[] => {
             align: "center",
             align: "center",
         },
         },
         {
         {
-            title: "创建时间",
-            dataIndex: 'createTime',
-            key: "createTime",
-            align: "center",
+            title: "链接",
+            dataIndex: 'linkUrl',
+            key: "linkUrl",
             hideInSearch: true,
             hideInSearch: true,
+            align: "center",
+            render: (_, row) => {
+                return row.linkUrl ? <Paragraph copyable>{row.linkUrl}</Paragraph> : '-'
+            }
         },
         },
         {
         {
-            title: "链接",
+            title: "小程序路径",
             dataIndex: 'pagePath',
             dataIndex: 'pagePath',
             key: "pagePath",
             key: "pagePath",
             hideInSearch: true,
             hideInSearch: true,
             align: "center",
             align: "center",
             render: (_, row) => {
             render: (_, row) => {
-                return <Paragraph copyable>{row.pagePath}</Paragraph>
+                return row.pagePath ? <Paragraph copyable>{row.pagePath}</Paragraph> : '-'
             }
             }
         },
         },
-
+        {
+            title: "创建时间",
+            dataIndex: 'createTime',
+            key: "createTime",
+            align: "center",
+            hideInSearch: true,
+        },
         // 搜索条件
         // 搜索条件
         {
         {
             title: "开始时间",
             title: "开始时间",