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

219 lines
4.0 KiB

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