diff --git a/main.js b/main.js index 8ff0046..4b316bc 100644 --- a/main.js +++ b/main.js @@ -44,7 +44,7 @@ class AppWindow extends BrowserWindow { }; const finalConfig = { ...basicConfig, ...config }; super(finalConfig); - if (envStr === 'development') { + if (env === 'development') { // 开发 this.loadURL('http://localhost:3000'); } else { diff --git a/src/api/Home/Index/index.ts b/src/api/Home/Index/index.ts index bcb47e7..d18265e 100644 --- a/src/api/Home/Index/index.ts +++ b/src/api/Home/Index/index.ts @@ -46,6 +46,11 @@ export const GetAgoraConf = () => url: `/home/agora-conf`, method: 'get', }) +export const GetQrcode = (roomNum: string, env: string) => + request({ + url: `/home/r-qrcode?roomNum=${roomNum}&env=${env}`, + method: 'get', + }) export const GetRecord = (beginTimestamp: number, endTimestamp: number, roomNum: string) => request({ diff --git a/src/assets/icon55.png b/src/assets/icon55.png new file mode 100644 index 0000000..e9a302e Binary files /dev/null and b/src/assets/icon55.png differ diff --git a/src/page/Home/Index/index.module.scss b/src/page/Home/Index/index.module.scss index 0a634c8..f8603d3 100644 --- a/src/page/Home/Index/index.module.scss +++ b/src/page/Home/Index/index.module.scss @@ -108,12 +108,26 @@ >div:nth-child(1) { display: flex; align-items: center; - cursor: pointer; - >span { - color: #767676; - margin-right: 4px; - font-size: 14px; + >div:nth-child(1) { + margin-right: 6px; + display: flex; + align-items: center; + cursor: pointer; + + >span { + color: #767676; + margin-right: 6px; + font-size: 14px; + } + } + + >div:nth-child(2) { + cursor: pointer; + + >img { + width: 16px; + } } } diff --git a/src/page/Home/Index/index.tsx b/src/page/Home/Index/index.tsx index 1a23802..257615a 100644 --- a/src/page/Home/Index/index.tsx +++ b/src/page/Home/Index/index.tsx @@ -2,7 +2,7 @@ import styles from '@/page/Home/Index/index.module.scss' import { useEffect, useState, useRef } from "react"; import Operation from '@/components/Operation'; import { Button, Input, Modal, Pagination, Empty, message, Popover, Popconfirm, DatePicker, Select } from "antd"; -import { GetRoom, PostRoom, GetCheckoutRoomNum, GetRoomRtcToken, DeleteRoom, GetRecord, PostRoomInfo } from '@/api/Home/Index'; +import { GetRoom, PostRoom, GetCheckoutRoomNum, GetRoomRtcToken, DeleteRoom, GetRecord, PostRoomInfo, GetQrcode } from '@/api/Home/Index'; import ImageUrl from '@/utils/package/imageUrl' import { ExclamationCircleFilled, ReloadOutlined } from '@ant-design/icons'; import JoinSetting from '@/components/JoinSetting'; @@ -41,6 +41,7 @@ const Index: React.FC = () => { const [subjectList, setSubjectList] = useState([]); const [timeData, setTimeData] = useState([]); const [isCreateRoom, setIsCreateRoom] = useState(false); + const [baseImage, setBaseImage] = useState(''); const userInfo = JSON.parse(storage.getItem('user') as string) useEffect(() => { setUser(userInfo) @@ -231,9 +232,37 @@ const Index: React.FC = () => {
-
copyRoomNum(item.roomNum)} title='复制房间号'> - {item.roomNum} - +
+
copyRoomNum(item.roomNum)} title='复制房间号'> + {item.roomNum} + +
+ { + if (e) { + GetQrcode(item.roomNum, import.meta.env.VITE_ENV === 'development' ? 'trial' : 'release').then(res => { + if (res.code === 200) { + setBaseImage(res.data) + } + }) + } + }} + content={ +
+ +
+ 微信中长按图片识别小程序码
+ 加入会议 +
+
+ } + > +
+ +
+
+
{role.ID.includes(userInfo.roleId) ?