Commit ce7575b3 by 高淑倩

add: 默认隐藏回到首页 不存在 5 tabBar 显示

parent 9cc762a8
// component/goHome/goHome.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
Component({
/**
* 组件的属性列表
*/
properties: {
},
attached () {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
handelGoHome() {
wxService.router('/pages/userCenter/userCenter').replace()
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/goHome/goHome.wxml-->
<view class="bottom-img" bindtap="handelGoHome">
<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image>
</view>
\ No newline at end of file
/* component/goHome/goHome.wxss */
.bottom-img{
position: fixed;
bottom: 143rpx;
right: 30rpx;
}
.bottom-img .img-top {
width: 85rpx;
height: 85rpx;
}
\ No newline at end of file
......@@ -211,9 +211,7 @@ wxService.page({
wx.hideLoading()
})
},
handelGoHome() {
wxService.router('/pages/userCenter/userCenter').replace()
},
// 获取plus购买信息
getPlusPurchase() {
wxService.get(`/sale/premium/query`).then(res => {
......
......@@ -30,10 +30,6 @@
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}"/>
</view>
</block>
<!--goHome-->
<view class="bottom-img" bindtap="handelGoHome">
<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image>
</view>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}' />
<guide-page-modal show="{{guidePageModalShow}}" />
......
......@@ -57,12 +57,3 @@
font-family: PingFangSC-Regular;
padding-left: 10rpx;
}
.bottom-img{
position: fixed;
bottom: 143rpx;
right: 30rpx;
}
.bottom-img .img-top {
width: 85rpx;
height: 85rpx;
}
\ No newline at end of file
......@@ -23,7 +23,8 @@ wxService.page({
token:'',
isAuthorization: false,
pageId: 3,
currHomePageId: ''
currHomePageId: '',
goHome: false // 默认隐藏回到首页 不存在 5 tabBar 显示
},
/**
......@@ -176,6 +177,15 @@ wxService.page({
newProducts.forEach((item, index) => {
if (item.type == 5) { newProducts.splice(index, 1) }
})
} else {
// 默认隐藏回到首页 不存在 5 tabBar 显示
newProducts.forEach(item => {
if (item.type != 5) {
this.setData({
goHome: true
})
}
})
}
// let productData = handlerDataOnPage.handlerArray(products)
......
......@@ -13,6 +13,7 @@
"bannerAd": "/component/bannerAd/bannerAd",
"attention": "/component/attention/attention",
"guide-page-modal": "/component/guidePageModal/guidePageModal",
"bottom-tabs": "/component/bottomTabs/bottomTabs"
"bottom-tabs": "/component/bottomTabs/bottomTabs",
"go-home": "/component/goHome/goHome"
}
}
\ No newline at end of file
......@@ -30,6 +30,8 @@
<plus sku-list="{{pItem.plus}}" />
</view>
</block>
<!--goHome-->
<go-home wx:if="{{goHome}}"/>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}' />
<guide-page-modal show="{{guidePageModalShow}}" />
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