zhashaonan 7 years atrás
parent
commit
b9e3352a0c
1 changed files with 26 additions and 0 deletions
  1. 26 0
      config.js

+ 26 - 0
config.js

@@ -0,0 +1,26 @@
+
+let api = "https://passport.lrlz.com/mobile/index.php"
+
+
+function getReq(data, callback, fail) {
+  let options = {
+    client_type: 'ios'
+  }
+  data = Object.assign({}, options, data)
+  return wx.request({
+    url: api,
+    data,
+    header: {
+      'content-type': 'application/json' // 默认值
+    },
+    success(res) {
+      callback(res.data)
+    },
+    fail() {
+      fail && fail()
+    }
+  })
+}
+module.exports = {
+  getReq
+}