zoukankan      html  css  js  c++  java
  • 随便弄个模板好找

    wx

        let self = this
        try {
          const token = wx.getStorageSync('token')
          if (token) {
            wx.request({
              method: 'POST',
              url: 'https://www.xiaoming.net.cn/api/v1/article/readarticletype',
              header: {
                'content-type': 'application/x-www-form-urlencoded',
                'Authorization': 'Bearer '+token
              },
              success(res) {
                console.log(res.data)
    
              }
            })
          }
        } catch (e) {
          // Do something when catch error
        }
    
    

    axios

        this.axios.get('/api/v1/***', {
          headers: {
            'Authorization': 'Bearer '+localStorage.getItem('token')
          }
        })
          .then((res) => {
            console.log(res);
          })
          .catch((error) => {
            console.log(error);
          });
    
          let data = new FormData();
          data.append('enterprise', this.writeFeel.company);
    
          this.axios({
            method: 'post',
            url: '/api/v1/***',
            headers: {
              'Content-type': 'multipart/form-data',
              'Authorization': 'Bearer '+localStorage.getItem('token')
            },
            data: data
          })
            .then((res) => {
              console.log(res);
            })
            .catch((error) => {
              console.log(error);
            });
    
  • 相关阅读:
    服务器常用端口
    xml处理类
    水印的代码
    Asp.net常用的51个代码(非常实用)
    poj 2453
    MOD
    LIS(最长上升子序列)
    POJ各题算法分类(转)
    poj 1496&1850
    poj 1423
  • 原文地址:https://www.cnblogs.com/wulzt/p/10463725.html
Copyright © 2011-2022 走看看