From a3defee272f9aa0780e5af12aa0a783f60bd3afd Mon Sep 17 00:00:00 2001 From: sfmind Date: Mon, 2 May 2022 17:46:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E5=8F=98=E5=8F=82=E6=95=B0/app-api?= =?UTF-8?q?=E5=BA=94=E9=85=8D=E7=BD=AE=E5=88=B0baseUrl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/api/address.js | 12 ++++++------ yudao-ui-app/api/auth.js | 8 ++++---- yudao-ui-app/api/index.js | 4 ++-- yudao-ui-app/api/user.js | 6 +++--- yudao-ui-app/common/config.js | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/yudao-ui-app/api/address.js b/yudao-ui-app/api/address.js index 6f4297cd6..5bfe9306e 100644 --- a/yudao-ui-app/api/address.js +++ b/yudao-ui-app/api/address.js @@ -2,14 +2,14 @@ const { http } = uni.$u //获得用户收件地址列表 -export const getAddressList = params => http.get('/app-api/member/address/list', params) +export const getAddressList = params => http.get('/member/address/list', params) //创建用户收件地址 -export const createAddress = data => http.post('/app-api/member/address/create', data) +export const createAddress = data => http.post('/member/address/create', data) //通过ID获得用户收件地址 -export const getAddressById = params => http.get('/app-api/member/address/get', { params }) +export const getAddressById = params => http.get('/member/address/get', { params }) //获得默认的用户收件地址 -export const getDefaultUserAddress = params => http.get('/app-api/member/address/get-default', { params }) +export const getDefaultUserAddress = params => http.get('/member/address/get-default', { params }) //更新用户收件地址 -export const updateAddress = params => http.put('/app-api/member/address/update', params) +export const updateAddress = params => http.put('/member/address/update', params) //删除用户收件地址 -export const deleteAddress = params => http.delete('/app-api/member/address/delete', {}, { params }) +export const deleteAddress = params => http.delete('/member/address/delete', {}, { params }) diff --git a/yudao-ui-app/api/auth.js b/yudao-ui-app/api/auth.js index 8a49d2b21..adc31b760 100644 --- a/yudao-ui-app/api/auth.js +++ b/yudao-ui-app/api/auth.js @@ -2,11 +2,11 @@ const { http } = uni.$u //使用手机 + 密码登录 -export const passwordLogin = data => http.post('/app-api/member/login', data) +export const passwordLogin = data => http.post('/member/login', data) //退出登录 -export const logout = data => http.post('/app-api/member/logout', data) +export const logout = data => http.post('/member/logout', data) //发送手机验证码 -export const sendSmsCode = data => http.post('/app-api/member/send-sms-code', data) +export const sendSmsCode = data => http.post('/member/send-sms-code', data) //使用手机 + 验证码登录 -export const smsLogin = data => http.post('/app-api/member/sms-login', data) +export const smsLogin = data => http.post('/member/sms-login', data) diff --git a/yudao-ui-app/api/index.js b/yudao-ui-app/api/index.js index 5bd7964a3..17d01638e 100644 --- a/yudao-ui-app/api/index.js +++ b/yudao-ui-app/api/index.js @@ -2,6 +2,6 @@ const { http } = uni.$u // 获取滚动图数据 -export const getBannerData = params => http.get('/app-api/index', { params }) +export const getBannerData = params => http.get('/index', { params }) // 获取滚动通知数据 -export const getNoticeData = params => http.get('/app-api/notice', { params }) +export const getNoticeData = params => http.get('/notice', { params }) diff --git a/yudao-ui-app/api/user.js b/yudao-ui-app/api/user.js index 4202fad29..d6023e243 100644 --- a/yudao-ui-app/api/user.js +++ b/yudao-ui-app/api/user.js @@ -2,13 +2,13 @@ const { http } = uni.$u //获取用户信息 -export const getUserInfo = params => http.get('/app-api/member/user/get', params) +export const getUserInfo = params => http.get('/member/user/get', params) //修改用户头像 export const updateAvatar = filePath => - http.upload('/app-api/member/user/update-avatar', { + http.upload('/member/user/update-avatar', { name: 'avatarFile', fileType: 'image', filePath: filePath }) //修改用户昵称 -export const updateNickname = params => http.put('/app-api/member/user/update-nickname', {}, { params }) +export const updateNickname = params => http.put('/member/user/update-nickname', {}, { params }) diff --git a/yudao-ui-app/common/config.js b/yudao-ui-app/common/config.js index 14c80225e..fceb0a814 100644 --- a/yudao-ui-app/common/config.js +++ b/yudao-ui-app/common/config.js @@ -1,6 +1,6 @@ module.exports = { //后端接口地址 - baseUrl: 'http://127.0.0.1:48080', + baseUrl: 'http://127.0.0.1:48080/app-api', header: { //租户ID 'tenant-id': 1