chore: v3.0.0-4030620241128001

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

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

@ -16,7 +16,14 @@
/> />
</view> </view>
<view v-else-if="item.lx=='activity'"> <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> </view>
</li> </li>
</ul> </ul>
@ -30,13 +37,15 @@
<script setup> <script setup>
import { onMounted, onUnmounted } from 'vue' import { onMounted, onUnmounted } from 'vue'
import io from '@hyoga/uni-socket.io' import io from '@hyoga/uni-socket.io'
import { ref } from 'vue' import { ref } from 'vue'
import {onLoad} from "@dcloudio/uni-app";
// and PPT // and PPT
const kctivityAndPPT = ref([ 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:'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 let socket
// //
onMounted((options) => { onLoad((options) => {
console.log(options) console.log('load',options)
socket = io('ws://localhost:3400', { console.log(kctivityAndPPT.value)
transports: ['websocket'], socket = null;
auth: { if(options) {
xuehao: "202413501062", socket= io('ws://localhost:3400', {
sf: "stu", transports: ['websocket'],
kch: options.kch, auth: {
kctime: options.kctime, xuehao: "202413501062",
k_id: options.uuid, 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('connect', () => console.log('Socket 已连接'))
socket.on('server', (data) => { socket.on('server', (data) => {
@ -92,4 +115,8 @@ const sendData = () => {
.container { .container {
padding: 20rpx; padding: 20rpx;
} }
.classactivetitle{
font-size: 32rpx
;
}
</style> </style>

Loading…
Cancel
Save