Compare commits

..

No commits in common. "eab46ec7f48cb04ca6e0c9b8fd462c5d39dfd597" and "81dd59f564ea9fde89662ea04a3bcf461665d608" have entirely different histories.

5 changed files with 13 additions and 52 deletions

View File

@ -26,13 +26,3 @@ export class imChat {
// 获取腾讯im-chat appid 签名 // 获取腾讯im-chat appid 签名
static getTxCloudSign = data => ApiService.publicHttp('/system/user/txCloudSign', data) static getTxCloudSign = data => ApiService.publicHttp('/system/user/txCloudSign', data)
} }
// zdg: url跳转-后端存储
export class toLink {
// 设置链接-返回key(默认15分钟有效时间)
static setLink = url => ApiService.publicHttp(`/smarttalk/toLink`, {url}, 'post', null, 'form')
// 获取链接
static getLink = key => ApiService.publicHttp(`/smarttalk/toLink/${key}`)
// 删除链接-缓存
static delLink = key => ApiService.publicHttp(`/smarttalk/toLink/${key}`, null, 'delete')
}

View File

@ -122,8 +122,7 @@ const outerAi = [
title: '教学大模型', title: '教学大模型',
secondTit: '中小学基础教学大模型', secondTit: '中小学基础教学大模型',
img: new URL('../../../src/assets/images/ai-02.png', import.meta.url).href, img: new URL('../../../src/assets/images/ai-02.png', import.meta.url).href,
path: '/ais/aimoss' disabled: true,
}, },
{ {
id: 3, id: 3,

View File

@ -57,7 +57,7 @@ function stateSyncWatch(storeName, newState) {
const diffData = findDifferences(oldState, newState) const diffData = findDifferences(oldState, newState)
if(!_.keys(diffData).length) return // 没有变化就终止执行 if(!_.keys(diffData).length) return // 没有变化就终止执行
// 数据处理: 找出差异 // 数据处理: 找出差异
// console.log('state-change-diffData', diffData) console.log('state-change-diffData', diffData)
try { try {
let pinaValue = {} // store pina状态管理需要的数据格式 let pinaValue = {} // store pina状态管理需要的数据格式
// 数据转换处理 // 数据转换处理
@ -116,7 +116,7 @@ function stateSyncInit(wid, store) {
function sessionWatch(store) { function sessionWatch(store) {
const unsubscribe = sessionStore.onDidAnyChange((newV, oldV) => { const unsubscribe = sessionStore.onDidAnyChange((newV, oldV) => {
if (newV !== oldV) { if (newV !== oldV) {
// console.log('session-change', newV, oldV) console.log('session-change', newV, oldV)
// 通知主线程更新 // 通知主线程更新
// ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr) // ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
} }
@ -129,7 +129,7 @@ function stateChange(store) {
const storeName = store.$id const storeName = store.$id
ipcRenderer?.on('pinia-state-set', (e, sName, jsonStr) => { ipcRenderer?.on('pinia-state-set', (e, sName, jsonStr) => {
if (sName == storeName) { // 更新对应数据 if (sName == storeName) { // 更新对应数据
// console.log('state-set', jsonStr, sName) console.log('state-set', jsonStr, sName)
const curJson = circularSafeStringify(store.$state) // 当前数据 const curJson = circularSafeStringify(store.$state) // 当前数据
const isUp = curJson != jsonStr // 不同的时候才写入,不然会导致触发数据变化监听,导致死循环 const isUp = curJson != jsonStr // 不同的时候才写入,不然会导致触发数据变化监听,导致死循环
if (!isUp) return if (!isUp) return

View File

@ -85,14 +85,12 @@ import vueQr from 'vue-qr/src/packages/vue-qr.vue' // 插件: 二维码
import imChat from '@/views/tool/components/imChat.vue' // im-chat- import imChat from '@/views/tool/components/imChat.vue' // im-chat-
import MsgEnum from '@/plugins/imChat/msgEnum' // -(nuem) import MsgEnum from '@/plugins/imChat/msgEnum' // -(nuem)
import * as commUtil from '@/utils/comm' // - import * as commUtil from '@/utils/comm' // -
import { toLinkWeb, getStaticUrl } from '@/utils/tool' // - import { toLinkWeb, getStaticUrl } from '@/utils/tool'
import * as Http_ClassManage from '@/api/classManage' // api import * as Http_ClassManage from '@/api/classManage' // api
import * as Http_Classcourse from '@/api/teaching/classcourse' // api import * as Http_Classcourse from '@/api/teaching/classcourse' // api
import * as Http_Entpcoursefile from '@/api/education/entpcoursefile' // api import * as Http_Entpcoursefile from '@/api/education/entpcoursefile' // api
import * as Http_api from '@/api/apiService' // api
import useUserStore from "@/store/modules/user" // user import useUserStore from "@/store/modules/user" // user
import CryptoJS from 'crypto-js'
const baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH const baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
const userStore = useUserStore() const userStore = useUserStore()
@ -191,9 +189,9 @@ const getClassList = async () => {
}) })
if (res.code == 200) { if (res.code == 200) {
listData.classList = (res.rows || []).map(o => { listData.classList = (res.rows || []).map(o => {
// if(!!o.classstudentlist) { // if(!!o.classstudentlist) { //
// o.classstudentlist = JSON.parse('[' + o.classstudentlist + ']') o.classstudentlist = JSON.parse('[' + o.classstudentlist + ']')
// } }
return o return o
}); });
// //
@ -279,34 +277,11 @@ const classTeachingStart = async () => {
} }
} }
// //
const getQrUrl = async() => { const getQrUrl = () => {
const { classcourseid:id } = teacherForm.form const { classcourseid:id } = teacherForm.form
const { userName, userId } = userStore.user const { userName } = userStore.user
if (!id||!userName) return if (!id||!userName) return
// (wx) const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
// 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}`
}
teacherForm.form.qrUrl = baseUrl + qrCodeUrl teacherForm.form.qrUrl = baseUrl + qrCodeUrl
} }

View File

@ -711,10 +711,7 @@ export default {
.page-center-wrap{ .page-center-wrap{
flex: 1; flex: 1;
height: 100%; height: 100%;
padding: 0 5px; padding: 0 10px;
margin: 0 5px;
border-radius: 10px;
background-color: white;
.prepare-center-jxkj{ .prepare-center-jxkj{
height: 100%; height: 100%;
display: flex; display: flex;