SpringBoo+vue3+vite整合讯飞星火3.5通过webscoket实现聊天功能(前端代码)附带展示效果

访问地址: 
天梦星服务平台 (tmxkj.top)icon-default.png?t=N7T8https://tmxkj.top/#/site

 后端文档:

SpringBoo+vue3整合讯飞星火3.5通过webscoket实现聊天功能(全网首发)附带展示效果_springboot websocket vue3-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/qq_53722480/article/details/139107409

1.样式库我使用了 tailwindcss,找到tailwindcss,里面有安装教程,不使用可以跳过,样式自己重新写也可以

 2.vue html

<template>
<div class="theme-controller bg-base-200 pt-1 pb-1 w-full d-flex justify-center items-center">
<div class="content-container "><!--侧边栏--><div class="side"><div class="h-full w-full  bg-base-300 rounded-r-3xl "><div class="side-logo d-flex align-center text-base-0"><img style="width: 35px;height: 35px" class="rounded-md" src="../assets/Logo.png"> </img><span class="ml-4 text-2xl font-weight-bold">AI人工智能助手</span></div><div class="side-api d-flex items-center"><el-button style="height: 40px;" class="w-36  bg-info border-0"><svg t="1715778624612" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4291" width="18" height="18"><path d="M760.32 183.466667h-13.653333v-59.733334a57.173333 57.173333 0 0 0-114.346667 0v59.733334H400.213333v-59.733334a57.173333 57.173333 0 0 0-114.346666 0v59.733334h-16.213334c-75.946667 0-138.24 61.44-138.24 138.24v494.08c0 75.946667 61.44 138.24 138.24 138.24H759.466667c75.946667 0 138.24-61.44 138.24-138.24V321.706667c0.853333-75.946667-61.44-138.24-137.386667-138.24zM515.413333 296.96c85.333333 0 154.453333 69.12 154.453334 154.453333 0 85.333333-69.12 154.453333-154.453334 154.453334-85.333333 0-154.453333-69.12-154.453333-154.453334 0-86.186667 69.12-154.453333 154.453333-154.453333zM748.373333 742.4c0 52.906667-42.666667 95.573333-95.573333 95.573333H378.026667c-52.906667 0-95.573333-42.666667-95.573334-95.573333 0-52.906667 42.666667-95.573333 95.573334-95.573333h273.92c52.906667 0 96.426667 42.666667 96.426666 95.573333z" p-id="4292" fill="#ffffff"></path></svg><span class="mt-0.5 ml-1">账户中心</span></el-button><el-button style="height: 40px;" class="w-36  bg-info border-0"><svg t="1715779300040" class="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8561" width="18" height="18"><path d="M924.17025 258.44833h0.04335c-55.093306 0-103.987667-35.705346-121.41046-88.638413l-5.639017-17.198822C779.74133 99.674415 730.836131 63.940169 675.742825 63.940169H348.239112c-55.093306 0-104.009342 35.734246-121.432134 88.667313L221.175186 169.784629C203.741555 222.728534 154.836357 258.441106 99.743051 258.441106H99.703314c-19.738366 0-35.763145 16.209013-35.763145 36.20025V777.035613h0.469617l397.129861 172.493959a126.731582 126.731582 0 0 0 100.920706 0L959.590214 777.035613h0.234808V294.644969c0-19.991237-15.916406-36.196638-35.654772-36.196639zM895.884854 734.860388l-358.989731 155.992338a62.495193 62.495193 0 0 1-49.931131 0L127.880338 734.860388V320.296897a187.991322 187.991322 0 0 0 31.699152-7.557222 192.21065 192.21065 0 0 0 94.609775-68.997583 193.821798 193.821798 0 0 0 27.714631-53.944551L287.550138 172.598719C296.357265 145.870284 320.748452 127.880338 348.239112 127.880338h327.503713c27.50511 0 51.89991 17.989946 60.688974 44.718381l5.649855 17.187985A193.312444 193.312444 0 0 0 811.715027 285.621096a190.660914 190.660914 0 0 0 52.586273 27.118579 195.34986 195.34986 0 0 0 31.583554 7.557222v414.563491z" fill="#ffffff" p-id="8562"></path><path d="M511.998194 255.999097c-141.383635 0-255.999097 114.615462-255.999097 255.999097S370.614559 768.004516 511.998194 768.004516 768.004516 653.385441 768.004516 511.998194s-114.619075-255.999097-256.006322-255.999097z m177.009507 330.736846a192.904239 192.904239 0 1 1 15.056646-74.737749 191.936105 191.936105 0 0 1-15.071096 74.741361z" fill="#ffffff" p-id="8563"></path><path d="M596.052423 425.393583l-105.392906 105.392906-62.726389-62.72639a31.970084 31.970084 0 0 0-45.213286 45.213286l85.333032 85.333032a31.970084 31.970084 0 0 0 45.213286 0l127.999548-127.999548A31.970084 31.970084 0 0 0 596.052423 425.393583z" fill="#ffffff" p-id="8564"></path></svg><span class="mt-0.5 ml-1">申请接口</span></el-button></div><div class="side-talke d-flex justify-center items-center"><div class="talke d-flex justify-center items-center bg-warning cursor-pointer"><svg t="1715779790026" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13505" width="21" height="21"><path d="M908.8 305.6c-5.4-10.5-16.3-17.8-28.9-17.8-17.8 0-32.2 14.4-32.2 32.1 0 6 1.7 11.7 4.6 16.5l-0.1 0.1c26.9 52.4 42.1 111.8 42.1 174.7 0 211.6-171.6 383.2-383.2 383.2S127.8 722.8 127.8 511.2 299.4 128.1 511 128.1c62.5 0 121.5 15 173.6 41.5l0.2-0.4c4.6 2.6 10 4.1 15.7 4.1 17.8 0 32.2-14.4 32.2-32.1 0-13.1-7.9-24.4-19.3-29.4C652.6 80.9 583.9 63.5 511 63.5 263.7 63.5 63.2 264 63.2 511.2S263.7 958.9 511 958.9s447.7-200.4 447.7-447.7c0-74.1-18-144-49.9-205.6z" fill="#ffffff" p-id="13506"></path><path d="M770.7 219.7a32.2 32.1 0 1 0 64.4 0 32.2 32.1 0 1 0-64.4 0Z" fill="#ffffff" p-id="13507"></path><path d="M512.4 704.1c17.5 0 31.9-14.3 31.9-31.9V544.3h127.8c17.5 0 31.9-14.3 31.9-31.9 0-17.5-14.3-31.9-31.9-31.9H544.3V352.6c0-17.5-14.3-31.9-31.9-31.9-17.5 0-31.9 14.3-31.9 31.9v127.9h-128c-17.5 0-31.9 14.3-31.9 31.9 0 17.6 14.4 31.9 31.9 31.9h128v127.9c0 17.5 14.3 31.9 31.9 31.9z" fill="#ffffff" p-id="13508"></path></svg><span class="ml-1">新建对话</span></div></div><div class="side-history d-flex items-center text-base-0"><div class="h-full d-flex flex-column justify-center align-center" @click="modelTypeFun(true)"><div class="h-full w-full d-flex justify-center align-center">历时对话</div><div class="w-full h-0.5" :class="modelType? 'bg-amber-50':''"></div></div><div  class="h-full d-flex flex-column justify-center align-center" @click="modelTypeFun(false)"><div class="h-full w-full d-flex justify-center align-center">助手列表</div><div  class="w-full h-0.5" :class="modelType? '':'bg-amber-50'"></div></div></div><div class="side-content bg-base-100 touch-pan-y overflow-auto" v-if="modelType"><div v-for="(item,index) in historyList" @mouseenter="deleteIndexFun(true,index)" @mouseleave="deleteIndexFun(false,index)" @click="selectItemFun(item)" class="h-14 pl-5 d-flex justify-space-betweenalign-center pr-5 w-full hover:bg-base-200"><div class="line-clamp-1">{{item.title}}</div><div v-show="deleteIndex===index" @click="deleteSparkChatFun([item])"><svg t="1716195021573" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1505" width="28" height="28"><path d="M839.68 307.2H184.32a40.96 40.96 0 0 1 0-81.92h655.36a40.96 40.96 0 1 1 0 81.92zM593.92 184.32h-163.84a40.96 40.96 0 1 1 0-81.92h163.84a40.96 40.96 0 0 1 0 81.92zM389.12 716.8V430.08a40.96 40.96 0 0 1 81.92 0v286.72a40.96 40.96 0 0 1-81.92 0z m163.84 0V430.08a40.96 40.96 0 0 1 81.92 0v286.72a40.96 40.96 0 0 1-81.92 0zM266.24 348.16a40.96 40.96 0 0 1 40.96 40.96v409.6a40.96 40.96 0 0 0 40.96 40.96h327.68a40.96 40.96 0 0 0 40.96-40.96V389.12a40.96 40.96 0 1 1 81.92 0v409.6a122.88 122.88 0 0 1-122.88 122.88H348.16a122.88 122.88 0 0 1-122.88-122.88V389.12a40.96 40.96 0 0 1 40.96-40.96z" fill="#f75959" p-id="1506"></path></svg></div></div></div><div class="side-content bg-base-100 touch-pan-y overflow-auto" v-else><div v-for="item in assistantList" class="h-14 pl-5 d-flex align-center pr-5 w-full hover:bg-base-200"><div :title="item.modelDescribe"><div>{{item.modelName}}</div><div class="text-xs line-clamp-1">{{item.modelDescribe}}</div></div><div></div></div></div><div class="side-foot d-flex pl-5 pr-5 justify-space-between align-center pr-5 w-full "><div class="d-flex align-center"><svg t="1715781825072"  viewBox="0 0 1372 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="51787" width="30" height="30"><path d="M696.145702 6.492596c230.726809 0 419.60034 179.243574 434.938553 406.13583l0.152511 2.788765 5.882553 1.220086c133.12 28.977021 232.034043 146.083404 235.302128 285.478127l0.065362 7.102639c0 165.408681-134.078638 299.487319-299.48732 299.487319H319.291915C153.905021 1008.705362 19.826383 874.626723 19.826383 709.218043c0-142.488511 100.003404-263.102638 235.367489-292.602554l5.860766-1.198298 0.196085-2.83234C276.392851 188.198128 461.344681 10.392511 688.650894 6.53617z m0 65.361702c-204.647489 0-370.557277 165.909787-370.579064 370.034383l0.522894 31.417191-29.979234 2.941277c-119.17617 11.699745-210.944 112.313191-210.944 232.970894 0 129.307234 104.818383 234.125617 234.125617 234.125617H1073.021277c129.307234 0 234.125617-104.796596 234.125617-234.125617 0-120.657702-91.724255-221.271149-210.900426-232.949107l-29.543489-2.897702 0.043574-29.696-0.065362-8.279149c-3.747404-201.422979-168.197447-363.541787-370.513702-363.541787zM608.909617 379.533617c11.002553 0 20.174979 2.091574 27.539064 6.252936 7.342298 4.161362 13.290213 9.542809 17.821957 16.100766 4.509957 6.53617 8.322723 13.595234 11.438298 21.133617 3.093787 7.538383 7.037277 17.604085 11.830468 30.197107l101.855319 251.577191 2.069788 5.098213c6.601532 16.558298 9.891404 28.759149 9.891404 36.667915 0 9.041702-3.769191 17.320851-11.285787 24.859234a37.147234 37.147234 0 0 1-27.277617 11.329361c-6.209362 0-11.525447-1.132936-15.948256-3.333446a32.680851 32.680851 0 0 1-11.176851-9.06349c-3.006638-3.790979-6.252936-9.651745-9.695319-17.538723a1028.531745 1028.531745 0 0 1-8.932766-20.87217l-18.606298-48.955915h-158.502127l-18.628085 50.001702-1.960852 5.163574c-6.427234 16.689021-11.982979 28.127319-16.645446 34.336681-5.141787 6.819404-13.573447 10.24-25.273192 10.24-9.934979 0-18.693447-3.638468-26.318979-10.893617-7.625532-7.276936-11.438298-15.512511-11.438297-24.750298 0-5.316085 0.871489-10.806468 2.658042-16.471149 1.764766-5.664681 4.706043-13.573447 8.780255-23.682723l99.720171-253.189447 1.786553-4.531745 8.453447-21.65651a132.466383 132.466383 0 0 1 12.767319-25.403915c4.531745-6.754043 10.457872-12.200851 17.821957-16.340426 7.364085-4.183149 16.449362-6.274723 27.25583-6.274723z m282.711149 0c11.89583 0 21.504 3.943489 28.868085 11.830468 7.364085 7.908766 11.02434 19.913532 11.02434 36.057872v307.178213l-0.108936 4.706043c-0.653617 13.791319-4.292085 24.270979-10.915404 31.460766-7.364085 7.974128-16.994043 11.982979-28.868085 11.982978-11.329362 0-20.697872-4.052426-28.04017-12.113702-7.364085-8.061277-11.046128-20.08783-11.046128-36.036085v-307.2l0.130723-5.163574c0.718979-13.399149 4.313872-23.639149 10.762894-30.72 7.276936-7.995915 16.667234-11.982979 28.192681-11.982979z m-283.234043 83.249021l-57.714383 160.898724h116.496341l-58.781958-160.898724z" fill="#ffffff" p-id="51788"></path></svg><span class="ml-2 text-xl">天梦星开发平台</span></div><div class="-rotate-90 cursor-pointer "><svg t="1715780362871" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="44227" width="20" height="20"><path d="M484.864 281.2928l-304.64 304.64a38.4 38.4 0 1 0 54.3232 54.3232L512 362.752l277.4528 277.504a38.2976 38.2976 0 0 0 54.272 0 38.4 38.4 0 0 0 0-54.3232l-304.64-304.64a39.424 39.424 0 0 0-54.2208 0z" fill="#ffffff" p-id="44228"></path><path d="M512 12.8C236.7488 12.8 12.8 236.7488 12.8 512s223.9488 499.2 499.2 499.2a496.4864 496.4864 0 0 0 448.3072-279.296 38.4 38.4 0 0 0-68.9152-33.8944A420.096 420.096 0 0 1 512 934.4c-232.9088 0-422.4-189.4912-422.4-422.4S279.0912 89.6 512 89.6s422.4 189.4912 422.4 422.4a38.4 38.4 0 0 0 76.8 0c0-275.2512-223.9488-499.2-499.2-499.2z" fill="#ffffff" p-id="44229"></path></svg></div></div></div></div><!--接收内容聊天框--><div class="content "><div class="content-body" ref="scrollContainer"><div class="item-content bg-base-300 rounded-lg position-relative mt-2 p-5" v-for="item in sparkList"><div class="position-absolute -mt-5 -ml-16 z-50"><el-image style="width: 40px;height: 40px" class="rounded-full" :src="userInfo?.image? configuration.visitFileUrl+userInfo.image :'https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg'"></el-image></div><div v-if="item.type==='send'" class="text-span">{{item.content.text}}</div><div v-else><keep-alive v-for="item2 in item.content"><div v-if="item2.type" class="w-full bg-base-100 rounded-t-md rounded-r-md mt-2 mb-2 rounded-md"><div class="d-flex justify-space-between align-center rounded-t-md rounded-r-md  p-3 w-full bg-base-200"><div class="font-weight-bold text-span">{{returnFirst(item2.text)}}</div><div @click="copyContentFun(item2.text)" class="text-sm cursor-pointer">复制代码</div></div><div class="p-3 text-span">{{getContent(item2.text)}}</div></div><text class="mt-1 text-pretty leading-3 text-span" v-else>{{item2.text}}</text></keep-alive></div></div></div><!--发送请求框--><div class="mt-md-2 w-full d-flex justify-center"><div class="content-foot bg-base-300"><div class="input-texture"><el-inputv-model="form.content"maxlength="2000"class="el-input-text":clearable="true":autosize="{ minRows: 2, maxRows: 5 }"type="textarea"placeholder="在此输入你想了解的内容"/></div><div class="foot-btn"><div></div><div><el-button style="height: 40px;" @click="sendSocket()" class=" bg-primary border-0 w-20 h-12">发送</el-button></div></div></div></div></div><div v-if="loginShow"><login-page @receive-login="receiveLogin"></login-page></div>
</div>
</div>
</template>

 3.js 代码  部分代码不能直接用,我把页面源码全部放上来了,你按照自己的需求分析提取相关内容,主要是socket的连接功能,你主要看这个,socket 的连接地址是ws://localhost:8082/websocket/+`{uuid}`

<script setup>
import { onBeforeUnmount, onMounted, ref } from 'vue'
import {addSparkChat,deleteSparkChat,queryAllLargeMode,querySparkChat,updateSparkChat
} from '../interface/sparkApi.js'
import { getSelUserInfo, getVerifyUser } from '../interface/UserApi.js'
import { configuration } from '../../env.product.js'
import { ElMessage } from 'element-plus'
import LoginPage from '../components/loginPage.vue'
let socket = null;
const modelType =ref(true);
const userInfo = ref();
const deleteIndex =ref(-1);
const form =ref({content:null,userId:null,type:"spark",historyId:null,chatType:null,
});
const historyList = ref([]);
const assistantList = ref([]);
const selectChat = ref({modelKey:"",list:[],title:""
});
const sparkList = ref([]);
const sparkEdit = ref(false);
const loginShow = ref(false);onMounted(()=>{sparkList.value.push({content:[{text: "我是你的AI智能助手,请问我有什么能帮到您?",title: null,type: false,}],type:"back"})verifyUser();
})/*** 回话记录删除鼠标移入移除事件*/
function deleteIndexFun(val,index){deleteIndex.value=-1;if (val){deleteIndex.value=index}
}
/*** 复制代码* @param val*/
function copyContentFun(val){const el = document.createElement('textarea');el.value = getContent(val);document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);ElMessage({message: '复制成功',type: 'success',plain: true,})
}/*** 返回首个拼音或者字* @param s* @return {*|null}*/
function returnFirst(s) {const pattern = /```(\w+)/;const matches = s.match(pattern);return matches ? matches[1] : null;
}
/*** 返回正文内容* @param item* @return {*}*/
function getContent(item) {let title = returnFirst(item);let result = (item.replace(/```/g, "\n")).replace(title,"") || item;return result;
}/*** 进入页面连接webSocket*/function openSocket() {const socketUrl = configuration.ws + userInfo.value.userId;if (socket != null) {socket.close()socket = null}//创建socketsocket = new WebSocket(socketUrl)//打开事件socket.onopen = function () {//	console.log("websocket已打开");}//监听服务器返回的数据信息socket.onmessage = msg => {let lastIndex = (sparkList.value).length - 1;let lastContentIndex = sparkList.value[lastIndex].content.length - 1;if (msg.data.indexOf("``") !== -1) {if (sparkEdit.value){let oldValue = sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text;sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text=oldValue+""+msg.data}else {sparkList.value[lastIndex].content.push({text: msg.data,title: null,type: true,})}sparkEdit.value = ! sparkEdit.value;}else {if (sparkEdit.value){let oldValue = sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text;sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text=oldValue+""+msg.data}else {sparkList.value[lastIndex].content.push({text: msg.data,type: false,})}}}//关闭事件socket.onclose = function () {addSparkChatFun();// console.log("websocket已关闭");}//发生了错误事件socket.onerror = function () {//	console.log('websocket发生了错误')closeSocket()}
}
/*** 关闭socket*/
function closeSocket() {if (socket !== null) {socket.close()socket = null}
}/*** 发送socket信息*/
function sendSocket() {sparkEdit.value = false;if (socket !== null) {let list = sparkList.value;let model ={content:{text:form.value.content,type:false},type:"send"};let model2 ={content:[],type:"back"};sparkList.value=[...list,model,model2];socket.send(JSON.stringify(form.value));form.value.content = null;setTimeout(()=>{addSparkChatFun();},5000)}
}/*** 选中历史对话数据*/
function selectItemFun(item){selectChat.value = item;sparkList.value = JSON.parse(item.list);
}/*** 新增/修改会话记录*/
function addSparkChatFun(){if (sparkList.value.length>=1){sparkList.value.shift();selectChat.value.title=sparkList.value[0].content.text;selectChat.value.list=JSON.stringify(sparkList.value);if (selectChat.value.id==null){addSparkChat(selectChat.value).then(res=>{if (res.code===200){selectChat.value.id=res.data;querySparkChatFun();}})}else {updateSparkChat(selectChat.value);querySparkChatFun();}}
}/*** 删除会话记录*/
function deleteSparkChatFun(val){deleteSparkChat(val).then(res=>{querySparkChatFun();ElMessage({message: res.msg,type: res.code==200?'success' :'error',plain: true,})})
}/*** 校验用户是否已经登录*/
function verifyUser() {getVerifyUser().then((res) => {if (res.code === 200) {localStorage.setItem('token', res.data)new selUserInfoFun()} else {loginShow.value = true;}})
}/*** 接收登录状态*/
function receiveLogin(e) {selUserInfoFun();
}/*** 查询用户信息* @constructor*/
function selUserInfoFun() {getSelUserInfo().then((res) => {if (res.code === 200) {userInfo.value = res.data;form.value.userId=res.data.userId;querySparkChatFun();queryAllLargeModeFun();openSocket();loginShow.value = false;}else {loginShow.value = true;}})
}
/*** 查询用户历史记录*/
function querySparkChatFun(){querySparkChat({}).then(res=>{if(res.code === 200){historyList.value=res.data;}})
}
/*** 查询模型分类*/
function queryAllLargeModeFun(){queryAllLargeMode({}).then(res=>{if(res.code === 200){form.value.chatType=res.data[0]?.modelKey || null;selectChat.value.modelKey=res.data[0]?.modelKey || null;assistantList.value=res.data;}})
}/*** 切换历史/模型分类* @param type*/
function modelTypeFun(type){modelType.value=type;
}
/*** 页面销毁之前*/
onBeforeUnmount(() => {closeSocket();
})
</script>

4.css

<style scoped>
.content-container {height: calc(100vh - 74px);width: 100%;display: flex;padding: 4px 0 4px 0;
}.side{width: 260px;height: 100%;}.content{width: calc(100% - 310px);height: 100%;display: flex;flex-direction: column;align-items: center;user-select: text;}.content-body{width: 100%;flex: 1;overflow-y: scroll;display: flex;align-items: center;flex-direction: column;}.item-content{width: 85%;}.content-foot{width: 85%;min-height: 120px;max-height: 300px;border-radius: 15px;display: flex;align-items: center;flex-direction: column;padding: 5px 0 5px 0;}.input-texture{width: 98%;height: auto;}.foot-btn{height: 40px;width: 98%;display: flex;justify-content: space-between;align-items: center;}:deep(.el-textarea__inner) {outline: none;border: none;resize: none;box-shadow: none;background:transparent;font-size: large;}.side-logo{width: 100%;height:100px;padding: 0 20px 0 20px;}.side-api{width: 100%;height:50px;padding: 0 20px 0 20px;justify-content: space-between;}.side-talke{width: 100%;height:50px;padding: 0 20px 0 20px;}.talke{width: 100%;height: 40px;border-radius: 6px;}
.side-history{width: 100%;height:50px;justify-content: space-evenly;
}
.side-content{width: 100%;height: calc(100% - 300px);
}
.side-foot{width: 100%;height:50px;
}
.text-span{white-space: pre-wrap;
}
</style>

 备注:样式你不用安装也可以,你根据自己需求重新也可以

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/357585.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2024 年值得推荐的 10 款 iPhone 数据恢复软件

iPhone 从来都不是一个简单的打电话电话。它就像一台微型电脑&#xff0c;让我们互相联系、拍照、拍视频、发邮件、看文档、看书。然而&#xff0c;随着它成为日常生活的必需品&#xff0c;我们总是容易因各种原因丢失数据&#xff0c;如删除、恢复出厂设置、iOS 错误、文件同步…

Django之云存储(二)

一、Django使用云存储 建立项目 django-admin startproject project_demo创建子应用 python manage.py startapp app_name修改配置文件,设置模板视图路径 settings.py TEMPLATES = [{BACKEND: django.template.backends.django.DjangoTemplates,DIRS: [os.path.join(BASE_DIR,…

【雷丰阳-谷粒商城 】【分布式高级篇-微服务架构篇】【13】压力压测JMeter-性能监控jvisualvm

持续学习&持续更新中… 守破离 【雷丰阳-谷粒商城 】【分布式高级篇-微服务架构篇】【13】压力压测JMeter-性能监控jvisualvm 压力测试概述性能指标 JMeter基本使用添加线程组添加 HTTP 请求添加监听器启动压测&查看分析结果JMeter Address Already in use 错误解决 性…

BFS:解决多源最短路问题

文章目录 什么是多源最短路问题&#xff1f;1.矩阵2.飞地的数量3.地图的最高点4.地图分析总结 什么是多源最短路问题&#xff1f; 多源最短路问题&#xff08;Multi-Source Shortest Path Problem&#xff0c;MSSP&#xff09;是图论中的一个经典问题&#xff0c;它的目标是在…

自动化办公04 使用pyecharts制图

目录 一、柱状图 二、折线图 三、饼图 四、地图 1. 中国地图 2. 世界地图 3. 省会地图 五、词云 Pyecharts是一个用于数据可视化的Python库。它基于Echarts库&#xff0c;可以通过Python代码生成各种类型的图表&#xff0c;如折线图、柱状图、饼图、散点图等。 Pyecha…

Spring-bean

Spring 网站&#xff1a;spring.io 两个方面&#xff1a; 简化开发&#xff1a; IoCAOP 框架整合&#xff1a; MyBatis SpringFrameWork系统架构&#xff08;上层依赖下层&#xff09; 解决问题&#xff08;代码耦合度高——模块与模块之间的依赖程度&#xff09; 目标&am…

HarmonyOS父子组件传递参数

HarmonyOS父子组件传递参数 1. 使用State和Prop进行父子组件传递———注意是单向同步 Prop装饰器&#xff1a;父子单向同步 注意&#xff1a;只支持单向同步&#xff0c;同时也只能支持string\number\boolean\enum比较简单的类型。 代码 // 使用 props 进行父子组件传值…

java.io.eofexception:ssl peer shut down incorrectly

可能是因为 1)https设置 2&#xff09;超时设置 FeignConfig.java package zwf.service;import java.io.IOException; import java.io.InputStream; import java.security.KeyStore;import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory;import org.apac…

玄机平台流量特征分析-蚁剑流量分析

前言 蚁剑的流量特征 (1)每个请求体都存在ini_set(“display_errors”, “0”);set_time_limit(0)开头。并且后面存在base64等字符 (2)响应包的结果返回格式为&#xff1a; 随机数 响应内容 随机数 看一下题目要求 步骤1.1 这里要求我们找到木马的连接密码&#xff0c;…

如和完全免费快速访问外网?有亿点点不便利罢了

很鸡肋&#xff0c;但是可以试试 这个手机是真的可以使用谷歌的 不得不说有点意思&#xff0c;但肯定没啥用 地址跳转

每日签到页面模板组件,简单好用,用了会上瘾的那种

uni-app 是一个使用 Vue.js 开发所有前端应用的框架&#xff0c;开发者编写一套代码&#xff0c;可发布到iOS、Android、Web&#xff08;响应式&#xff09;、以及各种小程序&#xff08;微信/支付宝/百度/头条/飞书/QQ/快手/钉钉/淘宝&#xff09;、快应用等多个平台。 今日给…

消息队列MQ相关面试题

消息队列MQ相关面试题 1 RabbitMQ 1.1 你们项目中哪里用到了RabbitMQ ? 难易程度&#xff1a;☆☆☆ 出现频率&#xff1a;☆☆☆☆ 我们项目中很多地方都使用了RabbitMQ , RabbitMQ 是我们项目中服务通信的主要方式之一 , 我们项目中服务通信主要有二种方式实现 : 通过Fei…

Gradle 自动化项目构建-Gradle 核心之 Project

一、前言 从明面上看&#xff0c;Gradle 是一款强大的构建工具&#xff0c;但 Gradle 不仅仅是一款强大的构建工具&#xff0c;它更像是一个编程框架。Gradle 的组成可以细分为如下三个方面&#xff1a; groovy 核心语法&#xff1a;包括 groovy 基本语法、闭包、数据结构、面…

抖音多功能全自动引流工具,支持评论关注私信留痕点赞等,让你的抖音粉丝暴涨!

随着短视频行业的火爆&#xff0c;越来越多的人开始关注抖音这个平台。然而&#xff0c;如何在抖音上获得更多的关注和粉丝&#xff0c;成为了许多人面临的难题。为了帮助大家解决这个问题&#xff0c;今天我们将为大家推荐一款抖音多功能全自动引流脚本&#xff0c;这款脚本可…

C | 在ubuntu22下开发的一些配置

目录 VScode设置 要下载的插件&#xff1a; 卸载VScode的话就是哪装的哪删。 浅用gcc 预处理指令 使用gcc 语言编译过程 1. 预处理&#xff08;Preprocessing&#xff09; 2. 编译&#xff08;Compilation&#xff09; 3. 汇编&#xff08;Assembly&#xff09; 4. …

rockchip linux sdk指定编译配置文件

SDK&#xff1a;rk3568_linux4.19_V1.4.0 硬件平台&#xff1a;RK3566 一、指定板级配置文件 板级配置文件在<SDK>/device/rockchip/rk3566_rk3568目录下。 1、方法1 ./build.sh后⾯加上板级配置⽂件&#xff0c;例如&#xff1a; ./build.sh /device/rockchip/rk3…

setInterval 定时任务执行时间不准验证

一般在处理定时任务的时候都使用setInterval间隔定时调用任务。 setInterval(() > {console.log("interval"); }, 2 * 1000);我们定义的是两秒执行一次&#xff0c;但是浏览器实际执行的间隔时间只多不少。这是由于浏览器执行 JS 是单线程模式&#xff0c;使用se…

八、(正点原子)Linux内核定时器实验

定时器是我们最常用到的功能&#xff0c;一般用来完成定时功能&#xff0c;本章我们就来学习一下 Linux 内核提供的定时器 API 函数&#xff0c;通过这些定时器 API 函数我们可以完成很多要求定时的应用。 Linux内核也提供了短延时函数&#xff0c;比如微秒、纳秒、毫秒延时函数…

【电路笔记】-共发射极放大器

共发射极放大器 文章目录 共发射极放大器1、概述2、完整的CEA配置3、直流等效电路4、交流等效电路5、输入阻抗6、输出阻抗7、电压增益8、微分电容的重要性9、信号源的衰减10、电流增益11、相位反转12、总结1、概述 在本文中,我们将介绍基于双极晶体管的放大器的最后一种拓扑:…

Piecewise Jerk Speed 论文以及代码解析

目录 1 算法原理 1.1 优化模型离散方式 1.1.1 Temporal Parameter Discretization 1.2 优化问题建模 1.2.1 Cost function 1.2.2 Constraints 2 ST-Graph 3 代码实现 ​编辑 3.1 STBoundsDecider 1 算法原理 1.1 优化模型离散方式 在处理最优化问题时&#xff0c;…