You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-mini/Utils/Api.js

23 lines
756 B

import {
POST
} from "./Request.js"
// let base = 'https://hsgcs.dctpay.com/crest';
let app = getApp();
let base = app.globalData.url;
//根据code获取openId
export const HandleCode = params => {
return POST('GET', `${base}/wechat/handleCode`, params).then(res => res.data);
}
//微信第一次登录
export const GetPhoneNumber = params => {
return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data);
};
//微信登录
export const WXlogin = params => {
return POST('GET', `${base}/wechat/login`, params).then(res => res.data);
};
//通过openid获取用户的信息
export const OpenidGetUser = (openId, params) => {
return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data);
};