diff --git a/auto-imports.d.ts b/auto-imports.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1d89ee8c4833d5972293125ae111ea45d41f2e83 --- /dev/null +++ b/auto-imports.d.ts @@ -0,0 +1,9 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +export {} +declare global { + +} diff --git a/components.d.ts b/components.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d398e16fe92958b4b2a7b84a1e7fd7f6678402f3 --- /dev/null +++ b/components.d.ts @@ -0,0 +1,23 @@ +/* eslint-disable */ +// @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 +export {} + +/* prettier-ignore */ +declare module 'vue' { + export interface GlobalComponents { + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] + VanCell: typeof import('vant/es')['Cell'] + VanCellGroup: typeof import('vant/es')['CellGroup'] + VanIcon: typeof import('vant/es')['Icon'] + VanNavBar: typeof import('vant/es')['NavBar'] + VanPopup: typeof import('vant/es')['Popup'] + VanSearch: typeof import('vant/es')['Search'] + VanTab: typeof import('vant/es')['Tab'] + VanTabbar: typeof import('vant/es')['Tabbar'] + VanTabbarItem: typeof import('vant/es')['TabbarItem'] + VanTabs: typeof import('vant/es')['Tabs'] + } +} diff --git a/package.json b/package.json index 5775601b664385cf1bc4dd4877a953f096f00426..a210daccafa8f4c3492105889462de0319932fc5 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,15 @@ }, "dependencies": { "@vant/compat": "1", + "@vueuse/core": "^10.11.0", "animate": "^1.0.0", "axios": "^1.7.2", "dayjs": "^1.11.11", "less": "^4.2.0", "mitt": "^3.0.1", "pinia": "^2.1.7", + "sass": "^1.77.6", + "socket.io-client": "^4.7.5", "vant": "4", "vue": "^3.4.29", "vue-router": "^4.4.0" diff --git a/public/send.png b/public/send.png new file mode 100644 index 0000000000000000000000000000000000000000..798f3601e115730cc02797de7f2eb864a4db7165 Binary files /dev/null and b/public/send.png differ diff --git a/public/zhangjie.jpg b/public/zhangjie.jpg new file mode 100644 index 0000000000000000000000000000000000000000..49d2fd9dcd6b08eb1f7ba2696c5b06aedffc5f35 Binary files /dev/null and b/public/zhangjie.jpg differ diff --git a/src/main.js b/src/main.js index 0a9cb76f3aeee41ae680cb2e97d7655c74587a91..2183b67ff4995ceab29c027ea7d1cc65d716819b 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,7 @@ import { createApp } from 'vue' import App from './App.vue' import router from './router' -// import Vant from 'vant'; +import Vant from 'vant'; import 'vant/lib/index.css'; import { createPinia } from 'pinia' @@ -10,5 +10,5 @@ const app = createApp(App) app.use(pinia) app.use(router) -// app.use(Vant); +app.use(Vant); app.mount('#app') diff --git a/src/request.js b/src/request.js index 772db9c8d252f5ae3534fdc3841f2a72f9024658..32a8681e74a3f8fe53e5180231d52ff205b6a224 100644 --- a/src/request.js +++ b/src/request.js @@ -9,6 +9,34 @@ import emitt from './tools/emitt' ——————需要标注代码注释,越详细越好—————— */ +// 获取用户信息 +export const getUserInfo = async(userId)=>{ + const res = await axios.get(`/users/userInfo?userId=${userId}`) + return res.data.data +} + + +// 获取聊天室的信息 +export const getConversation = async (friendId,userId)=>{ + const res = await axios.get(`/conv/find/${friendId}/${userId}`) + return res.data +} + +//获取到当前聊天室的所有消息 +export const getMessage = async (conversationId)=>{ + const res = await axios.get('/mess/' + conversationId) + return res.data +} + +// 发送消息 +export const sendMessage = async (message)=>{ + try{ + const res = await axios.post('/mess',message) + return res.data + }catch (err){ + console.log(err) + } +} //登入--邵文凯 export const loginAPI = async(params) => axios.post('/phoneLogin', params) @@ -25,4 +53,4 @@ export const PsswordLoginAPI = async(params) => axios.post('/PsswordLoginAPI', p export const updatePasswordAPI = async(params) => axios.put('/updatePasswordAPI', params) //找回密码--邮箱找回--邵文凯 -export const EmailUpdatePasswordAPI = async(params) => axios.put('/EmailUpdatePasswordAPI', params) \ No newline at end of file +export const EmailUpdatePasswordAPI = async(params) => axios.put('/EmailUpdatePasswordAPI', params) diff --git a/src/router/index.js b/src/router/index.js index ad55d0c8458bfec0eb16415fdbb5ad3d7e3cb20f..18faf08ba9bb03c829a53e31790b85dadad4101a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -71,6 +71,10 @@ const routes = [ path: "/search", component: () => import("../views/gzt_Home/Search.vue") //搜索页面---郭周童负责 }, + { + path:"/message", + component: () => import('../views/ssb_Message/component/message/Message.vue') //消息内容页面---孙少波 + }, { path:"/video/video_search", component:import ("../views/wk_Video/wk_Video_search.vue") diff --git a/src/views/gzt_Home/components/BlogList.vue b/src/views/gzt_Home/components/BlogList.vue index 4bfd9faaef8724487dc119e2ad6c54988046527d..0f00426d52d5b4078408b47e43bc3214dd9434af 100644 --- a/src/views/gzt_Home/components/BlogList.vue +++ b/src/views/gzt_Home/components/BlogList.vue @@ -21,7 +21,7 @@
{{ obj.text }}
+ +