青蛙卖大米小程序2024-11-24
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.

145 lines
2.6 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="page">
  3. <navbar
  4. bgColor="transparent"
  5. style="position: absolute;"
  6. leftClick @leftClick="$utils.navigateBack" />
  7. <view class="swipe">
  8. <uv-swiper
  9. :list="productDetail.image.split(',')"
  10. indicator
  11. height="520rpx"></uv-swiper>
  12. </view>
  13. <view class="info">
  14. <view class="">
  15. <view class="title">
  16. {{ productDetail.title }}
  17. </view>
  18. <view class="desc">
  19. {{ productDetail.sku }}
  20. </view>
  21. </view>
  22. <view class="">
  23. <view class="price">
  24. 会员价<text>{{ productDetail.price }}</text>
  25. </view>
  26. <view class="oldPrice">
  27. 零售价<text>{{ productDetail.oldPrice }}</text>
  28. </view>
  29. </view>
  30. </view>
  31. <uv-parse :content="productDetail.details"></uv-parse>
  32. <!-- 分享和购买按钮 -->
  33. <submit
  34. @submit="$utils.navigateTo('/pages_order/order/createOrder?pid=' + id)"
  35. />
  36. <!-- <submit
  37. @submit="$refs.submitUnitSelect.open()"
  38. @share="share"/> -->
  39. <!-- 选择规格 -->
  40. <!-- <submitUnitSelect
  41. :detail="productDetail"
  42. ref="submitUnitSelect"/> -->
  43. </view>
  44. </template>
  45. <script>
  46. import submit from '../components/product/submit.vue'
  47. import submitUnitSelect from '../components/product/submitUnitSelect.vue'
  48. export default {
  49. components : {
  50. submit,
  51. submitUnitSelect
  52. },
  53. data() {
  54. return {
  55. productDetail : {
  56. image : 'https://cdn.uviewui.com/uview/swiper/swiper3.png,https://cdn.uviewui.com/uview/swiper/swiper2.png',
  57. details : '',
  58. },
  59. id : 0,
  60. }
  61. },
  62. onLoad(args) {
  63. this.id = args.id
  64. },
  65. onShow() {
  66. this.getRiceProductDetail()
  67. },
  68. methods: {
  69. // 分享商品
  70. share(){
  71. },
  72. // 选择完成规格立即租赁下单
  73. submit(){
  74. },
  75. // 获取商品
  76. getRiceProductDetail(){
  77. this.$api('getRiceProductDetail', {
  78. id : this.id
  79. }, res => {
  80. if(res.code == 200){
  81. this.productDetail = res.result
  82. }
  83. })
  84. },
  85. }
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. .page{
  90. .swipe{
  91. }
  92. .info{
  93. padding: 30rpx;
  94. background-color: #fff;
  95. display: flex;
  96. justify-content: space-between;
  97. .title{
  98. font-size: 34rpx;
  99. font-weight: 900;
  100. }
  101. .price{
  102. font-size: 34rpx;
  103. color: $uni-color;
  104. font-weight: 900;
  105. text-align: right;
  106. }
  107. .oldPrice{
  108. font-size: 26rpx;
  109. color: #999;
  110. text-align: right;
  111. text-decoration: line-through;
  112. margin-top: 14rpx;
  113. }
  114. .desc{
  115. font-size: 26rpx;
  116. color: #777;
  117. margin-top: 20rpx;
  118. }
  119. }
  120. .info-unit{
  121. margin-top: 20rpx;
  122. padding: 30rpx;
  123. background-color: #fff;
  124. /deep/ text{
  125. font-size: 26rpx;
  126. }
  127. /deep/ .text{
  128. color: #7C7C7C;
  129. margin-right: 20rpx;
  130. font-size: 26rpx;
  131. }
  132. }
  133. }
  134. </style>