Browse Source

甘肃紫光平台,网页点击软件图标,启动本地已安装的计量支付软件,不能出现登录界面,无密码仅账号登录。

Chenshilong 8 years atrás
parent
commit
ab2efd0d5c
4 changed files with 27 additions and 6 deletions
  1. 10 0
      DataModules/PHPWebDm.pas
  2. 2 2
      Dprs/CSL/Measure_Cloud.dof
  3. 15 4
      Dprs/CSL/Measure_Cloud.dpr
  4. BIN
      Dprs/CSL/Measure_Cloud.res

+ 10 - 0
DataModules/PHPWebDm.pas

@@ -106,6 +106,7 @@ type
     function NetError(AMid: string): string;
     function PageError(AMid: string): string;
     function ExistInServer(AWebID: Integer): Boolean;
+    function GetNameFromURLProtocol(AURLProtocol: string): string;
 
 
     property Account: string read FAccount write SetAccount;
@@ -691,6 +692,15 @@ begin
     Result := False;
 end;
 
+// ¸ñʽΪ Measure:chen
+function TPHPWeb.GetNameFromURLProtocol(AURLProtocol: string): string;
+begin
+  if Trim(AURLProtocol) = '' then
+    Result := ''
+  else
+    Result := Copy(AURLProtocol, 9, Length(AURLProtocol) - 8);
+end;
+
 initialization
 
 finalization

+ 2 - 2
Dprs/CSL/Measure_Cloud.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=3
-Build=1106
+Build=1112
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化云版
-FileVersion=3.1.3.1106
+FileVersion=3.1.3.1112
 InternalName=
 LegalCopyright=
 LegalTrademarks=

+ 15 - 4
Dprs/CSL/Measure_Cloud.dpr

@@ -213,7 +213,7 @@ uses
 var
   Mutex: THandle;
   IPForm: TIPForm;
-  sInfo, sURL: string;
+  sInfo, sURL, sName: string;
   vFDForm: TFileDownLoadForm;
 
 begin
@@ -243,14 +243,25 @@ begin
       end;
 
       {$IFDEF _mLoginNoPW}
-      if ParamStr(1) = '' then         // 表示手工运行的
+      sName := PHPWeb.GetNameFromURLProtocol(ParamStr(1));
+      if sName = '' then         // 表示手工运行的
       begin
-        Application.MessageBox('本软件只能通过紫光平台打开!', '系统提示', MB_OK + MB_ICONINFORMATION);
+        Application.MessageBox('请从 项目管理信息平台 打开软件。', '系统提示', MB_OK + MB_ICONINFORMATION);
         Application.Terminate;
       end
       else
       begin
-        case PHPWeb.Login(ParamStr(1), '', 2, sInfo, sURL) of
+        // For Test only!
+//        Application.MessageBox(PChar(ParamStr(1) + #10#13 + sName), '系统提示', MB_OK + MB_ICONINFORMATION);
+//        Application.Terminate;
+
+        case PHPWeb.Login(sName, '', 2, sInfo, sURL) of
+          ltLoginFail:
+          begin
+            Application.MessageBox('该用户尚未注册不能登录!', '操作提醒', MB_OK + MB_ICONWARNING);
+            Application.Terminate;
+          end;
+
           ltUpdate:  // 升级
           begin
             if Application.MessageBox(PChar(sInfo), '系统提示', MB_OKCANCEL + MB_ICONQUESTION) = ID_OK then

BIN
Dprs/CSL/Measure_Cloud.res