Commit 0380317b authored by 黄奎's avatar 黄奎

页面修改

parent 4ad4ee89
......@@ -5,7 +5,7 @@ import md5 from 'js-md5'
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = '';
domainUrl = "http://192.168.0.110";
domainUrl = "http://192.168.2.214:8082";
let locationName = window.location.hostname;
if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com";
......
......@@ -36,37 +36,74 @@
desc: "這是一家非常牛逼的旅遊網站"
},
headType: 1,
dataList: {}
dataList: {},
//集团编号
RB_Group_Id: 0,
};
},
created() {
console.log("111");
this.$root.$on('change-head-style', param => {
this.changeHeadHandler(param);
})
},
mounted() {
this.getData();
//获取集团数据
if (localStorage.baseifo) {
var jObj = JSON.parse(window.localStorage.getItem('groupinfo'));
this.RB_Group_Id = jObj.GroupId;
} else {
this.getGroupData();
}
//获取网站基础配置
if (localStorage.baseifo) {
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
this.baseinfo.logo = jObj.Config.Logo;
this.baseinfo.name = jObj.Config.Name;
this.baseinfo.nav.navs = jObj.HeaderList;
this.baseinfo.nav.bg = jObj.Config.BgColor;
} else {
this.getData();
}
},
methods: {
changeHeadHandler(t) {
this.headType = t;
},
//获取集团数据
getGroupData() {
let locationName = window.location.hostname;
var msg = {
GroupId: 0,
B2BDomain: locationName
};
this.apipost(
"admin_get_GetGroupDomain", msg,
res => {
if (res.data.resultCode == 1) {
var jsonData = JSON.stringify(res.data.data);
window.localStorage.setItem("groupinfo", jsonData);
}
},
err => {}
);
},
getData() {
this.apipost(
"ws_get_GetHomePage", {
RB_Group_Id: 2
RB_Group_Id: this.RB_Group_Id
},
res => {
console.log(res);
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
if (this.dataList) {
var jsonData = JSON.stringify(res.data.data);
window.localStorage.setItem("baseifo", jsonData);
this.baseinfo.logo = this.dataList.Config.Logo;
this.baseinfo.name = this.dataList.Config.Name;
this.baseinfo.name = this.dataList.Config
.Name;
this.baseinfo.nav.navs = this.dataList.HeaderList;
this.baseinfo.nav.bg = this.dataList.Config.BgColor;
this.baseinfo.nav.bg = this.dataList
.Config.BgColor;
}
}
},
......
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