parent
5576c6adef
commit
daeb8b9695
|
|
@ -247,17 +247,24 @@ Component({
|
|||
// height: wx.getSystemInfoSync().windowHeight,
|
||||
clientWidth: wx.getSystemInfoSync().windowWidth,
|
||||
});
|
||||
|
||||
let pages = getCurrentPages(); //获取加载的页面
|
||||
let currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
||||
// 页面路由 pageName:独立门店路由
|
||||
let pathName = currentPage.__route__;
|
||||
console.log('------- 当前页面 -----------',currentPage.route);
|
||||
this.setData({
|
||||
routeData: currentPage.route,
|
||||
selectedMenuIndex: ''
|
||||
});
|
||||
|
||||
let that = this;
|
||||
|
||||
|
||||
|
||||
console.log('--------------- 装修内容 ------------------------',this.data.datas);
|
||||
// 获取门店默认菜单
|
||||
this.getDefaultMenu();
|
||||
|
||||
return false;// TODO:这里强制使用每个门店设置的默认菜单
|
||||
// console.log(this.data.datas,this.data.foot_type,"this.data.foot_type")
|
||||
// console.log(pathName , pageName, "pageName")
|
||||
if (this.data.isDiy && this.data.datas) {
|
||||
|
|
@ -267,7 +274,8 @@ Component({
|
|||
this.setData({
|
||||
routeDataShow: false,
|
||||
});
|
||||
} else if (!this.data.foot_type || this.data.foot_type == 1) {
|
||||
}
|
||||
else if (!this.data.foot_type || this.data.foot_type == 1) {
|
||||
|
||||
if (this.data.datas.group_title) {
|
||||
// 显示列表默认
|
||||
|
|
@ -321,7 +329,8 @@ Component({
|
|||
|
||||
}
|
||||
|
||||
} else if (this.data.foot_type == 2) {
|
||||
}
|
||||
else if (this.data.foot_type == 2) {
|
||||
// 显示自定义的底部导航
|
||||
if (!this.data.datas.group_title) {
|
||||
this.setData({
|
||||
|
|
@ -329,12 +338,10 @@ Component({
|
|||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.setData({
|
||||
menu_button: this.data.datas.button_item.menu_button,
|
||||
tab_style: this.data.datas.tab_style.value
|
||||
});
|
||||
|
||||
if (this.data.datas.button_item && this.data.datas.button_item.menu_button) {
|
||||
let menus = this.data.datas.button_item.menu_button;
|
||||
for (let i = 0; i < menus.length; i++) {
|
||||
|
|
@ -372,9 +379,7 @@ Component({
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if (app.globalData.store_alone_temp == 1 || pathName == pageName) {
|
||||
// 门店独立模块
|
||||
|
|
@ -382,7 +387,6 @@ Component({
|
|||
menu_button: that.data.storeData.button_item.menu_button,
|
||||
tab_style: that.data.storeData.tab_style.value
|
||||
});
|
||||
|
||||
// 显示storeData的底部导航
|
||||
if (that.data.menu_button) {
|
||||
let menus = that.data.menu_button;
|
||||
|
|
@ -397,7 +401,6 @@ Component({
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
// 其他页面
|
||||
|
|
@ -821,10 +824,44 @@ Component({
|
|||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取门店设置的默认底部菜单
|
||||
getDefaultMenu(){
|
||||
let _this = this;
|
||||
app._getNetWork({
|
||||
url: app.getNetAddresss("plugin.store-cashier.frontend.store.get-store-info.getDefaultFooterMenu"),
|
||||
success: (result) => {
|
||||
let res = result.data;
|
||||
if (parseInt(res.result) === 1) {
|
||||
console.log('------- 默认底部菜单 ----------',res.data);
|
||||
_this.setData({
|
||||
menu_button: res.data.button_item.menu_button,
|
||||
tab_style: res.data.tab_style.value
|
||||
},function(){
|
||||
_this.selectedButton();
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log("fail " + res);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选中底部导航按钮
|
||||
selectedButton(){
|
||||
let _this = this;
|
||||
let routeData = this.data.routeData;
|
||||
let menuButtons = _this.data.menu_button;
|
||||
Object.values(menuButtons).forEach(function (item,index){
|
||||
let url = item.link || '';
|
||||
if(url.indexOf(routeData) > 0){
|
||||
_this.setData({
|
||||
routeDataShow: true,
|
||||
selectedMenuIndex: index,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@
|
|||
<diyform datas="{{datas}}" modeType="single" wx:if="{{form_id}}" desThumb="{{false}}" memberBtn="{{false}}"
|
||||
params="{{'returnData'}}" bindgofunarr="postDiy" class="dsfrom"></diyform>
|
||||
</view>
|
||||
<view class="agreement" wx:if="{{agreementStatus || PlatformAgreement}}">
|
||||
<!-- <view class="agreement" wx:if="{{agreementStatus || PlatformAgreement}}">
|
||||
<view class="left">
|
||||
<van-checkbox value="{{agreementCB}}" bind:change="agreementCBinp" checked-color="#f15353" shape="{{true}}">
|
||||
</van-checkbox>
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
<view class="right">
|
||||
<view class="span">我已阅读、理解并接受<text catchtap="goAgreement" wx:if="{{agreementStatus}}">《{{protocol_title || '会员注册协议'}}》</text><text wx:if="{{PlatformAgreement}}" catchtap="openPlatformAgreement">《{{agreement_name}}》</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
</view>
|
||||
<view class="btn">
|
||||
<view class="button" catchtap="getPrepBind">确认授权开通并绑定会员</view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue