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();
} }
......
...@@ -67,13 +67,19 @@ ...@@ -67,13 +67,19 @@
</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="{
'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> <u-icon name="cross" color="#fff" @click="close"></u-icon>
<view style="width: 1px;height: 20px;margin:0 10px;background: #fff;"></view> <view
<Text style='color: #fff;'>{{setting.add_app_text}}</Text> 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 class="triangle-up"></view>
</view> </view>
</view> </view>
...@@ -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,23 +136,27 @@ export default { ...@@ -130,23 +136,27 @@ 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")) {
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.add_show = uni.getStorageSync("add_top_app")
this.setting =set; ? uni.getStorageSync("add_top_app").add_top_app_show
console.log(this.setting) : 1;
this.setting = set;
console.log(this.setting);
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
}, },
...@@ -160,37 +170,38 @@ export default { ...@@ -160,37 +170,38 @@ export default {
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) => { (res) => {
console.log(res,'resIndex'); console.log(res, "resIndex");
this.indexPageData = res.data.home_pages.navs[0].template.data; this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData=res.data; this.myPageData = res.data;
uni.showToast({
// wx.setStorageSync("indexdata", this.myPageData); title: this.mainColor,
duration: 2000,
});
if (res.data.home_pages.title != "") { if (res.data.home_pages.title != "") {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: res.data.home_pages.title, title: res.data.home_pages.title,
}); });
uni.setNavigationBarColor({ uni.setNavigationBarColor({
//字体颜色 //字体颜色
frontColor:res.data.navbar.top_text_color, frontColor: res.data.navbar.top_text_color,
//背景颜色 //背景颜色
backgroundColor:res.data.navbar.top_background_color backgroundColor: res.data.navbar.top_background_color,
}); });
} }
this.formatBg(); this.formatBg();
}, },
(error)=>{ (error) => {}
}
); );
}, },
close(){ close() {
this.add_show =2; this.add_show = 2;
uni.setStorageSync("add_top_app", {add_top_app_show:2}); uni.setStorageSync("add_top_app", { add_top_app_show: 2 });
}, },
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
...@@ -226,11 +237,11 @@ export default { ...@@ -226,11 +237,11 @@ 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;
...@@ -239,9 +250,8 @@ export default { ...@@ -239,9 +250,8 @@ export default {
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;
...@@ -249,7 +259,7 @@ export default { ...@@ -249,7 +259,7 @@ export default {
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