box_details.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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;margin: 15rpx 20rpx;background-color: #f6f6f6;">
  5. <view style="width: 100%;height: 100%;">
  6. <view v-for="(item,index) in serviceList" :key="index">
  7. <view class="card" 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>
  31. </template>
  32. <script>
  33. export default {
  34. onLoad() {
  35. this.getserviceList()
  36. },
  37. onShow() {
  38. this.miao = parseInt(new Date().getTime() / 1000)
  39. },
  40. data() {
  41. return {
  42. list: [{
  43. name: '服务中服务包'
  44. }, {
  45. name: '历史服务包'
  46. }, ],
  47. current: 0,
  48. serviceList: [],
  49. miao: ""
  50. }
  51. },
  52. methods: {
  53. change(index) {
  54. this.current = index;
  55. },
  56. getserviceList: async function() {
  57. let res = await this.$request.post("/api/v1/order/orderList", {
  58. list_type: 1,
  59. product_type: 6
  60. })
  61. if (res.status == 0) {
  62. this.serviceList = res.data.data
  63. console.log(this.serviceList)
  64. }
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss">
  70. .container {
  71. width: 100%;
  72. height: 100%;
  73. background-color: #F6F6F6;
  74. }
  75. .card {
  76. width: 100%;
  77. height: auto;
  78. margin-top: 20rpx;
  79. // background-image: url(../../static/服务包.png);
  80. .taocan {
  81. width: 710rpx;
  82. height: 230rpx;
  83. position: relative;
  84. display: flex;
  85. border-radius: 10rpx;
  86. background: radial-gradient(circle at right top, transparent 15rpx, #ffffff 0) top left / 152rpx 51% no-repeat,
  87. radial-gradient(circle at right bottom, transparent 15rpx, #ffffff 0) bottom left /152rpx 51% no-repeat,
  88. radial-gradient(circle at left top, transparent 15rpx, #ffffff 0) top right /560rpx 51% no-repeat,
  89. radial-gradient(circle at left bottom, transparent 15rpx, #ffffff 0) bottom right /560rpx 51% no-repeat;
  90. filter: drop-shadow(0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.04));
  91. }
  92. }
  93. .tc_left {
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. width: 152rpx;
  98. text {
  99. font-size: 30rpx;
  100. font-weight: bold;
  101. }
  102. }
  103. .tc_right {
  104. display: flex;
  105. flex-direction: column;
  106. justify-content: center;
  107. width: 550rpx;
  108. padding: 0 20rpx;
  109. font-size: 26rpx;
  110. .text {
  111. padding: 10rpx 0rpx;
  112. width: 100%;
  113. }
  114. }
  115. </style>