acdr-ui/dist/dev/mp-weixin/sheep/api/member/auth.js.map

1 line
5.0 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"auth.js","sources":["../../../../../../src/sheep/api/member/auth.js"],"sourcesContent":["import request from '@/sheep/request'\r\n\r\nconst AuthUtil = {\r\n // 使用手机 + 密码登录\r\n login: (data) => {\r\n return request({\r\n url: '/member/auth/login',\r\n method: 'POST',\r\n data,\r\n custom: {\r\n showSuccess: true,\r\n loadingMsg: '登录中',\r\n successMsg: '登录成功',\r\n },\r\n })\r\n },\r\n // 使用手机 + 验证码登录\r\n smsLogin: (data) => {\r\n return request({\r\n url: '/member/auth/sms-login',\r\n method: 'POST',\r\n data,\r\n custom: {\r\n showSuccess: true,\r\n loadingMsg: '登录中',\r\n successMsg: '登录成功',\r\n },\r\n })\r\n },\r\n // 发送手机验证码\r\n sendSmsCode: (mobile, scene) => {\r\n return request({\r\n url: '/member/auth/send-sms-code',\r\n method: 'POST',\r\n data: {\r\n mobile,\r\n scene,\r\n },\r\n custom: {\r\n loadingMsg: '发送中',\r\n showSuccess: true,\r\n successMsg: '发送成功',\r\n },\r\n })\r\n },\r\n // 登出系统\r\n logout: () => {\r\n return request({\r\n url: '/member/auth/logout',\r\n method: 'POST',\r\n })\r\n },\r\n // 刷新令牌\r\n refreshToken: (refreshToken) => {\r\n return request({\r\n url: '/member/auth/refresh-token',\r\n method: 'POST',\r\n params: {\r\n refreshToken,\r\n },\r\n custom: {\r\n loading: false, // 不用加载中\r\n showError: false, // 不展示错误提示\r\n },\r\n })\r\n },\r\n // 社交授权的跳转\r\n socialAuthRedirect: (type, redirectUri) => {\r\n return request({\r\n url: '/member/auth/social-auth-redirect',\r\n method: 'GET',\r\n params: {\r\n type,\r\n redirectUri,\r\n },\r\n custom: {\r\n showSuccess: true,\r\n loadingMsg: '登陆中',\r\n },\r\n })\r\n },\r\n // 社交快捷登录\r\n socialLogin: (type, code, state) => {\r\n return request({\r\n url: '/member/auth/social-login',\r\n method: 'POST',\r\n data: {\r\n type,\r\n code,\r\n state,\r\n },\r\n custom: {\r\n showSuccess: true,\r\n loadingMsg: '登陆中',\r\n },\r\n })\r\n },\r\n // 微信小程序的一键登录\r\n weixinMiniAppLogin: (phoneCode, loginCode, state) => {\r\n return request({\r\n url: '/member/auth/weixin-mini-app-login',\r\n method: 'POST',\r\n data: {\r\n phoneCode,\r\n loginCode,\r\n state,\r\n },\r\n custom: {\r\n showSuccess: true,\r\n loadingMsg: '登陆中',\r\n successMsg: '登录成功',\r\n },\r\n })\r\n },\r\n // 创建微信 JS SDK 初始化所需的签名\r\n createWeixinMpJsapiSignature: (url) => {\r\n return request({\r\n url: '/member/auth/create-weixin-jsapi-signature',\r\n method: 'POST',\r\n params: {\r\n url,\r\n },\r\n custom: {\r\n showError: false,\r\n showLoading: false,\r\n },\r\n })\r\n },\r\n //\r\n}\r\n\r\nexport default AuthUtil\r\n"],"names":["request"],"mappings":";;AAEK,MAAC,WAAW;AAAA;AAAA,EAEf,OAAO,CAAC,SAAS;AACf,WAAOA,4BAAQ;AAAA,MACb,KAAK;AAAA,MACL,QAAQ;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,aAAa;AAAA,QACb,YAAY;AAAA,QACZ,YAAY;AAAA,MACb;AAAA,IACP,CAAK;AAAA,EACF;AAAA;AAAA,EAED,UAAU,CAAC,SAAS;AAClB,WAAOA,4BAAQ;AAAA,MACb,KAAK;AAAA,MACL,QAAQ;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,aAAa;AAAA,QACb,YAAY;AAAA,QACZ,YAAY;AAAA,MACb;AAAA,IACP,CAAK;AAAA,EACF;AAAA;AAAA,EAED,aAAa,CAAC,QAAQ,UAAU;AAC9B,WAAOA,4BAAQ;AAAA,MACb,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,MACD;AAAA,MACD,QAAQ;AAAA,QACN,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,YAAY;AAAA,MACb;AAAA,IACP,CAAK;AAAA,EACF;AAAA;AAAA,EAED,QAAQ,MAAM;AACZ,WAAOA,4BAAQ;AAAA,MACb,KAAK;AAAA,MACL,QAAQ;AAAA,IACd,CAAK;AAAA,EACF;AAAA;AAAA,EAED,cAAc,CAAC,iBAAiB;AAC9B,WAAOA,4BAAQ;AAAA,MACb,KAAK;AAAA,MACL,QAAQ;