addProduct.wxml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!--pages/form/addProduct/addProduct.wxml-->
  2. <navBar></navBar>
  3. <van-notify id="van-notify" />
  4. <view class="addProduct">
  5. <view class="headTitle">
  6. 完善产品信息
  7. </view>
  8. <scroll-view scroll-y class="form">
  9. <wux-form
  10. id="wux-form"
  11. layout="none"
  12. validateMessages="{{ validateMessages }}"
  13. bind:change="onValuesChange"
  14. >
  15. <wux-field name="name" initialValue="{{''}}" rules="{{ [{ required: true,message:'产品名称不能为空' } ] }}">
  16. <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
  17. <view slot="label" >
  18. 产品名称
  19. </view>
  20. <wux-input placeholder="请输入产品名称" />
  21. </my-form-item>
  22. </wux-field>
  23. <block>
  24. <wux-field name="concernType" initialValue="{{''}}">
  25. <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
  26. <view slot="label" >
  27. 关注类型
  28. </view>
  29. <van-radio-group value="{{ form.concernType }}" bind:change="changeConcernType" >
  30. <van-radio wx:for="{{concernType}}" wx:key="index" name="{{item.type}}">{{item.label}}</van-radio>
  31. </van-radio-group>
  32. </my-form-item>
  33. </wux-field>
  34. </block>
  35. <wux-field name="searchCondition" initialValue="{{form.searchCondition}}">
  36. <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
  37. <view slot="label" >
  38. 关键词
  39. </view>
  40. <wux-input placeholder="请输入关键词人" />
  41. </my-form-item>
  42. </wux-field>
  43. <wux-field name="competitorCom" initialValue="{{''}}">
  44. <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
  45. <view slot="label" >
  46. 竞品公司
  47. </view>
  48. <wux-input placeholder="请输入竞品公司" />
  49. </my-form-item>
  50. </wux-field>
  51. <wux-field name="competitorLink" initialValue="{{''}}" >
  52. <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
  53. <view slot="label" >
  54. 竞品链接
  55. </view>
  56. <wux-input placeholder="请输入竞品链接" />
  57. </my-form-item>
  58. </wux-field>
  59. </wux-form>
  60. <view class="label">
  61. 附图
  62. </view>
  63. <view class="upload">
  64. <!-- <text class="iconfont myIconshangchuan"></text> -->
  65. <wux-upload
  66. listType="picture-card"
  67. fileList="{{ fileList }}"
  68. controlled
  69. uploaded="false"
  70. bind:before="beforeUpload"
  71. bind:change="onChange"
  72. bind:success="onSuccess"
  73. bind:fail="onFail"
  74. bind:complete="onComplete"
  75. bind:preview="onPreview"
  76. bind:remove="onRemove"
  77. >
  78. <text>+</text>
  79. </wux-upload>
  80. </view>
  81. <view class="label">
  82. 描述
  83. </view>
  84. <view class="value">
  85. <wux-textarea value="{{ form.description }}" bind:change="changRemark"/>
  86. </view>
  87. <view class="foot" bind:tap="submit">
  88. 提交
  89. </view>
  90. </scroll-view>
  91. </view>