付延余
2022-09-06 f47ce70afac05ce941b5eafb2d9114c7a017f774
api/global.js
@@ -27,9 +27,9 @@
   });
}
// 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({
@@ -59,7 +59,38 @@
            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',
@@ -71,6 +102,8 @@
}
// 获取流程数据
// export const getProcessDataList = (params) => {
//     return getRequest('/oa/actProcess/getByCondition', params)
@@ -78,5 +111,6 @@
export default {
   apiLogin
   apiLogin,
   wxSmallLogin
}