<!--pages/form/addProduct/addProduct.wxml-->
<navBar></navBar>
<van-notify id="van-notify" />
<view class="addProduct">
  <view class="headTitle">
    完善产品信息
  </view>
  <scroll-view scroll-y class="form">
    <wux-form
      id="wux-form"
      layout="none"
      validateMessages="{{ validateMessages }}"
      bind:change="onValuesChange"
    >
      <wux-field name="name" initialValue="{{''}}" rules="{{ [{ required: true,message:'产品名称不能为空' } ] }}">
        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
          <view slot="label" >
            产品名称
          </view>
          <wux-input  placeholder="请输入产品名称" />
        </my-form-item>
      </wux-field>
      <block>
        <wux-field name="concernType" initialValue="{{''}}">
          <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
            <view slot="label" >
              关注类型
            </view>
            <van-radio-group value="{{ form.concernType }}" bind:change="changeConcernType" >
                <van-radio wx:for="{{concernType}}" wx:key="index" name="{{item.type}}">{{item.label}}</van-radio>
            </van-radio-group>
          </my-form-item>
        </wux-field>
      </block>
      
      <wux-field name="searchCondition" initialValue="{{form.searchCondition}}">
        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
          <view slot="label" >
            关键词
          </view>
          <wux-input placeholder="请输入关键词人" />
        </my-form-item>
      </wux-field>
      <wux-field name="competitorCom" initialValue="{{''}}">
        <my-form-item labelWidth="{{labelWidth}}"  custom-class="form_label">
          <view slot="label" >
            竞品公司
          </view>
          <wux-input  placeholder="请输入竞品公司" />
        </my-form-item>
      </wux-field>
      <wux-field name="competitorLink" initialValue="{{''}}" >
        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
          <view slot="label" >
            竞品链接
          </view>
          <wux-input placeholder="请输入竞品链接" />
        </my-form-item>
      </wux-field>
    </wux-form>
    <view class="label">
      附图
    </view>
    <view class="upload">
      <!-- <text class="iconfont myIconshangchuan"></text> -->
      <wux-upload
      listType="picture-card"
      fileList="{{ fileList }}"
      controlled
      uploaded="false"
      bind:before="beforeUpload"
      bind:change="onChange"
      bind:success="onSuccess"
      bind:fail="onFail"
      bind:complete="onComplete"
      bind:preview="onPreview"
      bind:remove="onRemove"
    >
      <text>+</text>
    </wux-upload>
    </view>
    <view class="label">
      描述
    </view>
    <view class="value">
      <wux-textarea value="{{ form.description }}" bind:change="changRemark"/>
    </view>
    <view class="foot" bind:tap="submit">
      提交
    </view>
  </scroll-view>
</view>