愛招飛幫助手冊 愛招飛幫助手冊
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • Smart幫助主頁
  • 學習手冊

    • 基本入門

    • 功能介紹

    • 控制元件說明

    • 功能用法

    • 專用模板

      • 報表設計
      • RestAPI
    • 開發流程

    • 函式程式

  • 開發手冊

RestAPI

# Smart RestAPI

  Smart中包含了RestAPI客戶端的相關功能,可通過RestAPI獲取相關的請求資訊。

  我們以Smart快速上手中的示例為例,以 Myrtille Login API 為使用的API參照,在其中再新增一個TMemo元件,在其中Lines中輸入登錄使用的Body資訊。

  在Button1OnClick事件中新增以下指令碼資訊。其中的{server}處請修改爲自己設定的Myrtille地址。其中使用到的關鍵指令碼為paxfunc.NetHttpPost。

var
  QUrl: String;
  QSource: String;
  QContentType: String;
begin
  QUrl := 'http://{server}:8008/MyrtilleAdmin/ConnectionService/GetConnectionId';
  QSource := FThis.Memo1.Lines.Text;
  QContentType := 'application/json';
  ShowMessage(paxfunc.NetHttpPost(QUrl,QSource,QContentType));
end;
1
2
3
4
5
6
7
8
9
10

  再次運行此指令碼,如果設定正確的話,會在對話方塊中顯示預期收到的資訊。

  關於其他RestAPI相關的函式可參考paxfunc.NetHttpGet。

  除上述方式外,Smart提供了RestAPI控制元件。可使用RestAPI控制元件進行請求的發送與反饋資訊的接收。

報表設計
紡織印染業ERP設計實務

← 報表設計 紡織印染業ERP設計實務→

Copyright © 2021-2025 愛招飛IsoFace | ALL Rights Reserved
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式