- 更新 DashboardLayout 组件,统一使用演示模式布局 - 实现仪表盘页面的完整演示数据和功能 - 完成用户管理页面的演示模式,包含搜索、过滤、分页等功能 - 实现通话记录页面的演示数据和录音播放功能 - 完成翻译员管理页面的演示模式 - 实现订单管理页面的完整功能 - 完成发票管理页面的演示数据 - 更新文档管理页面 - 添加 utils.ts 工具函数库 - 完善 API 路由和数据库结构 - 修复各种 TypeScript 类型错误 - 统一界面风格和用户体验
54 lines
1.6 KiB
JavaScript
54 lines
1.6 KiB
JavaScript
const { createClient } = require('@supabase/supabase-js');
|
|
|
|
const supabaseUrl = 'https://poxwjzdianersitpnvdy.supabase.co';
|
|
const supabaseKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBveHdqemRpYW5lcnNpdHBudmR5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTExNjk4MjMsImV4cCI6MjA2Njc0NTgyM30.FkgCCSHK0_i8bNFIhhN3k6dEbP5PpE52IggcVJC4Aj8';
|
|
|
|
const supabase = createClient(supabaseUrl, supabaseKey);
|
|
|
|
async function checkTable() {
|
|
try {
|
|
console.log('检查users表结构...');
|
|
|
|
// 尝试查询表中的所有数据
|
|
const { data, error } = await supabase
|
|
.from('users')
|
|
.select('*')
|
|
.limit(1);
|
|
|
|
if (error) {
|
|
console.error('查询错误:', error);
|
|
} else {
|
|
console.log('查询结果:', data);
|
|
if (data && data.length > 0) {
|
|
console.log('表列名:', Object.keys(data[0]));
|
|
} else {
|
|
console.log('表为空,尝试插入测试数据...');
|
|
|
|
// 尝试插入一个简单的用户
|
|
const { data: insertData, error: insertError } = await supabase
|
|
.from('users')
|
|
.insert([
|
|
{
|
|
email: 'admin@example.com',
|
|
name: '系统管理员',
|
|
phone: '13800138000',
|
|
user_type: 'admin',
|
|
status: 'active'
|
|
}
|
|
])
|
|
.select();
|
|
|
|
if (insertError) {
|
|
console.error('插入错误:', insertError);
|
|
} else {
|
|
console.log('插入成功:', insertData);
|
|
}
|
|
}
|
|
}
|
|
|
|
} catch (error) {
|
|
console.error('操作失败:', error);
|
|
}
|
|
}
|
|
|
|
checkTable();
|