choicepacks.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view style="width: 100vw;height: auto;padding: 30rpx 20rpx;background-color: #f6f6f6;">
  3. <view style="width: 100%;height: 100%;">
  4. <text style="font-size: 30rpx;font-weight: bold;">官方套餐</text>
  5. <view v-for="(item,index) in serviceList" :key='index'>
  6. <view class="card">
  7. <view class="taocan" :data-id="item.id" @click="details">
  8. <view class="tc_left">
  9. <text>{{item.name}}</text>
  10. </view>
  11. <view class="tc_right">
  12. <view style="width: 100%;">
  13. <view class="text">{{item.intro}}</view>
  14. <view class="text">{{item.desc}}</view>
  15. <view class="text">
  16. <text style="text-align: left;">时长:{{item.effective_days}}天</text>
  17. <text style="float: right;color: #FF4F61;font-weight: bold;">¥{{item.price/100}}</text>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. mounted() {
  30. this.getservice()
  31. },
  32. data() {
  33. return {
  34. pageindex: 1,
  35. serviceList: []
  36. }
  37. },
  38. methods: {
  39. details(e) {
  40. uni.navigateTo({
  41. url: '/pages/service_packs/packs_details?id=' + e.currentTarget.dataset.id
  42. })
  43. },
  44. getservice: async function() {
  45. let res = await this.$request.post("/api/v1/ServicePack/servicePackList", {
  46. page: this.pageindex
  47. })
  48. console.log(res)
  49. if (res.status == 0) {
  50. if (this.pageindex > res.data.last_page) {
  51. uni.showToast({
  52. title: "没有更多了",
  53. icon: "none"
  54. })
  55. } else {
  56. this.serviceList = this.serviceList.concat(res.data.data)
  57. this.pageindex++
  58. }
  59. }
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss">
  65. .card {
  66. width: 100%;
  67. height: auto;
  68. margin-top: 20rpx;
  69. // background-image: url(../../static/服务包.png);
  70. .taocan {
  71. width: 710rpx;
  72. height: 230rpx;
  73. position: relative;
  74. display: flex;
  75. border-radius: 10rpx;
  76. background: radial-gradient(circle at right top, transparent 15rpx, #ffffff 0) top left / 152rpx 51% no-repeat,
  77. radial-gradient(circle at right bottom, transparent 15rpx, #ffffff 0) bottom left /152rpx 51% no-repeat,
  78. radial-gradient(circle at left top, transparent 15rpx, #ffffff 0) top right /560rpx 51% no-repeat,
  79. radial-gradient(circle at left bottom, transparent 15rpx, #ffffff 0) bottom right /560rpx 51% no-repeat;
  80. filter: drop-shadow(0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.04));
  81. }
  82. }
  83. .tc_left {
  84. display: flex;
  85. justify-content: center;
  86. align-items: center;
  87. width: 152rpx;
  88. text {
  89. font-size: 30rpx;
  90. font-weight: bold;
  91. }
  92. }
  93. .tc_right {
  94. display: flex;
  95. align-items: center;
  96. width: 550rpx;
  97. padding: 0 20rpx;
  98. font-size: 26rpx;
  99. .text {
  100. padding: 10rpx 0rpx;
  101. width: 100%;
  102. }
  103. }
  104. </style>