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