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

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