| | |
| | | }); |
| | | } |
| | | |
| | | // const baseUrl = 'http://192.168.0.159:9999' |
| | | // const baseUrl = 'http://192.168.3.159:9999' |
| | | // const baseUrl = 'https://mx.jzeg.cn:443/app'; |
| | | const baseUrl = "https://mx.jzeg.cn:9998"; |
| | | const baseUrl = "https://mx.jzeg.cn:9998"; // 正式服务 |
| | | |
| | | // POST请求 |
| | | function apiLogin({ |
| | |
| | | resolve(res); |
| | | }, |
| | | fail: (err) => { |
| | | console.log('错误',err); |
| | | console.log('错误', err); |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '服务器错误' |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | function wxSmallLogin(code) { |
| | | uni.showLoading({ |
| | | title: '登录中...', |
| | | }) |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: baseUrl + `/auth/mobile/token/social?grant_type=mobile&mobile=MINI@${code}`, |
| | | method: "POST", |
| | | header: { |
| | | "TENANT-ID": "5", |
| | | "Authorization": "Basic cGlnOnBpZw==", |
| | | 'Content-Type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | success: (res) => { |
| | | uni.hideLoading(); |
| | | // console.log(res) |
| | | resolve(res); |
| | | }, |
| | | fail: (err) => { |
| | | console.log('错误', err); |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | icon: 'none', |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 获取流程数据 |
| | | // export const getProcessDataList = (params) => { |
| | | // return getRequest('/oa/actProcess/getByCondition', params) |
| | |
| | | |
| | | |
| | | export default { |
| | | apiLogin |
| | | apiLogin, |
| | | wxSmallLogin |
| | | } |