upload.wxml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <My_card custom-class='box'>
  2. <view class="label">素材标题</view>
  3. <input class="input base" bindinput='titleInput' value="{{content.title}}" placeholder-style='font-size: 28rpx;' placeholder='请输入标题' />
  4. <view class="label">素材内容</view>
  5. <view class="input base" style="display: flex; justify-content: space-between; color: #999;">
  6. {{content.content==''?'编辑富文本':'浏览富文本'}} <text style="color: #3874F6;" catchtap="openEditRichText">编辑/预览</text>
  7. </view>
  8. <!-- 富文本 -->
  9. <My_richText show="{{editRichText}}" bindcallback='getRichText' />
  10. <view class="label">素材分类</view>
  11. <navigator class="category base" url="#" bindtap="openSelect">
  12. <view>{{activeName||"请选择素材分类"}}</view>
  13. <van-icon name="arrow-down" />
  14. </navigator>
  15. <van-popup show="{{ selectShow }}" position="top" bind:close="onClose">
  16. <!-- 分类选择 -->
  17. <van-tree-select items="{{ items }}" main-active-class='main-active' content-active-class='content-active' main-active-index="{{ mainActiveIndex }}" active-id="{{content.sat_sharematerial_classid}}" bind:click-nav="onClickNav" bind:click-item="onClickItem" />
  18. </van-popup>
  19. <view class="label">素材<text>已上传{{detailsData.attinfos.length}}个</text></view>
  20. <view class="file-list">
  21. <view class="file-box" wx:for="{{detailsData.attinfos}}" data-item="{{item}}" bindtap="openFile">
  22. <view class="delete" catchtap="deleteFile" data-item="{{item}}" data-index="{{index}}">
  23. <van-icon class="icon" name="clear" />
  24. </view>
  25. <image wx:if="{{item.fileType=='image'}}" src="{{item.cover}}" mode="aspectFit" />
  26. <image wx:elif="{{item.fileType=='video'}}" style="width: 100rpx; height: 100rpx;" src="../../static/image/file/video.png" />
  27. </view>
  28. <My_upload accept='media' binduploadCallback='getFile'>
  29. <navigator url="#" class="file-box upload-file">
  30. <view>
  31. <view class="iconfont icon-a-tuiguangsucaishangchuan1"></view>
  32. <view>上传素材</view>
  33. </view>
  34. </navigator>
  35. </My_upload>
  36. </view>
  37. </My_card>
  38. <view class="but-bom">
  39. <van-button type="primary" custom-class='upload' disabled='{{!content.title}}' loading='{{loading}}' loading-text="保存中..." bindtap="submit">提交</van-button>
  40. </view>
  41. <view style="height: 130rpx;" />