Procházet zdrojové kódy

fix: 线上环境访问头像使用localhost

lanjianrong před 4 roky
rodič
revize
617087c1dd

+ 1 - 1
src/components/RightContent/AvatarDropdown.tsx

@@ -96,7 +96,7 @@ const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu }) => {
           size="small"
           className={styles.avatar}
           src={
-            (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') +
+            (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') +
             (currentUser?.avatar ?? consts.DEFAULT_AVATAR)
           }
           alt="avatar"

+ 1 - 1
src/components/RightContent/Book/components/UserList/index.tsx

@@ -58,7 +58,7 @@ const UesrList: React.FC<UserListProps> = ({ onlineList }) => {
                           className="w-8 h-8 rounded-1/2 block"
                           style={{
                             backgroundImage: `url(${
-                              (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') +
+                              (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') +
                               (item.avatar ?? consts.DEFAULT_AVATAR)
                             })`,
                             backgroundSize: 'cover'

+ 1 - 1
src/components/RightContent/NoticeIcon/NoticeIcon.tsx

@@ -110,7 +110,7 @@ const NoticeIcon: React.FC<NoticeIconProps> & {
 }
 
 NoticeIcon.defaultProps = {
-  emptyImage: (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') + '/resource/notice_bell.png'
+  emptyImage: (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') + '/resource/notice_bell.png'
 }
 
 NoticeIcon.Tab = NoticeList

+ 1 - 1
src/pages/Customer/Client/components/ClientDetail/LowerList.tsx

@@ -118,7 +118,7 @@ export const ServiceLogItem: React.FC<ServiceLogItemProps> = ({ item, logType, u
               className="rounded-1/2 w-8 h-8"
               style={{
                 backgroundImage: `url(${
-                  (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') +
+                  (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') +
                   (item.avatar ?? consts.DEFAULT_AVATAR)
                 })`,
                 backgroundSize: 'cover'

+ 2 - 2
src/pages/Hr/Notification/components/AddMessage.jsx

@@ -23,11 +23,11 @@ const AddMessage = props => {
         switch (values.media) {
           case mediaType.VersionUpdate:
             newValues.avatar =
-              (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') + '/resource/notice_email.png'
+              (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') + '/resource/notice_email.png'
             break
           case mediaType.HolidayNotice:
             newValues.avatar =
-              (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') + '/resource/notice_airplane.png'
+              (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') + '/resource/notice_airplane.png'
             break
           default:
             break

+ 1 - 1
src/pages/Product/Lock/LockStore/components/LockDetail/TabList.tsx

@@ -148,7 +148,7 @@ const LockTabList: React.FC<LockTabListProps> = ({
                 className="rounded-1/2 w-8 h-8"
                 style={{
                   backgroundImage: `url(${
-                    (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') +
+                    (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') +
                     (item.avatar ?? consts.DEFAULT_AVATAR)
                   })`,
                   backgroundSize: 'cover'

+ 1 - 1
src/pages/User/Account/Settings/components/BaseView.jsx

@@ -51,7 +51,7 @@ const BaseView = () => {
     initData()
   }, [])
   const avatar =
-    (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') +
+    (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') +
     (staff?.avatar ?? '/resource/avatar/avtra_2.jpg')
   return (
     <Tabs defaultActiveKey="1">

+ 1 - 1
src/pages/Workbench/Dashboard/index.tsx

@@ -391,7 +391,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
                   <img
                     className="w-full max-w-8 h-8 border rounded-4xl"
                     src={
-                      (isDevMode() ? 'http://cld2qa.com' : 'http://localhost') +
+                      (isDevMode() ? 'http://cld2qa.com' : 'http://127.0.0.1') +
                       (item?.avatar ?? consts.DEFAULT_AVATAR)
                     }
                   />