Sanakey
2020-08-13 d98d05000c3d14e1f12a7754ebeea11ec1fa0f0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!--pages/posterList/posterList.wxml-->
<!-- <text>pages/posterList/posterList.wxml</text> -->
<import src="../template/no-more/no-more-template" />
<view class="container">
    <scroll-view class="nav-left" scroll-y="true" style="height:{{windowHeight}}px;">
        <van-sidebar active-key="{{ activeKey }}">
            <!-- bind:change="typeOnChange" -->
            <block wx:for="{{posterTypeList}}" wx:key="key" wx:for-item="item">
                <van-sidebar-item bind:click="typeOnChange" data-index="{{item.PosterTypeId}}">
                    <view slot="title">
                        <!-- <text class="iconfont icon-zhifu"></text> -->
                        <view class="item-title" title="{{item.PosterTypeName}}">{{item.PosterTypeName}}</view>
                    </view>
                </van-sidebar-item>
            </block>
            <van-sidebar-item wx:if="{{isShowMyPoster}}" bind:click="getMyPoster">
                <view slot="title">
                    <view class="item-title" title="我的海报">我的海报</view>
                </view>
            </van-sidebar-item>
            <!-- <text class="iconfont icon-zhifu"></text> -->
            <!-- <van-sidebar-item custom-class="item-title" title="标签名 3" /> -->
        </van-sidebar>
 
    </scroll-view>
 
 
    <scroll-view scroll-top="{{scrollTop}}" class="nav-right" scroll-y="true" style="height:{{windowHeight}}px;">
 
        <!-- <van-button bind:click="getPosterByTag" color="#7232dd">全部</van-button>
    <block wx:for="{{TagList}}" wx:key="key">
      <van-button bind:click="getPosterByTag" color="#7232dd">{{item}}</van-button>
    </block> -->
        <view class="poster-list-container" hidden="{{isHiddenTypePoster}}">
            <block wx:for="{{allTagList}}" wx:key="key">
                <!-- swipe-threshold="{{6}}" -->
                <van-tabs tab-class="tab-class" ellipsis="{{false}}" wx:if="{{activeKey == index}}" bind:change="posterTagChange">
                    <block wx:for="{{allTagList[activeKey]}}" wx:key="key" wx:index="i">
                        <!-- <van-button bind:click="getPosterByTag" color="#7232dd">{{item}}</van-button> bind:change="getPosterByTag" active="{{ activeTabIndex }}" -->
                        <van-tab data-index="{{i}}" title="{{item}}">
                        </van-tab>
                    </block>
                </van-tabs>
            </block>
 
 
            <van-grid column-num="2" border="{{ false }}" gutter="{{ 10 }}">
                <view>
                    <block wx:if="{{selectedTag==item.PosterTypeTag}}" wx:for="{{posterList}}" wx:key="key" wx:for-item="item">
                        <van-grid-item use-slot content-class="poster-container" wx:for="{{item.Images}}" wx:key="key" wx:for-item="childItem">
                            <image bind:tap="goCreatePoster" data-src="{{childItem.url}}" lazy-load="{{true}}" mode="aspectFill" style="width: 100%;" src="{{childItem.url}}" />
                        </van-grid-item>
                    </block>
                </view>
 
                <view wx:if="{{selectedTag=='全部'}}">
                    <!-- wx:if="{{selectedTag=='全部'}}" -->
                    <block wx:for="{{posterList}}" wx:key="key" wx:for-item="item">
                        <van-grid-item use-slot content-class="poster-container" wx:for="{{item.Images}}" wx:key="key" wx:for-item="childItem">
                            <image bind:tap="goCreatePoster" data-src="{{childItem.url}}" lazy-load="{{true}}" mode="aspectFill" src="{{childItem.url}}" />
                        </van-grid-item>
                    </block>
                </view>
 
            </van-grid>
        </view>
 
        <view class="poster-list-container" hidden="{{!isHiddenTypePoster}}">
            <view class="my-title">已生成的海报</view>
            <van-grid column-num="2" border="{{ false }}" gutter="{{ 10 }}">
                <view>
                    <block wx:for="{{myPosterList}}" wx:key="key" wx:for-item="item">
                        <van-grid-item bind:click="viewMyPoster" data-src="{{item.Photo}}" use-slot content-class="poster-container">
                            <text catchtap="deletePoster" data-userid="{{item.UserId}}" data-rowid="{{item.RowId}}" class="delete-icon iconfont icon-cuowuguanbiquxiao-xianxingyuankuang"></text>
                            <image lazy-load="{{true}}" mode="aspectFill"  src="{{item.Photo}}" />
                            <view class="no-wrap">创建于 {{item.CreateTime}}</view>
                        </van-grid-item>
                    </block>
                </view>
            </van-grid>
        </view>
 
        <template is="noMoreTemplate" />
        <!-- <van-grid column-num="2" border="{{ false }}" gutter="{{ 10 }}">
            <block wx:for="{{posterList}}" wx:key="key" wx:for-item="item">
                <van-grid-item use-slot content-class="poster-container" wx:for="{{item.Images}}" wx:key="key" wx:for-item="childItem">
                    <image mode="aspectFill" style="width: 100%;" src="{{childItem.url}}" />
                </van-grid-item>
            </block>
        </van-grid> -->
    </scroll-view>
 
 
</view>