index.wxml 3.44 KB
<wxs module="strSubstr">
    var getString = function(str,len=8){
        if(!str)return ''
        if(str.length<len+1)return str
        var newStr = str.substring(0,len)+'...'
        return newStr
    }
    module.exports.getString = getString
</wxs>
<view class="container">
    <view class="open-box" style="background: url({{IMGURL}}store-assistant/index_active_bg_2.png);background-size: 100% 100%;">
        <view class="pannel">
            <view class="header">
                <view class="left_wrap">
                    <glsx-image class="cover" webp src="store-assistant/pravite_logo_icon.png"></glsx-image>
                </view>
                <view class="right_wrap">
                    <view class="title">{{localData.activityName}}</view>
                    <view  class="tip flex_cc {{localData.open?'tip-open':''}}">{{localData.open?'服务已开通':'服务未开通'}}</view>
                </view>
            </view>
            <view class="board">
                <block wx:for="{{localData.dataBoard}}" wx:key="index">
                    <view style="height:{{item.height}}rpx" class="board-box bgImage{{item.id}}">
                        <block wx:for="{{item.content}}" wx:for-item="content" wx:key="i" wx:for-index="i">
                            <view class="num_wrap flex_ccc">
                                <view class="title">{{content.title}}</view>
                                <view class="num">{{query.open?content.openNum:content.num}}</view>
                            </view>
                        </block>
                        <view bind:tap="toTips" data-content="{{item.content}}" data-id="{{item.id}}" wx:if="{{item.id>2}}" class="board-box-btn flex_cc">
                            查看详情
                            <glsx-image class="icon" webp src="store-assistant/blue-icon.png"></glsx-image>
                        </view>
                    </view>
                </block>
            </view>
            <view class="calendar">
                <view class="calendar-pannel">
                    <view class="calendar-pannel-title">任务列表 <text class="greycolor">· {{localData.missionList.length}}</text></view>
                    <block wx:for="{{localData.missionList}}" wx:key="index">
                        <view bind:tap="toPage" data-misson="{{item.missonType}}" data-index="{{index}}" class="calendar-pannel-cell {{index<1?'bottom_line':''}}">
                            <glsx-image class="logo" webp src="store-assistant/{{item.icon}}.png"></glsx-image>
                            <view class="content">
                                <view class="title_line">
                                    <text>{{strSubstr.getString(item.title,12)}}</text>
                                    <glsx-image class="tip_icon" webp src="store-assistant/integral_icon.png"></glsx-image>
                                    <view class="price_text">+{{item.count}}积分</view>
                                </view>
                                <view class="tip_text">{{item.tip}}</view>
                            </view>
                            <glsx-image class="arrow_icon" webp src="store-assistant/right_arrow_grey_icon.png"></glsx-image>
                            <glsx-image wx:if="{{item.status==2}}" class="complete_icon" webp src="store-assistant/complete.png"></glsx-image>
                        </view>
                    </block>
                </view>
            </view>
        </view>
    </view>
</view>