bundle_detail.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view v-show="data.bundlePartList || data.bundleItemList" class="bundle_detail_wrap">
  3. <view class="uni-col-10" >
  4. <view class="list-title flex align_center justify_between" hover-class="navigator-hover">
  5. <view class="bundle-name">{{data.name}}</view>
  6. </view>
  7. <!-- 套餐包含服务项 -->
  8. <view v-show="serverList.length" class="bundle-list flex flex_column" v-for="item in serverList" :key="item.id">
  9. <view class="flex align_end justify_between">
  10. <view class="line-height">
  11. <text class="line-height">{{item.itemName}}</text>
  12. </view>
  13. <view class="line-height">
  14. {{item.itemClsName}}
  15. </view>
  16. </view>
  17. <view class="flex align_end justify_between">
  18. <view class="uni-col-6 flex flex_column">
  19. <text class="line-height">服务价格:¥{{item.itemPrice||0}}</text>
  20. </view>
  21. <view class="line-height">
  22. 次数:<text style="padding: 0 2px;font-weight: bold;">{{ item.times || 0 }}</text>次
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. props:{
  32. data: {
  33. type: Object,
  34. default: function(){
  35. return {}
  36. }
  37. },
  38. // 父级页面 detail:套餐详情 sellOrder:购买套餐
  39. parentPage: {
  40. type: String,
  41. default: ''
  42. }
  43. },
  44. watch:{
  45. data (newV,oldV){
  46. this.partList = newV ? newV.bundlePartList : []
  47. this.serverList = newV ? newV.bundleItemList : []
  48. }
  49. },
  50. data() {
  51. return {
  52. partList: this.data.bundlePartList ,
  53. serverList: this.data.bundleItemList
  54. }
  55. },
  56. onLoad() {
  57. },
  58. methods: {
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .bundle_detail_wrap{
  64. background-color: white;
  65. padding: 20rpx;
  66. margin-bottom: 20rpx;
  67. .flex{
  68. display: flex;
  69. }
  70. .align_end{
  71. align-items: flex-end;
  72. }
  73. .justify_between{
  74. justify-content: space-between;
  75. }
  76. .flex_column{
  77. flex-direction: column;
  78. }
  79. .bundle-name{
  80. font-size: 30rpx;
  81. font-weight: bold;
  82. }
  83. .pack-num{
  84. color: #8b8b8b;
  85. font-size: 28rpx;
  86. margin-left: 40rpx;
  87. }
  88. .price{
  89. color: red;
  90. font-size: 30rpx;
  91. }
  92. .bundle-list{
  93. padding: 10rpx 0 20rpx ;
  94. font-size: 28rpx;
  95. border-bottom: 1px solid #eee;
  96. }
  97. .bundle-list:last-child{
  98. border-bottom: none;
  99. }
  100. .list-title{
  101. padding-bottom: 20rpx;
  102. border-bottom: 1px solid #eee;
  103. }
  104. .line-height {
  105. line-height: 60rpx;
  106. }
  107. .vip-text{
  108. font-size: 28rpx;
  109. font-style: oblique;
  110. margin-left: 3px;
  111. color: #fff;
  112. padding: 6rpx 12rpx 6rpx 10rpx;
  113. background-color: #ff5500;
  114. border-radius: 10rpx;
  115. }
  116. }
  117. </style>