index.wxml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!--index.wxml-->
  2. <scroll-view class="scrollarea" scroll-y="{{popupShow ? false : true}}" type="list">
  3. <view class="container">
  4. <!-- <view class="topShadow"></view> -->
  5. <view class="slider-count">{{current + 1}}/{{imgList.length}}</view>
  6. <swiper indicator-dots="{{false}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="changeSwiper">
  7. <swiper-item wx:for="{{imgList}}" wx:key="index">
  8. <view class="swiper-item">
  9. <image bind:tap="onPreivewBannerImg" data-src="{{ item }}" src="{{ item }}"></image>
  10. </view>
  11. </swiper-item>
  12. </swiper>
  13. <view class="shop-section">
  14. <view class="showPrice">
  15. <view class="left">
  16. <view class="currentPrice">
  17. <text class="stuff">¥</text>
  18. <text class="priceZ">{{ selected.integerPart || 0 }}</text>
  19. <text class="priceF">.{{ selected.decimalPart || '00' }}</text>
  20. </view>
  21. <view class="originPrice" wx:if="{{ selected.originalPrice > selected.salePrice }}">¥{{ selected.originalPrice || '0.00' }}</view>
  22. </view>
  23. <view class="right">
  24. 已售1w+
  25. </view>
  26. </view>
  27. <view class="shopName">
  28. {{ selected.name }}
  29. </view>
  30. <view class="goodsInfo">
  31. <text class="desc">已选:</text>
  32. <view class="goodsList">
  33. <view wx:for="{{ list }}" wx:key="index" class="goodsItem {{ item.id == selected.id ? 'selected' : '' }} {{ item.stockNum <= 0 ? 'nosale' : '' }}" bind:tap="onSelectGoods" data-id="{{ item.id }}">{{ item.typeName }}<image wx:if="{{ item.stockNum <= 0 }}" src="./images/nosale.png"></image></view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="goodsSection">
  38. <view class="goodsIntro">
  39. <view class="title">图文详情</view>
  40. <view class="images">
  41. <block wx:for="{{goodsImgList}}" wx:key="index">
  42. <image mode="widthFix" bind:tap="onPreivewGoodsImg" data-src="{{item}}" src="{{item}}"></image>
  43. </block>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="bottom-section">
  48. <view class="orders" bind:tap="onService">
  49. <image src="./images/icon-service.png" />
  50. <text>客服</text>
  51. </view>
  52. <view class="orders" bind:tap="onOrder">
  53. <image src="./images/icon-order.png" />
  54. <text>订单</text>
  55. </view>
  56. <view class="btnSection">
  57. <button bind:tap="onBuyShop" type="primary" disabled="{{ isOverSaled }}">立即购买</button>
  58. </view>
  59. </view>
  60. <view class="popup-section" wx:if="{{popupShow}}">
  61. <view class="popup-mask" bind:tap="onClose"></view>
  62. <view class="popup-container">
  63. <image bind:tap="onClose" src="./images/icon-close.png" class="iconClose"></image>
  64. <view class="product-section">
  65. <view class="product-img">
  66. <image bind:tap="onPreivewGoods" data-src="{{ selected.pic }}" src="{{ selected.pic }}"></image>
  67. </view>
  68. <view class="product-left">
  69. <view class="currentPrice">
  70. <text class="stuff">¥</text>
  71. <text class="priceZ">{{ selected.integerPart }}</text>
  72. <text class="priceF">.{{ selected.decimalPart }}</text>
  73. </view>
  74. <view class="originPrice">¥{{ selected.originalPrice }}</view>
  75. </view>
  76. </view>
  77. <view class="goodsInfo">
  78. <view class="desc">规格</view>
  79. <view class="goodsList">
  80. <view wx:for="{{ list }}" wx:key="index" class="goodsItem {{ item.id == selected.id ? 'selected' : '' }} {{ item.stockNum <= 0 ? 'nosale' : '' }}" bind:tap="onSelectGoods" data-id="{{ item.id }}">{{ item.typeName }}<image wx:if="{{ item.stockNum <= 0 }}" src="./images/nosale.png"></image></view>
  81. </view>
  82. </view>
  83. <button type="primary" bind:tap="onSubmit">立即购买</button>
  84. </view>
  85. </view>
  86. </view>
  87. <service popShow="{{ showService }}" bind:changePop="changePop"></service>
  88. </scroll-view>