Commit 1d5daa74 authored by 黄奎's avatar 黄奎

页面修改

parent 04772f57
...@@ -277,17 +277,34 @@ ...@@ -277,17 +277,34 @@
}, },
mounted() { mounted() {
this.$root.$emit("change-head-style", 2); this.$root.$emit("change-head-style", 2);
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
this.areas = jObj.AreaList;
document.addEventListener("click", this.clickHandler); document.addEventListener("click", this.clickHandler);
if (localStorage.baseifo) {
var jObj = JSON.parse(localStorage.baseifo);
this.areas = jObj.AreaList;
} else {
this.getAera()
}
}, },
beforeDestroy() { beforeDestroy() {
document.removeEventListener("click", this.clickHandler); document.removeEventListener("click", this.clickHandler);
}, },
computed: { computed: {
}, },
methods: { methods: {
//获取地区数据
getAera() {
this.apipost(
"ws_get_GetSearchArea", {},
res => {
if (res.data.resultCode == 1) {
if (res.data.data) {
this.areas = res.data.data.AreaList;
}
}
},
err => {}
);
},
showPopupHandler() { showPopupHandler() {
this.showPopup = true; this.showPopup = true;
}, },
......
...@@ -276,10 +276,14 @@ ...@@ -276,10 +276,14 @@
}; };
}, },
mounted() { mounted() {
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
this.areas = jObj.AreaList;
this.$root.$emit("change-head-style", 2); this.$root.$emit("change-head-style", 2);
document.addEventListener("click", this.clickHandler); document.addEventListener("click", this.clickHandler);
if (localStorage.baseifo) {
var jObj = JSON.parse(localStorage.baseifo);
this.areas = jObj.AreaList;
} else {
this.getAera()
}
}, },
beforeDestroy() { beforeDestroy() {
document.removeEventListener("click", this.clickHandler); document.removeEventListener("click", this.clickHandler);
...@@ -288,6 +292,20 @@ ...@@ -288,6 +292,20 @@
}, },
methods: { methods: {
//获取地区数据
getAera() {
this.apipost(
"ws_get_GetSearchArea", {},
res => {
if (res.data.resultCode == 1) {
if (res.data.data) {
this.areas = res.data.data.AreaList;
}
}
},
err => {}
);
},
showPopupHandler() { showPopupHandler() {
this.showPopup = true; this.showPopup = true;
}, },
......
...@@ -276,10 +276,14 @@ ...@@ -276,10 +276,14 @@
}; };
}, },
mounted() { mounted() {
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
this.areas = jObj.AreaList;
this.$root.$emit("change-head-style", 2); this.$root.$emit("change-head-style", 2);
document.addEventListener("click", this.clickHandler); document.addEventListener("click", this.clickHandler);
if (localStorage.baseifo) {
var jObj = JSON.parse(localStorage.baseifo);
this.areas = jObj.AreaList;
} else {
this.getAera()
}
}, },
beforeDestroy() { beforeDestroy() {
document.removeEventListener("click", this.clickHandler); document.removeEventListener("click", this.clickHandler);
...@@ -288,6 +292,20 @@ ...@@ -288,6 +292,20 @@
}, },
methods: { methods: {
//获取地区数据
getAera() {
this.apipost(
"ws_get_GetSearchArea", {},
res => {
if (res.data.resultCode == 1) {
if (res.data.data) {
this.areas = res.data.data.AreaList;
}
}
},
err => {}
);
},
showPopupHandler() { showPopupHandler() {
this.showPopup = true; this.showPopup = true;
}, },
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
mounted() { mounted() {
localStorage.clear(); localStorage.clear();
//获取集团数据 //获取集团数据
if (localStorage.baseifo) { if (localStorage.groupinfo) {
var jObj = JSON.parse(window.localStorage.getItem('groupinfo')); var jObj = JSON.parse(window.localStorage.getItem('groupinfo'));
this.RB_Group_Id = jObj.GroupId; this.RB_Group_Id = jObj.GroupId;
} else { } else {
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
HomeData: {}, HomeData: {},
}; };
}, },
created(){ created() {
this.getHomeData(); this.getHomeData();
}, },
mounted() { mounted() {
...@@ -244,19 +244,21 @@ ...@@ -244,19 +244,21 @@
}, },
methods: { methods: {
getHomeData() { getHomeData() {
this.apipost( if (this.RB_Group_Id > 0) {
"ws_get_GetHomePage", { this.apipost(
RB_Group_Id: this.RB_Group_Id "ws_get_GetHomePage", {
}, RB_Group_Id: this.RB_Group_Id
res => { },
if (res.data.resultCode == 1) { res => {
if (res.data.data) { if (res.data.resultCode == 1) {
this.HomeData = res.data.data; if (res.data.data) {
this.HomeData = res.data.data;
}
} }
} },
}, err => {}
err => {} );
); }
} }
}, },
}; };
......
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