Commit 144350bf authored by 罗超's avatar 罗超

修改问题

parent 7c2ff70d
...@@ -33,8 +33,10 @@ export default { ...@@ -33,8 +33,10 @@ export default {
(res) => { (res) => {
uni.setStorageSync("basedata", res.data); uni.setStorageSync("basedata", res.data);
this.basedata = res.data; this.basedata = res.data;
this.$uiConfig.mainColor=this.basedata.mall.setting.mallStyle.main console.log("赋值:")
this.$uiConfig.secondary=this.basedata.mall.setting.mallStyle.secondary 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.formatTabbar();
this.formatNavigation(); this.formatNavigation();
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
:current="active" :current="active"
:bar-width="80" :bar-width="80"
:font-size="32" :font-size="32"
:bold="false" :bold="false"
@change="changeHandler" @change="changeHandler"
></u-tabs> ></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs"> <template v-for="(item, i) in myPageData.home_pages.navs">
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
:key="di" :key="di"
></addialog> ></addialog>
<quicknav <quicknav
v-if="d.id == 'quick-nav' && d.data.navSwitch == 1" v-if="d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs="d.data" :navs="d.data"
:key="di" :key="di"
></quicknav> ></quicknav>
...@@ -67,15 +67,21 @@ ...@@ -67,15 +67,21 @@
</view> </view>
</template> </template>
<tabbar></tabbar> <tabbar></tabbar>
<view class="tips" v-if="add_show==1&& JSON.stringify(setting) != '{}' " :style="{ <view
'border-radius':setting.add_app_bg_radius+'rpx', class="tips"
'opacity':setting.add_app_bg_transparency/100 v-if="add_show == 1 && JSON.stringify(setting) != '{}'"
}"> :style="{
<u-icon name="cross" color="#fff" @click="close"></u-icon> 'border-radius': setting.add_app_bg_radius + 'rpx',
<view style="width: 1px;height: 20px;margin:0 10px;background: #fff;"></view> opacity: setting.add_app_bg_transparency / 100,
<Text style='color: #fff;'>{{setting.add_app_text}}</Text> }"
<view class="triangle-up"></view> >
</view> <u-icon name="cross" color="#fff" @click="close"></u-icon>
<view
style="width: 1px; height: 20px; margin: 0 10px; background: #fff;"
></view>
<Text style="color: #fff;">{{ setting.add_app_text }}</Text>
<view class="triangle-up"></view>
</view>
</view> </view>
</template> </template>
...@@ -102,14 +108,14 @@ export default { ...@@ -102,14 +108,14 @@ export default {
data() { data() {
return { return {
title: "Hello", title: "Hello",
myPageData:{}, myPageData: {},
indexPageData: {}, indexPageData: {},
mainColor: "", mainColor: "",
active: 0, active: 0,
contentHeight: 0, contentHeight: 0,
pageId:0, pageId: 0,
setting:{}, setting: {},
add_show:1, add_show: 1,
}; };
}, },
components: { components: {
...@@ -130,24 +136,28 @@ export default { ...@@ -130,24 +136,28 @@ export default {
mapi, mapi,
checkform, checkform,
addialog, addialog,
quicknav quicknav,
}, },
onLoad(options) { onLoad(options) {
console.log(options,'option'); console.log(options, "option");
if(options&&options.page_id){ if (options && options.page_id) {
this.pageId=options.page_id this.pageId = options.page_id;
} }
let c = this.$uiConfig.is_bang ? 78 : 50; let c = this.$uiConfig.is_bang ? 78 : 50;
this.contentHeight = this.$utils.calcContentHeight(c); this.contentHeight = this.$utils.calcContentHeight(c);
this.init(); this.init();
let set = uni.getStorageSync("basedata")? uni.getStorageSync("basedata").mall.setting:{}; let set = uni.getStorageSync("basedata")
if(!uni.getStorageSync("add_top_app")){ ? uni.getStorageSync("basedata").mall.setting
uni.setStorageSync("add_top_app", {add_top_app_show:1}); : {};
} if (!uni.getStorageSync("add_top_app")) {
this.add_show = uni.getStorageSync("add_top_app")?uni.getStorageSync("add_top_app").add_top_app_show:1; uni.setStorageSync("add_top_app", { add_top_app_show: 1 });
this.setting =set; }
console.log(this.setting) this.add_show = uni.getStorageSync("add_top_app")
? uni.getStorageSync("add_top_app").add_top_app_show
: 1;
this.setting = set;
console.log(this.setting);
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
}, },
onShow() { onShow() {
...@@ -158,40 +168,41 @@ export default { ...@@ -158,40 +168,41 @@ export default {
}, },
methods: { methods: {
init() { init() {
this.request2( this.request2(
{ {
url: '/api/Mall/GetHome', url: "/api/Mall/GetHome",
data: { data: {
page_id:this.pageId page_id: this.pageId,
},
},
(res) => {
console.log(res,'resIndex');
this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData=res.data;
// wx.setStorageSync("indexdata", this.myPageData);
if (res.data.home_pages.title != "") {
uni.setNavigationBarTitle({
title: res.data.home_pages.title,
});
uni.setNavigationBarColor({
//字体颜色
frontColor:res.data.navbar.top_text_color,
//背景颜色
backgroundColor:res.data.navbar.top_background_color
});
}
this.formatBg();
}, },
(error)=>{ },
} (res) => {
); console.log(res, "resIndex");
this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData = res.data;
uni.showToast({
title: this.mainColor,
duration: 2000,
});
if (res.data.home_pages.title != "") {
uni.setNavigationBarTitle({
title: res.data.home_pages.title,
});
uni.setNavigationBarColor({
//字体颜色
frontColor: res.data.navbar.top_text_color,
//背景颜色
backgroundColor: res.data.navbar.top_background_color,
});
}
this.formatBg();
},
(error) => {}
);
},
close() {
this.add_show = 2;
uni.setStorageSync("add_top_app", { add_top_app_show: 2 });
}, },
close(){
this.add_show =2;
uni.setStorageSync("add_top_app", {add_top_app_show:2});
},
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
}, },
...@@ -226,30 +237,29 @@ export default { ...@@ -226,30 +237,29 @@ export default {
flex-direction: column; flex-direction: column;
/* align-items: center; /* align-items: center;
justify-content: center; */ justify-content: center; */
padding-bottom:100rpx; padding-bottom: 100rpx;
} }
.content .tips{ .content .tips {
position: fixed; position: fixed;
top:8px; top: 8px;
right: 6px; right: 6px;
height: 36px; height: 36px;
background: #000000; background: #000000;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
padding: 0 10px; padding: 0 10px;
font-size: 12px; font-size: 12px;
} }
.triangle-up{ .triangle-up {
width: 0; width: 0;
height: 0; height: 0;
border-left: 5px solid transparent; border-left: 5px solid transparent;
border-right: 5px solid transparent; border-right: 5px solid transparent;
border-bottom: 10px solid black; border-bottom: 10px solid black;
position: fixed; position: fixed;
right: 65px; right: 65px;
top:0px top: 0px;
} }
/* .logo { /* .logo {
height: 200rpx; height: 200rpx;
......
<template>
<scroll-view
:scroll-y="true"
@scrolltolower="lower"
:enable-back-to-top="true"
:enable-flex="true"
style="height: 100%; padding: 10px; padding-bottom: 0px;"
>
</scroll-view>
</template>
<script>
export default {
data() {
return {
mc: "",
secondary: "",
pageTitle: "直播列表",
page: 1,
list: [],
pageCount: 1,
loading: true,
};
},
onLoad(option) {
uni.showNavigationBarLoading();
this.init();
this.mc = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.initPage();
this.init();
},
methods: {
initPage() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
init() {
let h = this.apiheader();
if (page < pageCount) {
this.request(
{
url: "",
header: h,
data: {
r: "api/live/index",
page: this.page,
},
},
(res) => {
this.list = res.data.list;
this.pageCount = 1;
uni.hideNavigationBarLoading();
}
);
}
},
},
};
</script>
<style></style>
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