From 3d1a777260e74df3e7edb819ae19cbc5f6556a84 Mon Sep 17 00:00:00 2001 From: ZeYanG <zeyang404@gmail.com> Date: Tue, 14 Aug 2018 15:02:41 +0800 Subject: [PATCH] tijiao --- publish/js/ajax.js | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/publish/js/ajax.js b/publish/js/ajax.js index 7148173..a3706dc 100644 --- a/publish/js/ajax.js +++ b/publish/js/ajax.js @@ -59,7 +59,9 @@ var tenantIDObj = window.getEnclocal("tenantID"); var userObj = window.getEnclocal("userName"); var userObj= {"userName":"YK"}; - document.cookie = "name = value; path=/"; +document.cookie = "name = value; path=/"; +document.cookie = "openId = test; path = /publish"; + //设置AJAX的全局默认选项 $.ajaxSetup({ aysnc: true, // 默认异步加载 @@ -68,7 +70,8 @@ "Access-Control-Allow-Origin":"*", "Access-Control-Allow-Methods":"*", "Access-Control-Allow-Headers":"*" , - "withCredentials":"true" + "withCredentials":"true", + }, beforeSend: function (a, b, c) { ajaxStar(); @@ -140,7 +143,11 @@ Object.keys(sendData).map((k) => { if (data.hasOwnProperty(k)) { try{ - sendData[k]=encryptByDES(data[k],""); + if(data[k] == ""||data[k]==null||data[k]==undefined){ + sendData[k]=""; + }else{ + sendData[k]=encryptByDES(data[k],""); + } }catch(error){ } } -- Gitblit v1.8.0