rule-info.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view class="flex-common-css iPhone-bottom">
  3. <Nav title="规则详情" titleColor="#333" bgckgroundBox='#fff'></Nav>
  4. <scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
  5. <view class="contetn-box">
  6. <view class="item-box display-flex mb-20">
  7. <view class="item-left flex-direction align-items-center flex-justify-center"
  8. :class="ticketData.status == 1?'bgc-FCE7E2':'bgc-E6E6E6'">
  9. <view class="align-items-center">
  10. <view class="fs-30 fw-600" :class="ticketData.status == 1?'fc-FB3D03':'fc-9'">¥</view>
  11. <view class="fs-48 fw-600" :class="ticketData.status == 1?'fc-FB3D03':'fc-9'">{{ticketData.money||''}}</view>
  12. </view>
  13. <view class="fs-24" :class="ticketData.status == 1?'fc-6':'fc-9'">
  14. 需满{{ticketData.full_money || ''}}元
  15. </view>
  16. <view class="ball"></view>
  17. <view class="ball-two"></view>
  18. </view>
  19. <view class="item-hr" :class="ticketData.status == 1?'':'item-hr-two'"></view>
  20. <view class="item-right flex-1 bgc-f">
  21. <view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fw-600"
  22. :class="ticketData.status == 1?'fc-3':'fc-9'">
  23. {{ticketData.name||''}}
  24. </view>
  25. <view class="fs-24 mb-12" :class="ticketData.status == 1?'fc-FB3D03':'fc-9'">
  26. {{ticketData.time_str||''}}
  27. </view>
  28. <view class="flex-justify-space">
  29. <view class="fs-24" :class="ticketData.status == 1?'fc-3':'fc-9'">
  30. 券类型:{{ticketData.scene_str||''}}
  31. </view>
  32. </view>
  33. <image class="item-img" src="@/static/img/my/ysy.png" mode="" v-if="ticketData.status == 2">
  34. </image>
  35. <image class="item-img" src="@/static/img/my/ysx.png" mode="" v-if="ticketData.status == 3"></image>
  36. </view>
  37. </view>
  38. <view class="but-box" v-if="ticketData.status == 1">
  39. <view class="but fs-32 fc-f fw-500" @click="goToUrl()">去使用</view>
  40. </view>
  41. <view class="fs-34 fw-600 fc-0 mb-12">使用范围</view>
  42. <view class="describe fs-28 fc-6">{{ticketData.str||''}}</view>
  43. </view>
  44. </scroll-view>
  45. </view>
  46. </template>
  47. <script>
  48. import {couponRule} from '@/api/coupon.js';
  49. import tools from "@/service/tools";
  50. export default {
  51. components: {},
  52. data() {
  53. return {
  54. ticketData: {},
  55. id:"",
  56. };
  57. },
  58. onLoad(e) {
  59. if(e.id){
  60. this.id = e.id;
  61. this.getRole();
  62. }
  63. },
  64. methods: {
  65. getRole(){
  66. couponRule({id:this.id}).then((res)=>{
  67. if(res.code === 1){
  68. this.ticketData = res.data
  69. }
  70. })
  71. },
  72. goToUrl(){
  73. if(this.ticketData.scene == 1){
  74. // 去外卖
  75. }else{
  76. uni.navigateTo({
  77. url:'/pages-takeout/replace-take'
  78. })
  79. }
  80. },
  81. scrolltolower() {},
  82. },
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. .contetn-box {
  87. padding: 24rpx;
  88. box-sizing: border-box;
  89. }
  90. .item-hr {
  91. width: 0px;
  92. height: auto;
  93. border-right: 1rpx dashed #FB7850;
  94. }
  95. .item-hr-two {
  96. width: 0px;
  97. height: auto;
  98. border-right: 1rpx dashed #999;
  99. }
  100. .item-left {
  101. width: 200rpx;
  102. height: auto;
  103. padding: 34rpx 32rpx 44rpx;
  104. box-sizing: border-box;
  105. position: relative;
  106. border-radius: 20rpx 0 0 20rpx;
  107. }
  108. .ball {
  109. width: 24rpx;
  110. height: 24rpx;
  111. border-radius: 50%;
  112. position: absolute;
  113. top: -12rpx;
  114. right: -12rpx;
  115. background: #F5F5F5;
  116. z-index: 10;
  117. }
  118. .ball-two {
  119. width: 24rpx;
  120. height: 24rpx;
  121. border-radius: 50%;
  122. position: absolute;
  123. background: #F5F5F5;
  124. z-index: 10;
  125. bottom: -12rpx;
  126. right: -12rpx;
  127. }
  128. .item-right {
  129. padding: 24rpx;
  130. box-sizing: border-box;
  131. border-radius: 0 20rpx 20rpx 0;
  132. position: relative;
  133. }
  134. .ticket-name {
  135. max-width: 280rpx;
  136. }
  137. .item-img {
  138. width: 88rpx;
  139. height: 88rpx;
  140. position: absolute;
  141. bottom: 40%;
  142. right: 24rpx;
  143. }
  144. .but-box{
  145. padding: 12rpx 44rpx 46rpx;
  146. box-sizing: border-box;
  147. .but{
  148. width: 100%;
  149. height: 92rpx;
  150. line-height: 92rpx;
  151. text-align: center;
  152. background: linear-gradient( 144deg, #57CAFF 0%, #41ABF5 100%);
  153. border-radius: 380rpx;
  154. }
  155. }
  156. .describe{
  157. padding: 0 0 32rpx 0;
  158. border-bottom: 2rpx solid #EEEEEE;
  159. }
  160. </style>