金诚优选前端代码
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.

184 lines
5.5 KiB

  1. <template>
  2. <view class="head">
  3. <lf-nav :spreadOut="false" :showIcon="true" bgColor="transparent" titleColor="white" title="我的报名"></lf-nav>
  4. <view class="bg-left"></view>
  5. <view class="bg-right"></view>
  6. <view class="margin-auto">
  7. <view class="register-card">
  8. <view class="lf-flex lf-p-l-40 register-content">
  9. <image class="register-head" :src="activity_details.image" mode="aspectFill"></image>
  10. <view class="lf-color-black lf-m-l-21 lf-font-32">
  11. {{activity_details.name}}
  12. </view>
  13. </view>
  14. <view class="lf-p-l-40" style="position: relative;top: 160rpx;">
  15. <view class="lf-font-36 lf-color-black lf-font-bold ">{{activity_details.content}}</view>
  16. <view class="lf-m-t-30">
  17. <view class="lf-m-t-20">
  18. <text class="lf-color-777 lf-font-28">活动时间</text><text class="lf-font-28 lf-color-black lf-m-l-10">{{activity_details.apply_start}}-{{activity_details.apply_end}}</text>
  19. </view>
  20. <view class="lf-m-t-20">
  21. <text class="lf-color-777 lf-font-28">活动地点</text><text class="lf-font-28 lf-color-black lf-m-l-10">海蓝之谜专卖店</text>
  22. </view>
  23. <view class="lf-m-t-20">
  24. <text class="lf-color-777 lf-font-28">报名时间</text><text class="lf-font-28 lf-color-black lf-m-l-10">2021.09.02 18:37:57</text>
  25. </view>
  26. <view class="lf-m-t-20">
  27. <text class="lf-color-777 lf-font-28">报名费用</text>
  28. <text class="lf-font-28 lf-color-black lf-m-l-10" v-if="activity_details.price == 0">免费</text>
  29. <text class="lf-font-28 lf-color-black lf-m-l-10" v-else>{{activity_details.price}}</text>
  30. </view>
  31. <view style="margin-top: 60rpx;display: flex;justify-content: center;">
  32. <view class="lf-flex-column">
  33. <lf-qrcode :options="config.qrc"></lf-qrcode>
  34. <view class="lf-font-28 lf-row-center" style="color: #15716E;">待使用</view>
  35. </view>
  36. </view>
  37. <view style="margin-top: 60rpx;">
  38. <view class="lf-font-32 lf-color-black">
  39. 报名信息
  40. </view>
  41. <view class="lf-m-t-30">
  42. <text class="lf-font-28 lf-color-777">报名人:</text><text class="lf-font-28 lf-color-777 lf-m-l-10">王晓人</text>
  43. </view>
  44. <view class="lf-m-t-30">
  45. <text class="lf-font-28 lf-color-777">手机号码:</text><text class="lf-font-28 lf-color-777 lf-m-l-10">13200000000</text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import lfQrcode from '@/components/lf-code/lf-qrcode.vue';
  56. export default {
  57. data() {
  58. return {
  59. config: {
  60. bar: {
  61. code: 'E01181016286106',
  62. color: '#000', // 条形码的颜色
  63. bgColor: '#FFFFFF', // 背景色
  64. width: 586, // 宽度
  65. height: 210 // 高度
  66. },
  67. qrc: {
  68. code: "https://weixin.qq.com/g/AwYAAHO3aO4zlasEij6bLsk4hlZd5XNFkkBmqyS55mLPFxmn5c9PaI1omqLhd24fABCD23333",
  69. size: 352, // 二维码大小
  70. level: 4, //等级 0~4
  71. bgColor: '#FFFFFF', //二维码背景色 默认白色
  72. // border: {
  73. // color: ['#8A2387', '#F27121'], //边框颜色支持渐变色
  74. // lineWidth: 3, //边框宽度
  75. // },
  76. // img: '/static/logo.png', //图片
  77. // iconSize: 40, //二维码图标的大小
  78. color: '#000000', //边框颜色支持渐变色
  79. }
  80. },
  81. activity_id: 0,
  82. activity_details: ''
  83. }
  84. },
  85. components: {lfQrcode},
  86. onLoad(e) {
  87. this.activity_id = e.activity_id;
  88. this.getMyActivetiDetails();
  89. },
  90. methods: {
  91. getMyActivetiDetails() {
  92. this.$http
  93. .get({
  94. api: 'api/activity/detail',
  95. data: {
  96. activity_id: this.activity_id
  97. }
  98. })
  99. .then(res => {
  100. if (res.data.code == 200) {
  101. if (res.data.status) {
  102. this.activity_details = res.data.data;
  103. console.log('活动详情',this.activity_details);
  104. } else {
  105. wx.showModal({
  106. content: res.message || '请下拉页面刷新重试',
  107. showCancel: false
  108. });
  109. }
  110. } else {
  111. wx.showModal({
  112. content: '请下拉页面刷新重试',
  113. showCancel: false
  114. });
  115. }
  116. wx.hideLoading();
  117. })
  118. .catch(() => {
  119. wx.hideLoading();
  120. wx.showModal({
  121. content: '请求失败',
  122. showCancel: false
  123. });
  124. });
  125. }
  126. }
  127. }
  128. </script>
  129. <style lang="scss" scoped>
  130. .register-content {
  131. position: absolute;
  132. top: -30rpx;
  133. }
  134. .register-head {
  135. width: 160rpx;
  136. height: 160rpx;
  137. box-shadow: 0px 2rpx 8rpx 1rpx rgba(21, 113, 110, 0.2);
  138. border: 5rpx solid #FFFFFF;
  139. border-radius: 50%;
  140. }
  141. .margin-auto {
  142. margin: 0 auto;
  143. position: relative;
  144. top: 0;
  145. }
  146. .register-card {
  147. width: 686rpx;
  148. height: 1266rpx;
  149. background: #FFFFFF;
  150. border-radius: 20rpx;
  151. }
  152. .head {
  153. width: 750rpx;
  154. height: 1624rpx;
  155. background: linear-gradient(270deg, #187B7A 0%, #2FAAA7 100%, #22A2A0 100%);
  156. position: relative;
  157. overflow: hidden;
  158. display: flex;
  159. align-items: flex-end;
  160. box-sizing: border-box;
  161. padding: 60rpx 32rpx 110rpx;
  162. color: #FFFFFF;
  163. }
  164. .bg-left{
  165. position: absolute;
  166. width: 196rpx;
  167. height: 196rpx;
  168. border-radius: 50%;
  169. background-color: rgba(255,255,255,0.04);
  170. left: -92rpx;
  171. bottom: 60rpx;
  172. }
  173. .bg-right{
  174. position: absolute;
  175. width: 520rpx;
  176. height: 520rpx;
  177. border-radius: 50%;
  178. background-color: rgba(255,255,255,0.04);
  179. right: -168rpx;
  180. top: -142rpx;
  181. }
  182. </style>