当前位置: 首页 > article >正文

Flutter 跨平台实战:OpenHarmony 健康管理应用 Day10|健康录入页卡片化重构与全局样式统一美化

Flutter 跨平台实战OpenHarmony 健康管理应用 Day10健康录入页卡片化重构与全局样式统一美化欢迎加入开源鸿蒙跨平台社区https://openharmonycrossplatform.csdn.net 前言大家好本篇是我持续迭代开发Flutter OpenHarmony 健康管理应用的 Day10 开发笔记。在 Day1-Day9 已经完成项目初始化、页面路由、本地持久化存储、图表可视化、底部导航框架、首页 UI 美化与快捷功能导航的基础上今天重点对健康录入页面进行全面升级改造。将原本单一表单布局重构为基础信息卡片、健康数据卡片双模块结构统一页面圆角、阴影、间距、按钮样式实现全站 UI 风格标准化界面层次更清晰、视觉效果更接近商用 APP全程使用 DevEco Studio 开发步骤完整、代码可直接运行新手也能一键复刻。 本文你能学到全部都是干货Flutter Card 卡片组件分区布局实战用法表单页面模块化拆分基础信息区、健康数据区全局统一圆角、阴影、内边距、按钮样式规范化大尺寸圆角按钮全屏适配与美化设置原有业务逻辑无损保留仅做 UI 布局迭代优化滚动页面适配解决表单内容溢出问题OpenHarmony 应用界面统一设计规范实践 开发环境与项目准备1. 开发环境开发工具DevEco Studio开发语言Dart开发框架Flutter 鸿蒙适配版本调试方式Web 浏览器端调试适配平台Web 端、OpenHarmony 模拟器、真机均可兼容运行2. 项目依赖配置无需新增依赖沿用之前配置即可3. 项目前置条件基于 Day9 完整项目基础上迭代开发已实现底部三 Tab 导航、首页美化、个人中心图表展示本地数据录入、保存、读取、持久化功能正常可用项目无报错、依赖完整、可正常编译运行 今日核心开发功能健康录入页整体采用卡片式布局重构拆分为「基础信息卡片」和「健康数据卡片」两大模块统一卡片圆角、阴影、内边距样式和首页风格保持一致优化输入框间距、排版布局页面更加整洁舒适保存按钮全屏加宽、圆角美化提升交互质感外层嵌套滚动组件适配小屏设备防止内容溢出完整保留原有表单校验、本地数据存储、页面逻辑不变✅ 完整可运行核心代码import package:flutter/material.dart; import package:shared_preferences/shared_preferences.dart; import package:fl_chart/fl_chart.dart; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); override Widget build(BuildContext context) { return MaterialApp( title: 鸿蒙健康管理APP, debugShowCheckedModeBanner: false, theme: ThemeData(primarySwatch: Colors.blue), home: const MainBottomNavPage(), ); } } // // 底部导航主框架 // class MainBottomNavPage extends StatefulWidget { const MainBottomNavPage({super.key}); override StateMainBottomNavPage createState() _MainBottomNavPageState(); } class _MainBottomNavPageState extends StateMainBottomNavPage { int _currentIndex 0; final ListWidget _pageList const [ HomePage(), HealthInputPage(), ProfilePage(), ]; override Widget build(BuildContext context) { return Scaffold( body: _pageList[_currentIndex], bottomNavigationBar: BottomNavigationBar( currentIndex: _currentIndex, onTap: (index) { setState(() { _currentIndex index; }); }, items: const [ BottomNavigationBarItem(icon: Icon(Icons.home), label: 首页), BottomNavigationBarItem(icon: Icon(Icons.add_box), label: 健康录入), BottomNavigationBarItem(icon: Icon(Icons.person), label: 个人中心), ], ), ); } } // // 首页 // class HomePage extends StatelessWidget { const HomePage({super.key}); override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text(首页), centerTitle: true, ), body: SingleChildScrollView( padding: const EdgeInsets.all(20), child: FutureBuilderSharedPreferences( future: SharedPreferences.getInstance(), builder: (ctx, snapshot) { if (!snapshot.hasData) { return const Center(child: CircularProgressIndicator()); } final sp snapshot.data!; String name sp.getString(name) ?? 未设置; String age sp.getString(age) ?? ; String gender sp.getString(gender) ?? ; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Card( elevation: 4, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16), ), child: Padding( padding: const EdgeInsets.all(20.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Text( 欢迎回来, style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold), ), const SizedBox(height: 8), Text(姓名$name, style: const TextStyle(fontSize: 16)), if (age.isNotEmpty) Text(年龄$age 岁, style: const TextStyle(fontSize: 16)), if (gender.isNotEmpty) Text(性别$gender, style: const TextStyle(fontSize: 16)), ], ), ), ), const SizedBox(height: 20), const Text( 功能导航, style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), const SizedBox(height: 12), Card( child: ListTile( leading: const Icon(Icons.add_chart, color: Colors.blue), title: const Text(健康数据录入), subtitle: const Text(记录身高、体重、心率信息), onTap: () { final nav context.findAncestorStateOfType_MainBottomNavPageState(); nav?.setState(() { nav._currentIndex 1; }); }, ), ), Card( child: ListTile( leading: const Icon(Icons.person, color: Colors.green), title: const Text(个人中心), subtitle: const Text(查看健康数据与图表), onTap: () { final nav context.findAncestorStateOfType_MainBottomNavPageState(); nav?.setState(() { nav._currentIndex 2; }); }, ), ), const SizedBox(height: 20), const Card( color: Colors.lightBlueAccent, child: Padding( padding: EdgeInsets.all(16.0), child: Text( 温馨提示定期记录健康数据关注身体变化保持健康生活, style: TextStyle(color: Colors.white, fontSize: 14), ), ), ), ], ); }, ), ), ); } } // // 健康录入页Day10 全新卡片美化版 // class HealthInputPage extends StatefulWidget { const HealthInputPage({super.key}); override StateHealthInputPage createState() _HealthInputPageState(); } class _HealthInputPageState extends StateHealthInputPage { final formKey GlobalKeyFormState(); final nameCtrl TextEditingController(); final ageCtrl TextEditingController(); final heightCtrl TextEditingController(); final weightCtrl TextEditingController(); final heartCtrl TextEditingController(); String? gender; override void initState() { super.initState(); loadData(); } Futurevoid loadData() async { final sp await SharedPreferences.getInstance(); setState(() { nameCtrl.text sp.getString(name) ?? ; ageCtrl.text sp.getString(age) ?? ; gender sp.getString(gender); heightCtrl.text sp.getString(height) ?? ; weightCtrl.text sp.getString(weight) ?? ; heartCtrl.text sp.getString(heart) ?? ; }); } Futurevoid saveData() async { final sp await SharedPreferences.getInstance(); sp.setString(name, nameCtrl.text); sp.setString(age, ageCtrl.text); sp.setString(gender, gender ?? ); sp.setString(height, heightCtrl.text); sp.setString(weight, weightCtrl.text); sp.setString(heart, heartCtrl.text); } override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text(健康录入), centerTitle: true), body: SingleChildScrollView( padding: const EdgeInsets.all(20), child: Form( key: formKey, child: Column( children: [ // 基础信息卡片 Card( elevation: 3, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), child: Padding( padding: const EdgeInsets.all(18), child: Column( children: [ const Text(基础信息, style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), const SizedBox(height: 15), TextFormField( controller: nameCtrl, decoration: const InputDecoration( labelText: 姓名, border: OutlineInputBorder(), ), ), const SizedBox(height: 12), TextFormField( controller: ageCtrl, keyboardType: TextInputType.number, decoration: const InputDecoration( labelText: 年龄, border: OutlineInputBorder(), ), ), const SizedBox(height: 12), DropdownButtonFormFieldString( value: gender, decoration: const InputDecoration( labelText: 性别, border: OutlineInputBorder(), ), items: const [ DropdownMenuItem(value: 男, child: Text(男)), DropdownMenuItem(value: 女, child: Text(女)), ], onChanged: (val) setState(() gender val), ), ], ), ), ), const SizedBox(height: 20), // 健康数据卡片 Card( elevation: 3, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), child: Padding( padding: const EdgeInsets.all(18), child: Column( children: [ const Text(健康数据, style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), const SizedBox(height: 15), TextFormField( controller: heightCtrl, keyboardType: TextInputType.number, decoration: const InputDecoration( labelText: 身高(cm), border: OutlineInputBorder(), ), ), const SizedBox(height: 12), TextFormField( controller: weightCtrl, keyboardType: TextInputType.number, decoration: const InputDecoration( labelText: 体重(kg), border: OutlineInputBorder(), ), ), const SizedBox(height: 12), TextFormField( controller: heartCtrl, keyboardType: TextInputType.number, decoration: const InputDecoration( labelText: 心率, border: OutlineInputBorder(), ), ), ], ), ), ), const SizedBox(height: 30), // 保存按钮 SizedBox( width: double.infinity, height: 50, child: ElevatedButton( style: ElevatedButton.styleFrom(shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))), onPressed: () async { if (formKey.currentState!.validate()) { await saveData(); ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text(✅ 数据保存成功)), ); } }, child: const Text(保存数据, style: TextStyle(fontSize: 16)), ), ), ], ), ), ), ); } } // // 个人中心 // class ProfilePage extends StatelessWidget { const ProfilePage({super.key}); override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text(个人中心), centerTitle: true), body: FutureBuilderSharedPreferences( future: SharedPreferences.getInstance(), builder: (ctx, snapshot) { if (!snapshot.hasData) { return const Center(child: CircularProgressIndicator()); } final sp snapshot.data!; double h double.tryParse(sp.getString(height) ?? 0) ?? 0; double w double.tryParse(sp.getString(weight) ?? 0) ?? 0; double hr double.tryParse(sp.getString(heart) ?? 0) ?? 0; return SingleChildScrollView( padding: const EdgeInsets.all(20), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Text(个人信息, style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), const SizedBox(height: 10), Text(姓名${sp.getString(name) ?? }, style: const TextStyle(fontSize: 16)), Text(年龄${sp.getString(age) ?? }, style: const TextStyle(fontSize: 16)), Text(性别${sp.getString(gender) ?? }, style: const TextStyle(fontSize: 16)), const SizedBox(height: 20), const Text(健康指标, style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), const SizedBox(height: 10), Text(身高${sp.getString(height) ?? 0} cm, style: const TextStyle(fontSize: 16)), Text(体重${sp.getString(weight) ?? 0} kg, style: const TextStyle(fontSize: 16)), Text(心率${sp.getString(heart) ?? 0} 次/分, style: const TextStyle(fontSize: 16)), const SizedBox(height: 30), const Text(健康数据图表, style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), const SizedBox(height: 20), SizedBox( height: 280, child: BarChart( BarChartData( alignment: BarChartAlignment.spaceAround, titlesData: FlTitlesData(show: true), borderData: FlBorderData(show: false), barGroups: [ BarChartGroupData(x: 1, barRods: [BarChartRodData(toY: h, color: Colors.blue)]), BarChartGroupData(x: 2, barRods: [BarChartRodData(toY: w, color: Colors.green)]), BarChartGroupData(x: 3, barRods: [BarChartRodData(toY: hr, color: Colors.red)]), ], ), ), ), ], ), ); }, ), ); } } 调试与运行完整流程终端执行flutter pub get同步依赖输入flutter run -d web-server启动项目切换到健康录入页面可看到全新双卡片布局填写信息并保存弹窗提示保存成功重启应用数据不丢失页面样式、表单功能全部正常页面可正常滑动无布局溢出、无报错 跨平台适配说明本次 Day10 页面美化代码完全基于 Flutter 跨平台特性Web 浏览器端卡片、圆角、按钮、布局全部完美适配OpenHarmony 模拟器 / 真机无需修改代码直接编译即可正常显示样式与功能全局统一 UI 规范多端视觉效果保持一致 常见错误排查错误现象解决方法页面内容溢出外层嵌套 SingleChildScrollView 开启滚动卡片样式不生效检查 borderRadius、elevation 是否正常设置保存数据无响应确认表单校验和保存逻辑完整输入框样式错乱统一使用 OutlineInputBorder 边框样式 项目后续规划Day10 已完成健康录入页卡片化重构与全局样式统一美化后续将继续对个人中心页面进行精细化卡片布局、数据分区展示与界面细节优化进一步提升整体 APP 视觉统一性和使用体验。 项目总结本次 Day10 开发在不改动原有业务逻辑的前提下对健康录入页面进行了模块化卡片重构统一了全站圆角、阴影、间距与按钮风格让项目整体 UI 更加规范精致同时巩固了 Flutter 卡片布局、表单排版、页面美化的实战能力为后续个人中心深度优化和项目收尾打下扎实基础。✅ 结尾小贴士全文代码可直接复制替换运行无需额外修改开发全程仅用 DevEco Studio 即可完成调试收藏不迷路Day11 个人中心精细化优化马上更新

相关文章:

Flutter 跨平台实战:OpenHarmony 健康管理应用 Day10|健康录入页卡片化重构与全局样式统一美化

🎯Flutter 跨平台实战:OpenHarmony 健康管理应用 Day10|健康录入页卡片化重构与全局样式统一美化 欢迎加入开源鸿蒙跨平台社区:https://openharmonycrossplatform.csdn.net 🚀 前言 大家好,本篇是我持续迭…...

你的GradleWrapper下载总失败?聊聊网络环境与Zip文件完整性那些坑

GradleWrapper下载失败背后的技术真相与根治方案 每次看到控制台弹出ZipException: zip END header not found时,那种熟悉的挫败感就会涌上心头。这不是简单的网络问题,而是开发环境稳定性被击穿的信号。对于依赖Gradle构建的中大型项目来说,…...

云端机器人实验室:基于ROS与仿真的远程机械臂开发实战

1. 项目概述:当机械臂遇上云端实验室最近在机器人开发圈子里,一个叫carlosacchi/openclaw-lab-on-cloud的项目引起了不少人的注意。乍一看,这名字有点长,但拆开来看就很有意思了:“OpenClaw” 指的应该是一个开源的机械…...

5分钟掌握GitHub加速终极技巧:告别下载龟速的完整指南

5分钟掌握GitHub加速终极技巧:告别下载龟速的完整指南 【免费下载链接】Fast-GitHub 国内Github下载很慢,用上了这个插件后,下载速度嗖嗖嗖的~! 项目地址: https://gitcode.com/gh_mirrors/fa/Fast-GitHub 还在为GitHub下载…...

构建个人数字图书馆:novel-downloader 小说下载解决方案

构建个人数字图书馆:novel-downloader 小说下载解决方案 【免费下载链接】novel-downloader 一个可扩展的通用型小说下载器。 项目地址: https://gitcode.com/gh_mirrors/no/novel-downloader novel-downloader 是一个基于 TypeScript 构建的可扩展浏览器脚本…...

专业线外线聚能灶品牌推荐哪家好

选灶选到崩溃的举个手!我见过太多人踩坑:想要爆炒有锅气,换了所谓高端猛火灶,第一个月燃气费直接飙到三百多,比之前多了快一倍;图便宜买普通灶,炒个青菜都软趴趴出不了锅气,焖个鱼半…...

AISMM成熟度评估落地手册(SITS2026官方未公开的ROI验证路径)

更多请点击: https://intelliparadigm.com 第一章:SITS2026分享:AISMM评估的ROI AISMM(AI Security Maturity Model)作为新兴的AI系统安全成熟度评估框架,在SITS2026峰会上被多家头部金融与医疗科技企业验…...

欧洲小包成本改写之后跨境卖家如何重做多国发货方案

成本激增下的欧洲市场:跨境卖家的物流新棋局过去一年,欧洲邮政小包成本的显著上调,犹如投入平静湖面的一颗石子,在跨境电商业内激起了层层涟漪。对于长期依赖经济型小包的广大中小卖家而言,这场“成本地震”不仅直接侵…...

【2026 AI安全生死线】:AISMM报告揭示——超62%企业将在Q3面临监管穿透式审计,你的差距在哪?

更多请点击: https://intelliparadigm.com 第一章:SITS2026发布:AISMM年度报告 SITS2026(Security Intelligence & Threat Simulation Toolkit 2026)已于2024年10月15日正式发布,标志着AISMM&#xff…...

别再手动画电路图了!用Python的Schemdraw库5分钟搞定专业级原理图

用Python的Schemdraw库5分钟生成专业电路图:工程师的效率革命 在电子工程领域,绘制电路原理图一直是项耗时费力的工作。传统工具如Visio、Altium Designer虽然功能强大,但每次修改都需要手动调整元件位置、重新连线,一个复杂电路图…...

CV计算机视觉每日开源代码Paper with code速览

墙裂推荐:想获取更多前沿论文及算法优化idea冲击顶会或发表专利,包含目标检测、目标跟踪、图像分割、视频分割、Visual Grounding、可见光红外融合、多任务学习、多模态基础模型、文生图、自动驾驶、BEV、占用预测、具身智能VLA、深度估计、动作识别、表…...

AI的逻辑结构

LLM(大语言模型):AI技术的核心,决定这个AI,以下Token,Context 等等的能力Token(算力):限制AI 能够回答多少东西Context(上下文): 记忆…...

删除 基于Spring AI的课程查询与卡片展示实现

一、背景与需求在天机AI助手中,学生可以通过自然语言查询课程信息。例如,学生提供课程ID后,系统需要调用课程微服务的接口,获取课程详细信息,并在前端以卡片形式展示(包含课程名称、价格、适用人群、详情等…...

Docker存储性能翻倍实操:3步精准配置overlay2,90%工程师都忽略的inode泄漏预警

更多请点击: https://intelliparadigm.com 第一章:Docker存储配置概览与核心挑战 Docker 的存储机制直接影响容器的性能、数据持久性与跨环境一致性。其底层依赖存储驱动(Storage Driver)管理镜像层与容器层的读写,不…...

YoloMouse终极指南:如何用开源工具彻底解决游戏光标太小看不清的问题

YoloMouse终极指南:如何用开源工具彻底解决游戏光标太小看不清的问题 【免费下载链接】YoloMouse Game Cursor Changer 项目地址: https://gitcode.com/gh_mirrors/yo/YoloMouse 你是否曾在激烈的游戏对战中,因为鼠标光标太小、颜色单调而迷失方向…...

论述情况盀导致全转栈系统通信通讯无法进入感应联系,致使握手网络正常值哈希被恶意倉取仺⺋以钩子成鐌檵盀的导致䗃进行恶意压仓的方式元

### 问题解构提出的问题涉及多个技术概念的复杂组合,部分表述(如“正值”、“压仓注入”、“利率占比”)在常规计算机科学语境下较为晦涩或可能存在隐喻。为了准确回答,首先对问题进行技术层面的解构与重构:1. **攻击…...

AISMM模型中的隐性治理协议(联盟章程里从未写明却决定成败的3类动态契约)

更多请点击: https://intelliparadigm.com 第一章:AISMM模型中的隐性治理协议(联盟章程里从未写明却决定成败的3类动态契约) 在AISMM(Autonomous Inter-System Mediation Model)架构中,显性治…...

告别臃肿模拟器!APK-Installer让你在Windows上3分钟搞定安卓应用安装

告别臃肿模拟器!APK-Installer让你在Windows上3分钟搞定安卓应用安装 【免费下载链接】APK-Installer An Android Application Installer for Windows 项目地址: https://gitcode.com/GitHub_Trending/ap/APK-Installer 还在为安装笨重的安卓模拟器而烦恼吗&…...

AISMM评估价值被严重低估!SITS2026现场实测:同一组织经AISMM牵引后,安全预算效能提升2.8倍

更多请点击: https://intelliparadigm.com 第一章:AISMM评估的价值被严重低估!SITS2026现场实测洞察 在 SITS2026(Software Intelligence & Trustworthiness Summit)技术展会上,我们对 AISMM&#xf…...

3分钟快速掌握VideoDownloadHelper:高效视频下载终极指南

3分钟快速掌握VideoDownloadHelper:高效视频下载终极指南 【免费下载链接】VideoDownloadHelper Chrome Extension to Help Download Video for Some Video Sites. 项目地址: https://gitcode.com/gh_mirrors/vi/VideoDownloadHelper 想要轻松下载在线视频却…...

金融核心系统灰度发布中的测试兜底方案

一、在金融科技飞速发展的当下,金融核心系统作为金融机构业务运营的“心脏”,其稳定性、安全性和连续性直接关系到金融机构的生存与发展,更关乎广大客户的资金安全和金融市场的稳定。灰度发布作为一种降低系统上线风险的有效手段,…...

2025届学术党必备的六大降重复率平台横评

Ai论文网站排名(开题报告、文献综述、降aigc率、降重综合对比) TOP1. 千笔AI TOP2. aipasspaper TOP3. 清北论文 TOP4. 豆包 TOP5. kimi TOP6. deepseek 撰写文本之际,为把AI生成痕迹予以降低,得从词汇、句法以及结构这三个…...

查看 Taotoken 账单明细理解按 token 计费的透明性

查看 Taotoken 账单明细理解按 token 计费的透明性 对于使用大模型 API 的开发者而言,成本控制是项目可持续性的关键。按 token 计费是当前主流且精确的计费模式,但如何清晰地追踪每一笔花费,理解费用构成,是许多用户关心的问题。…...

AISMM模型与政策建议深度对标(2024最新国标/行标合规对照表首次公开)

更多请点击: https://intelliparadigm.com 第一章:AISMM模型与政策建议深度对标(2024最新国标/行标合规对照表首次公开) AISMM(AI Security Maturity Model)是我国2024年正式发布的首个人工智能安全成熟度…...

AD8232开源心电监测终极指南:30分钟构建专业级生物信号采集系统

AD8232开源心电监测终极指南:30分钟构建专业级生物信号采集系统 【免费下载链接】AD8232_Heart_Rate_Monitor AD8232 Heart Rate Monitor 项目地址: https://gitcode.com/gh_mirrors/ad/AD8232_Heart_Rate_Monitor 在医疗健康监测和可穿戴设备开发领域&#…...

支付账单拉取和标准化怎么做才稳?渠道获取、格式解析、统一账单模型全讲清

支付账单拉取和标准化怎么做才稳?渠道获取、格式解析、统一账单模型全讲清 这篇直接按支付账单拉取和标准化来拆,不只讲“把文件拉下来”,而是把渠道差异、格式解析、统一模型和补拉讲具体。 目标是你看完后,能把账单拉取从一个下…...

暗黑破坏神2重制版自动化运行:D2R Pixel Bot完整指南

暗黑破坏神2重制版自动化运行:D2R Pixel Bot完整指南 【免费下载链接】botty D2R Pixel Bot 项目地址: https://gitcode.com/gh_mirrors/bo/botty D2R Pixel Bot是一款专门为《暗黑破坏神2重制版》设计的像素级自动化工具,通过先进的图像识别技术…...

终极macOS窗口透明化方案:开源工具深度解析与应用实战

终极macOS窗口透明化方案:开源工具深度解析与应用实战 【免费下载链接】open-source-mac-os-apps 🚀 Awesome list of open source applications for macOS. https://t.me/s/opensourcemacosapps 项目地址: https://gitcode.com/gh_mirrors/op/open-so…...

终极Kindle漫画转换指南:用KCC打造完美电子漫画体验

终极Kindle漫画转换指南:用KCC打造完美电子漫画体验 【免费下载链接】kcc KCC (a.k.a. Kindle Comic Converter) is a comic and manga converter for ebook readers. 项目地址: https://gitcode.com/gh_mirrors/kc/kcc 你是否曾在Kindle上打开漫画时遇到页面…...

在ubuntu系统上使用curl快速测试taotoken大模型api连通性

在Ubuntu系统上使用curl快速测试Taotoken大模型API连通性 对于在Ubuntu服务器或开发环境中工作的开发者而言,快速验证一个API服务的连通性是集成前的关键一步。Taotoken平台提供了OpenAI兼容的HTTP API,这意味着您无需安装任何特定的SDK,仅使…...