index.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view class="user-detail-page">
  3. <view class="user-hero">
  4. <image src="https://img.icons8.com/?size=256&id=23235&format=png" class="avatar" mode="aspectFill"></image>
  5. <text class="user-name">张先生</text>
  6. <text class="user-phone">13800138000</text>
  7. </view>
  8. <view class="info-card">
  9. <view class="info-row"><text class="label">性别</text><text class="value">男</text></view>
  10. <view class="info-row"><text class="label">住址</text><text class="value">北京市朝阳区三里屯</text></view>
  11. <view class="info-row"><text class="label">关联宠物</text><text class="value orange">2只</text></view>
  12. <view class="info-row"><text class="label">订单数量</text><text class="value">12单</text></view>
  13. <view class="info-row"><text class="label">录入来源</text><text class="value">三里屯店录入</text></view>
  14. <view class="info-row"><text class="label">创建时间</text><text class="value">2025-01-15 10:00</text></view>
  15. <view class="info-row"><text class="label">备注</text><text class="value">经常周末来</text></view>
  16. </view>
  17. <button class="edit-btn" @click="goToEdit">编辑用户</button>
  18. </view>
  19. </template>
  20. <script setup>
  21. const goToEdit = () => uni.navigateTo({ url: '/pages/my/user/edit/index' })
  22. </script>
  23. <style lang="scss" scoped>
  24. .user-detail-page { min-height: 100vh; background: #f7f8fa; padding-bottom: 160rpx; }
  25. .user-hero { background: linear-gradient(150deg, #ffd53f, #ff9500); padding: 80rpx 40rpx 60rpx; display: flex; flex-direction: column; align-items: center; }
  26. .avatar { width: 160rpx; height: 160rpx; border-radius: 50%; border: 8rpx solid #fff; margin-bottom: 20rpx; }
  27. .user-name { font-size: 40rpx; font-weight: 800; color: #5c4314; }
  28. .user-phone { font-size: 28rpx; color: #5c4314; opacity: 0.8; margin-top: 8rpx; }
  29. .info-card { background: #fff; border-radius: 32rpx 32rpx 0 0; margin-top: -40rpx; padding: 40rpx 32rpx; position: relative; z-index: 3; }
  30. .info-row { display: flex; justify-content: space-between; padding: 24rpx 0; border-bottom: 1rpx solid #f5f5f5; }
  31. .info-row:last-child { border-bottom: none; }
  32. .label { font-size: 28rpx; color: #999; }
  33. .value { font-size: 28rpx; color: #333; font-weight: 500; }
  34. .value.orange { color: #ff9800; }
  35. .edit-btn { margin: 40rpx 32rpx; width: calc(100% - 64rpx); height: 96rpx; background: linear-gradient(90deg, #ffd53f, #ff9500); color: #333; border: none; border-radius: 48rpx; font-size: 32rpx; font-weight: bold; line-height: 96rpx; }
  36. </style>