Przeglądaj źródła

返回应用host为空时,使用当前web host

huqi 5 lat temu
rodzic
commit
3f18cabfc3

+ 4 - 4
o2web/source/o2_core/o2/xAction/services/x_faceset_control.js

@@ -19,9 +19,9 @@ MWF.xAction.RestActions.Action["x_faceset_control"] = new Class({
                 options.data.append("api_key", this.faceKeys.api_key);
                 options.data.append("api_key", this.faceKeys.api_key);
                 options.data.append("api_secret", this.faceKeys.api_secret);
                 options.data.append("api_secret", this.faceKeys.api_secret);
             }else{
             }else{
-                if (!options.data) options.data = {};
-                options.data.api_key = this.faceKeys.api_key;
-                options.data.api_secret = this.faceKeys.api_secret
+                if (!options.parameter) options.parameter = {};
+                options.parameter.api_key = this.faceKeys.api_key;
+                options.parameter.api_secret = this.faceKeys.api_secret
             }
             }
         }
         }
         return this.action.invoke(options);
         return this.action.invoke(options);
@@ -45,7 +45,7 @@ MWF.xAction.RestActions.Action["x_faceset_control"].RestActions = new Class({
     Extends: MWF.xDesktop.Actions.RestActions,
     Extends: MWF.xDesktop.Actions.RestActions,
     getAddress: function(success, failure){
     getAddress: function(success, failure){
         //this.address = "http://dev.o2oa.net:8888/"+this.serviceName;
         //this.address = "http://dev.o2oa.net:8888/"+this.serviceName;
-        this.address = "http://release.o2oa.net:8888/"+this.serviceName;
+        this.address = "http://develop.o2oa.net:8888/"+this.serviceName;
         //this.address = "http://127.0.0.1:8888/"+this.serviceName;
         //this.address = "http://127.0.0.1:8888/"+this.serviceName;
         if (success) success.apply();
         if (success) success.apply();
     }
     }

+ 2 - 2
o2web/source/o2_core/o2/xAction/services/x_faceset_control.json

@@ -6,8 +6,8 @@
   "compare": {"uri":"/compare", "method": "POST"},
   "compare": {"uri":"/compare", "method": "POST"},
   "analyze": {"uri":"/face/analyze", "method": "POST"},
   "analyze": {"uri":"/face/analyze", "method": "POST"},
   "detectattr": {"uri":"/face/detectattr/{attr}", "method": "POST", "enctype": "formData"},
   "detectattr": {"uri":"/face/detectattr/{attr}", "method": "POST", "enctype": "formData"},
-  "getFaceSet": {"uri":"/faceset/getFaceSet/{faceset}"},
-  "createFaceSet": {"uri":"/faceset/createfaceset/{faceset}"},
+  "getFaceSet": {"uri":"/faceset/getFaceSet/{faceset}", "method": "POST"},
+  "createFaceSet": {"uri":"/faceset/createfaceset/{faceset}", "method": "POST"},
 
 
 
 
   "clazz": "x_faceset_control"
   "clazz": "x_faceset_control"

+ 4 - 3
o2web/source/o2_core/o2/xDesktop/Authentication.js

@@ -206,7 +206,7 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
     },
     },
     cameraLoginInit: function () {
     cameraLoginInit: function () {
         this.cameraLoginConfig = {
         this.cameraLoginConfig = {
-            "maxStep": 1,
+            "maxStep": 2,
             "step": 0,
             "step": 0,
             "count": 0,
             "count": 0,
             "max": 2,
             "max": 2,
@@ -391,6 +391,7 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
         return max - min;
         return max - min;
     },
     },
     checkCameraLogin: function () {
     checkCameraLogin: function () {
+        debugger;
         if (this.cameraLoginConfig.errorCount > this.cameraLoginConfig.errorMax) {
         if (this.cameraLoginConfig.errorCount > this.cameraLoginConfig.errorMax) {
             this.cameraLoginVideoInfoNode.set("text", MWF.LP.desktop.login.camera_loginError);
             this.cameraLoginVideoInfoNode.set("text", MWF.LP.desktop.login.camera_loginError);
         } else {
         } else {
@@ -409,10 +410,10 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
             //COMMON.AjaxModule.loadDom(, function(){
             //COMMON.AjaxModule.loadDom(, function(){
 
 
             var addressObj = layout.serviceAddressList["x_organization_assemble_authentication"];
             var addressObj = layout.serviceAddressList["x_organization_assemble_authentication"];
-            var url = layout.config.app_protocol + "//" + addressObj.host + (addressObj.port === 80 ? "" : ":" + addressObj.port) + addressObj.context;
+            var url = layout.config.app_protocol + "//" + (addressObj.host || window.location.hostname)+ (addressObj.port === 80 ? "" : ":" + addressObj.port) + addressObj.context;
 
 
             var code = this.crypDES();
             var code = this.crypDES();
-            var json = { "client": "oa", "token": code };
+            var json = { "client": "face", "token": code };
             var res = new Request.JSON({
             var res = new Request.JSON({
                 "method": "POST",
                 "method": "POST",
                 "url": url + "/jaxrs/sso",
                 "url": url + "/jaxrs/sso",

+ 6 - 0
o2web/source/x_component_Setting/Document.js

@@ -231,6 +231,12 @@ MWF.xApplication.Setting.Document.Check = new Class({
                 }
                 }
 
 
                 this.actions[method](this.explorer[this.data.data.key], function(){
                 this.actions[method](this.explorer[this.data.data.key], function(){
+                    // if (this.data.data.valueKey==="faceLogin"){
+                    //     if (this.explorer[this.data.data.key][this.data.data.valueKey]){
+                    //
+                    //     }
+                    // }
+
                     this.fireEvent("editSuccess");
                     this.fireEvent("editSuccess");
                     //this.app.notice(this.lp.setSaved, "success");
                     //this.app.notice(this.lp.setSaved, "success");
                 }.bind(this));
                 }.bind(this));

+ 1 - 1
o2web/source/x_component_Setting/lp/zh-cn.js

@@ -64,7 +64,7 @@ MWF.xApplication.Setting.LP = {
     "base_bindLogin_infor": "启用后允许扫描二维码登录",
     "base_bindLogin_infor": "启用后允许扫描二维码登录",
 
 
     "base_faceLogin": "启用人脸识别登录",
     "base_faceLogin": "启用人脸识别登录",
-    "base_faceLogin_infor": "启用后允许人脸识别登录,用户可到个人设置中设置人脸特征",
+    "base_faceLogin_infor": "启用后允许人脸识别登录,用户可到个人设置中设置人脸特征。启用后您必须创建一个SSO配置,名称为face,密钥为xplatform(这是一个试验性功能,您必须启用https)",
 
 
     "base_faceApi": "人脸识别服务",
     "base_faceApi": "人脸识别服务",
     "base_faceApi_action": "编辑人脸识别服务",
     "base_faceApi_action": "编辑人脸识别服务",