baigl #305
Binary file not shown.
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
@ -153,7 +153,7 @@ function handleCommand(command) {
|
|||
|
||||
function logout() {
|
||||
const hasClass = sessionStore.has('activeClass.id')
|
||||
if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结结束上课')
|
||||
if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结束上课')
|
||||
ElMessageBox.confirm('确认退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
|
|
@ -4,14 +4,7 @@
|
|||
<Header />
|
||||
</el-header>
|
||||
<el-main>
|
||||
<template v-if="currentRoute.path != '/home'">
|
||||
<el-page-header @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large mr-3"> {{ currentRoute.meta.title }} </span>
|
||||
</template>
|
||||
</el-page-header>
|
||||
</template>
|
||||
<AppMain :style="{ height: currentRoute.path == '/home' ? '100%' : 'calc(100% - 45px)'}" />
|
||||
<AppMain />
|
||||
</el-main>
|
||||
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
|
||||
<AiChart/>
|
||||
|
@ -19,32 +12,16 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { watch } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Header from './components/Header.vue'
|
||||
import AppMain from './components/AppMain.vue'
|
||||
import Uploader from './components/Uploader.vue'
|
||||
import AiChart from '@/components/ai-chart/index.vue'
|
||||
import uploaderState from '@/store/modules/uploader'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const router = useRouter()
|
||||
const currentRoute = ref('')
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value,
|
||||
(newValue) => {
|
||||
currentRoute.value = newValue
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
let uploaderStore = ref(uploaderState())
|
||||
|
||||
const goBack = () =>{
|
||||
router.back()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<div :title="value" v-if="!!value">
|
||||
<vue-qr :text="value" :size="200" :margin="10" colorDark="green" colorLight="white" :logoSrc="getStaticUrl('/img/logo.png')" :logoScale="0.2" :dotScale="0.7"></vue-qr>
|
||||
</div>
|
||||
<!-- <el-button type="primary" :icon="Refresh" round title="刷新" @click="getQrUrl()" /> -->
|
||||
<el-button type="primary" :icon="Refresh" round title="刷新" @click="getQrUrl()" />
|
||||
<!-- <el-button type="warning" :loading="dt.loadingDel" @click="removeClasscourse()">删除记录</el-button>-->
|
||||
</template>
|
||||
<!-- 手机登录 -->
|
||||
|
@ -96,7 +96,7 @@ import * as Http_api from '@/api/apiService' // api接口
|
|||
import useUserStore from "@/store/modules/user" // 状态管理:user
|
||||
import CryptoJS from 'crypto-js'
|
||||
|
||||
const baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||
let baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||
const userStore = useUserStore()
|
||||
const visible = ref(false) // 是否打开窗口
|
||||
const myClassActive = ref({}) // 我的课件:准备上课的APT课件
|
||||
|
@ -286,30 +286,30 @@ const getQrUrl = async() => {
|
|||
const { userName, userId } = userStore.user
|
||||
if (!id||!userName) return
|
||||
// 原始方法(需要wx登录)
|
||||
const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
|
||||
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
// // const baseUrl = 'https://localhost:7860'
|
||||
// // token跳转
|
||||
// const url = `/teaching/classteachingonmobile?classcourseid=${id}` // 跳转移动端-上课
|
||||
// let qrCodeUrl = '' // 移动端-二维码地址
|
||||
// try {
|
||||
// // 走后端缓存url
|
||||
// const res = await Http_api.toLink.setLink(url) // 设置链接-缓存
|
||||
// if (res.code == 200) {
|
||||
// const redisKey = res.data
|
||||
// const base64Key = CryptoJS.enc.Utf8.parse(redisKey).toString(CryptoJS.enc.Base64) // base64加密
|
||||
// const enStrUrl = encodeURIComponent(base64Key) // url转码
|
||||
// qrCodeUrl = `?_server=${enStrUrl}`
|
||||
// teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
// }
|
||||
// } catch (error) { // 异常, 直接加密token
|
||||
// const jsonStr = JSON.stringify({ url, token: userStore.token }) // json数据:{url, token}
|
||||
// const key = `Ax19i14Ga6qEDOkGTo` // AES加密-key
|
||||
// const enStr = CryptoJS.AES.encrypt(jsonStr, key).toString() // AES加密-数据
|
||||
// const enStrUrl = encodeURIComponent(enStr) // url转码
|
||||
// qrCodeUrl = `?_web=${enStrUrl}`
|
||||
// }
|
||||
// const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
|
||||
// teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
// baseUrl = 'https://localhost:7860'
|
||||
// token跳转
|
||||
let url = `teaching/classteachingonmobile?classcourseid=${id}` // 跳转移动端-上课
|
||||
let qrCodeUrl = '' // 移动端-二维码地址
|
||||
try {
|
||||
// 走后端缓存url
|
||||
const res = await Http_api.toLink.setLink('/' + url) // 设置链接-缓存
|
||||
if (res.code == 200) {
|
||||
const redisKey = res.data
|
||||
const base64Key = CryptoJS.enc.Utf8.parse(redisKey).toString(CryptoJS.enc.Base64) // base64加密
|
||||
const enStrUrl = encodeURIComponent(base64Key) // url转码
|
||||
qrCodeUrl = `${url}&_server=${enStrUrl}`
|
||||
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
}
|
||||
} catch (error) { // 异常, 直接加密token
|
||||
const jsonStr = JSON.stringify({ url, token: userStore.token }) // json数据:{url, token}
|
||||
const key = `Ax19i14Ga6qEDOkGTo` // AES加密-key
|
||||
const enStr = CryptoJS.AES.encrypt(jsonStr, key).toString() // AES加密-数据
|
||||
const enStrUrl = encodeURIComponent(enStr) // url转码
|
||||
qrCodeUrl = `${url}&?_web=${enStrUrl}`
|
||||
}
|
||||
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
}
|
||||
// 定时器监听
|
||||
|
||||
|
|
Loading…
Reference in New Issue