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

203 lines
3.6 KiB

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