written_off.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <!-- <view class="voucher" style="background: url(/static/sign_in_off.jpg) no-repeat;background-size: cover;"> -->
  3. <view class="voucher">
  4. <image src="../../static/imgs/sign_in_off.jpg" class="bgImg"></image>
  5. <view class="voucher_con">
  6. <view class="line"></view>
  7. <view class="title">第{{ signInfo.season ? signInfo.season : '' }}届大卫博士创业{{ Number(signInfo.type) == 0 ? '实战营' : '密训营' }}</view>
  8. <view class="voucher_icon">
  9. <image src="../../static/imgs/written_off.png"></image>
  10. <view>签到成功</view>
  11. </view>
  12. <view class="info">
  13. <view class="flexS">
  14. <text>报名人:</text>
  15. <view>{{ signInfo.nickname ? signInfo.nickname : '' }}</view>
  16. </view>
  17. <view class="flexS">
  18. <text>手机号:</text>
  19. <view>{{ signInfo.phone ? signInfo.phone : '' }}</view>
  20. </view>
  21. <view class="flexS">
  22. <text>报名时间:</text>
  23. <view>{{ signInfo.created_at ? signInfo.created_at : '' }}</view>
  24. </view>
  25. </view>
  26. <view class="btn" v-if="signInfo.path == 1">
  27. <view class="flexC" @click="scanCode">继续扫码</view>
  28. <view class="flexC" @click="skipSignIn">手动签到</view>
  29. </view>
  30. <view class="btn" v-else><view class="flexC" @click="goBack">返回首页</view></view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. signInfo: '', //已报名的信息
  39. userInfo: '', //用户信息
  40. seasonInfo: '', //历史赛季信息
  41. id: ''
  42. };
  43. },
  44. onLoad(options) {
  45. if (uni.getStorageSync('userInfo')) {
  46. this.userInfo = uni.getStorageSync('userInfo');
  47. }
  48. this.signInfo = options;
  49. },
  50. methods: {
  51. //返回首页
  52. goBack() {
  53. uni.switchTab({
  54. url: '../index/index'
  55. });
  56. },
  57. //继续扫码
  58. scanCode() {
  59. uni.scanCode({
  60. success: function(res) {
  61. let str = res.path;
  62. let id = str.replace(/[^0-9]/gi, '');
  63. if (id) {
  64. uni.navigateTo({
  65. url: '../sign_in_voucher/sign_in_voucher?id=' + id
  66. });
  67. }
  68. }
  69. });
  70. },
  71. // 手动签到
  72. skipSignIn() {
  73. uni.navigateTo({
  74. url: '../sign_in/sign_in'
  75. });
  76. }
  77. }
  78. };
  79. </script>
  80. <style lang="scss" scoped>
  81. .voucher {
  82. hieght: 100vh;
  83. min-height: 100vh;
  84. width: 100vw;
  85. position: relative;
  86. .bgImg {
  87. height: 100vh;
  88. width: 100vw;
  89. position: fixed;
  90. top: 0;
  91. left: 0;
  92. }
  93. .voucher_con {
  94. position: fixed;
  95. height: 85%;
  96. width: 100%;
  97. bottom: 0;
  98. left: 0;
  99. background: #fff;
  100. border-top-left-radius: 60rpx;
  101. border-top-right-radius: 60rpx;
  102. .line {
  103. width: 128rpx;
  104. height: 8rpx;
  105. background: #f1f3f5;
  106. margin: 36rpx auto 0;
  107. }
  108. .title {
  109. color: #333;
  110. font-size: 42rpx;
  111. margin: 48rpx auto 48rpx;
  112. text-align: center;
  113. font-weight: bold;
  114. }
  115. .voucher_icon {
  116. text-align: center;
  117. image {
  118. height: 192rpx;
  119. width: 192rpx;
  120. margin-bottom: 30rpx;
  121. }
  122. view {
  123. font-size: 48rpx;
  124. color: #333;
  125. }
  126. }
  127. .info {
  128. margin: 30rpx 0 40rpx 100rpx;
  129. > view {
  130. margin-top: 34rpx;
  131. font-size: 28rpx;
  132. text {
  133. color: #656565;
  134. }
  135. view {
  136. color: #333333;
  137. }
  138. }
  139. }
  140. .btn {
  141. view {
  142. width: 640rpx;
  143. margin: 0 auto;
  144. height: 88rpx;
  145. color: #fff;
  146. background: rgba(233, 73, 65, 0.6);
  147. border-radius: 44rpx;
  148. letter-spacing: 2rpx;
  149. }
  150. view:last-child {
  151. margin-top: 30rpx;
  152. border: 2rpx solid #e94941;
  153. background: #fff;
  154. color: #e94941;
  155. }
  156. }
  157. }
  158. }
  159. </style>