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

224 lines
4.1 KiB

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