From a6df44f034325643a1ae28c4ea4ed43ace19461f Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Mon, 21 Apr 2025 13:23:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=80=9A=E5=91=8A=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/wxApi.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 api/wxApi.js 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