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

页面修改

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