vue项目post请求设置header

    async getData() {
      var netUrl = "http://fsgs.kxlims.com/xxxxxxxx";
      var datas = {
        companyId: "9696886C-8B08-40A9-943A-B15EED8430CB",
        projectId: "A4D3F61A-F152-482E-9DC9-B7D14F682D7D",
        organId: "3A4C2039-7E0B-433A-AD8E-463987161886",
        pageIndex: 1,
      };
      const { data: res } = await this.$http.post(netUrl, datas, {
        headers: {
          accessToken: Token,
          projectId: "A4D3F61A-F152-482E-9DC9-B7D14F682D7D",
        },
      });
    },

你可能感兴趣的:(vue项目post请求设置header)