details.wxml 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. <view class="main">
  2. <view class="goods-box">
  3. <image src="{{goods.image}}" class="goods-thumb"></image>
  4. <navigator open-type="switchTab" url="../cart/cart">
  5. <view class="carts-icon {{scaleCart?'on':''}}">
  6. <image src="/image/cart2.png"></image>
  7. <text class="carts-icon-num" wx:if="{{hasCarts}}">{{totalNum}}</text>
  8. </view>
  9. </navigator>
  10. <view class="goods-operation">
  11. <text class="goods-operation-num">数量 {{num}}</text>
  12. <text class="goods-operation-add" bindtap="addCount">+</text>
  13. <text class="goods-to-cart" bindtap="addToCart">加入购物车</text>
  14. <image src="/image/cart1.png" class="goods-cart-img" bindtap="addToCart"></image>
  15. </view>
  16. <image wx:if="{{show}}" src="/image/cart1.png" class="to-carts-icon"></image>
  17. <view class="goods-stock">{{goods.stock}}</view>
  18. <view class="goods-title">{{goods.title}}</view>
  19. <view class="goods-price">¥ {{goods.price}}</view>
  20. </view>
  21. <view class="goods-tab-box">
  22. <view class="goods-tab-nav {{curIndex === 0 ?'on':''}}" bindtap="bindTap" data-index="0">商品详情</view>
  23. <view class="goods-tab-nav {{curIndex === 1 ?'on':''}}" bindtap="bindTap" data-index="1">产品参数</view>
  24. <view class="goods-tab-nav {{curIndex === 2 ?'on':''}}" bindtap="bindTap" data-index="2">售后保障</view>
  25. <view class="goods-content">
  26. <view wx:if="{{curIndex === 0}}">{{goods.detail}}</view>
  27. <view wx:if="{{curIndex === 1}}">{{goods.parameter}}</view>
  28. <view wx:if="{{curIndex === 2}}">{{goods.service}}</view>
  29. </view>
  30. </view>
  31. </view>