From 70757e8adfcc211cc89b7146085d702ba3bdde6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B?= <994041296@163.com> Date: Thu, 9 Feb 2023 15:13:55 +0800 Subject: [PATCH] =?UTF-8?q?IM=E5=95=86=E5=AE=B6=E7=AB=AF=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- im/.env | 2 +- im/.env.development | 2 +- im/src/api/user.js | 8 ++++---- im/src/utils/auth.js | 42 +++++++++++++++++++++--------------------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/im/.env b/im/.env index b65f6811..070b82b5 100644 --- a/im/.env +++ b/im/.env @@ -4,7 +4,7 @@ VUE_APP_API_BASE_URL=https://im-api.pickmall.cn VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket VUE_APP_COMMON=https://common-api.pickmall.cn VUE_APP_BUYER=https://buyer-api.pickmall.cn -VUE_APP_SELLER=https://seller-api.pickmall.cn +VUE_APP_SELLER=https://store-api.pickmall.cn VUE_APP_WEBSITE_NAME="LiLi IM" VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/ VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/ \ No newline at end of file diff --git a/im/.env.development b/im/.env.development index 1018d37c..2b51a5e6 100644 --- a/im/.env.development +++ b/im/.env.development @@ -4,7 +4,7 @@ VUE_APP_API_BASE_URL=https://im-api.pickmall.cn VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket VUE_APP_COMMON=https://common-api.pickmall.cn VUE_APP_BUYER=https://buyer-api.pickmall.cn -VUE_APP_SELLER=https://seller-api.pickmall.cn +VUE_APP_SELLER=https://store-api.pickmall.cn VUE_APP_WEBSITE_NAME="LiLi IM" VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/ VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/ \ No newline at end of file diff --git a/im/src/api/user.js b/im/src/api/user.js index 93f7b8f3..44ef3fd8 100644 --- a/im/src/api/user.js +++ b/im/src/api/user.js @@ -23,22 +23,22 @@ export const ServeGetStoreDetail = (storeId) => { // 获取用户历史足迹 export const ServeGetFootPrint = (params) => { - return get(`${config.BASE_BUYER}/buyer/member/footprint`,params); + return get(`${config.BASE_BUYER}/buyer/member/footprint`, params); }; // 商家获取用户历史足迹 export const ServeStoreGetFootPrint = (params) => { - return get(`${config.BASE_SELLER}/store/member/footprint`,params); + return get(`${config.BASE_SELLER}/store/member/footprint`, params); }; // 获取用户订单列表信息 export const ServeGetOrderPrint = (params) => { - return get(`${config.BASE_BUYER}/buyer/order/order`,params); + return get(`${config.BASE_BUYER}/buyer/order/order`, params); }; // 商家获取用户订单列表信息 export const ServeStoreGetOrderPrint = (params) => { - return get(`${config.BASE_SELLER}/store/order/order`,params); + return get(`${config.BASE_SELLER}/store/order/order`, params); }; // 获取商品信息 diff --git a/im/src/utils/auth.js b/im/src/utils/auth.js index 487f40f0..39a81fa5 100644 --- a/im/src/utils/auth.js +++ b/im/src/utils/auth.js @@ -9,18 +9,18 @@ const USER_SETTING = 'LILI-SETTING' * * @param {String} token */ -export function setToken(token) { - return localStorage.setItem( - USER_TOKEN, - token - ) +export function setToken (token) { + return localStorage.setItem( + USER_TOKEN, + token + ) } /** * 获取授权token */ -export function getToken() { - return localStorage.getItem(USER_TOKEN) +export function getToken () { + return localStorage.getItem(USER_TOKEN) } /** @@ -28,24 +28,24 @@ export function getToken() { * * @param {Object} data */ -export function setUserInfo(data) { - localStorage.setItem(USER_INFO, JsBase64.Base64.encode(JSON.stringify(data))) +export function setUserInfo (data) { + localStorage.setItem(USER_INFO, JsBase64.Base64.encode(JSON.stringify(data))) } /** * 获取用户信息 */ -export function getUserInfo() { - const data = JsBase64.Base64.decode(localStorage.getItem(USER_INFO) || '') - return data ? JSON.parse(data) : {} +export function getUserInfo () { + const data = JsBase64.Base64.decode(localStorage.getItem(USER_INFO) || '') + return data ? JSON.parse(data) : {} } /** * 获取用户本地缓存的设置信息 */ -export function getUserSettingCache() { - const data = localStorage.getItem(USER_SETTING) - return data ? JSON.parse(data) : {} +export function getUserSettingCache () { + const data = localStorage.getItem(USER_SETTING) + return data ? JSON.parse(data) : {} } /** @@ -53,15 +53,15 @@ export function getUserSettingCache() { * * @param {Object} state 用户设置相关信息 */ -export function setUserSettingCache(state) { - localStorage.setItem(USER_SETTING, JSON.stringify(state)) +export function setUserSettingCache (state) { + localStorage.setItem(USER_SETTING, JSON.stringify(state)) } /** * 删除用户相关缓存信息 */ -export function removeAll() { - localStorage.removeItem(USER_TOKEN) - localStorage.removeItem(USER_INFO) - localStorage.removeItem(USER_SETTING) +export function removeAll () { + localStorage.removeItem(USER_TOKEN) + localStorage.removeItem(USER_INFO) + localStorage.removeItem(USER_SETTING) }