Commit 03966cb7 authored by zhengke's avatar zhengke

修改

parent 873c4ec0
......@@ -19,12 +19,11 @@ export default {
},
methods: {
init() {
console.log(uni.getStorageSync("basedata"));
// if (uni.getStorageSync("basedata")) {
// this.basedata = uni.getStorageSync("basedata");
// this.formatTabbar();
// this.formatNavigation();
// } else {
if (uni.getStorageSync("basedata")) {
this.basedata = uni.getStorageSync("basedata");
this.formatTabbar();
this.formatNavigation();
} else {
this.request2(
{
url: "/api/Mall/GetHome",
......@@ -33,15 +32,13 @@ export default {
(res) => {
uni.setStorageSync("basedata", res.data);
this.basedata = res.data;
console.log("赋值:")
console.log(res.data.mall.setting.mallStyle.main)
this.$uiConfig.mainColor=res.data.mall.setting.mallStyle.main
this.$uiConfig.secondary=res.data.mall.setting.mallStyle.secondary
this.formatTabbar();
this.formatNavigation();
}
);
//}
}
},
formatPlat() {
let modelmes = uni.getSystemInfoSync().model;
......
......@@ -166,11 +166,9 @@ export default {
},
},
(res) => {
console.log(res,'resIndex');
this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData=res.data;
// wx.setStorageSync("indexdata", this.myPageData);
uni.setStorageSync("basedata", res.data);
if (res.data.home_pages.title != "") {
uni.setNavigationBarTitle({
title: res.data.home_pages.title,
......
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