index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view>
  3. <u-navbar title="兑奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
  4. <view class="process">
  5. <view class="flex box-wrap">
  6. <view class="box">
  7. <view class="hand">
  8. <view class="ing" @click="toChoice">刮开测手气</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="btn" @click="put">放入我的票包,暂不兑奖</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import env from '../../config/env.js'
  18. import $http from '@/utils/request.js'
  19. export default {
  20. data() {
  21. return {
  22. id: ''
  23. };
  24. },
  25. onLoad(options) {
  26. this.id = options.id
  27. },
  28. methods: {
  29. put() {
  30. uni.navigateBack({
  31. delta: 1
  32. })
  33. },
  34. toChoice() {
  35. uni.redirectTo({
  36. url: `/pages/choice/index?id=${ this.id }`
  37. })
  38. },
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .process {
  44. width: 100%;
  45. height: calc(100vh - 50px);
  46. background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2F50%2Fv2-a6f5c8b5b66fe87e4e79c1fc82a61a36_hd.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649658373&t=f216ee4825d5b36e62aa3a490516bfb1) center center;
  47. }
  48. .box-wrap {
  49. padding: 100rpx 0 100rpx;
  50. .box {
  51. position: relative;
  52. width: 80%;
  53. height: 900rpx;
  54. background-color: $uni-bg-color;
  55. }
  56. .hand {
  57. position: absolute;
  58. bottom: 20rpx;
  59. width: 100%;
  60. height: 100rpx;
  61. .ing {
  62. margin: auto;
  63. width: 80%;
  64. height: 100rpx;
  65. text-align: center;
  66. line-height: 100rpx;
  67. font-size: 50rpx;
  68. font-weight: bold;
  69. background-color: #FFFFFF;
  70. }
  71. }
  72. }
  73. .btn {
  74. margin: auto;
  75. width: 380rpx;
  76. height: 60rpx;
  77. line-height: 60rpx;
  78. border-radius: 8rpx;
  79. color: rgba(140, 140, 140, 100);
  80. font-size: 28rpx;
  81. text-align: center;
  82. border: 1px solid rgba(140, 140, 140, 100);
  83. background-color: #FFFFFF;
  84. }
  85. </style>