goods.wxml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!--pages/goods/goods.wxml-->
  2. <import src="goods.skeleton.wxml" />
  3. <template is="skeleton" wx:if="{{!goods.prodId}}" />
  4. <view class="goods" wx:if="{{goods.prodId}}">
  5. <swiper indicator-dots="{{true}}">
  6. <swiper-item wx:for="{{goods.picArr}}" wx:key="item">
  7. <image src="{{item}}" mode="aspectFit" />
  8. </swiper-item>
  9. </swiper>
  10. <view class="pannel info">
  11. <view class="price"><text class="rmb2">¥</text>{{goods.price}}</view>
  12. <view class="prodName text3">{{goods.prodName || ''}}</view>
  13. <view class="simpleTitle">{{goods.simpleTitle || ''}}</view>
  14. <view class="desc">
  15. <text>可供{{goods.usableStocksTotal}}{{goods.stockUnit || '件 '}}</text>
  16. <text wx:if="{{goods.limitQty}}">限购数量{{goods.limitQty}}{{goods.stockUnit || '件'}}</text>
  17. </view>
  18. </view>
  19. <view class="pannel qty">
  20. <view class="cell">
  21. <view class="cellText">商品件数</view>
  22. <view class="cellText number" wx:if="{{goods.totalStocks > 0}}">
  23. <view class="iconfont icon-Less1" bind:tap="jianNum"></view>
  24. <input
  25. class="qty-input"
  26. value="{{goods.qtyInput}}"
  27. type="number"
  28. disabled="{{goods.qtyUpdating}}"
  29. confirm-type="done"
  30. bindinput="qtyInput"
  31. bindblur="qtyBlur"
  32. bindconfirm="qtyConfirm"
  33. />
  34. <view class="iconfont icon-More" bind:tap="jiaNum"></view>
  35. </view>
  36. <view class="cellText number" style="color: #b2b2b2;" wx:else="">
  37. 无库存
  38. </view>
  39. </view>
  40. </view>
  41. <view class="pannel goodsInfo">
  42. <view class="titleText">基础信息</view>
  43. <view class="cell">
  44. <view class="cellText">商品编号:{{goods.skuCode || '暂无'}}</view>
  45. <view class="cellText">商品尺寸:{{goods.skuSize || '暂无'}}</view>
  46. </view>
  47. <view class="cell">
  48. <view class="cellText">商品长度:{{goods.skuLength || '暂无'}}</view>
  49. <view class="cellText">商品宽度:{{goods.skuWidth || '暂无'}}</view>
  50. </view>
  51. <view class="cell">
  52. <view class="cellText">商品高度:{{goods.skuHeight || '暂无'}}</view>
  53. <view class="cellText">商品重量:{{goods.weight || '暂无'}}</view>
  54. </view>
  55. </view>
  56. <view class="pannel" wx:if="{{goods.skuDesc}}">
  57. <view class="titleText">商品详情</view>
  58. <rich-text nodes="{{goods.skuDesc}}"></rich-text>
  59. </view>
  60. <view style="height: 128rpx;"></view>
  61. <view class="cartBtn">
  62. <navigator url="/pages/cartList/cartList" hover-class="none" class="cartTip">
  63. <view class="iconfont icon-gouwuche3"></view>
  64. <view class="badge">{{cartNum}}</view>
  65. </navigator>
  66. <view wx:if="{{goods.totalStocks > 0}}" class="addCart" bind:tap="updateSku">加入购物车</view>
  67. <view wx:else class="addCart" style="color: #EEEEEE;background-color: #b2b2b2;">暂无库存</view>
  68. </view>
  69. </view>