wjx 5 годин тому
батько
коміт
782bd618e3

+ 9 - 4
src/pages/weComTask/page/miniProgramPages/index.tsx

@@ -3,7 +3,6 @@ import SearchBox from "../../components/searchBox"
 import { SearchOutlined, PlusOutlined } from '@ant-design/icons';
 import { useEffect, useRef, useState } from "react";
 import style from '../bookLink/index.less'
-import NewMini from "./newMini";
 import { getProjectGroupsAllListApi } from "../../API/groupManage";
 import { useAjax } from "@/Hook/useAjax";
 import dayjs from 'dayjs';
@@ -14,7 +13,7 @@ import { randomString } from "@/utils/utils";
 import DrawerMini from "./drawerMini";
 import { getCorpUserListApi, getGenerateUrllinkApi } from "../../API/global";
 import ShowQrCode from "./showQrCode";
-import { url } from "inspector";
+import dayJs from 'dayjs';
 
 
 /**
@@ -149,8 +148,14 @@ const MiniProgramPages: React.FC = () => {
         }).catch(() => hide())
     }
 
-    const handleCode = (appId: string, vid: string) => {
-        getGenerateUrllink.run({ path: '/pages/play/index', query: `vid=${vid}&eq=${-Math.random()}`, appId }).then(res => {
+    const handleCode = (appId: string, vid: string, createTime: string) => {
+        let params = {}
+        if (dayJs(createTime) > dayJs('2026-04-08').startOf('day')) {
+            params = { path: '/pages/player/index', query: `id=${vid}` }
+        } else {
+            params = { path: '/pages/play/index', query: `vid=${vid}&eq=${-Math.random()}` }
+        }
+        getGenerateUrllink.run({ ...params, appId }).then(res => {
             if (res?.data) {
                 setQrCode({ visible: true, url: res.data })
             }

+ 2 - 2
src/pages/weComTask/page/miniProgramPages/tableConfig.tsx

@@ -7,7 +7,7 @@ import dayJs from 'dayjs';
 export function TableConfig(
     handleEdit?: (d: Record<string, any>, isCopy?: boolean) => void,
     handleDel?: (data: number[]) => void,
-    handleCode?: (appid: string, vid: string) => void
+    handleCode?: (appid: string, vid: string, createTime: string) => void
 ): ColumnsType<any> {
 
     const arr: ColumnsType<any> = [
@@ -188,7 +188,7 @@ export function TableConfig(
                 return <Flex gap={4}>
                     <a onClick={() => handleEdit?.(records, true)}>复制</a>
                     <a onClick={() => handleEdit?.(records)}>修改</a>
-                    {records?.previewAppId && <a onClick={() => handleCode?.(records.previewAppId, records.sign)}>小程序预览链接</a>}
+                    {records?.previewAppId && <a onClick={() => handleCode?.(records.previewAppId, records.sign, records.createTime)}>小程序预览链接</a>}
                     <Popconfirm
                         title="确定删除?"
                         onConfirm={() => { handleDel?.([records.id]) }}