index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <s-layout>
  3. <view class="customer-service">
  4. <view class="title">联系客服</view>
  5. <view class="subtitle">我们随时为您服务</view>
  6. <view class="qrcode-container">
  7. <view class="qrcode-item">
  8. <view class="qrcode-wrapper">
  9. <image class="qrcode" :src="query.url" mode="aspectFit"></image>
  10. </view>
  11. <view class="desc">
  12. <!-- <text class="name">客服小美</text> -->
  13. <text class="tag">主营业务咨询</text>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="tips">
  18. <text class="tips-icon">💡</text>
  19. <text>扫描以上二维码添加客服微信</text>
  20. </view>
  21. <view class="contact-time">服务时间: 周一至周日 9:00-21:00</view>
  22. </view>
  23. </s-layout>
  24. </template>
  25. <script setup>
  26. import { onLoad, onPageScroll } from '@dcloudio/uni-app';
  27. import { ref } from "vue"
  28. const query = ref(null)
  29. onLoad((options) => {
  30. // 页面加载时执行的操作
  31. console.log('Page loaded:', JSON.parse(options.data));
  32. query.value = JSON.parse(options.data)
  33. })
  34. </script>
  35. <style lang="scss" scoped>
  36. .customer-service {
  37. padding: 40rpx;
  38. background: linear-gradient(to bottom, #f8f9fa, #ffffff);
  39. // min-height: 100vh;
  40. .title {
  41. font-size: 44rpx;
  42. font-weight: bold;
  43. text-align: center;
  44. margin-bottom: 20rpx;
  45. color: #333;
  46. }
  47. .subtitle {
  48. font-size: 28rpx;
  49. color: #666;
  50. text-align: center;
  51. margin-bottom: 60rpx;
  52. }
  53. .qrcode-container {
  54. display: flex;
  55. justify-content: space-around;
  56. align-items: center;
  57. margin-bottom: 50rpx;
  58. .qrcode-item {
  59. text-align: center;
  60. .qrcode-wrapper {
  61. background: #fff;
  62. padding: 20rpx;
  63. border-radius: 20rpx;
  64. box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.05);
  65. margin-bottom: 30rpx;
  66. transition: all 0.3s ease;
  67. &:hover {
  68. transform: translateY(-5rpx);
  69. box-shadow: 0 15rpx 30rpx rgba(0, 0, 0, 0.1);
  70. }
  71. .qrcode {
  72. width: 280rpx;
  73. height: 280rpx;
  74. border-radius: 10rpx;
  75. }
  76. }
  77. .desc {
  78. display: flex;
  79. flex-direction: column;
  80. align-items: center;
  81. gap: 10rpx;
  82. .name {
  83. font-size: 32rpx;
  84. color: #333;
  85. font-weight: 500;
  86. }
  87. .tag {
  88. font-size: 24rpx;
  89. color: #666;
  90. background: #f5f6f7;
  91. padding: 6rpx 20rpx;
  92. border-radius: 20rpx;
  93. }
  94. }
  95. }
  96. }
  97. .tips {
  98. font-size: 28rpx;
  99. color: #666;
  100. text-align: center;
  101. margin-bottom: 30rpx;
  102. display: flex;
  103. align-items: center;
  104. justify-content: center;
  105. gap: 10rpx;
  106. .tips-icon {
  107. font-size: 32rpx;
  108. }
  109. }
  110. .contact-time {
  111. font-size: 26rpx;
  112. color: #999;
  113. text-align: center;
  114. padding: 20rpx;
  115. background: #f8f9fa;
  116. border-radius: 10rpx;
  117. }
  118. }
  119. </style>