import http from '@/http/api.js' // 获取token const token = (tenantId, username, password, type) => { return http.request({ url: '/blade-auth/oauth/token', method: 'POST', header: { 'Tenant-Id': tenantId }, params: { tenantId, username, password, grant_type: "password", scope: "all", type:'account' } }) } // 获取用户信息 const userInfo = () => { return http.request({ url: '/blade-user/info', method: 'GET', }) } // 获取版本 const getVersion = (params) => { return http.request({ url: '/store-goods/appversion/getLatestVersion', method: 'GET', params }) } // 授权获取token const empowerToken = (params) => { return http.request({ url: '/blade-auth/oauth/token', method: 'POST', params: { ...params, grant_type: "password", scope: "all", type: 'account' } }) } // 授权获取手机号 const tokenTwo = (params) => { return http.request({ url: '/blade-client/wechat/programLogin', method: 'get', params }) } // 获取个人资料信息 const user = (params) => { return http.request({ url: '/blade-purchase-sales/appParts/personalInformation', method: 'get', params }) } export default { token, userInfo, getVersion, empowerToken, tokenTwo, user }