日照项目的居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
5.3 KiB

<view>
<!-- <form class="m-fm">
<view class="fm">
<textarea placeholder="{{placeholderText}}"
style="{{ showedHint ? 'display: none;' : '' }}"
data-fm="fmData"
data-name="topicContent"
placeholder-class="z-placeholder"
bindinput="inputSync"
maxlength="3000"
value="{{ fmData.topicContent }}"></textarea>
<view class="input-hint"><text>{{ fmData.topicContent.length }}</text>/3000</view>
<view class="img-list">
<view class="img-item {{ item.valid ? '' : 'z-unvalid' }}"
wx:key="*this"
wx:for="{{ imgList }}">
<image class="i-del" src="/assets/images/topic/del.png"
data-index="{{ index }}"
bind:tap="delImg"></image>
<image class="img-primary" src="{{ item.tempFilePath }}"
data-index="{{ index }}"
bind:tap="previewImg" mode="aspectFill"></image>
</view>
<view class="img-item img-item-add"
hidden="{{ imgList.length >= maxLimitImg }}"
bind:tap="addImg">
<text class="i-add"></text>
</view>
</view>
</view>
<view class="fm">
<input class="position-input" type="text" placeholder="请输入定位地址"
data-fm="fmData"
data-name="address"
placeholder-class="z-placeholder"
bindinput="inputSync"
value="{{ fmData.address }}" />
<view class="position-hint" bind:tap="toughGetLocation">
<image src="/assets/images/topic/position.png" />
<text>话题定位</text>
</view>
</view>
<button
class="btn {{ submitBtnIsAllowed ? '' : 'z-disabled'}}"
plain="true" bind:tap="submit">发起话题</button>
</form> -->
<form class="m-fm">
<view class="fm fm-flex" style="height: {{viewHeight}}; overflow-y: scroll;">
<textarea class="topic-text" placeholder="{{placeholderText}}"
style="{{ showedHint ? 'display: none;' : '' }}"
data-fm="fmData"
data-name="topicContent"
placeholder-class="z-placeholder"
bindinput="inputSync"
maxlength="3000"
bindkeyboardheightchange="handleKeyBoard"
value="{{ fmData.topicContent }}"></textarea>
<view class="input-hint input-hints"><text>{{ fmData.topicContent.length }}</text>/3000</view>
<view class="topic-audio">
<topic-audio wx:if="{{fmData.voiceList.length > 0}}" url="{{fmData.voiceList[0].url}}" duration="{{fmData.voiceList[0].duration}}" bind:audiodel="handleAudioDel" show-del="{{true}}" />
<!-- <topic-audio url="{{fmData.voiceList[0].url}}" duration="{{fmData.voiceList[0].duration}}" bind:audiodel="handleAudioDel" /> -->
</view>
<view class="img-list">
<view class="img-item {{ item.valid ? '' : 'z-unvalid' }}"
wx:key="*this"
wx:for="{{ imgList }}">
<image class="i-del" src="/assets/images/topic/del_record.png"
data-index="{{ index }}"
bind:tap="delImg"></image>
<image class="img-primary" src="{{ item.tempFilePath }}"
data-index="{{ index }}"
bind:tap="previewImg" mode="aspectFill"></image>
</view>
<block wx:if="{{imgList.length > 0}}">
<view class="img-item img-item-add"
hidden="{{ imgList.length >= maxLimitImg }}"
bind:tap="addImg">
<text class="i-add"></text>
</view>
</block>
</view>
<view class="position-hints" bind:tap="toughGetLocation">
<view class="position-hints-left">
<image src="/assets/images/index/dingwei.png" />
<text wx:if="{{fmData.address}}">{{ fmData.address }}</text>
<text wx:else>话题定位</text>
</view>
<image class="position-hints-arrow" src="/assets/images/index/arrow.png" />
</view>
<view class="topic-operate">
<image wx:if="{{tabRecord}}" src="/assets/images/topic/record3.png" bind:tap="handleTapRecord" />
<image wx:elif="{{fmData.voiceList.length > 0}}" src="/assets/images/topic/record2.png" />
<image wx:else src="/assets/images/topic/record1.png" bind:tap="handleTapRecord" />
<image src="/assets/images/topic/img.png" bind:tap="addImg" />
</view>
</view>
<button
class="btn {{ submitBtnIsAllowed ? '' : 'z-disabled'}}"
plain="true" bind:tap="submit">发起话题</button>
<view class="topic-record {{tabRecord&&'topic-record-on'}}">
<sound-record wx:if="{{tabRecord}}" bind:cancle="handleTapRecord" bind:finish="handleRecordFinish" />
<!-- <sound-record bind:cancle="handleTapRecord" bind:finish="handleRecordFinish" /> -->
</view>
</form>
</view>
<view wx:if="{{dialogVisible}}" class="topic-dialog a-fade-in">
<view class="dialog-mask a-scale-in"></view>
<view class="dialog-wrapper a-scale-in">
<view class="dialog-content"> 提交成功,话题审核通过后会自动发布感谢您的参与。</view>
<view class="dialog-btn" bind:tap="submitComfire">确定</view>
</view>
</view>
<!-- <request-msg behavior-title="为了不错过话题状态变更提醒,请订阅消息推送" behavior-type="发表话题" template-type="站内信提醒" id="requestMsg" /> -->