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

201 lines
3.5 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 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. <!-- <img
  59. :src="detail.detail"
  60. style="width: 100%;height: 800rpx;"
  61. alt="" /> -->
  62. <image
  63. v-for="(item,index) in detail.detail && detail.detail.split(',')"
  64. :src="item"
  65. style="width: 100%;"
  66. mode="widthFix"></image>
  67. </view>
  68. <!-- 分享和租赁按钮 -->
  69. <submit
  70. @submit="handleSubmit"
  71. @share="share"/>
  72. <!-- 选择规格 -->
  73. <submitUnitSelect ref="submitUnitSelect"
  74. v-if="detail.id"
  75. :detail="detail"/>
  76. </view>
  77. </template>
  78. <script>
  79. import submit from '../components/product/submit.vue'
  80. import submitUnitSelect from '../components/product/submitUnitSelect.vue'
  81. export default {
  82. components : {
  83. submit,
  84. submitUnitSelect
  85. },
  86. data() {
  87. return {
  88. detail : {},
  89. id : 0,
  90. }
  91. },
  92. onLoad(args) {
  93. this.id = args.id
  94. this.getData()
  95. },
  96. // 微信小程序分享
  97. onShareAppMessage(res) {
  98. return {
  99. title: this.detail.name,
  100. path: '/pages_order/product/productDetail?id=' + this.id
  101. }
  102. },
  103. methods: {
  104. // 分享商品
  105. share(){
  106. },
  107. // 选择完成规格立即租赁下单
  108. submit(){
  109. },
  110. handleSubmit(){
  111. this.$refs.submitUnitSelect.open()
  112. },
  113. getData(){
  114. this.$api('goodsOne', {
  115. id : this.id
  116. }, res => {
  117. if(res.code == 200){
  118. this.detail = res.result
  119. }
  120. })
  121. },
  122. }
  123. }
  124. </script>
  125. <style scoped lang="scss">
  126. .page{
  127. padding-bottom: 100rpx;
  128. .swipe{
  129. }
  130. .info{
  131. padding: 30rpx;
  132. background-color: #fff;
  133. .title{
  134. font-size: 34rpx;
  135. font-weight: 900;
  136. }
  137. .info-line{
  138. display: flex;
  139. justify-content: space-between;
  140. align-items: center;
  141. margin-top: 30rpx;
  142. .price{
  143. font-size: 28rpx;
  144. color: $uni-color;
  145. text{
  146. font-size: 34rpx;
  147. }
  148. }
  149. .num{
  150. font-size: 24rpx;
  151. image{
  152. width: 24rpx;
  153. height: 24rpx;
  154. }
  155. }
  156. }
  157. .tips{
  158. display: flex;
  159. font-size: 20rpx;
  160. margin-top: 30rpx;
  161. .tip{
  162. margin-right: 40rpx;
  163. }
  164. }
  165. }
  166. .info-unit{
  167. margin-top: 20rpx;
  168. padding: 30rpx;
  169. background-color: #fff;
  170. /deep/ text{
  171. font-size: 26rpx;
  172. }
  173. /deep/ .text{
  174. color: #7C7C7C;
  175. margin-right: 20rpx;
  176. font-size: 26rpx;
  177. }
  178. }
  179. .content{
  180. background-color: #fff;
  181. margin-top: 20rpx;
  182. .title{
  183. padding: 30rpx;
  184. }
  185. }
  186. }
  187. </style>