chore: v3.0.0-4030620241128001

main
刘东阳 3 months ago
parent 6155de708a
commit edf3b3d8ef

@ -55,7 +55,8 @@
"dayjs": "^1.11.13",
"pinia": "^3.0.2",
"vue": "^3.4.21",
"vue-i18n": "^9.1.9"
"vue-i18n": "^9.1.9",
"vue-router": "^4.5.1"
},
"devDependencies": {
"@dcloudio/types": "^3.4.8",

@ -16,7 +16,14 @@
/>
</view>
<view v-else-if="item.lx=='activity'">
<view :style="{backgroundColor:item.color,width:'90vw',height:'70px'}">
<view :style="{fontSize:'30px'}">
<text :style="{color:'white'}">{{item.showname}}</text>
</view>
<view :style="{fontSize:'15px'}">
<text :style="{color:'white'}">{{item.title}}</text>
</view>
</view>
</view>
</li>
</ul>
@ -30,13 +37,15 @@
<script setup>
import { onMounted, onUnmounted } from 'vue'
import io from '@hyoga/uni-socket.io'
import { ref } from 'vue'
import {onLoad} from "@dcloudio/uni-app";
// and PPT
const kctivityAndPPT = ref([
{lx:'ppt',id:1,name:'PPT展示1',src:'https://img11.360buyimg.com/n1/s720x720_jfs/t1/303510/33/1806/82651/6815a7a6F2e5d77b6/08d231a86927b0ce.jpg'},
{lx :'activity',id:2,name:'课堂活动1',src:'https://img11.360buyimg.com/n1/s720x720_jfs/t1/303510/33/1806/82651/6815a7a6F2e5d77b6/08d231a86927b0ce.jpg'}
{lx :'activity',id:2,name:'课堂活动1',lxA:'讨论',color:'green',showname:'课程讨论',title:'历史为什么选择了中国共产党'}
])
@ -45,19 +54,33 @@ const kctivityAndPPT = ref([
let socket
//
onMounted((options) => {
console.log(options)
socket = io('ws://localhost:3400', {
transports: ['websocket'],
auth: {
xuehao: "202413501062",
sf: "stu",
kch: options.kch,
kctime: options.kctime,
k_id: options.uuid,
}
})
onLoad((options) => {
console.log('load',options)
console.log(kctivityAndPPT.value)
socket = null;
if(options) {
socket= io('ws://localhost:3400', {
transports: ['websocket'],
auth: {
xuehao: "202413501062",
sf: "stu",
kch: options.kch,
kctime: options.kctime,
k_id: options.uuid,
}
})
}else {
socket= io('ws://localhost:3400', {
transports: ['websocket'],
auth: {
xuehao: "202413501062",
sf: "stu",
kch: "nokch",
kctime: "nokctime",
k_id: "nouuid",
}
})
}
//
socket.on('connect', () => console.log('Socket 已连接'))
socket.on('server', (data) => {
@ -92,4 +115,8 @@ const sendData = () => {
.container {
padding: 20rpx;
}
.classactivetitle{
font-size: 32rpx
;
}
</style>

Loading…
Cancel
Save