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

223 lines
4.1 KiB

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