Commit 061aa819 by 张卓

底部导航分销入口显示隐藏

parent 46c757f6
...@@ -3,6 +3,7 @@ import shop from "@/api/shop"; ...@@ -3,6 +3,7 @@ import shop from "@/api/shop";
import spokesman from "@/api/spokesman"; import spokesman from "@/api/spokesman";
import { themeColor, checkShowConditionIds } from "@/utils/mayi"; import { themeColor, checkShowConditionIds } from "@/utils/mayi";
import { query_isEntry } from "@/utils/mayi_fenxiao";
export default { export default {
created() { created() {
...@@ -167,6 +168,11 @@ export default { ...@@ -167,6 +168,11 @@ export default {
// 显示条件(未处理) // 显示条件(未处理)
footerVal.componentData.list=footerVal.componentData.list.filter(item=>item.visible==undefined || item.visible==1) || []; footerVal.componentData.list=footerVal.componentData.list.filter(item=>item.visible==undefined || item.visible==1) || [];
footerVal.componentData.list.forEach(ele=>{
if(ele.link.name=="分销员中心" || ele.link.name=="分销商中心") {
ele.show = false;
}
})
this.mpApp.globalData.footerVal = footerVal; this.mpApp.globalData.footerVal = footerVal;
// app中异步数据回调 底部栏数据 // app中异步数据回调 底部栏数据
if (mpApp.footerCallBack) { if (mpApp.footerCallBack) {
......
...@@ -232,23 +232,6 @@ export default { ...@@ -232,23 +232,6 @@ export default {
getHomePageQuickAccess().then(res=>{ getHomePageQuickAccess().then(res=>{
that.showMyCard = res; that.showMyCard = res;
}) })
query_isEntry().then((data)=>{
//分销弹框信息
app.globalData.applySucessEntry = data;
console.log(app.globalData.applySucessEntry,1111112222222222,data)
if (
data.applyRemind == "true" &&
data.displayEntry == "true"
) {
that.applySucessEntry = true
}else if (
data.applyRemindByDistributor == "true" &&
data.displayEntryByDistributor == "true"
) {
that.applySucessEntry = true
}
// that.applySucessEntry = res;
})
//获取分销信息 //获取分销信息
this.getSpokesmanInit(options) this.getSpokesmanInit(options)
// 来源 // 来源
...@@ -316,6 +299,38 @@ export default { ...@@ -316,6 +299,38 @@ export default {
wx.setNavigationBarTitle({title : app.globalData.shopInfo.shopName}) wx.setNavigationBarTitle({title : app.globalData.shopInfo.shopName})
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
query_isEntry().then((data)=>{
//分销弹框信息
app.globalData.applySucessEntry = data;
console.log(app.globalData.applySucessEntry,3333444)
if (
data.applyRemind == "true" &&
data.displayEntry == "true"
) {
this.applySucessEntry = true;
}else if (
data.applyRemindByDistributor == "true" &&
data.displayEntryByDistributor == "true"
) {
this.applySucessEntry = true
}
let footerVal = {...app.globalData.footerVal};
footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"&&data.displayEntry == 'true') {
res.show = true
}else if(res.link.name=="分销员中心"&&data.displayEntry == 'false') {
res.show = false
}else if(res.link.name=="分销商中心"&&data.displayEntryByDistributor == 'true') {
res.show = true
}else if(res.link.name=="分销商中心"&&data.displayEntryByDistributor == 'false') {
res.show = false
}
})
app.globalData.footerVal = footerVal;
this.$mp.page.selectComponent(".custom-tab-bar").init();
// that.applySucessEntry = res;
})
}, },
async getSpokesmanInit(extConfig) { async getSpokesmanInit(extConfig) {
//绑定上下级关系 //绑定上下级关系
......
...@@ -38,6 +38,10 @@ Component({ ...@@ -38,6 +38,10 @@ Component({
}); });
}, },
attached() { attached() {
this.init()
},
methods: {
init() {
let that = this; let that = this;
if (app.globalData.footerVal) { if (app.globalData.footerVal) {
let mm = let mm =
...@@ -50,6 +54,7 @@ Component({ ...@@ -50,6 +54,7 @@ Component({
list: app.globalData.footerVal.componentData.list, list: app.globalData.footerVal.componentData.list,
mm: mm mm: mm
}); });
console.log(this.data.list,1111111132333)
} else { } else {
app.footerCallBack = function(params) { app.footerCallBack = function(params) {
params.componentData.selectIconColor = app.globalData.footerVal.componentData.selectIconBackground == 1 ? 'val(--main-color)':params.componentData.selectIconColor params.componentData.selectIconColor = app.globalData.footerVal.componentData.selectIconBackground == 1 ? 'val(--main-color)':params.componentData.selectIconColor
...@@ -71,7 +76,6 @@ Component({ ...@@ -71,7 +76,6 @@ Component({
this.data.componentData["styleSelectionNum"] == 1 this.data.componentData["styleSelectionNum"] == 1
}); });
}, },
methods: {
switchTab(e) { switchTab(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset;
app.$themeToLink(this.data.list[index]["link"], 1); app.$themeToLink(this.data.list[index]["link"], 1);
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<view class="tab-bar-border"></view> <view class="tab-bar-border"></view>
<view <view
wx:for="{{list}}" wx:for="{{list}}"
wx:if="{{item.show}}"
wx:key="index" wx:key="index"
class="tab-bar-item {{(mmm==index&&componentData['styleSelectionNum']==1)?'isItem':''}}" class="tab-bar-item {{(mmm==index&&componentData['styleSelectionNum']==1)?'isItem':''}}"
data-path="{{item.link}}" data-path="{{item.link}}"
......
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