| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699 |
- <template>
- <view class="index-container">
- <!-- 顶部用户信息卡片 -->
- <view class="page-top">
- <view class="user-card">
- <view class="user-info">
- <view class="avatar-wrapper">
- <image class="avatar" src="/static/avatar-default.png" mode="aspectFill" />
- </view>
- <view class="user-details">
- <view class="name-row">
- <text class="user-name">赵建平</text>
- <text class="user-role">销售经理</text>
- </view>
- <text class="company-name">杭州臻迹网络技术有限公司</text>
- </view>
- </view>
- <view class="user-address">
- <view class="row" @click="makeCall">
- <text class="contact-icon">📞</text>
- <text class="contact-text">400-0000-0000 (点击拨打电话)</text>
- </view>
- <view class="row">
- <text class="contact-icon">✉️</text>
- <text class="contact-text">zhao.jp@subote.com</text>
- </view>
- <view class="row">
- <text class="contact-icon">📍</text>
- <text class="contact-text">上海市静安区江宁路 168 号</text>
- </view>
- </view>
- <view class="share-btn" @click="shareCard">
- <text class="share-icon">📇</text>
- <text class="share-text">分享名片</text>
- </view>
- </view>
- </view>
- <!-- 最近访客模块 -->
- <view class="recent-visitors">
- <view class="section-header">
- <text class="section-title">最近访客</text>
- <view class="visitor-count">
- <image class="visitor-icon" src="/static/visitor-icon.png" mode="aspectFit" />
- <text class="visitor-number">258 人</text>
- </view>
- <text class="view-more" @click="viewAllVisitors">查看更多</text>
- </view>
- <view class="visitor-list">
- <view class="visitor-item">
- <view class="visitor-avatar">
- <image src="/static/avatar-1.png" mode="aspectFill" />
- </view>
- <view class="visitor-info">
- <view class="visitor-name-row">
- <text class="visitor-name">惠誉黑白激光打印机</text>
- <text class="visitor-tag">待跟进</text>
- </view>
- <text class="visitor-source">来源:微信小程序 手机:13622255856</text>
- <text class="visitor-action">打印机 | 惠普</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 功能菜单网格 -->
- <view class="function-grid">
- <view class="grid-item" @click="navigateTo('clue')">
- <view class="grid-icon clue-icon">
- <text class="icon-text">📋</text>
- </view>
- <text class="grid-label">线索管理</text>
- </view>
- <view class="grid-item" @click="navigateTo('customer')">
- <view class="grid-icon customer-icon">
- <text class="icon-text">🏢</text>
- </view>
- <text class="grid-label">客户管理</text>
- </view>
- <view class="grid-item" @click="navigateTo('contact')">
- <view class="grid-icon contact-icon">
- <text class="icon-text">👥</text>
- </view>
- <text class="grid-label">联系人管理</text>
- </view>
- <view class="grid-item" @click="navigateTo('public-pool')">
- <view class="grid-icon pool-icon">
- <text class="icon-text">🌊</text>
- </view>
- <text class="grid-label">客户公海</text>
- </view>
- <view class="grid-item" @click="navigateTo('opportunity')">
- <view class="grid-icon opportunity-icon">
- <text class="icon-text">💼</text>
- </view>
- <text class="grid-label">商机管理</text>
- </view>
- <view class="grid-item" @click="navigateTo('payment')">
- <view class="grid-icon payment-icon">
- <text class="icon-text">💰</text>
- </view>
- <text class="grid-label">回款管理</text>
- </view>
- <view class="grid-item" @click="navigateTo('product')">
- <view class="grid-icon product-icon">
- <text class="icon-text">📦</text>
- </view>
- <text class="grid-label">产品管理</text>
- </view>
- <view class="grid-item" @click="navigateTo('all')">
- <view class="grid-icon all-icon">
- <text class="icon-text">📊</text>
- </view>
- <text class="grid-label">全部</text>
- </view>
- </view>
- <!-- 业务日历模块 -->
- <view class="business-calendar">
- <view class="section-header">
- <text class="section-title">业务日历</text>
- <text class="view-more" @click="viewAllCalendar">查看更多</text>
- </view>
- <!-- 日历头部 -->
- <view class="calendar-header">
- <text class="calendar-month">2026 年 4 月</text>
- </view>
- <!-- 星期 -->
- <view class="calendar-weekdays">
- <text class="weekday">日</text>
- <text class="weekday">一</text>
- <text class="weekday">二</text>
- <text class="weekday">三</text>
- <text class="weekday">四</text>
- <text class="weekday">五</text>
- <text class="weekday">六</text>
- </view>
- <!-- 日期网格 -->
- <view class="calendar-dates">
- <view class="date-cell">
- <text class="date-num">15</text>
- </view>
- <view class="date-cell">
- <text class="date-num">16</text>
- </view>
- <view class="date-cell">
- <text class="date-num">17</text>
- </view>
- <view class="date-cell today">
- <text class="date-num current">18</text>
- </view>
- <view class="date-cell has-event">
- <text class="date-num">19</text>
- <view class="event-dot"></view>
- </view>
- <view class="date-cell">
- <text class="date-num">20</text>
- </view>
- <view class="date-cell">
- <text class="date-num">21</text>
- </view>
- </view>
- <!-- 今日日程 -->
- <view class="today-schedule">
- <view class="schedule-item">
- <view class="schedule-time">
- <text class="time-period">下午</text>
- <text class="time-value">3:00</text>
- </view>
- <view class="schedule-content">
- <text class="schedule-title">与李总沟通合同细节</text>
- </view>
- </view>
- <view class="schedule-item tomorrow">
- <view class="schedule-time">
- <text class="time-period">明天</text>
- <text class="time-value">10:00</text>
- </view>
- <view class="schedule-content">
- <text class="schedule-title">拜访新客户 - 科技公司</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 底部留白,避免被 TabBar 遮挡 -->
- <view class="bottom-spacer"></view>
- </view>
- </template>
- <script setup>
- import {
- ref,
- onMounted
- } from 'vue'
- import {
- getUserInfo,
- isLogin
- } from '@/utils/userCache.js'
- const userInfo = ref(null)
- onMounted(() => {
- loadUserInfo()
- })
- const loadUserInfo = () => {
- const info = getUserInfo()
- if (info) {
- userInfo.value = info
- }
- }
- const makeCall = () => {
- uni.makePhoneCall({
- phoneNumber: '4000000000'
- })
- }
- const shareCard = () => {
- uni.showShareMenu({
- withShareTicket: true
- })
- }
- const viewAllVisitors = () => {
- uni.navigateTo({
- url: '/pages/visitors/list'
- })
- }
- const navigateTo = (page) => {
- uni.showToast({
- title: `功能开发中:${page}`,
- icon: 'none'
- })
- }
- const viewAllCalendar = () => {
- uni.navigateTo({
- url: '/pages/calendar/list'
- })
- }
- </script>
- <style lang="scss" scoped>
- .index-container {
- min-height: 100vh;
- background-color: #f5f6f8;
- padding-bottom: 120rpx;
- }
- /* 用户信息卡片 */
- .page-top {
- width: 750rpx;
- background: linear-gradient(180deg, #abc7ff 44%, #f4f5f9 100%);
- margin-bottom: 20rpx;
- padding: 20px;
- .user-card {
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.20) 51%, rgba(255, 255, 255, 0.80) 100%), rgba(255, 255, 255, 0.20);
- border: 4rpx solid #fcf6ec;
- border-radius: 28rpx;
- padding: 20px;
- position: relative;
- .user-info {
- display: flex;
- align-items: flex-start;
- .avatar-wrapper {
- flex-shrink: 0;
- margin-right: 24rpx;
- .avatar {
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
- border: 4rpx solid rgba(255, 255, 255, 0.3);
- }
- }
- .user-details {
- flex: 1;
- .name-row {
- display: flex;
- align-items: center;
- margin-bottom: 12rpx;
- .user-name {
- font-size: 40rpx;
- font-weight: 600;
- text-align: LEFT;
- color: #202020;
- line-height: 50rpx;
- letter-spacing: 0.02rpx;
- }
- .user-role {
- margin-left: 10px;
- width: 108rpx;
- height: 40rpx;
- line-height: 40rpx;
- text-align: center;
- background: rgba(255, 255, 255, 0.90);
- border-radius: 8rpx;
- font-size: 22rpx;
- font-weight: 500;
- color: #456eff;
- }
- }
- .company-name {
- font-size: 26rpx;
- color: rgba(255, 255, 255, 0.9);
- display: block;
- margin-bottom: 16rpx;
- }
- .contact-row,
- .email-row,
- .address-row {
- display: flex;
- align-items: center;
- margin-bottom: 8rpx;
- .contact-icon {
- font-size: 24rpx;
- margin-right: 8rpx;
- }
- .contact-text {
- font-size: 22rpx;
- color: rgba(255, 255, 255, 0.85);
- }
- }
- }
- }
- .user-address{
- display: grid;
- gap: 10rpx;
- .row{
- display: grid;
- grid-template-columns: 24px 1fr;
- gap: 6rpx;
- align-items: center;
- font-size: 24rpx;
- .contact-text{
- font-weight: 500;
- color: #666666;
- }
- }
- }
- .share-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- background: rgba(255, 255, 255, 0.2);
- align-self: flex-start;
- width: 204rpx;
- height: 66rpx;
- background: linear-gradient(90deg, #446dff, rgba(68, 109, 255, 0.30) 100%);
- border-radius: 8rpx 28rpx 8rpx 28rpx;
- box-sizing: border-box;
- position: absolute;
- top: -2rpx;
- right: -2rpx;
- .share-icon {
- font-size: 28rpx;
- margin-right: 8rpx;
- }
- .share-text {
- font-size: 26rpx;
- color: #ffffff;
- }
- }
- }
- }
- /* 最近访客模块 */
- .recent-visitors {
- background: #ffffff;
- margin: 20rpx;
- padding: 32rpx;
- border-radius: 24rpx;
- box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
- .section-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 24rpx;
- .section-title {
- font-size: 32rpx;
- font-weight: 600;
- color: #333333;
- }
- .visitor-count {
- display: flex;
- align-items: center;
- .visitor-icon {
- width: 32rpx;
- height: 32rpx;
- margin-right: 8rpx;
- }
- .visitor-number {
- font-size: 24rpx;
- color: #999999;
- }
- }
- .view-more {
- font-size: 24rpx;
- color: #667eea;
- }
- }
- .visitor-list {
- .visitor-item {
- display: flex;
- align-items: flex-start;
- .visitor-avatar {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- margin-right: 20rpx;
- flex-shrink: 0;
- image {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- }
- .visitor-info {
- flex: 1;
- .visitor-name-row {
- display: flex;
- align-items: center;
- margin-bottom: 8rpx;
- .visitor-name {
- font-size: 28rpx;
- color: #333333;
- font-weight: 500;
- }
- .visitor-tag {
- font-size: 20rpx;
- color: #ff6b6b;
- background: rgba(255, 107, 107, 0.1);
- padding: 4rpx 12rpx;
- border-radius: 16rpx;
- margin-left: 12rpx;
- }
- }
- .visitor-source {
- font-size: 22rpx;
- color: #999999;
- display: block;
- margin-bottom: 8rpx;
- }
- .visitor-action {
- font-size: 22rpx;
- color: #666666;
- }
- }
- }
- }
- }
- /* 功能菜单网格 */
- .function-grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 24rpx;
- background: #ffffff;
- margin: 20rpx;
- padding: 32rpx 24rpx;
- border-radius: 24rpx;
- box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
- .grid-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- .grid-icon {
- width: 96rpx;
- height: 96rpx;
- border-radius: 28rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 12rpx;
- .icon-text {
- font-size: 48rpx;
- }
- }
- .clue-icon {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- }
- .customer-icon {
- background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
- }
- .contact-icon {
- background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
- }
- .pool-icon {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- }
- .opportunity-icon {
- background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
- }
- .payment-icon {
- background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
- }
- .product-icon {
- background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
- }
- .all-icon {
- background: linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%);
- }
- .grid-label {
- font-size: 24rpx;
- color: #333333;
- }
- }
- }
- /* 业务日历模块 */
- .business-calendar {
- background: #ffffff;
- margin: 20rpx;
- padding: 32rpx;
- border-radius: 24rpx;
- box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
- .section-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 24rpx;
- .section-title {
- font-size: 32rpx;
- font-weight: 600;
- color: #333333;
- }
- .view-more {
- font-size: 24rpx;
- color: #667eea;
- }
- }
- .calendar-header {
- text-align: center;
- margin-bottom: 20rpx;
- .calendar-month {
- font-size: 30rpx;
- font-weight: 600;
- color: #333333;
- }
- }
- .calendar-weekdays {
- display: grid;
- grid-template-columns: repeat(7, 1fr);
- text-align: center;
- margin-bottom: 16rpx;
- .weekday {
- font-size: 24rpx;
- color: #999999;
- padding: 12rpx 0;
- }
- }
- .calendar-dates {
- display: grid;
- grid-template-columns: repeat(7, 1fr);
- gap: 8rpx;
- margin-bottom: 32rpx;
- .date-cell {
- aspect-ratio: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- border-radius: 50%;
- position: relative;
- .date-num {
- font-size: 26rpx;
- color: #333333;
- }
- &.today {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- .date-num {
- color: #ffffff;
- font-weight: 600;
- }
- }
- &.has-event {
- .event-dot {
- width: 12rpx;
- height: 12rpx;
- background: #ff6b6b;
- border-radius: 50%;
- position: absolute;
- bottom: 8rpx;
- }
- }
- }
- }
- .today-schedule {
- .schedule-item {
- display: flex;
- align-items: flex-start;
- padding: 24rpx;
- background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
- border-radius: 16rpx;
- margin-bottom: 16rpx;
- border-left: 6rpx solid #667eea;
- &.tomorrow {
- border-left-color: #30cfd0;
- }
- .schedule-time {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-right: 20rpx;
- min-width: 100rpx;
- .time-period {
- font-size: 22rpx;
- color: #999999;
- margin-bottom: 4rpx;
- }
- .time-value {
- font-size: 28rpx;
- font-weight: 600;
- color: #333333;
- }
- }
- .schedule-content {
- flex: 1;
- .schedule-title {
- font-size: 28rpx;
- color: #333333;
- line-height: 1.5;
- }
- }
- }
- }
- }
- .bottom-spacer {
- height: 40rpx;
- }
- </style>
|