LoginGuideCard.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="login-guide-card">
  3. <view class="guide-header">
  4. <text class="guide-icon">🔒</text>
  5. </view>
  6. <text class="guide-title">{{ title }}</text>
  7. <view class="guide-desc">
  8. <text class="guide-desc-item" v-for="(item, idx) in items" :key="idx">· {{ item }}</text>
  9. </view>
  10. <view class="guide-actions">
  11. <view class="guide-btn primary" @click="goLogin">立即登录</view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. props: {
  18. title: { type: String, default: '登录后查看完整内容' },
  19. items: {
  20. type: Array,
  21. default: function() {
  22. return ['查看个性化数据', '获取更多推荐']
  23. }
  24. }
  25. },
  26. methods: {
  27. goLogin: function() {
  28. uni.navigateTo({ url: '/pages/login/login' })
  29. }
  30. }
  31. }
  32. </script>
  33. <style scoped>
  34. .login-guide-card {
  35. margin: 20rpx 30rpx;
  36. background: linear-gradient(135deg, #FFF7ED, #FFE4D6);
  37. border-radius: 24rpx;
  38. padding: 40rpx 32rpx;
  39. text-align: center;
  40. }
  41. .guide-icon { font-size: 48rpx; }
  42. .guide-title {
  43. font-size: 32rpx;
  44. font-weight: bold;
  45. color: #333;
  46. margin: 16rpx 0;
  47. display: block;
  48. }
  49. .guide-desc { margin-bottom: 24rpx; }
  50. .guide-desc-item {
  51. font-size: 26rpx;
  52. color: #666;
  53. line-height: 1.8;
  54. display: block;
  55. }
  56. .guide-actions {
  57. display: flex;
  58. flex-direction: row;
  59. justify-content: center;
  60. }
  61. .guide-btn {
  62. padding: 16rpx 48rpx;
  63. border-radius: 40rpx;
  64. font-size: 28rpx;
  65. font-weight: 500;
  66. }
  67. .guide-btn.primary {
  68. background: linear-gradient(135deg, #F97316, #FB923C);
  69. color: #fff;
  70. }
  71. .guide-btn:active { opacity: 0.8; }
  72. </style>