city_card/packagecard/moments/publish/momentpublishline.wxml
2023-07-15 14:25:28 +08:00

226 lines
16 KiB
Plaintext
Executable File

<view class="flex flex-direction radius align-center" style="padding-bottom:100rpx;width:100%;" wx:if="{{fieldList.length>0}}">
<view class="flex flex-direction self-center" style="padding:15rpx;width: 100%;">
<view class="item-bottom-margin" wx:for="{{fieldList}}" wx:key="index">
<view style="width: 100%;" wx:if="{{item.dataType=='1'}}">
<view class="cu-form-group item-padding">
<view class="title">{{item.comment}}</view>
<input bindinput="inputText" data-index="{{index}}" data-key="{{item.name}}" data-value="{{item.value}}" maxlength="{{item.maxLength}}" placeholder="请输入内容"></input>
</view>
</view>
<view wx:if="{{item.dataType=='7'}}">
<view class="cu-bar bg-white">
<view class="action">
<text>{{item.comment}}</text>
</view>
</view>
<view class="bg-white">
<view class="cu-form-group item-padding">
<textarea bindinput="inputText" class="border-line" data-index="{{index}}" data-key="{{item.name}}" data-value="{{item.value}}" maxlength="{{item.maxLength}}" placeholder="请输入内容"></textarea>
</view>
</view>
</view>
<view wx:elif="{{item.dataType=='2'}}">
<view class="cu-bar bg-white">
<view class="action">
<text>{{item.comment}}{{item.valueList.length}}/{{item.maxCount}}</text>
</view>
</view>
<view class="cu-bar bg-white">
<view catchtap="chooseDisplayType" class="cu-capsule radius" data-id="{{it.id}}" style="margin-left: 15rpx;" wx:for="{{displayType}}" wx:for-index="idx" wx:for-item="it" wx:key="idx">
<view class="cu-tag {{selDisplayType==it.id?'bg-yellowlight':'bg-grey'}}">
<text class="{{selDisplayType==it.id?'cuIcon-radiobox':'cuIcon-round'}}"></text>
</view>
<view class="cu-tag {{selDisplayType==it.id?'line-yellowlight2':'line-black'}}"> {{it.name}} </view>
</view>
</view>
<view class="cu-form-group item-padding">
<view class="grid col-3 grid-square flex-sub">
<view bindtap="viewImg" class="bg-img" data-url="{{photo.path}}" wx:for="{{item.valueList}}" wx:for-index="idx" wx:for-item="photo" wx:key="idx">
<image mode="aspectFill" src="{{photo.path}}"></image>
<view catchtap="delImg" class="cu-tag bg-red" data-index="{{idx}}" data-itemIndex="{{index}}">
<text class="cuIcon-close"></text>
</view>
</view>
<view bindtap="choosePhoto" class="solids" data-index="{{index}}" data-item="{{item}}" wx:if="{{item.valueList.length<item.maxCount}}">
<text class="cuIcon-cameraadd"></text>
</view>
</view>
</view>
</view>
<view wx:elif="{{item.dataType=='3'}}">
<view class="cu-bar bg-white">
<view class="action">
<text>{{item.comment}}</text>
</view>
<view class="action"> {{item.valueList.length}}/{{item.maxCount}} </view>
</view>
<view class="flex flex-direction align-center bg-white radius">
<view style="width:100%;" wx:if="{{item.valueList.length>0}}">
<view class="flex align-center shadow-box margin-top-xs item-padding" style="width:100%;" wx:for="{{item.valueList}}" wx:for-index="idx" wx:for-item="audio" wx:key="idx">
<image mode="scaleToFill" src="/images/ic_user_default.png" 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 activeColor="#1296db" backgroundColor="#cacaca" bindchange="slider4change" blockColor="#1296db" blockSize="14" class="flex-sub" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" max="{{audio.duration}}" min="{{0}}" value="{{audio.curDuration}}"></slider>
<text>{{audio.totalDurationStr}}</text>
</view>
<view class="flex justify-between" style="width:80%;">
<image bindtap="rewind" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="/images/ic_audio_rewind.png"></image>
<image bindtap="play" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="{{audio.isPlay?'/images/ic_audio_playing.png':'/images/ic_audio_play.png'}}"></image>
<image bindtap="speed" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="/images/ic_audio_speed.png"></image>
</view>
</view>
<view catchtap="delAudio" class="cu-tag bg-gray margin-left-xs" data-idx="{{idx}}" data-index="{{index}}" style="border-radius:50%;">
<text class="cuIcon-close"></text>
</view>
</view>
</view>
<view class="flex align-center flex-direction" wx:else>
<image mode="scaleToFill" src="/images/ic_empty_voice.png" style="width:200rpx;height:200rpx;"></image>
<text class="text-gray">
语音,可以给名片访客留下更深的印象
</text>
</view>
<view bindtap="showDialog" class="cu-btn bg-blue radius margin-top-sm" data-index="{{index}}" data-item="{{item}}" style="width:60%;margin-bottom: 15rpx;" wx:if="{{item.valueList.length<item.maxCount}}">点击添加 </view>
</view>
</view>
<view wx:elif="{{item.dataType=='4'}}">
<view class="cu-bar bg-white">
<view class="action"> {{item.comment}} </view>
<view class="action"> {{item.valueList.length}}/{{item.maxCount}} </view>
</view>
<view class="cu-form-group item-padding">
<view class="grid col-3 grid-square flex-sub">
<view bindtap="viewVideo" class="bg-img" data-url="{{video.path}}" wx:for="{{item.valueList}}" wx:for-index="idx" wx:for-item="video" wx:key="idx">
<image mode="aspectFill" src="{{video.imgPath}}"></image>
<view catchtap="delVideo" class="cu-tag bg-red" data-idx="{{idx}}" data-index="{{index}}">
<text class="cuIcon-close"></text>
</view>
</view>
<view bindtap="chooseVideo" class="solids" data-index="{{index}}" data-item="{{item}}" wx:if="{{item.valueList.length<item.maxCount}}">
<text class="cuIcon-cameraadd"></text>
</view>
</view>
</view>
</view>
<view wx:if="{{item.dataType=='5'}}">
<view class="cu-form-group item-padding">
<view class="title margin-left-sm">{{item.comment}}</view>
<input bindinput="inputText" data-index="{{index}}" data-key="{{item.name}}" data-value="{{item.value}}" maxlength="{{item.maxLength}}" placeholder="请输入内容"></input>
</view>
</view>
<view wx:elif="{{item.dataType=='6'}}">
<view class="cu-bar bg-white">
<view class="action">
<text>{{item.comment}}</text>
</view>
<view class="action"></view>
</view>
<view class="flex flex-direction align-center bg-white radius item-padding">
<view style="width: 100%;" wx:if="{{item.valueList.length>0}}">
<view class="margin-top-xs" style="width:100%;display: flex;flex-direction: column;" wx:for="{{item.valueList}}" wx:for-index="idx" wx:for-item="m" wx:key="idx">
<view class="flex justify-between">
<view> {{m.name}}-{{m.address}} </view>
<view catchtap="delMap" class="cu-tag bg-gray margin-left-xs" data-idx="{{idx}}" data-index="{{index}}">
<text class="cuIcon-close"></text>
</view>
</view>
<view style="border-radius:10rpx;overflow:hidden;margin-top:10rpx;width: 100%;">
<map latitude="{{m.latitude}}" longitude="{{m.longitude}}" markers="{{[ {latitude:m.latitude,longitude:m.longitude} ]}}" scale="12" style="width:100%;height:300rpx;"></map>
</view>
</view>
</view>
<view class="flex align-center bg-white flex-direction" wx:else>
<image mode="scaleToFill" src="/images/ic_empty_map.png" style="width:200rpx;height:200rpx;"></image>
<text class="text-gray">
在地图上选取一个地点
</text>
</view>
<view bindtap="chooseLocation" class="cu-btn bg-blue radius margin-top-sm" data-index="{{index}}" style="width:60%;" wx:if="{{item.valueList.length<item.maxCount}}">点击添加</view>
</view>
</view>
<view wx:elif="{{item.dataType=='8'}}">
<view class="cu-form-group item-padding">
<view class="title margin-left-sm">{{item.comment}}</view>
<picker bindchange="pickerChange" data-index="{{index}}" range="{{item.dictionariesList}}" rangeKey="dataName" value="{{item.index}}">
<view class="picker"> {{item.dictionariesList[item.index].dataName}} </view>
</picker>
</view>
</view>
<view wx:elif="{{item.dataType=='9'}}">
<view catchtap="showMutliSel" class="cu-form-group item-padding" data-index="{{index}}" data-item="{{item}}">
<view class="title margin-left-sm">{{item.comment}}</view>
<view class="flex align-center" style="flex-direction:row;">
<view class="margin-right-sm"> {{item.selValue}} </view>
<text class="cuIcon-right"></text>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="margin-top:200rpx;width:100%;" wx:else>
<van-empty description="暂无数据"></van-empty>
</view>
<view class="foot bg-white" style="padding: 15rpx;" wx:if="{{fieldList.length>0}}">
<button bindtap="doPublish" class="cu-btn bg-blue" style="width:100%">保存</button>
</view>
<van-action-sheet bind:close="onHide" data-type="1" show="{{isShowAudio}}" style="padding-bottom:180rpx;" title="语音介绍添加">
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:80rpx;" wx:if="{{audioFile==null}}">
<image mode="heightFix" src="/images/ic_voice_record.gif" style="width:300rpx;height:300rpx;" wx:if="{{isStartRecord}}"></image>
<image mode="heightFix" src="/images/ic_record_start.png" style="width:300rpx;height:300rpx;" wx:else></image>
<text>00:{{speck_time>9?speck_time:'0'+speck_time}}</text>
<view bindlongpress="startRecord" bindtouchend="doEndRecord" class="cu-btn bg-blue radius margin-top-sm" style="width:70%;">长按录音</view>
</view>
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:80rpx;" wx:else>
<image mode="heightFix" src="{{audioFile.isPlay?'/images/ic_voice_record.gif':'/images/ic_record_start.png'}}" style="width:300rpx;height:300rpx;"></image>
<text>{{audioFile.isPlay?'播放中:'+speck_time+'秒':'时长:'+audioFile.duration+'秒'}}</text>
<view class="flex" style="width:80%;">
<view bindtap="playAudio" class="cu-btn bg-blue radius margin-top-sm flex-sub">点击播放</view>
<view bindtap="delAudio" class="cu-btn bg-red radius margin-top-sm flex-sub margin-left">删除</view>
</view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onHide" data-type="2" show="{{isShowDesc}}" style="padding-bottom:20rpx;" title="{{'文本内容'+'('+textareaList.length+'/'+currentItem.count+')'}}">
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:30rpx;">
<textarea bindinput="textInput" id="tempDesc" placeholder="请输入文本内容" style="width:90%;" value="{{tempDesc}}"></textarea>
<view bindtap="addDesc" class="cu-btn bg-blue radius margin-top-sm">点击添加</view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onHide" data-type="3" show="{{isShowText}}" style="padding-bottom:180rpx;" title="{{'文本内容'+'('+textList.length+'/'+currentItem.count+')'}}">
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:30rpx;">
<input bindinput="textInput" id="tempText" placeholder="请输入文本内容" style="width:90%;" value="{{tempText}}"></input>
<view bindtap="addStr" class="cu-btn bg-blue radius margin-top-sm">点击添加</view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onHide" data-type="4" show="{{isShowPhoto}}" style="padding-bottom:20rpx;" title="图片选取">
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:30rpx;">
<view catchtap="choosePhoto" class="text-lg line" data-type="album"> 相册 </view>
<view catchtap="choosePhoto" class="text-lg noline" data-type="camera"> 相机 </view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onHide" data-type="6" show="{{isShowVideo}}" style="padding-bottom:20rpx;" title="视频选取">
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:30rpx;">
<view catchtap="chooseVideo" class="text-lg line" data-type="album"> 相册 </view>
<view catchtap="chooseVideo" class="text-lg noline" data-type="camera"> 相机 </view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onHide" data-type="5" show="{{isShowLink}}" style="padding-bottom:180rpx;" title="{{'链接内容'+'('+linkList.length+'/'+currentItem.count+')'}}">
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:30rpx;">
<input bindinput="textInput" id="linkStr" placeholder="请输入链接地址(https://www.baidu.com)" style="width:90%;" value="{{linkStr}}"></input>
<view bindtap="addLink" class="cu-btn bg-blue radius margin-top-sm">点击添加</view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onHide" data-type="8" show="{{isShowTags}}" style="padding-bottom:180rpx;" title="请选择">
<view class="flex flex-direction align-center" style="margin-top:10rpx;padding-bottom:30rpx;">
<scroll-view scrollY style="height:320rpx;max-height:320rpx;padding:0rpx 20rpx;">
<view class="cu-capsule radius" wx:for="{{fieldList[currentIndex].dictionariesList}}" wx:key="index">
<view catchtap="chooseTags" class="cu-tag {{item.isSel?'bg-blue':'bg-gray'}}" data-idx="{{index}}"> {{item.dataName}} </view>
</view>
</scroll-view>
</view>
</van-action-sheet>
<van-action-sheet bind:close="onHide" show="{{isShowType}}" style="padding-bottom:180rpx;">
<van-picker showToolbar bind:cancel="cancelSel" bind:confirm="confirmSel" columns="{{displayType}}" title="展示方式" valueKey="name"></van-picker>
</van-action-sheet>