box_details.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view class="container">
  3. <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
  4. <view style="width: 100vw;height: auto;background-color: #f6f6f6;">
  5. <view style="width: 100%;height: 100%;">
  6. <view v-for="(item,index) in serviceList" :key="index">
  7. <view class="card flex justify-center" v-for="itm,idx in item.order_pack" :key="idx">
  8. <view class="taocan" :data-id="item.id" @click="details">
  9. <view class="tc_left">
  10. <text>{{itm.pack_name}}</text>
  11. </view>
  12. <view class="tc_right">
  13. <view style="width: 100%;">
  14. <view class="text">{{itm.pack_intro}}</view>
  15. <!-- <view class="text">{{item.desc}}</view> -->
  16. <view class="text">
  17. <text style="text-align: left;">时长:{{itm.effective_days}}天</text>
  18. <text style="float: right;color: #FF4F61;font-weight: bold;">¥{{itm.pack_price/100}}</text>
  19. </view>
  20. </view>
  21. <view class="margin-top-xs">
  22. 剩余时长:<u-count-down v-if="true" color="#EEAA3F" separator="zh" :timestamp="itm.end_time-miao"></u-count-down><text v-else>已结束</text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="cu-tabbar-height"></view>
  31. <view class="cu-tabbar-height"></view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. onLoad() {
  37. this.getserviceList()
  38. },
  39. onShow() {
  40. this.miao = parseInt(new Date().getTime() / 1000)
  41. },
  42. data() {
  43. return {
  44. list: [{
  45. name: '服务中服务包'
  46. }, {
  47. name: '历史服务包'
  48. }, ],
  49. current: 0,
  50. serviceList: [],
  51. miao: ""
  52. }
  53. },
  54. methods: {
  55. change(index) {
  56. this.current = index;
  57. },
  58. getserviceList: async function() {
  59. let res = await this.$request.post("/api/v1/order/orderList", {
  60. list_type: 1,
  61. product_type: 6
  62. })
  63. if (res.status == 0) {
  64. this.serviceList = res.data.data
  65. console.log(this.serviceList)
  66. }
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss">
  72. .container {
  73. width: 100%;
  74. height: 100%;
  75. background-color: #F6F6F6;
  76. }
  77. .card {
  78. width: 100%;
  79. height: auto;
  80. margin-top: 20rpx;
  81. // background-image: url(../../static/服务包.png);
  82. .taocan {
  83. width: 710rpx;
  84. height: 230rpx;
  85. position: relative;
  86. display: flex;
  87. border-radius: 10rpx;
  88. background: radial-gradient(circle at right top, transparent 15rpx, #ffffff 0) top left / 152rpx 51% no-repeat,
  89. radial-gradient(circle at right bottom, transparent 15rpx, #ffffff 0) bottom left /152rpx 51% no-repeat,
  90. radial-gradient(circle at left top, transparent 15rpx, #ffffff 0) top right /560rpx 51% no-repeat,
  91. radial-gradient(circle at left bottom, transparent 15rpx, #ffffff 0) bottom right /560rpx 51% no-repeat;
  92. filter: drop-shadow(0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.04));
  93. }
  94. }
  95. .tc_left {
  96. display: flex;
  97. justify-content: center;
  98. align-items: center;
  99. width: 152rpx;
  100. text {
  101. font-size: 30rpx;
  102. font-weight: bold;
  103. }
  104. }
  105. .tc_right {
  106. display: flex;
  107. flex-direction: column;
  108. justify-content: center;
  109. width: 550rpx;
  110. padding: 0 20rpx;
  111. font-size: 26rpx;
  112. .text {
  113. padding: 10rpx 0rpx;
  114. width: 100%;
  115. }
  116. }
  117. </style>