1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- import $http from '@/common/request.js';
- import config from '@/config';
- function getCompmayUsers() {
- return $http({
- url: `/user/companyUsers`,
- method: 'GET',
- });
- }
- // 获取用户信息
- function getUserInfo(params) {
- return $http({
- url: '/user/info',
- method: 'GET',
- data: JSON.stringify(params)
- });
- }
- function setWxAuthUserInfo(params) {
- return $http({
- url: '/user/wxAuthInfo',
- method: 'POST',
- data: JSON.stringify(params)
- });
- // return Promise.resolve()
- }
- function login(params) {
- return $http({
- url: `${config.duoduoenvService}userNew/wechat/login`,
- method: 'POST',
- data: JSON.stringify(params)
- })
- }
- // duoduo-service/duoduoenv-service/userNew/wechat/register
- // 注册
- function register(params) {
- return $http({
- url: `${config.duoduoenvService}userNew/wechat/register`,
- method: 'POST',
- isComParams: true,
- data: JSON.stringify(params)
- })
- }
- // 根据手机号获取租户数据
- function getCompanyByPhone(params) {
- return $http({
- url: `${config.duoduoenvService}userNew/company?phone=${params.phone}`,
- method: 'get'
- })
- }
- // 根据code获取手机号
- function getHttpPhoneNumber(code) {
- return $http({
- url: `${config.duoduoenvService}userNew/wechat/getPhoneNumber?code=${code}`,
- method: 'get'
- })
- }
- // 续约
- function refreshToken(refreshToken) {
- return $http({
- header: {
- "refreshToken": refreshToken,
- },
- url: `${config.duoduoenvService}userNew/refreshToken`,
- method: 'post'
- })
- }
- // 获取用户空间权限
- function getUserControlSpace(params) {
- return $http({
- // url: `http://192.168.88.4:52009/userControlSpace/query`,
- url: `${config.duoduoenvService}userControlSpace/query`,
- method: 'POST',
- data: JSON.stringify(params),
- isComParams: false // 是否携带通用的参数
- })
- }
- export {
- getCompmayUsers,
- getUserInfo,
- getHttpPhoneNumber,
- getCompanyByPhone,
- register,
- login,
- getUserControlSpace,
- refreshToken
- }
|