金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
4.7 KiB

  1. <template>
  2. <view>
  3. <lf-nav :showIcon="true" :spreadOut="false" bgColor="transparent"></lf-nav>
  4. <view class="head">
  5. <image class="img" mode="aspectFill" src="https://picsum.photos/seed/picsum/200/300"></image>
  6. <view class="suspension" hover-class="lf-opacity" @click="$url('/pages/coupon/index/index')">我的优惠券</view>
  7. </view>
  8. <view class="coupon-wrap">
  9. <view class="coupon-box" v-for="i of 3">
  10. <view class="coupon-card lf-m-b-30">
  11. <view class="coupon-circle-top">
  12. <view class="coupon-circle1"></view>
  13. </view>
  14. <view class="coupon-circle-bottom">
  15. <view class="coupon-circle1"></view>
  16. </view>
  17. <view class="coupon-radius">
  18. <view class="coupon-left">
  19. <view class="lf-color-white">
  20. <text class="lf-font-24"></text>
  21. <text class="lf-font-70 lf-color-white lf-font-bold">200</text>
  22. </view>
  23. </view>
  24. <view class="coupon-right">
  25. <view class="lf-font-32 lf-font-bold lf-color-white">满1200减200</view>
  26. <view class="lf-font-24 lf-color-white">有效期2021.09.09-2021-09.15</view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="coupon-receive" @click="receive">立即领取</view>
  31. <block v-if="i == 2">
  32. <view class="coupon-opacity"></view>
  33. <view class="coupon-end">
  34. <view>抢光了</view>
  35. </view>
  36. </block>
  37. </view>
  38. </view>
  39. <u-back-top :scrollTop="pageScrollTop"></u-back-top>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. data(){
  45. return {
  46. }
  47. },
  48. onLoad(){
  49. },
  50. methods: {
  51. receive(){
  52. this.$msg('领取成功')
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped="scoped">
  58. .head{
  59. height: 376rpx;
  60. width: 750rpx;
  61. position: relative;
  62. .img{
  63. width: 100%;
  64. height: 100%;
  65. }
  66. .suspension{
  67. position: absolute;
  68. bottom: 30rpx;
  69. right: 0;
  70. width: 165rpx;
  71. height: 54rpx;
  72. background: #15716E;
  73. border-radius: 100rpx 0rpx 0rpx 100rpx;
  74. border: 2rpx solid #FFFFFF;
  75. font-size: 24rpx;
  76. color: #FFFFFF;
  77. display: flex;
  78. justify-content: center;
  79. align-items: center;
  80. }
  81. }
  82. .coupon-wrap {
  83. display: flex;
  84. justify-content: center;
  85. margin-top: 30rpx;
  86. flex-direction: column;
  87. align-content: center;
  88. align-items: center;
  89. }
  90. .coupon-box{
  91. display: flex;
  92. align-items: center;
  93. position: relative;
  94. }
  95. .coupon-card {
  96. overflow: hidden;
  97. position: relative;
  98. display: flex;
  99. align-items: center;
  100. justify-content: center;
  101. width: 637rpx;
  102. // display: flex;
  103. height: 171rpx;
  104. // opacity: 0.59;
  105. // border: 1rpx solid #FFFFFF;
  106. background: #15716E;
  107. border-radius: 20rpx;
  108. z-index: 3;
  109. }
  110. .coupon-radius {
  111. width: 627rpx;
  112. display: flex;
  113. height: 161rpx;
  114. border: 1rpx dashed #ccc;
  115. // background: #15716E;
  116. border-radius: 20rpx;
  117. }
  118. .coupon-circle1 {
  119. width: 40rpx;
  120. height: 40rpx;
  121. background-color: white;
  122. border-radius: 50%;
  123. }
  124. .coupon-circle-top {
  125. width: 50rpx;
  126. height: 50rpx;
  127. border-radius: 50%;
  128. // background-color: red;
  129. position: absolute;
  130. border: 1px dashed #ccc;
  131. left: 190rpx;
  132. top: -20rpx;
  133. display: flex;
  134. align-items: center;
  135. text-align: center;
  136. justify-content: center;
  137. }
  138. .coupon-circle-bottom {
  139. width: 50rpx;
  140. height: 50rpx;
  141. border-radius: 50%;
  142. // background-color: red;
  143. position: absolute;
  144. border: 1px dashed #ccc;
  145. left: 190rpx;
  146. bottom: -20rpx;
  147. display: flex;
  148. align-items: center;
  149. text-align: center;
  150. justify-content: center;
  151. }
  152. .coupon-right {
  153. text-align: left;
  154. justify-content: center;
  155. align-items: flex-start;
  156. display: flex;
  157. flex-direction: column;
  158. margin-left: 84rpx;
  159. }
  160. .coupon-left {
  161. margin-left: 40rpx;
  162. display: flex;
  163. flex-direction: column;
  164. justify-content: center;
  165. align-items: center;
  166. }
  167. .coupon-receive{
  168. width: 45rpx;
  169. height: 126rpx;
  170. font-size: 24rpx;
  171. background: #22A19F;
  172. border-radius: 6rpx;
  173. line-height: 1.2;
  174. color: #FFFFFF;
  175. text-align: center;
  176. display: flex;
  177. justify-content: center;
  178. align-items: center;
  179. transform: translate(-16rpx, -9rpx) rotate(10deg);
  180. transform-origin: bottom;
  181. position: relative;
  182. z-index: 1;
  183. }
  184. .coupon-opacity{
  185. width: 102%;
  186. height: 100%;
  187. position: absolute;
  188. left: 0;
  189. right: 0;
  190. top: 0;
  191. bottom: 0;
  192. background-color: rgba(255,255,255,0.5);
  193. z-index: 5;
  194. }
  195. .coupon-end{
  196. position: absolute;
  197. z-index: 7;
  198. width: 136rpx;
  199. height: 136rpx;
  200. background-color: #15716E;
  201. border-radius: 50%;
  202. top: calc(50% - 81rpx);
  203. left: calc(50% - 68rpx);
  204. display: flex;
  205. justify-content: center;
  206. align-items: center;
  207. &>view{
  208. width: 126rpx;
  209. height: 126rpx;
  210. border: 2rpx dashed #FFFFFF;
  211. border-radius: 50%;
  212. font-size: 32rpx;
  213. color: #FFFFFF;
  214. display: flex;
  215. justify-content: center;
  216. align-items: center;
  217. transform: rotate(-38deg);
  218. }
  219. }
  220. </style>