This commit is contained in:
裴浩宇 2020-04-17 17:38:58 +08:00
parent 8ef01a9293
commit e906a7917a
2 changed files with 14 additions and 5 deletions

View File

@ -1,8 +1,8 @@
// 配置API接口地址 // 配置API接口地址
import de from "element-ui/src/locale/lang/de"; import de from "element-ui/src/locale/lang/de";
let root = 'http://192.168.10.29:8048' // let root = 'http://192.168.10.29:8048'
// let root = 'http://123.57.22.91:8048' let root = 'http://123.57.22.91:8048'
// let root = 'http://127.0.0.1:8048' // let root = 'http://127.0.0.1:8048'
// 引用axios // 引用axios
let axios = require('axios') let axios = require('axios')

View File

@ -7,13 +7,13 @@
<el-input class="searchinp" v-model="condition" placeholder="请输入内容" @keydown.enter.native="search"></el-input> <el-input class="searchinp" v-model="condition" placeholder="请输入内容" @keydown.enter.native="search"></el-input>
<el-button type="primary" class="searchbtn" @click="search">搜索</el-button> <el-button type="primary" class="searchbtn" @click="search">搜索</el-button>
</div> </div>
<div class="list"> <nodate v-if="noDate"></nodate>
<div class="list" v-if="!noDate">
<div class="one" v-for="item in list"> <div class="one" v-for="item in list">
<div class="type" @click="searchLabel(item.label)"> <div class="type" @click="searchLabel(item.label)">
[{{item.label}}] [{{item.label}}]
</div> </div>
<div class="text" @click="getContent(item.id)">{{item.title}}</div> <div class="text" @click="getContent(item.id)">{{item.title}}</div>
<!-- <div class="release">{{item.real_name}}</div>-->
<div class="release-time">{{item.release_time}}</div> <div class="release-time">{{item.release_time}}</div>
<div class="editorbtn" @click="editorContent(item.id)" v-if="isOwn">编辑</div> <div class="editorbtn" @click="editorContent(item.id)" v-if="isOwn">编辑</div>
<div class="delete" @click="deleteMy(item.id)" v-if="isOwn">删除</div> <div class="delete" @click="deleteMy(item.id)" v-if="isOwn">删除</div>
@ -144,6 +144,7 @@
<script> <script>
import addArticle from './AddArticle' import addArticle from './AddArticle'
import footers from './components/Footer' import footers from './components/Footer'
import nodate from './components/NoData'
import {getDate} from "../assets/js/public"; import {getDate} from "../assets/js/public";
export default { export default {
name: "PersonalInfo", name: "PersonalInfo",
@ -192,6 +193,7 @@
drawer: false, drawer: false,
direction: 'rtl', direction: 'rtl',
sentList: [], sentList: [],
noDate: false,
} }
}, },
mounted() { mounted() {
@ -205,6 +207,9 @@
this.$ajax.post("/hs/getPersonalInfo",{text:"",releaseId: sessionStorage.getItem("userId")},r=>{ this.$ajax.post("/hs/getPersonalInfo",{text:"",releaseId: sessionStorage.getItem("userId")},r=>{
this.list = r.personalList; this.list = r.personalList;
this.length = r.personalList.length; this.length = r.personalList.length;
if (r.personalList.length === 0) {
this.noDate = true;
}
this.all = { this.all = {
real_name: r.personalInfo.real_name, real_name: r.personalInfo.real_name,
header_photo: r.personalInfo.real_name.substring(0, 1), header_photo: r.personalInfo.real_name.substring(0, 1),
@ -439,6 +444,9 @@
this.$ajax.post("/hs/getListByAttribute",{text:this.condition,releaseId: sessionStorage.getItem("userId")},r=>{ this.$ajax.post("/hs/getListByAttribute",{text:this.condition,releaseId: sessionStorage.getItem("userId")},r=>{
this.list = r this.list = r
this.length = r.length this.length = r.length
if (r.length === 0) {
this.noDate = true;
}
}) })
}, },
getContent(id) { getContent(id) {
@ -482,7 +490,8 @@
}, },
components: { components: {
addArticle, addArticle,
footers footers,
nodate
} }
} }
</script> </script>