bundle_detail.vue 2.5 KB

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