快速开始

快速启动和使用果唯云客服系统

环境要求

  • 后端:Go >= 1.24
  • 前端:Node.js >= 16.0.0(推荐 v18+)
  • 数据库:MySQL >= 5.7
  • 缓存:Redis >= 6.0(可选,用于多实例部署)

步骤一:启动后端服务

cd /Users/liyongsheng/www/im-system/server
go build -o im-system .
./im-system

后端服务运行在:http://localhost:8080

步骤二:启动管理后台

cd /Users/liyongsheng/www/im-system/admin-vue
npm install
npm run dev

管理后台运行在:http://localhost:3000

步骤三:启动访客聊天端

cd /Users/liyongsheng/www/im-system/visitor-chat
./start.sh

访客聊天端运行在:http://localhost:8081

步骤四:登录系统

角色 用户名 密码 访问地址
企业管理员 tenant_admin admin123 http://localhost:3000/tenant
客服坐席 agent001 admin123 http://localhost:3000/workspace

创建测试账号

执行以下 SQL 创建测试租户管理员和坐席账号:

-- 创建测试租户
INSERT INTO tenants (name, code, status, max_agents) 
VALUES ('测试企业', 'test_company', 'active', 10);

-- 创建租户管理员(密码: admin123)
INSERT INTO users (tenant_id, username, password, role, real_name, status) 
VALUES (
  LAST_INSERT_ID(),
  'tenant_admin', 
  '$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy',
  'tenant_admin',
  '租户管理员',
  'active'
);

-- 创建坐席账号(密码: admin123)
INSERT INTO users (tenant_id, username, password, role, real_name, status) 
VALUES (
  1,
  'agent001', 
  '$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy',
  'agent',
  '测试坐席',
  'active'
);

密码安全

  • 密码使用 bcrypt 加密存储
  • 建议定期更换密码
  • 忘记密码可通过"忘记密码"功能重置