Commit f631237c by 高淑倩

add: showQrcode

parent 8f5d5b90
...@@ -9,9 +9,9 @@ Component({ ...@@ -9,9 +9,9 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
categorys:{ categoryType:{
type: Array, type: Object,
value: [] value: null
} }
}, },
attached() { attached() {
...@@ -30,6 +30,9 @@ Component({ ...@@ -30,6 +30,9 @@ Component({
handelToVipCode() { handelToVipCode() {
wxService.router(`/pages/memberOfOwn/memberOfOwn`) wxService.router(`/pages/memberOfOwn/memberOfOwn`)
}, },
handelToCart() {
wxService.router(`/pages/cart/cart`)
},
// 设置tab active // 设置tab active
switchNav(event) { switchNav(event) {
const ev = event.currentTarget.dataset; const ev = event.currentTarget.dataset;
......
<!--component/tabSort/tabSort.wxml--> <!--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}}"> <scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
<block <block
wx:for="{{categorys}}" wx:for="{{categoryType.categorys}}"
wx:for-index="idx" wx:for-index="idx"
wx:for-item="navItem" wx:for-item="navItem"
wx:key="idx" wx:key="idx"
...@@ -11,18 +11,35 @@ ...@@ -11,18 +11,35 @@
class="scroll-view-item {{currentTab == idx ?'active':''}}" class="scroll-view-item {{currentTab == idx ?'active':''}}"
style="width:{{navItemWidth}}%" style="width:{{navItemWidth}}%"
data-current="{{idx}}" data-current="{{idx}}"
data-redirectId ="{{navItem.redirectId}}" data-redirectId="{{navItem.redirectId}}"
bindtap="switchNav" bindtap="switchNav"
> >
<view>{{navItem.title}}</view> <view>{{navItem.title}}</view>
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
<view class="scroll-view-right" bindtap="handelToVipCode"> <!-- showQrcode 2 购物车 1 会员码 0 隐藏 -->
<!-- showQrcode 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="" /> <image
<text class="active vip-text" selectable="false" space="false" decode="false"> 会员码</text> class="right-img"
</view> 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>
<!-- 页面内容 --> <!-- 页面内容 -->
<!--<view> <!--<view>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<announcement notice="{{pItem.notice}}" /> <announcement notice="{{pItem.notice}}" />
</view> </view>
<view class="" wx:if="{{pItem.type == 7}}"> <view class="" wx:if="{{pItem.type == 7}}">
<tab-sort categorys="{{pItem.categoryType.categorys}}" /> <tab-sort category-type="{{pItem.categoryType}}" />
</view> </view>
<view class="" wx:if="{{pItem.type == 8}}"> <view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" /> <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