景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
3.3 KiB

9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="商品详情" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="swipe">
  5. <uv-swiper :list="productDetail.waresImage &&
  6. productDetail.waresImage.split(',')" indicator height="420rpx"></uv-swiper>
  7. </view>
  8. <view class="info">
  9. <view class="title">
  10. {{productDetail.waresTitle}}
  11. </view>
  12. <view class="info-line">
  13. <view class="price">
  14. <text>{{productDetail.waresPrice}}</text>
  15. </view>
  16. <view class="num">
  17. {{productDetail.waresSales}}
  18. <image src="../static/product/like.png" mode=""></image>
  19. </view>
  20. </view>
  21. <view class="tips">
  22. <view class="tip">
  23. 专业设备
  24. </view>
  25. <view class="tip">
  26. 科学流程
  27. </view>
  28. <view class="tip">
  29. 质量保证
  30. </view>
  31. </view>
  32. </view>
  33. <view class="info-unit">
  34. <uv-cell title="服务" isLink>
  35. <template #icon>
  36. <text class="text">免费上门退·7天无理由退货·快递发货</text>
  37. </template>
  38. </uv-cell>
  39. <uv-cell title="参数" isLink>
  40. <template #icon>
  41. <text class="text">品牌适应人群</text>
  42. </template>
  43. </uv-cell>
  44. </view>
  45. <view class="content">
  46. <view class="title">
  47. 详情
  48. </view>
  49. <uv-parse :content="productDetail.content"></uv-parse>
  50. </view>
  51. <!-- 分享和租赁按钮 -->
  52. <submit @submit="$refs.submitUnitSelect.open()" @share="share" />
  53. <!-- 选择规格 -->
  54. <submitUnitSelect ref="submitUnitSelect" :detail="productDetail"/>
  55. </view>
  56. </template>
  57. <script>
  58. import submit from '../components/product/submit.vue'
  59. import submitUnitSelect from '../components/product/submitUnitSelect.vue'
  60. export default {
  61. components: {
  62. submit,
  63. submitUnitSelect
  64. },
  65. data() {
  66. return {
  67. productDetail: {},
  68. productId : 0,
  69. }
  70. },
  71. onLoad(args) {
  72. this.productId = args.id
  73. this.queryWaresById()
  74. },
  75. onShareAppMessage(res) {
  76. return {
  77. title: this.productDetail.waresTitle,
  78. path: '/pages_order/product/productDetail?id=' + this.id
  79. }
  80. },
  81. methods: {
  82. // 分享商品
  83. share() {
  84. },
  85. // 选择完成规格立即租赁下单
  86. submit() {
  87. },
  88. queryWaresById() {
  89. this.$api('queryWaresById', {
  90. waresId: this.productId
  91. },
  92. res => {
  93. if (res.code == 200) {
  94. console.log(res);
  95. this.productDetail = res.result
  96. }
  97. })
  98. }
  99. }
  100. }
  101. </script>
  102. <style scoped lang="scss">
  103. .page {
  104. .swipe {}
  105. .info {
  106. padding: 30rpx;
  107. background-color: #fff;
  108. .title {
  109. font-size: 34rpx;
  110. font-weight: 900;
  111. }
  112. .info-line {
  113. display: flex;
  114. justify-content: space-between;
  115. align-items: center;
  116. margin-top: 30rpx;
  117. .price {
  118. font-size: 28rpx;
  119. color: $uni-color;
  120. text {
  121. font-size: 34rpx;
  122. }
  123. }
  124. .num {
  125. font-size: 24rpx;
  126. image {
  127. width: 24rpx;
  128. height: 24rpx;
  129. }
  130. }
  131. }
  132. .tips {
  133. display: flex;
  134. font-size: 20rpx;
  135. margin-top: 30rpx;
  136. .tip {
  137. margin-right: 40rpx;
  138. }
  139. }
  140. }
  141. .info-unit {
  142. margin-top: 20rpx;
  143. padding: 30rpx;
  144. background-color: #fff;
  145. /deep/ text {
  146. font-size: 26rpx;
  147. }
  148. /deep/ .text {
  149. color: #7C7C7C;
  150. margin-right: 20rpx;
  151. font-size: 26rpx;
  152. }
  153. }
  154. .content {
  155. background-color: #fff;
  156. margin-top: 20rpx;
  157. .title {
  158. padding: 30rpx;
  159. }
  160. }
  161. }
  162. </style>