Commit d9cb5738 by chenwq

众筹显示隐藏,个人中心样式

1 parent fccafa9d
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
</view> </view>
<view class="utilBoxTitle">常用工具</view> <view class="utilBoxTitle">常用工具</view>
<view class="boxItemCon"> <view class="boxItemCon">
<view wx:for="{{boxItemList}}" wx:key="index" class="item" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO"> <view wx:for="{{boxItemList}}" wx:key="index" class="{{item.isHide ? '': 'item'}}" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO">
<block wx:if="{{!item.isHide}}"> <view wx:if="{{!item.isHide}}">
<view class="imgcon"> <view class="imgcon">
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" ></view> <view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" ></view>
<view wx:if="{{item.newTips}}" class="new" hidden="{{!versionData.isNew}}">new</view> <view wx:if="{{item.newTips}}" class="new" hidden="{{!versionData.isNew}}">new</view>
<glsx-image class="img" src="{{IMAGES['icon' + index]}}" /> <glsx-image class="img" src="{{IMAGES['icon' + index]}}" />
</view> </view>
<view class="name">{{item.name}}</view> <view class="name">{{item.name}}</view>
</block> </view>
</view> </view>
<!-- <view class="update" bindtap="jump"> <!-- <view class="update" bindtap="jump">
<view class="icon"> <view class="icon">
......
...@@ -9,8 +9,9 @@ Component({ ...@@ -9,8 +9,9 @@ Component({
type: Object, type: Object,
value: () => { }, value: () => { },
observer(n) { observer(n) {
if(n) { if (n) {
this.dealYearMonth() this.dealYearMonth()
this.dealCrowdData()
} }
} }
}, },
...@@ -60,6 +61,21 @@ Component({ ...@@ -60,6 +61,21 @@ Component({
['date.month']: new Date(yearMonth || '').getMonth() + 1, ['date.month']: new Date(yearMonth || '').getMonth() + 1,
}) })
}, },
dealCrowdData() {
let { searchForm, curInfo } = this.data
// 众筹数据处理
if (searchForm.sceneType == 3) {
curInfo?.merchantDataList.length && curInfo?.merchantDataList.forEach(item => {
let productCodes = item.productCodes || []
item?.curMonthTotalData?.length && item?.curMonthTotalData?.forEach(subItem => {
subItem.isShow = productCodes.includes(subItem.productCode)
})
})
this.setData({
curInfo: curInfo
})
}
},
dealData() { dealData() {
let { searchForm, sceneToInfo } = this.data let { searchForm, sceneToInfo } = this.data
let sceneObj = sceneToInfo.find(item => item.type == (searchForm.sceneType || 1)) let sceneObj = sceneToInfo.find(item => item.type == (searchForm.sceneType || 1))
......
...@@ -44,10 +44,12 @@ ...@@ -44,10 +44,12 @@
<!-- 内容 - 售后众筹 --> <!-- 内容 - 售后众筹 -->
<view wx:if="{{sceneObj.name == 'crowdfund'}}" class="list-content crowdfund"> <view wx:if="{{sceneObj.name == 'crowdfund'}}" class="list-content crowdfund">
<view wx:for="{{item.curMonthTotalData}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="crowdfund-item"> <view wx:for="{{item.curMonthTotalData}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="crowdfund-item">
<view wx:if="{{subItem.isShow}}">
<view class="label">{{subItem.productName}}</view> <view class="label">{{subItem.productName}}</view>
<view class="num">{{subItem.activityTotal || 0}}场/{{subItem.orderTotal || 0}}单/¥{{filter.money_three_for_two_thousands(subItem.bizTotal || 0)}}</view> <view class="num">{{subItem.activityTotal || 0}}场/{{subItem.orderTotal || 0}}单/¥{{filter.money_three_for_two_thousands(subItem.bizTotal || 0)}}</view>
</view> </view>
</view> </view>
</view>
<!-- 内容 - 太阳膜、会员权益/升级 --> <!-- 内容 - 太阳膜、会员权益/升级 -->
<view wx:else class="list-content"> <view wx:else class="list-content">
<view wx:if="{{currentMonth == curInfo.yearMonth}}"> <view wx:if="{{currentMonth == curInfo.yearMonth}}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!