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

修改问题

parent 7c2ff70d
......@@ -33,8 +33,10 @@ export default {
(res) => {
uni.setStorageSync("basedata", res.data);
this.basedata = res.data;
this.$uiConfig.mainColor=this.basedata.mall.setting.mallStyle.main
this.$uiConfig.secondary=this.basedata.mall.setting.mallStyle.secondary
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();
}
......
......@@ -9,7 +9,7 @@
:current="active"
:bar-width="80"
:font-size="32"
:bold="false"
:bold="false"
@change="changeHandler"
></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
......@@ -59,7 +59,7 @@
:key="di"
></addialog>
<quicknav
v-if="d.id == 'quick-nav' && d.data.navSwitch == 1"
v-if="d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs="d.data"
:key="di"
></quicknav>
......@@ -67,15 +67,21 @@
</view>
</template>
<tabbar></tabbar>
<view class="tips" v-if="add_show==1&& JSON.stringify(setting) != '{}' " :style="{
'border-radius':setting.add_app_bg_radius+'rpx',
'opacity':setting.add_app_bg_transparency/100
}">
<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
class="tips"
v-if="add_show == 1 && JSON.stringify(setting) != '{}'"
:style="{
'border-radius': setting.add_app_bg_radius + 'rpx',
opacity: setting.add_app_bg_transparency / 100,
}"
>
<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>
</template>
......@@ -102,14 +108,14 @@ export default {
data() {
return {
title: "Hello",
myPageData:{},
myPageData: {},
indexPageData: {},
mainColor: "",
active: 0,
contentHeight: 0,
pageId:0,
setting:{},
add_show:1,
pageId: 0,
setting: {},
add_show: 1,
};
},
components: {
......@@ -130,24 +136,28 @@ export default {
mapi,
checkform,
addialog,
quicknav
quicknav,
},
onLoad(options) {
console.log(options,'option');
if(options&&options.page_id){
this.pageId=options.page_id
}
console.log(options, "option");
if (options && options.page_id) {
this.pageId = options.page_id;
}
let c = this.$uiConfig.is_bang ? 78 : 50;
this.contentHeight = this.$utils.calcContentHeight(c);
this.init();
let set = uni.getStorageSync("basedata")? uni.getStorageSync("basedata").mall.setting:{};
if(!uni.getStorageSync("add_top_app")){
uni.setStorageSync("add_top_app", {add_top_app_show:1});
}
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)
let set = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").mall.setting
: {};
if (!uni.getStorageSync("add_top_app")) {
uni.setStorageSync("add_top_app", { add_top_app_show: 1 });
}
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();
},
onShow() {
......@@ -158,40 +168,41 @@ export default {
},
methods: {
init() {
this.request2(
{
url: '/api/Mall/GetHome',
data: {
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();
this.request2(
{
url: "/api/Mall/GetHome",
data: {
page_id: this.pageId,
},
(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) {
this.active = i;
},
......@@ -226,30 +237,29 @@ export default {
flex-direction: column;
/* align-items: center;
justify-content: center; */
padding-bottom:100rpx;
padding-bottom: 100rpx;
}
.content .tips{
position: fixed;
top:8px;
right: 6px;
height: 36px;
background: #000000;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 10px;
font-size: 12px;
.content .tips {
position: fixed;
top: 8px;
right: 6px;
height: 36px;
background: #000000;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 10px;
font-size: 12px;
}
.triangle-up{
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 10px solid black;
position: fixed;
right: 65px;
top:0px
.triangle-up {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 10px solid black;
position: fixed;
right: 65px;
top: 0px;
}
/* .logo {
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