Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

141 linhas
4.2 KiB

  1. <template>
  2. <view class="wrap">
  3. <view class="hero-card">
  4. <text class="eyebrow">AIONLINE 助手</text>
  5. <text class="hero-title">关注公众号</text>
  6. <text class="hero-desc">分享 AI 资讯与使用技巧,并定期发放福利。</text>
  7. </view>
  8. <view class="qr-card">
  9. <image
  10. class="qr-img"
  11. :src="qrUrl"
  12. mode="aspectFit"
  13. show-menu-by-longpress
  14. @click="previewQr"
  15. />
  16. <text class="qr-name">AIonline助手</text>
  17. <view class="steps">
  18. <!-- 小程序 / H5 里可以长按识别,App 只能保存到相册再去微信扫 -->
  19. <!-- #ifdef APP-PLUS -->
  20. <view class="step"><text class="step-index">1</text><text class="step-text">点击二维码查看大图</text></view>
  21. <view class="step"><text class="step-index">2</text><text class="step-text">长按保存到相册</text></view>
  22. <view class="step"><text class="step-index">3</text><text class="step-text">打开微信扫一扫识别</text></view>
  23. <!-- #endif -->
  24. <!-- #ifndef APP-PLUS -->
  25. <view class="step"><text class="step-index">1</text><text class="step-text">长按上方二维码</text></view>
  26. <view class="step"><text class="step-index">2</text><text class="step-text">识别并前往图中的公众号</text></view>
  27. <view class="step"><text class="step-index">3</text><text class="step-text">点击关注即可</text></view>
  28. <!-- #endif -->
  29. </view>
  30. </view>
  31. <view class="tip-card">
  32. <text class="tip-title">关注后可以做什么</text>
  33. <text class="tip-line">· 第一时间收到新功能与活动通知</text>
  34. <text class="tip-line">· 获取 AI 绘画、写作的实用提示词</text>
  35. <text class="tip-line">· 参与不定期的点数与会员福利活动</text>
  36. </view>
  37. </view>
  38. </template>
  39. <script setup>
  40. import { ref } from 'vue'
  41. import { onLoad } from '@dcloudio/uni-app'
  42. import { commonApi } from '@/api/index.js'
  43. // 二维码优先读配置项,便于运营换图;取不到用默认图兜底(与 PC 站页脚同一张)
  44. const DEFAULT_QR = 'https://cdn.aionline.cc/ai/aionline_qr.jpg'
  45. const CONFIG_KEY = 'wechat_qr'
  46. const qrUrl = ref(DEFAULT_QR)
  47. onLoad(() => loadQr())
  48. async function loadQr() {
  49. try {
  50. const res = await commonApi.getConfig({ keys: CONFIG_KEY })
  51. const rows = Array.isArray(res.list) ? res.list : []
  52. const item = rows.find((it) => it.key === CONFIG_KEY)
  53. if (item && item.value) qrUrl.value = item.value
  54. } catch (e) {
  55. // 配置缺失就用默认图
  56. }
  57. }
  58. function previewQr() {
  59. uni.previewImage({ urls: [qrUrl.value] })
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .wrap {
  64. min-height: 100vh;
  65. padding: 24rpx 28rpx 60rpx;
  66. background: #f3f7fb;
  67. box-sizing: border-box;
  68. }
  69. .hero-card {
  70. padding: 32rpx;
  71. border-radius: 26rpx;
  72. background: linear-gradient(135deg, #1f8cff, #41b9ff);
  73. }
  74. .eyebrow { display: block; color: rgba(255, 255, 255, 0.75); font-size: 21rpx; font-weight: 800; }
  75. .hero-title { display: block; margin-top: 12rpx; color: #fff; font-size: 40rpx; font-weight: 900; }
  76. .hero-desc {
  77. display: block;
  78. margin-top: 12rpx;
  79. color: rgba(255, 255, 255, 0.85);
  80. font-size: 23rpx;
  81. line-height: 1.5;
  82. }
  83. .qr-card {
  84. margin-top: 22rpx;
  85. padding: 36rpx 28rpx 28rpx;
  86. border-radius: 24rpx;
  87. background: #fff;
  88. display: flex;
  89. flex-direction: column;
  90. align-items: center;
  91. }
  92. .qr-img {
  93. width: 420rpx;
  94. height: 420rpx;
  95. border-radius: 20rpx;
  96. background: #f7f9fd;
  97. }
  98. .qr-name { margin-top: 20rpx; color: #172033; font-size: 30rpx; font-weight: 800; }
  99. .steps { margin-top: 24rpx; width: 100%; }
  100. .step { display: flex; align-items: center; gap: 14rpx; margin-top: 14rpx; }
  101. .step-index {
  102. width: 40rpx;
  103. height: 40rpx;
  104. border-radius: 50%;
  105. color: #1f8cff;
  106. background: #eef7ff;
  107. font-size: 22rpx;
  108. font-weight: 800;
  109. line-height: 40rpx;
  110. text-align: center;
  111. flex-shrink: 0;
  112. }
  113. .step-text { color: #5f6f83; font-size: 25rpx; }
  114. .tip-card {
  115. margin-top: 22rpx;
  116. padding: 28rpx;
  117. border-radius: 24rpx;
  118. background: #fff;
  119. }
  120. .tip-title { display: block; margin-bottom: 12rpx; color: #172033; font-size: 28rpx; font-weight: 800; }
  121. .tip-line {
  122. display: block;
  123. margin-top: 8rpx;
  124. color: #7f8896;
  125. font-size: 23rpx;
  126. line-height: 1.6;
  127. }
  128. </style>