zoukankan      html  css  js  c++  java
  • CROS+node-basis+ajax

    $.ajax({
    url: this.baseUrl + this.restful.showDesigerViewList,
    type: "post",
    dataType: "json",
    // beforeSend : function(request){
    // request.setRequestHeader("Authorization", th.getToken("token"));
    // },
    crossDomain: true,
    //contentType:"application/x-www-form-urlencoded",
    headers: {
    'Authorization':(th.getToken("token")),
    "Origin": "*",
    //"ACCEPT": "application/json",
    //'Content-Type':'application/x-www-form-urlencoded',
    },
    // xhrFields : {
    // withCredentials: true
    // },
    data: obj,
    success: function (data, textStatus, xhr) {
    
    },
    error: function (e) {
    th.disablePage();
    }
    });

    注意:headers里的“Origin”值,然后在带着自己的header信息
  • 相关阅读:
    debounce
    react-xiguan
    备忘录
    ie导出问题
    umi 动态路由配置
    tsconfig
    关于vue 和react 中的hash与锚点冲突问题
    lodash
    pyplot绘图
    Numpy实现图像变换
  • 原文地址:https://www.cnblogs.com/wsoft/p/9561514.html
Copyright © 2011-2022 走看看