Commit c9146632 by 梁建民

css

parent 7f7c45f4
Showing with 12 additions and 12 deletions
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
init: function () { init: function () {
this.mounted(this).handleBind(this); this.mounted(this).handleBind(this);
}, },
getData: function (url, type, param, callback,isload,isheader) { getData: function (url, type, param, callback, isload, isheader) {
//是否启动loadin效果 //是否启动loadin效果
if(isload == undefined){ if (isload == undefined) {
var index = layer.load(1, { var index = layer.load(1, {
offset: ['50%', "50%"], offset: ['50%', "50%"],
shade: false shade: false
...@@ -24,18 +24,18 @@ ...@@ -24,18 +24,18 @@
dataTypeXpx = "jsonp"; dataTypeXpx = "jsonp";
} }
// if(isheader){ // if(isheader){
$.ajaxSetup({ $.ajaxSetup({
headers:{ headers: {
Authorization:'Bearer '+Util.getCookie('token') Authorization: 'Bearer ' + Util.getCookie('token')
}, },
}); });
// }; // };
$.ajax({ $.ajax({
type: type, type: type,
url: url, url: url,
data: params, data: params,
dataType: 'json', dataType: 'json',
xhrFields: { xhrFields: {
withCredentials: true withCredentials: true
}, },
...@@ -125,11 +125,11 @@ ...@@ -125,11 +125,11 @@
* @param name * @param name
*/ */
delCookie: function (name, domain) { delCookie: function (name, domain) {
domain = domain ? ";domain=" + domain : "";
var exp = new Date(); var exp = new Date();
exp.setTime(exp.getTime() - 1); exp.setTime(exp.getTime() - 10000);
var cval = this.getCookie(name); document.cookie = name + "=" + '' + ";expires=" + exp.toGMTString() + ";path=/" + domain;
if (cval != null) return true;
document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() + ";path=/" + domain;
}, },
/** /**
* 获取参数 * 获取参数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment