diff --git a/api/wxApi.js b/api/wxApi.js new file mode 100644 index 0000000..c94639c --- /dev/null +++ b/api/wxApi.js @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 微信登录授权获取code +export function getCodeUrl(userType) { + return request({ + 'url': '/wxApi/getCodeUrl?userType=' + userType, + 'method': 'get' + }) +} + +// 微信登录授权获取code +export function getWebAccessTokenAndOpenid(code) { + return request({ + 'url': '/wxApi/getWebAccessTokenAndOpenid?code=' + code, + 'method': 'get' + }) +} + +// 微信登录授权获取code +export function gzhLogin(data) { + return request({ + 'url': '/wxApi/gzhLogin', + 'method': 'POST', + 'data': data + }) +} \ No newline at end of file