Commit d35edb65 by 高淑倩

currentTab

parent ca616f12
......@@ -15,13 +15,19 @@ wxService.page({
isExchange: false,
exchangeId: '',
exchangePoint: 0,
currentTab: 'goods'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {},
handelTab(e) {
let curTab = e.currentTarget.dataset.tab
this.setData({
currentTab: curTab
})
},
/**
* 生命周期函数--监听页面显示
*/
......
<!--pages/userCenter.wxml-->
<view class='page-integral-mall' style="padding-bottom: 40rpx">
<!-- title -->
<view class='mall-title'>
<view class='title-num-point'>
<view class='title-img-point'>
......@@ -15,6 +16,13 @@
<view class='title-time-point'>1000积分将于2020-12清零</view>
</view>
<!-- tab -->
<view class='mall-tab'>
<view class="tab-coupon {{currentTab=='coupon' ? 'tab-active':''}}" data-tab="coupon" bindtap="handelTab">优惠券</view>
<view class="tab-coupon {{currentTab=='goods' ? 'tab-active':''}}" data-tab="goods" bindtap="handelTab">限量精品</view>
</view>
<!-- 优惠券列表-->
<view class='coupon-wrap' wx:if="{{integralCouponList.length}}">
<view
class='coupon-list'
......
......@@ -134,3 +134,25 @@ page {
text-align: left;
padding-top: 3rpx;
}
.mall-tab {
height: 80rpx;
display: flex;
align-items: center;
background-color: #fff;
padding: 5rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
}
.tab-coupon, .tab-goods {
flex: 1;
text-align: center;
color: rgba(102, 102, 102, 1);
font-size: 26rpx;
}
.tab-coupon {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color: rgba(5, 195, 91, 1);
}
\ No newline at end of file
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