contact-us.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <van-overlay :show="show">
  3. <view class="contact-us-wrapper">
  4. <view class="contact-us">
  5. <view class="contact-us-qrcode">
  6. <image :src="buoyInfo.contact_us_qrcode" show-menu-by-longpress/>
  7. </view>
  8. <view class="contact-us-label-1">{{buoyInfo.contact_us_title}}</view>
  9. <view class="contact-us-label-2">{{buoyInfo.contact_us_description}}</view>
  10. <view class="contact-us-service-list">
  11. <view>{{buoyInfo.contact_us_consultation}}</view>
  12. <view>{{buoyInfo.contact_us_forum}}</view>
  13. <view>{{buoyInfo.contact_us_visit}}</view>
  14. </view>
  15. <view class="contact-us-close" @click="onClickClose">
  16. <van-icon name="close" />
  17. </view>
  18. </view>
  19. </view>
  20. </van-overlay>
  21. </template>
  22. <script>
  23. import VanOverlay from '@/wxcomponents/vant/overlay/index'
  24. import {getBuoyInfo} from "@/api";
  25. export default {
  26. options: {
  27. styleIsolation: 'shared'
  28. },
  29. components: {
  30. VanOverlay
  31. },
  32. props: {
  33. show: Boolean,
  34. qrcode_url: String
  35. },
  36. watch: {
  37. show(val){
  38. if (val) {
  39. this.getBuoyData()
  40. }
  41. }
  42. },
  43. data() {
  44. return {
  45. loading: false,
  46. buoyInfo: {}
  47. }
  48. },
  49. created() {
  50. // this.getBuoyData()
  51. },
  52. methods: {
  53. onClickClose() {
  54. this.$emit('update:show', false)
  55. },
  56. getBuoyData() {
  57. getBuoyInfo().then(res => {
  58. this.buoyInfo = res.data
  59. // console.log(this.buoyInfo);
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. .contact-us-wrapper{
  67. @include display-flex-center;
  68. height: 100%;
  69. .contact-us{
  70. @include display-flex-center;
  71. position: relative;
  72. flex-direction: column;
  73. width: 500rpx;
  74. height: 689rpx;
  75. background-color: $buttonPrimaryColor;
  76. border-radius: 15rpx 15rpx 15rpx 15rpx;
  77. color: #FFFFFF;
  78. }
  79. .contact-us-qrcode{
  80. width: 279rpx;
  81. height: 279rpx;
  82. margin-top: 69rpx auto 0 auto;
  83. }
  84. .contact-us-label-1{
  85. margin-top: 30rpx;
  86. font-size: $fontSize6;
  87. }
  88. .contact-us-label-2{
  89. margin-top: 13rpx;
  90. font-size: $fontSize6;
  91. }
  92. .contact-us-service-list{
  93. display: grid;
  94. grid-template-columns: 1fr;
  95. grid-row-gap: 10rpx;
  96. margin-top: 20rpx;
  97. font-size: $fontSize3;
  98. }
  99. .contact-us-close{
  100. position: absolute;
  101. top: -70rpx;
  102. right: -70rpx;
  103. .van-icon-close{
  104. font-size: 69rpx;
  105. cursor: pointer;
  106. }
  107. }
  108. }
  109. </style>