```
module.exports = (method,url,data)=>{
  return new Promise((resolve,reject)=>{
    wx.request({
      url:`https://123hao/aaa${url}`,
      data:data,
      method:method,
      success:resolve,
      fail:reject
    })
  })
}
//method 你的HTTP 请求方法
// url 你的地址
//data 你的数据
```
引入文件 
const fetch =require('../../utils/fetch')
使用请求

```
let data = {
          mobile:this.data.inputPhone,
          code:this.data.code,
          openId:this.data.openId
      }
      console.log(data);
      fetch('post','/wechatlogin',data)
      .then(res=>{
          console.log(res);
      })
```

  

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。