index.wxml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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}}" domain="{{domain}}" uptokenURL="{{uptokenURL}}"></upload>
  5. <input bindblur="blur" type="text" class="input" data-name="name" value="{{name}}" placeholder="套餐名称"></input>
  6. <view class="top-input">
  7. <view class="top-txt">
  8. <input bindblur="blur" type="text" class="inputs" data-name="price" value="{{price}}" placeholder="售价多少"></input>
  9. <view>元</view>
  10. </view>
  11. <view class="top-txt">
  12. <input bindblur="blur" type="text" class="inputs" data-name="originalPrice" value="{{originalPrice}}" placeholder="商品原价"></input>
  13. <view>元</view>
  14. </view>
  15. </view>
  16. <view class="top-input">
  17. <view class="top-txt">
  18. <input bindblur="blur" type="number" class="inputs" data-name="sales" value="{{sales}}" placeholder="已售数量"></input>
  19. <view>件</view>
  20. </view>
  21. <view class="top-txt">
  22. <input bindblur="blur" type="number" class="inputs" data-name="total" value="{{total}}" placeholder="库存数量"></input>
  23. <view>件</view>
  24. </view>
  25. </view>
  26. <view class="top-input">
  27. <view class="top-txt">
  28. <input bindblur="blur" type="number" class="inputs" data-name="top" value="{{top}}" placeholder="套餐排序"></input>
  29. <view>排序</view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="service">
  34. <view>服务</view>
  35. <block wx:for="{{services}}" wx:key="index">
  36. <view class="services">{{item.value}}</view>
  37. </block>
  38. <view class="service-list"></view>
  39. <view class="service-add" bindtap="showPopup">添加服务</view>
  40. <van-popup show="{{ show }}" closeable close-icon-position="top-right" bind:close="onClose" round custom-style="width:80%;">
  41. <view class="txt">添加服务</view>
  42. <input bindblur="blur" type="text" class="inputs" data-name="service" value="{{service}}" placeholder="请输入内容"></input>
  43. <view class="determine" bindtap="twoonConfirm">确定</view>
  44. </van-popup>
  45. </view>
  46. <view class="goods-titlet" bindtap="goodsimage">
  47. <view class="goods-titles">
  48. <view class="goods-txt">商品详情</view>
  49. <view class="txt-placeholder">
  50. <view class="txt-place">不设置默认为主图</view>
  51. <van-icon name="arrow" />
  52. </view>
  53. </view>
  54. <block wx:if="{{images.length > 0}}">
  55. <view class="images">
  56. <block wx:for="{{images}}" wx:key="index" wx:for-index="i">
  57. <block wx:if="{{i<4}}">
  58. <image class="goods-place" src="{{item}}" />
  59. </block>
  60. </block>
  61. <view class="goods-numbe">已添加: {{images.length}}</view>
  62. </view>
  63. </block>
  64. </view>
  65. <view class="goods-title">
  66. <view class="goods-txt">是否上架商品</view>
  67. <van-switch checked="{{ checked }}" bind:change="onChange" />
  68. </view>
  69. <view class="goods-title">
  70. <view class="goods-txt">是否推荐商品</view>
  71. <van-switch checked="{{ check }}" bind:change="oChange" />
  72. </view>
  73. <view class="buttoms">
  74. <buttom class="buttoms-bottom2" bindtap="submit">发布商品</buttom>
  75. </view>