productInfo.wxml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <gracePage headerBG="#FFFFFF" footerBg="#FFFFFF" customHeader="{{false}}">
  2. <view slot="gBody" style="padding-bottom:120rpx;">
  3. <!-- 轮播图 -->
  4. <swiper class="grace-swiper" autoplay="true" indicator-dots
  5. indicator-color="rgba(255, 255, 255, 1)" indicator-active-color="#3688FF"
  6. style="height:399rpx" interval="5000">
  7. <swiper-item class="grace-swiper-item" wx:for="{{swiperItems}}" wx:key="index">
  8. <image class="grace-swiper-image" src="{{item}}" mode="widthFix"></image>
  9. </swiper-item>
  10. </swiper>
  11. <!-- 商品标题 分享按钮 -->
  12. <view class="grace-product-padding grace-space-between grace-flex-vcenter">
  13. <text class="grace-product-title grace-bold">{{product.name}}</text>
  14. <view class="grace-product-share" bindtap="share"><text class="grace-icons icon-share3"></text></view>
  15. </view>
  16. <view class="grace-common-line"></view>
  17. <!-- 价格 -->
  18. <view class="grace-product-padding">
  19. <view class="grace-nowrap grace-flex-vcenter">
  20. <text class="grace-product-price">¥{{product.price}}</text>
  21. <text class="grace-text grace-gray grace-line-through" style="margin-left:30rpx;">¥{{product.priceMarket}}</text>
  22. </view>
  23. <view class="grace-space-between grace-flex-vcenter">
  24. <text class="grace-text-small grace-gray">运费 ¥0.00</text>
  25. <text class="grace-text-small grace-gray">已售 21008 件</text>
  26. <text class="grace-text-small grace-gray">浏览 36万次</text>
  27. </view>
  28. </view>
  29. <view class="grace-common-line"></view>
  30. <!-- 底部信息切换导航 -->
  31. <view class="grace-product-padding">
  32. <graceNavBar items="{{navItems}}" lineHeight="80rpx" isCenter="{{true}}"
  33. currentIndex="{{active}}" size="{{200}}" activeLineBg="#FF7900" textAlign="center"
  34. activeColor="#FF7900" activeLineWidth="200rpx" activeLineHeight="2rpx"
  35. margin="{{10}}" bind:change="navChange"></graceNavBar>
  36. </view>
  37. <!-- 详情 请根据项目情况自行改进 可以使用 富文本-->
  38. <view class="grace-product-padding" hidden="{{active == 1}}">
  39. <image class="grace-product-info-img" src="{{item}}" mode="widthFix" wx:for="{{product.imgs}}" wx:key="index"></image>
  40. </view>
  41. <!-- 评论区 -->
  42. <view class="grace-comments grace-product-padding" hidden="{{active == 0}}">
  43. <view class="grace-comments-items" wx:for="{{commentContents}}" wx:key="index">
  44. <image src="{{item.face}}" class="grace-comments-face"></image>
  45. <view class="grace-comments-body">
  46. <view class="grace-comments-header">
  47. <text class="grace-comments-header-text">{{item.name}}</text>
  48. <text class="grace-comments-info-text">{{item.date}}</text>
  49. </view>
  50. <text class="grace-comments-content">{{item.content}}</text>
  51. <view class="grace-comments-imgs" wx:if="{{item.imgs}}">
  52. <view class="grace-comments-image" wx:for="{{item.imgs}}" wx:for-index="indexImg" wx:for-item="img" wx:key="indexImg">
  53. <image src="{{img}}" data-index1="{{index}}" data-index2="{{indexImg}}" mode="widthFix" class="grace-comments-img" catchtap="showImgs"></image>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- 属性选择 -->
  60. <graceBottomDialog show="{{attrIsShow}}" bind:closeDialog="closeAttr">
  61. <form bindsubmit="attrSubmit" style="box-sizing:border-box; padding:10rpx 25rpx;" class="grace-form" slot="content">
  62. <!-- 关闭按钮 -->
  63. <view class="grace-nowrap grace-flex-end">
  64. <text class="grace-icons icon-close" catchtap="closeAttr"></text>
  65. </view>
  66. <!-- 头部商品信息 -->
  67. <view class="grace-product-attr-info">
  68. <image class= "grace-product-attr-info-image" mode="widthFix"
  69. src="https://img13.360buyimg.com/n7/jfs/t1/9085/2/12381/146200/5c371c5bE08328383/4f4ba51aed682207.jpg"></image>
  70. <view class="grace-product-attr-info-body">
  71. <text class="grace-product-attr-info-title">{{product.name}}</text>
  72. <text class="grace-product-attr-info-stone">库存 : 1999件</text>
  73. </view>
  74. </view>
  75. <!-- 属性列表区 -->
  76. <scroll-view style="height:700rpx;" scroll-y>
  77. <view class="grace-title grace-margin-top">选择颜色</view>
  78. <view><graceSelectTags selectedColor="#FF0036" items="{{colorTips}}" type="radio" bind:change="change1"></graceSelectTags></view>
  79. <view class="grace-title grace-margin-top">选择类型</view>
  80. <view><graceSelectTags selectedColor="#FF0036" items="{{typeTips}}" type="radio" bind:change="change2"></graceSelectTags></view>
  81. <view class="grace-margin-top"><text class="grace-title">购买数量</text></view>
  82. <view>
  83. <graceNumberBox value="{{buyNum}}" bind:change="buyNumChange"></graceNumberBox>
  84. </view>
  85. </scroll-view>
  86. <view class="grace-product-attr-btn">
  87. <button type="warn" class="grace-button grace-border-radius grace-bg-red" formType="submit">立即购买</button>
  88. </view>
  89. </form>
  90. </graceBottomDialog>
  91. </view>
  92. <!-- 底部 -->
  93. <view class="grace-space-between grace-flex-vcenter grace-bg-white" slot="gFooter">
  94. <view class="grace-grids grace-nowrap" style="width:250rpx;">
  95. <view class="grace-grids-items grace-relative">
  96. <text class="grace-grids-icon grace-icons icon-home"></text>
  97. <text class="grace-grids-text grace-grids-text">首页</text>
  98. </view>
  99. <view class="grace-grids-items grace-relative">
  100. <text class="grace-grids-icon grace-grids-icon grace-icons icon-shoucang grace-footer-active"></text>
  101. <text class="grace-grids-text grace-grids-text grace-footer-active">收藏</text>
  102. </view>
  103. </view>
  104. <view class="grace-flex-end" style="width:460rpx;">
  105. <button type="warn" class="grace-footer-button" style="background:#E55D52;" bindtap="buyNow">立即购买</button>
  106. <button type="warn" class="grace-footer-button" style="background:#F37B1D;" bindtap="buyNow">加入购物车</button>
  107. </view>
  108. </view>
  109. </gracePage>