酒店桌布为微信小程序
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.

184 lines
3.1 KiB

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