Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
b58834b4
Commit
b58834b4
authored
Sep 05, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
授权:点击TAB我的/点击购物车
parent
fa7b95fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
15 deletions
+38
-15
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+7
-1
bottomTabs.wxml
src/component/bottomTabs/bottomTabs.wxml
+17
-14
handlerData.wxs
src/component/bottomTabs/handlerData.wxs
+14
-0
No files found.
src/component/bottomTabs/bottomTabs.js
View file @
b58834b4
...
...
@@ -21,6 +21,11 @@ Component({
type
:
String
,
value
:
''
}
},
attached
()
{
this
.
setData
({
baseImgUrl
:
app
.
globalData
.
imageUrl
})
},
ready
()
{
this
.
setData
({
...
...
@@ -33,7 +38,8 @@ Component({
data
:
{
currentRoute
:
''
,
tabs
:
[],
type
:
1
type
:
1
,
baseImgUrl
:
''
},
/**
* 组件的方法列表
...
...
src/component/bottomTabs/bottomTabs.wxml
View file @
b58834b4
<!--component/bottomTabs/bottomTabs.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<wxs src="./handlerData.wxs" module="tools" />
<view class='bgc fixed-bottom0' style="background-color:#FFF;background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});" wx:if="{{tabBar.num == 4}}">
<!--<view class='bgc fixed-bottom0' style="background-color:#FFF;background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});{{tabBar.num == 4 ? 'height: 108rpx':'height: 144rpx'}}" wx:if="{{tabBar.num == 4}}">-->
<!--<view class='bgc fixed-bottom0' style="background-color:#FFF;background-image:url({{tabBar.num == 4 ? '': '/assets/imgs/7_1_0/bg.png'}});{{tabBar.num == 4 ? 'height: 108rpx':'height: 144rpx'}}" wx:if="{{tabBar.num == 4}}">-->
<block wx:for="{{tabBar.images}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab" data-item="{{tab}}" bindtap="handelToPage">
<!-- <view wx:if="{{tab.desc == '个人中心'}}">
<view class="tab">
<!--当前页面需要授权 切未授权-->
<view wx:if="{{tools.hanlerLinkNeedAuth(tab.link.url)}}">
<view wx:if="{{!currentHasUserInfo}}">
<button
bindgetuserinfo="_getUserInfo"
...
...
@@ -12,20 +15,20 @@
class='btn btn-primary'
hover-class="btn-hover"
>
<image class='tab-img' src='{{currHomePageId == tab.redirectId ? "{{tab.activeImageUrl}}": "{{tab.imageUrl}}"}}' />
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == tab.redirectId ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</view>
<view wx:else data-item="{{tab}}" bindtap="handelToPage">
<button>
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == tab.redirectId ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</view>
<view wx:else>3</view>
</view>
<view wx:else>
22
</view>-->
<button wx:if="{{currHomePageId == tab.redirectId}}">
<image class='tab-img' src='{{tab.activeImageUrl}}' />
</button>
<button wx:else>
<image class='tab-img' src='{{tab.imageUrl}}' />
</button>
<view wx:else data-item="{{tab}}" bindtap="handelToPage">
<button>
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == tab.redirectId ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</view>
</view>
</block>
</view>
...
...
src/component/bottomTabs/handlerData.wxs
0 → 100644
View file @
b58834b4
function hanlerLinkNeedAuth(link){
console.log('linkwwwwwwwwwww', link)
var flag = false
if(link.indexOf('pages/my/my') > -1 || link.indexOf('pages/cart/cart') > -1 ){
flag = true
}
console.log('flag', flag)
return flag
}
module.exports = {
hanlerLinkNeedAuth: hanlerLinkNeedAuth
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment