Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
9959fead
Commit
9959fead
authored
Aug 28, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed to load profile image from db
parent
52db6456
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
+32
-15
public_new/js/common/common.js
+22
-10
public_new/js/common/constant.js
+3
-3
public_new/js/common/native-bridge-datasource.js
+7
-2
No files found.
public_new/js/common/common.js
View file @
9959fead
...
@@ -140,21 +140,33 @@ Common.getProfileImgUrl = function (path) {
...
@@ -140,21 +140,33 @@ Common.getProfileImgUrl = function (path) {
return
"./img/noImage.png"
;
return
"./img/noImage.png"
;
}
else
if
(
path
.
includes
(
"/mnt"
))
{
}
else
if
(
path
.
includes
(
"/mnt"
))
{
const
userInfo
=
path
.
split
(
"/"
).
reverse
();
const
userInfo
=
path
.
split
(
"/"
).
reverse
();
return
(
serverInfo
.
cmsURL
+
if
(
deviceInfo
.
isiOS
())
{
"/chatapi/user?profileFileName="
+
const
receivedString
=
NativeBridgeDataSource
.
getCachedImage
(
userInfo
[
1
]);
userInfo
[
0
]
+
if
(
receivedString
==
""
||
receivedString
==
undefined
)
{
"&profileGetLoginId="
+
return
Common
.
generateProfileImgURLFromServer
(
userInfo
[
0
],
userInfo
[
1
]);
userInfo
[
1
]
+
}
"&sid="
+
return
"data:image/"
+
userInfo
[
0
].
split
(
'.'
).
pop
()
+
";base64,"
+
receivedString
;
currentUserInfo
.
sid
+
}
"&cmd=12"
return
Common
.
generateProfileImgURLFromServer
(
userInfo
[
0
],
userInfo
[
1
]);
);
}
else
{
}
else
{
return
path
;
return
path
;
}
}
};
};
Common
.
generateProfileImgURLFromServer
=
function
(
fileName
,
loginID
)
{
return
(
serverInfo
.
cmsURL
+
"/chatapi/user?profileFileName="
+
fileName
+
"&profileGetLoginId="
+
loginID
+
"&sid="
+
currentUserInfo
.
sid
+
"&cmd=12"
);
};
Common
.
startCollaboration
=
function
(
collaborationType
)
{
Common
.
startCollaboration
=
function
(
collaborationType
)
{
if
(
deviceInfo
.
isAndroid
())
{
if
(
deviceInfo
.
isAndroid
())
{
if
(
if
(
...
...
public_new/js/common/constant.js
View file @
9959fead
...
@@ -142,7 +142,7 @@ const SOCKET_KEY = {
...
@@ -142,7 +142,7 @@ const SOCKET_KEY = {
CREATE_TEXT
:
"createText"
,
CREATE_TEXT
:
"createText"
,
CREATE_IMAGE
:
"createImage"
,
CREATE_IMAGE
:
"createImage"
,
CREATE_VIDEO
:
"createVideo"
,
CREATE_VIDEO
:
"createVideo"
,
COMMUNICATION
:
"communication"
,
COMMUNICATION
:
"communication"
,
GET_GROUP_LIST
:
"getGroupList"
,
GET_GROUP_LIST
:
"getGroupList"
,
LEAVE_ROOM
:
"leaveRoom"
,
LEAVE_ROOM
:
"leaveRoom"
,
};
};
...
@@ -190,6 +190,7 @@ const NATIVE_KEY_IOS = {
...
@@ -190,6 +190,7 @@ const NATIVE_KEY_IOS = {
getUserListByLoginId
:
"getUserListByLoginId"
,
getUserListByLoginId
:
"getUserListByLoginId"
,
getMessageListFromMessageId
:
"getMessageListFromMessageId"
,
getMessageListFromMessageId
:
"getMessageListFromMessageId"
,
updatePreMessage
:
"updatePreMessage"
,
updatePreMessage
:
"updatePreMessage"
,
getCachedImage
:
"getCachedImage"
,
};
};
const
BIZ_TASK_YELL_URL
=
"https://biztaskyell.abookcloud.com"
;
const
BIZ_TASK_YELL_URL
=
"https://biztaskyell.abookcloud.com"
;
\ No newline at end of file
public_new/js/common/native-bridge-datasource.js
View file @
9959fead
...
@@ -415,4 +415,10 @@ NativeBridgeDataSource.getHostRequestFlg = function () {
...
@@ -415,4 +415,10 @@ NativeBridgeDataSource.getHostRequestFlg = function () {
}
else
{
}
else
{
return
android
.
getHostRequestFlg
();
return
android
.
getHostRequestFlg
();
}
}
};
};
\ No newline at end of file
NativeBridgeDataSource
.
getCachedImage
=
function
(
loginID
)
{
if
(
deviceInfo
.
isiOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getCachedImage
,
{
loginID
:
loginID
});
}
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment