From 87d2fac9c381de99f75ce6c6c39b7d638b980d7e Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期四, 21 八月 2025 17:52:14 +0800 Subject: [PATCH] 1111 --- src/assets/js/middleGround/api/identity.js | 194 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 194 insertions(+), 0 deletions(-) diff --git a/src/assets/js/middleGround/api/identity.js b/src/assets/js/middleGround/api/identity.js new file mode 100644 index 0000000..a9317ae --- /dev/null +++ b/src/assets/js/middleGround/api/identity.js @@ -0,0 +1,194 @@ +import request from '@/plugin/axios/index.ts' +const identityApi = { + // 鑾峰彇鍥惧舰楠岃瘉鐮� + getImgCode() { + return request({ + url: '/identity/NewCaptcha', + method: 'post', + }) + }, + + // 楠岃瘉鍥惧舰楠岃瘉鐮� + verificationImgCode(data) { + return request({ + url: '/identity/ValidCaptcha', + method: 'post', + data, + }) + }, + + // 鑾峰彇鐭俊楠岃瘉鐮� + getPhoneCode(data) { + return request({ + url: '/identity/NewSms', + method: 'post', + data, + }) + }, + // 楠岃瘉鐭俊楠岃瘉鐮� + verificationPhoneCode(data) { + return request({ + url: '/identity/api/ApiValidMobilePhone', + method: 'post', + data, + }) + }, + + getSlideCaptchaImage(options) { + return request('/identity/GetSlideCaptchaImage', { + method: 'POST', + data: options || {}, + }) + }, + // 楠岃瘉婊戝姩楠岃瘉鐮� + validSlideCaptcha(options) { + return request('/identity/ValidSlideCaptcha', { + method: 'POST', + data: options || {}, + }) + }, + + // 閫氳繃鎵嬫満鍙锋敞鍐岀敤鎴� + registerAppUserWithPhone(data) { + return request({ + url: '/identity/api/RegisterAppUserWithPhone', + method: 'post', + data, + }) + }, + + // 璐﹀彿瀵嗙爜鐧诲綍 + loginByPassword(data) { + return request({ + url: '/identity/api/LoginByPassword', + method: 'post', + data, + }) + }, + + // 鐭俊楠岃瘉鐮佺櫥褰� + loginByMobilePhone(data) { + return request({ + url: '/identity/api/LoginByMobilePhone', + method: 'post', + data, + }) + }, + + // 璁剧疆鐢ㄦ埛key + setUserKey(data) { + return request({ + url: '/identity/api/ApiAppUserSetKey', + method: 'post', + data, + }) + }, + + // 鑾峰彇鐢ㄦ埛key + getUserKey(data) { + return request({ + url: '/identity/api/ApiGetAppUserKey', + method: 'post', + data, + }) + }, + + // 鍒犻櫎鐢ㄦ埛key + delUserKey(data) { + return request({ + url: '/identity/api/ApiDelAppUserKey', + method: 'post', + data, + }) + }, + + // 鑾峰彇鍘诲綋鍓嶇敤鎴蜂俊鎭� + getCurrentAppUser() { + return request({ + url: '/identity/api/GetCurrentAppUser', + method: 'post', + }) + }, + + // 娣诲姞鐢ㄦ埛淇℃伅 + setAppUserInfo(data) { + return request({ + url: '/identity/api/SetAppUserInfoRequest', + method: 'post', + data, + }) + }, + + // 鐢ㄦ埛鏇存崲缁戝畾鎵嬫満鍙凤紝濡傛病鏈夌粦瀹氭墜鏈哄垯鑷姩鍒涘缓 + userSetPhoneNumber(data) { + return request({ + url: '/identity/api/ApiUserSetPhoneNumber', + method: 'post', + data, + }) + }, + + // 妫�娴嬬敤鎴锋槸鍚︾粦瀹氬井淇� + checkBuildingWeChat(data) { + return request({ + url: '/identity/api/ApiCheckBuildingWeChat', + method: 'post', + data, + }) + }, + + // 閫氳繃鎵嬫満鍙烽噸缃瘑鐮� + changePasswordByMobilePhone(data) { + return request({ + url: '/identity/api/ChangePasswordByMobilePhone', + method: 'post', + data, + }) + }, + + // 寰俊寮�鏀惧钩鍙版壂鐮佺櫥褰� + loginByWeChatOpenCode(data) { + return request({ + url: '/identity/api/LoginByWeChatOpenCode', + method: 'post', + data, + }) + }, + + // 鐢ㄦ埛缁戝畾寰俊鍙� + bindingWeChat(data) { + return request({ + url: '/identity/api/ApiBindingWeChat', + method: 'post', + data, + }) + }, + + // 璁剧疆鐧诲綍鐨勭敤鎴峰悕鍜屽瘑鐮侊紝鐢ㄦ埛鍚嶅拰瀵嗙爜鑷冲皯6浣� + setLoginNameAndPassword(data) { + return request({ + url: '/identity/api/ApiUserSetLoginNameAndPassword', + method: 'post', + data, + }) + }, + + // 鑾峰彇閭楠岃瘉鐮� + getEmailCode(data) { + return request({ + url: '/identity/api/SendVerifyEMail', + method: 'post', + data, + }) + }, + // 鐢ㄦ埛缁戝畾閭 + bindingEmail(data) { + return request({ + url: '/identity/api/ApiBindEMail', + method: 'post', + data, + }) + }, +} + +export default identityApi -- Gitblit v1.9.1