提交 c6c46558 编写于 作者: cxt104926's avatar cxt104926

聊天

上级 88b33ca6
......@@ -3,7 +3,6 @@ import Router from 'vue-router'
import login from '../views/login'
import register from '../views/register/register'
import manager from '../views/manager/index'
import de from "element-ui/src/locale/lang/de";
Vue.use(Router)
......@@ -36,10 +35,9 @@ const router = new Router({
component: () => import("../views/system/welcome")
},
{
// 嵌入页面
path: '/system/stuIframe',
name: 'stuIframe',
component: () => import("../views/system/stuIframe")
component: () => import("../views/service/stuIframe")
},
{
path: '/system/stuMenu',
......@@ -50,6 +48,11 @@ const router = new Router({
path: '/system/stuClass',
name: 'stuClass',
component: () => import("../views/system/stuClass")
},
{
path: '/service/chat',
name: 'chat',
component: () => import("../views/service/chat")
}
]
},
......
<template>
<section>
<div class="leftDiv">
<ul class="infinite-list">
<!--<li v-for="item in friends" :key="item" class="infinite-list-item">111<el-divider content-position="left"></el-divider></li>-->
<li class="infinite-list-item" @click="chat(1)"><img src="favicon.ico"/>巴扎黑</li>
<li class="infinite-list-item" @click="chat(2)">吾皇</li>
<li class="infinite-list-item" @click="chat(3)">吾皇1</li>
</ul>
</div>
</section>
</template>
<script>
export default {
name: "chat",
data() {
return {
friends: [],
}
},
created() {
// this.getFriends();
},
methods: {
chat(va){
console.log(va)
// console.log(this)
},
async getFriends() {
await this.api.getApi("").then(res => {
this.friends = res.data;
})
},
}
}
</script>
<style scoped>
.leftDiv {
width: 200px;
background-color: white;
}
.infinite-list {
padding: 0;
margin: 0;
color: white;
list-style-type: none;
}
.infinite-list-item {
cursor:pointer; /*鼠标放上变手*/
height: 50px;
margin-top: 1px;
padding: 10px;
display: flex;
justify-content: center; /*水平居中*/
align-items: center; /*垂直居中*/
background-color: #3d3d3d;
}
</style>
......@@ -65,7 +65,14 @@
}
};
},
created() {},
created() {
let item = localStorage.getItem("Authorization");
if (item !== null){
this.$router.push({
path: "/manager"
});
}
},
methods: {
getVerification() {
this.imgSrc = "/api/getVerify?temp=" + +new Date();
......
......@@ -326,11 +326,11 @@ export default {
this.$refs[formName].validate(async valid => {
if (valid) {
let formData = this.addAndEditFormData;
if (formData.id === formData.pid){
this.$message.error('出现错误,父级不可以是自己');
return;
}
if (this.isEditable) {
if (formData.id === formData.pid){
this.$message.error('出现错误,父级不可以是自己');
return;
}
this.api.putApi("/menu/update", formData).then(res => {
if (res.data.code === 200) {
this.getList();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册