CyLee

简单示例 

https://developers.weixin.qq.com/miniprogram/dev/api/network-request.html

wx.request({
      method: \'POST\',
      url: \'http://localhost:3011/wx/app/xindai/login\',
      data: {
        userName: \'13713332652\',
        pwd: \'123456.a\',
        openId: \'oRsEC1ualLIvMV6E9-IHmZj-ZAQU\' // 这个openid无论是什么接口都是必填的,而这个openid在服务号是从后端给我的,在小程序是由我们前端自己去获取的。
      },
      header: {
        \'content-type\': \'application/json\',
        \'token\': \'\', // 登录 注册 忘记密码 之后会返回一个token,其他需要登录才调用的接口必须带这个token参数
        \'Authorization\': Authorization,
        \'app\':\'WX\'
      },
      success: function (res) {
        console.log(res.data)
      }
    })

 

分类:

技术点:

相关文章:

  • 2021-11-02
  • 2021-12-30
  • 2021-10-06
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-04
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-02-28
相关资源
相似解决方案