config.js 433 B

1234567891011121314151617181920212223242526
  1. let api = "https://passport.lrlz.com/mobile/index.php"
  2. function getReq(data, callback, fail) {
  3. let options = {
  4. client_type: 'ios'
  5. }
  6. data = Object.assign({}, options, data)
  7. return wx.request({
  8. url: api,
  9. data,
  10. header: {
  11. 'content-type': 'application/json' // 默认值
  12. },
  13. success(res) {
  14. callback(res.data)
  15. },
  16. fail() {
  17. fail && fail()
  18. }
  19. })
  20. }
  21. module.exports = {
  22. getReq
  23. }