Commit 1a78e541 authored by miaojiale's avatar miaojiale

修复bug

parent 1d0747d1
...@@ -15,7 +15,7 @@ let CommonAlert = function (msg) { ...@@ -15,7 +15,7 @@ let CommonAlert = function (msg) {
// axios.defaults.timeout = 5000; // axios.defaults.timeout = 5000;
if (process.env.NODE_ENV == "development") { if (process.env.NODE_ENV == "development") {
// axios.defaults.baseURL = "https://inno.sh-sict.com/gastric-api/"; axios.defaults.baseURL = "https://inno.sh-sict.com/gastric-api/";
} else { } else {
axios.defaults.baseURL = process.env.VUE_APP_URL; axios.defaults.baseURL = process.env.VUE_APP_URL;
} }
......
...@@ -92,6 +92,11 @@ export default { ...@@ -92,6 +92,11 @@ export default {
} }
this.finished = false; this.finished = false;
this.$API.getPeopleList(data).then(res => { this.$API.getPeopleList(data).then(res => {
if (res.code == -100) {
sessionStorage.setItem('getList', true)
} else {
sessionStorage.removeItem('getList')
}
this.loading = false this.loading = false
this.totalCount = res.object?.totalCount this.totalCount = res.object?.totalCount
this.peopleList = [...this.peopleList, ...res.object.list] this.peopleList = [...this.peopleList, ...res.object.list]
...@@ -106,6 +111,11 @@ export default { ...@@ -106,6 +111,11 @@ export default {
}, },
}, },
activated () { activated () {
let getList = sessionStorage.getItem('getList')
if (getList) {
this.peopleList = []
this.getList()
}
const scrollTops = this.$route.meta.scrollTop; const scrollTops = this.$route.meta.scrollTop;
const $content = document.querySelector('.list_content'); const $content = document.querySelector('.list_content');
if (scrollTops && $content) { if (scrollTops && $content) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment