zoukankan      html  css  js  c++  java
  • VUE中调用datasnap服务

                    try {
    // http.post 调用 updatelogin 方法 http.get 调用 login 方法 const { data: res }
    = await this.$http.post('/TSM/login/', { _parameters: [this.loginForm.username, this.loginForm.password] });
    // http.post http.get 都调用 login 方法
    // const {data: res} = await this.$http.post( // `/TSM/login/${this.loginForm.username}/${this.loginForm.password}`); if(res.result[0].ret) return this.$message.success('登录成功'); this.$message.error('登录失败'); } catch (e) { this.$message.error(e.message); }
    function TSM.login(UserName, Password: string): TJSONObject;
    begin
      Result := TJSONObject.Create;
      if (UserName='admin') and (Password='123456') then
      begin
        Result.AddPair('ret', TJSONTrue.Create);
      end
      else
      begin
        Result.AddPair('ret', TJSONFalse.Create);
      end;
    end;
    
    function TSM.updatelogin(UserName, Password: string): TJSONObject;
    begin
      Result := TJSONObject.Create;
      if (UserName='admin') and (Password='123456') then
      begin
        Result.AddPair('ret', TJSONTrue.Create);
      end
      else
      begin
        Result.AddPair('ret', TJSONFalse.Create);
      end;
    end;
  • 相关阅读:
    leetcode165
    leetcode63
    leetcode92
    leetcode86
    捣鼓Haskell
    递归操作链表
    treap(堆树)
    贪心策略 — 分数背包
    LeetCode.21
    LeetCode.94
  • 原文地址:https://www.cnblogs.com/Jiaojiawang/p/12331308.html
Copyright © 2011-2022 走看看