index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="container">
  3. <!-- 优惠券信息 -->
  4. <view class="info">
  5. <view class="info_name">外卖满减券</view>
  6. <view class="info_term">满25可用</view>
  7. <view class="info_box">
  8. <text class="text">¥</text>
  9. 5
  10. </view>
  11. <view class="info_btn">立即领取</view>
  12. <view class="info_time">2025.09.22 23:59 到期</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. imgtype1: ''
  21. }
  22. },
  23. onLoad(option) {
  24. if (option.scene) {
  25. const scene = decodeURIComponent(option.scene)
  26. let params = {}
  27. // 分割成键值对数组
  28. let pairs = scene.split('&')
  29. // 遍历并解析每个键值对
  30. pairs.forEach((pair) => {
  31. const [key, value] = pair.split('=')
  32. params[key] = value
  33. })
  34. let shopId = params.shopId
  35. let couponId = params.couponId
  36. console.log(shopId)
  37. console.log(couponId)
  38. }
  39. },
  40. methods: {}
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. .container {
  45. display: flex;
  46. align-items: center;
  47. justify-content: center;
  48. width: 100vw;
  49. height: 100vh;
  50. background-image: url('https://mxys.chuanghai-tech.com/wmfile/20250926/a27624ab752f4623ab069c555e497531.png');
  51. background-size: 100% 100%;
  52. .info {
  53. margin-top: 4vh;
  54. width: 42vw;
  55. height: 30vh;
  56. color: #fd322e;
  57. .info_name {
  58. font-size: 36rpx;
  59. }
  60. .info_term {
  61. margin-top: 10rpx;
  62. font-size: 32rpx;
  63. }
  64. .info_box {
  65. margin-left: 90rpx;
  66. font-size: 150rpx;
  67. .text {
  68. margin-right: 35rpx;
  69. font-size: 60rpx;
  70. }
  71. }
  72. .info_btn {
  73. display: flex;
  74. align-items: center;
  75. justify-content: center;
  76. margin: 10rpx 0 20rpx 35rpx;
  77. width: 262rpx;
  78. height: 74rpx;
  79. font-size: 40rpx;
  80. color: #fff;
  81. border-radius: 32rpx;
  82. background-color: #fd322e;
  83. }
  84. .info_time {
  85. width: 100%;
  86. text-align: center;
  87. color: #000;
  88. font-size: 24rpx;
  89. }
  90. }
  91. }
  92. </style>