Commit f631237c by 高淑倩

add: showQrcode

parent 8f5d5b90
......@@ -9,9 +9,9 @@ Component({
* 组件的属性列表
*/
properties: {
categorys:{
type: Array,
value: []
categoryType:{
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;
......
<!--component/tabSort/tabSort.wxml-->
<view class="tab-sort" wx:if="{{categorys}}">
<view class="tab-sort" wx:if="{{categoryType.categorys}}">
<scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
<block
wx:for="{{categorys}}"
wx:for="{{categoryType.categorys}}"
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>
......
......@@ -25,7 +25,7 @@
<announcement notice="{{pItem.notice}}" />
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<tab-sort categorys="{{pItem.categoryType.categorys}}" />
<tab-sort category-type="{{pItem.categoryType}}" />
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" />
......
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