Commit 41ecd597 by 赵雅纹

Merge branch 'dev_7.1.0' into feature-zyw-sc

parents 90ec1b8d 223d18fd
...@@ -9,9 +9,9 @@ Component({ ...@@ -9,9 +9,9 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
categorys:{ categoryType:{
type: Array, type: Object,
value: [] value: null
} }
}, },
attached() { attached() {
...@@ -21,7 +21,8 @@ Component({ ...@@ -21,7 +21,8 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
currentTab: 0 // currentTab: 0,
currentTab: 99,
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -30,6 +31,9 @@ Component({ ...@@ -30,6 +31,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,34 +11,35 @@ ...@@ -11,34 +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 隐藏 -->
<image class="right-img" src="./../../assets/imgs/7_1_0/scancode.png" mode="widthFix" lazy-load="false" binderror="" bindload="" /> <view class="scroll-view-right" bindtap="handelToVipCode" wx:if="{{categoryType.showQrcode == 1}}">
<text class="active vip-text" selectable="false" space="false" decode="false">会员码</text> <image
</view> 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/08_22/cart_point.png"
mode="widthFix"
lazy-load="false"
binderror=""
bindload=""
/>
</view>
</view> </view>
<!-- 页面内容 -->
<!--<view>
<swiper
current="{{currentTab}}"
duration="300"
bindchange="switchTab"
>
<swiper-item
wx:for="{{categorys}}"
wx:for-item="navItem"
wx:for-index="idx"
wx:key="idx"
class="tab-content-clock"
>
<view>{{navItem.label}}</view>
</swiper-item>
</swiper>
</view>-->
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
<bottom-tabs tab-bar="{{pItem.tabBar}}" /> <bottom-tabs tab-bar="{{pItem.tabBar}}" />
</view>--> </view>-->
<view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}"> <view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}">
<attention wx:if="{{pItem.type == 9}}" /> <!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else -->
<bottom-tabs wx:else tab-bar="{{pItem.tabBar}}" /> <bottom-tabs tab-bar="{{pItem.tabBar}}" />
</view> </view>
<view class="" wx:if="{{pItem.type == 6}}"> <view class="" wx:if="{{pItem.type == 6}}">
<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