- 实现拍照识别食物功能(集成大语言模型视觉能力) - 实现智能对话功能(集成大语言模型流式输出) - 实现食物记录和卡路里管理功能 - 实现体重记录和统计功能 - 实现健康数据管理页面 - 配置数据库表结构(用户、食物记录、体重记录) - 实现Express后端API路由 - 配置Tab导航和前端页面 - 采用健康运动配色方案
77 lines
2.4 KiB
TypeScript
77 lines
2.4 KiB
TypeScript
import { ExpoConfig, ConfigContext } from 'expo/config';
|
||
|
||
const appName = process.env.COZE_PROJECT_NAME || process.env.EXPO_PUBLIC_COZE_PROJECT_NAME || '应用';
|
||
const projectId = process.env.COZE_PROJECT_ID || process.env.EXPO_PUBLIC_COZE_PROJECT_ID;
|
||
const slugAppName = projectId ? `app${projectId}` : 'myapp';
|
||
|
||
export default ({ config }: ConfigContext): ExpoConfig => {
|
||
return {
|
||
...config,
|
||
"name": appName,
|
||
"slug": slugAppName,
|
||
"version": "1.0.0",
|
||
"orientation": "portrait",
|
||
"icon": "./assets/images/icon.png",
|
||
"scheme": "myapp",
|
||
"userInterfaceStyle": "automatic",
|
||
"newArchEnabled": true,
|
||
"ios": {
|
||
"supportsTablet": true
|
||
},
|
||
"android": {
|
||
"adaptiveIcon": {
|
||
"foregroundImage": "./assets/images/adaptive-icon.png",
|
||
"backgroundColor": "#ffffff"
|
||
},
|
||
"package": `com.anonymous.x${projectId || '0'}`
|
||
},
|
||
"web": {
|
||
"bundler": "metro",
|
||
"output": "single",
|
||
"favicon": "./assets/images/favicon.png"
|
||
},
|
||
"plugins": [
|
||
process.env.EXPO_PUBLIC_BACKEND_BASE_URL ? [
|
||
"expo-router",
|
||
{
|
||
"origin": process.env.EXPO_PUBLIC_BACKEND_BASE_URL
|
||
}
|
||
] : 'expo-router',
|
||
[
|
||
"expo-splash-screen",
|
||
{
|
||
"image": "./assets/images/splash-icon.png",
|
||
"imageWidth": 200,
|
||
"resizeMode": "contain",
|
||
"backgroundColor": "#ffffff"
|
||
}
|
||
],
|
||
[
|
||
"expo-image-picker",
|
||
{
|
||
"photosPermission": `允许FoodWeight智能体App访问您的相册,以便您上传或保存图片。`,
|
||
"cameraPermission": `允许FoodWeight智能体App使用您的相机,以便您直接拍摄照片上传。`,
|
||
"microphonePermission": `允许FoodWeight智能体App访问您的麦克风,以便您拍摄带有声音的视频。`
|
||
}
|
||
],
|
||
[
|
||
"expo-location",
|
||
{
|
||
"locationWhenInUsePermission": `FoodWeight智能体App需要访问您的位置以提供周边服务及导航功能。`
|
||
}
|
||
],
|
||
[
|
||
"expo-camera",
|
||
{
|
||
"cameraPermission": `FoodWeight智能体App需要访问相机以拍摄照片和视频。`,
|
||
"microphonePermission": `FoodWeight智能体App需要访问麦克风以录制视频声音。`,
|
||
"recordAudioAndroid": true
|
||
}
|
||
]
|
||
],
|
||
"experiments": {
|
||
"typedRoutes": true
|
||
}
|
||
}
|
||
}
|