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
f631237c
Commit
f631237c
authored
Aug 29, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: showQrcode
parent
8f5d5b90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
12 deletions
+32
-12
tabSort.js
src/component/tabSort/tabSort.js
+6
-3
tabSort.wxml
src/component/tabSort/tabSort.wxml
+25
-8
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+1
-1
No files found.
src/component/tabSort/tabSort.js
View file @
f631237c
...
...
@@ -9,9 +9,9 @@ Component({
* 组件的属性列表
*/
properties
:
{
category
s
:{
type
:
Array
,
value
:
[]
category
Type
:{
type
:
Object
,
value
:
null
}
},
attached
()
{
...
...
@@ -30,6 +30,9 @@ Component({
handelToVipCode
()
{
wxService
.
router
(
`/pages/memberOfOwn/memberOfOwn`
)
},
handelToCart
()
{
wxService
.
router
(
`/pages/cart/cart`
)
},
// 设置tab active
switchNav
(
event
)
{
const
ev
=
event
.
currentTarget
.
dataset
;
...
...
src/component/tabSort/tabSort.wxml
View file @
f631237c
<!--component/tabSort/tabSort.wxml-->
<view class="tab-sort" wx:if="{{categorys}}">
<view class="tab-sort" wx:if="{{category
Type.category
s}}">
<scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
<block
wx:for="{{categorys}}"
wx:for="{{category
Type.category
s}}"
wx:for-index="idx"
wx:for-item="navItem"
wx:key="idx"
...
...
@@ -11,18 +11,35 @@
class="scroll-view-item {{currentTab == idx ?'active':''}}"
style="width:{{navItemWidth}}%"
data-current="{{idx}}"
data-redirectId
="{{navItem.redirectId}}"
data-redirectId="{{navItem.redirectId}}"
bindtap="switchNav"
>
<view>{{navItem.title}}</view>
</view>
</block>
</scroll-view>
<view class="scroll-view-right" bindtap="handelToVipCode">
<!-- showQrcode 1 显示 0 隐藏-->
<image class="right-img" src="./../../assets/imgs/7_1_0/scancode.png" mode="widthFix" lazy-load="false" binderror="" bindload="" />
<text class="active vip-text" selectable="false" space="false" decode="false"> 会员码</text>
</view>
<!-- showQrcode 2 购物车 1 会员码 0 隐藏 -->
<view class="scroll-view-right" bindtap="handelToVipCode" wx:if="{{categoryType.showQrcode == 1}}">
<image
class="right-img"
src="/assets/imgs/7_1_0/scancode.png"
mode="widthFix"
lazy-load="false"
binderror=""
bindload=""
/>
<text class="active vip-text" selectable="false" space="false" decode="false">会员码</text>
</view>
<view class="scroll-view-right" bindtap="handelToCart" wx:if="{{categoryType.showQrcode == 2}}">
<image
class="right-img"
src="/assets/imgs/7_1_0/scancode.png"
mode="widthFix"
lazy-load="false"
binderror=""
bindload=""
/>
</view>
</view>
<!-- 页面内容 -->
<!--<view>
...
...
src/pages/userCenter/userCenter.wxml
View file @
f631237c
...
...
@@ -25,7 +25,7 @@
<announcement notice="{{pItem.notice}}" />
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<tab-sort category
s="{{pItem.categoryType.categorys
}}" />
<tab-sort category
-type="{{pItem.categoryType
}}" />
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" />
...
...
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