<!--subPackage/page/pages/grassCommunity/grassCommunity.wxml-->
<form bindsubmit="formSubmit">
  <view class="grass-community border_box">
    <view class="page-upload-img">
      <view class="flex-wrp">
        <view class="flex-item" wx:for="{{pics}}" wx:key="{{index}}">
          <icon size="16" type="clear" catchtap="deleteImage" data-index="{{index}}" />
          <image class="item-img" src="{{item}}" />
        </view>
        <view class="flex-item" hidden="{{pics.length >= 5}}">
          <view class="upload-wrap" bindtap="uploadImg">
            <view class="upload-text">+图片</view>
          </view>
        </view>
        <view class="flex-item">
          <upload-video bind:_uploadVideo="_uploadVideo" bind:_deleteVideo="_deleteVideo" video="{{video}}"/>
        </view>
      </view>
    </view>

    <view class="upload-tip">*只支持.jpg、png、gif、kpge格式图片/ .mp4、m3u8格式视频，最长60s</view>
    <view class="title-border">
      <input placeholder="添加标题" name="headline" value="{{params.headline}}" />
    </view>
    <view class="title-border-text">
      <!--<input placeholder="这一刻想说什么..." name="article" value="{{params.article}}" />-->
      <textarea bindblur="bindWordLimit" style="width: 100%;" class='textarea-text' name="article" value="{{params.article}}" auto-height placeholder="这一刻想说什么..." />
    </view>
    <view class="title-border" bindtap="selectTab">
      <image class="tab-icon" src="/assets/imgs/7_1_0/tab.png"></image>
      <input class="tab-input" placeholder="选择标签"  value="{{tabName}}" disabled="true" />
    </view>

    <view class="related-goods" bindtap="handleRelatedGoods">
      <image class="relate-img" mode="widthFix" src="/assets/imgs/7_1_0/relation.png"></image>
      <text class="relate-text">关联商品</text> 
      </view>
    <view class="gress-list">
      <grass-item pro-goods="{{proGoods}}"/>
    </view>
  </view>
  <button wx:if="{{!currentHasUserInfo}}" class="post-notes fixed-bottom0"  bindgetuserinfo="_getUserInfo" data-jflag="false" open-type='getUserInfo'>发布笔记</button>
  <button wx:if="{{currentHasUserInfo}}" class="post-notes fixed-bottom0" form-type="submit">发布笔记</button>
</form>
	<!--goHome-->
<go-home />
<select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" />
<select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/>

