index.wxml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <nav type="back" title="{{id?'编辑菜品':'添加菜品'}}" background-color="#46a9a4"></nav>
  2. <view class="top">
  3. <view class="top-figure">菜品首图</view>
  4. <upload bind:onChangeFile="changeFile" fileList="{{imageList}}" accept="image" maxCount="1" uploadURL="{{uploadURL}}"
  5. domain="{{domain}}" uptokenURL="{{uptokenURL}}"></upload>
  6. <input bindblur="blur" type="text" class="input" data-name="name" value="{{name}}" placeholder="菜品名称"></input>
  7. <view class="top-input">
  8. <view class="top-txt">
  9. <input bindblur="blur" type="text" class="inputs" data-name="price" value="{{price}}"
  10. placeholder="售价多少"></input>
  11. <view>元</view>
  12. </view>
  13. <view bindtap="category" class="top-txt">类型:{{columns[idx].name}}</view>
  14. </view>
  15. <view class="top-input">
  16. <view class="top-txt">
  17. <input bindblur="blur" type="text" class="inputs" data-name="unit" value="{{unit}}"
  18. placeholder="计量单位"></input>
  19. <view>单位</view>
  20. </view>
  21. </view>
  22. <van-popup show="{{ show }}" closeable close-icon-position="top-right" round bind:close="onCancela">
  23. <view style="text-align:center ;">
  24. <view class="txt">选择类型</view>
  25. <view class='box'>
  26. <view wx:for="{{columns}}" wx:key="list">
  27. <view class="{{index==idx?'_left':'left'}}" bindtap='goIndex' data-index="{{index}}"
  28. data-item="{{item}}">{{item.name}}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </van-popup>
  34. </view>
  35. <view class="goods-title">
  36. <view class="goods-txt">是否上架商品</view>
  37. <van-switch checked="{{ checked }}" bind:change="onChange" />
  38. </view>
  39. <view class="buttoms">
  40. <buttom class="buttoms-bottom2" bindtap="submit">提交</buttom>
  41. </view>