<cu-custom isBack="{{true}}">
    <view slot="content">内容列表</view>
</cu-custom>
<view id="it" class="flex flex-direction bg-white margin-sm radius padding-sm">
    <view class="flex justify-between padding-xs align-center">
        <view class="text-black text-df text-bold ">
            发表时间:2021年12月12日 12:12:12
        </view>
        <image src="../../../images/ic_squareness_del.png" mode="scaleToFill" style="width:48rpx;height:48rpx;"
            catchtap="delItem"></image>
    </view>
    <!-- 文本 -->
    <view wx:for="{{trendsList}}" wx:key='index'>
        <view class="box">
            <view class="textFour_box {{item.seeMore?'three':''}}">{{item.text}}</view>
            <view class="text_toggle_box" style="display:flex;align-items:center;" wx:if='{{item.seeMore}}'
                data-index='{{index}}' catchtap='toggleHandler'>
                <text class="text_toggle_text">查看更多</text>
                <image class="toggle-icon" src="/images/ic_arrow_down.png"></image>
            </view>
            <view class="text_toggle_box" style="display:flex;align-items:center;"
                wx:if='{{!item.seeMore && item.auto}}' data-index='{{index}}' catchtap='toggleContent'>
                <text class="text_toggle_text">收起</text>
                <image class="toggle-icon" src="/images/ic_arrow_up.png"></image>
            </view>
        </view>
    </view>
    <!-- 图片 -->
    <view wx:if="{{photoList.length>0}}" class="cu-form-group margin-top-xs">
        <view class="grid col-4 grid-square flex-sub">
            <view class="bg-img" wx:for="{{photoList}}" wx:key="index" wx:for-item="photo" catchtap="viewImg"
                data-url="{{photo.path}}">
                <image src='{{photo.path}}' mode='scaleToFill'></image>
            </view>
        </view>
    </view>
    <!-- 视频 -->
    <view wx:if="{{videoList.length>0}}" class="cu-form-group">
        <view class="grid col-{{count>3 ? count : 1}} grid-square flex-sub">
            <view class="bg-img" wx:for="{{videoList}}" wx:key="index" wx:for-item="video" catchtap="viewVideo"
                style="{{count > 3 ? '' :'height:280rpx;width:100%;padding-bottom:0px;'}}" data-url="{{video.path}}">
                <image style="width:100%;height:100%;" src='{{video.imgPath}}' mode='scaleToFill'></image>
                <view class="{{count > 3 ? 'play-box-arrow-pos':'play-box-arrow-flex'}}">
                    <image src="/images/ic_video_play.png" mode="scaleToFill"
                        style="{{count > 3 ? 'width:32px;height:32px':'height:64px;width:64px;'}}"></image>
                </view>
            </view>
        </view>
    </view>
    <!-- 音频 -->
    <view wx:if="{{audioList.length > 0}}" style="width:100%;">
        <view class="flex align-center shadow-box margin-top-xs" style="width:100%;" wx:for="{{audioList}}"
            wx:key="index" wx:for-item="audio">
            <image src="/images/ic_user_default.png" mode="scaleToFill" style="width:80rpx;height:80rpx;">
            </image>
            <view class="play-box">
                <view class="flex justify-between align-center" style="width:80%;">
                    <text>{{audio.curDurationStr}}</text>
                    <slider class="flex-sub" bindchange="slider4change" min="{{0}}" max="{{audio.duration}}"
                        value="{{audio.curDuration}}" backgroundColor="#cacaca" activeColor="#1296db"
                        data-index="{{index}}" data-item="{{audio}}" block-size="14" block-color="#1296db" />
                    <text>{{audio.totalDurationStr}}</text>
                </view>
                <view class="flex justify-between" style="width:80%;">
                    <image src="/images/ic_audio_rewind.png" mode="scaleToFill" data-index="{{index}}"
                        data-item="{{audio}}" bindtap="rewind"></image>
                    <image src="{{audio.isPlay ? '/images/ic_audio_playing.png':'/images/ic_audio_play.png'}}"
                        mode="scaleToFill" bindtap="play" data-index="{{index}}" data-item="{{audio}}"></image>
                    <image src="/images/ic_audio_speed.png" mode="scaleToFill" bindtap="speed" data-index="{{index}}"
                        data-item="{{audio}}"></image>
                </view>
            </view>
        </view>
    </view>
    <!-- 连接 -->
    <view wx:if="{{linkList.length > 0}}" style="width:100%;">
        <view class="flex align-center margin-top-xs" style="width:100%;" wx:for="{{linkList}}" wx:key="index"
            wx:for-item="link">
            <view class="flex-sub">
                {{link.url}}
            </view>
            <view class="cu-btn bg-blue radius">
                打开
            </view>
        </view>
    </view>

    <!-- 地图定位 -->
    <view wx:for="{{locationList}}" wx:key="index" wx:for-item="m" style="width:100%;" class="margin-top-xs">
        <view class="flex justify-between">
            <view>
                {{m.name}}-{{m.address}}
            </view>
            <view></view>
        </view>
        <view style="border-radius:10rpx;overflow:hidden;margin-top:10rpx;">
            <map style="width:100%;height:300rpx;" longitude="{{m.longitude}}" latitude="{{m.latitude}}" scale="12"
                enable-scroll="{{false}}" enable-zoom="{{false}}" enable-rotate="{{false}}" enable-traffic="{{false}}"
                markers="{{[{latitude:m.latitude,longitude:m.longitude}]}}"></map>
        </view>
    </view>

</view>

<view class="padding-xs foot bg-white" wx:if="{{configMode == '2' || dataList.length <= 0}}">
    <button class="cu-btn bg-blue" style="width:100%" bindtap="doPublish">发布</button>
</view>

<view
    style="width:100%;display:flex;justify-content:center;background-color:#fff;padding:20rpx 0rpx;margin-bottom:100rpx"
    wx:if="{{isLoadMore}}">
    <van-loading type="spinner" size="24px">加载中...</van-loading>
</view>