join-us.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="join-us">
  3. <view class="ewm-container">
  4. <view class="qrcode"><image :src="qrcodeUrl" mode="" :show-menu-by-longpress="true"></image></view>
  5. <view class="message">
  6. <view class="row">长按识别二维码</view>
  7. <view class="row">加微信获取优惠福利</view>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import { fetchGroupQrCode } from '@/services/api/common.js'
  14. export default {
  15. data() {
  16. return {
  17. qrcodeUrl: ''
  18. }
  19. },
  20. onLoad() {
  21. this.fetchGroupQrCode()
  22. },
  23. methods: {
  24. async fetchGroupQrCode() {
  25. try {
  26. const { data } = await fetchGroupQrCode()
  27. this.qrcodeUrl = data
  28. } catch (e) {
  29. //TODO handle the exception
  30. console.log(e)
  31. }
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. .join-us {
  38. @extend .cm-flex-center;
  39. width: 100%;
  40. height: 100vh;
  41. background: url(https://static.caimei365.com/app/mini-hehe/icon/bg-join.png) no-repeat center;
  42. background-size: cover;
  43. background-color: #fff;
  44. .ewm-container {
  45. position: relative;
  46. width: 622rpx;
  47. height: 766rpx;
  48. background: #ffffff;
  49. border-radius: 16rpx;
  50. &::after {
  51. content: '';
  52. position: absolute;
  53. bottom: 0;
  54. left: 50%;
  55. transform: translateX(-50%);
  56. display: block;
  57. width: 48rpx;
  58. height: 8rpx;
  59. background: #ff457b;
  60. border-radius: 8rpx 8rpx 0px 0px;
  61. }
  62. .qrcode {
  63. width: 500rpx;
  64. height: 500rpx;
  65. margin: 61rpx 61rpx 0;
  66. background: #000;
  67. border-radius: 8rpx;
  68. image {
  69. width: 500rpx;
  70. height: 500rpx;
  71. }
  72. }
  73. .message {
  74. margin-top: 48rpx;
  75. text-align: center;
  76. font-size: 40rpx;
  77. color: #333333;
  78. .row {
  79. &:first-child {
  80. font-weight: bold;
  81. }
  82. &:last-child {
  83. margin-top: 8rpx;
  84. font-size: 32rpx;
  85. color: #666666;
  86. }
  87. }
  88. }
  89. }
  90. }
  91. </style>