Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
ts-api-demo
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wmvm
ts-api-demo
Commits
be44fd95
Commit
be44fd95
authored
Jan 03, 2025
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产管理后台-oss 修改
parent
dd6b8c01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
mUserRealName.service.ts
src/functional/mvc/service/mUserRealName.service.ts
+8
-8
OSSUtils.ts
src/utils/OSSUtils.ts
+1
-1
No files found.
src/functional/mvc/service/mUserRealName.service.ts
View file @
be44fd95
...
@@ -298,8 +298,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
...
@@ -298,8 +298,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
let
identityFrondSide
=
dbRealNameInfo
.
identity_frond_side
;
let
identityFrondSide
=
dbRealNameInfo
.
identity_frond_side
;
if
(
identityFrondSide
)
{
if
(
identityFrondSide
)
{
if
(
!
identityFrondSide
.
includes
(
"http"
))
{
if
(
!
identityFrondSide
.
includes
(
"http"
))
{
dbRealNameInfo
.
identity_frond_side_small
=
await
ossUtils
.
resizeWithWaterMark
(
identityFrondSide
,
"
Madex
"
,
300
);
dbRealNameInfo
.
identity_frond_side_small
=
await
ossUtils
.
resizeWithWaterMark
(
identityFrondSide
,
"
KTX
"
,
300
);
dbRealNameInfo
.
identity_frond_side
=
await
ossUtils
.
withWaterMark
(
identityFrondSide
,
"
Madex
"
);
dbRealNameInfo
.
identity_frond_side
=
await
ossUtils
.
withWaterMark
(
identityFrondSide
,
"
KTX
"
);
}
}
else
{
else
{
dbRealNameInfo
.
identity_frond_side_small
=
identityFrondSide
dbRealNameInfo
.
identity_frond_side_small
=
identityFrondSide
...
@@ -313,8 +313,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
...
@@ -313,8 +313,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
let
identityOtherSide
=
dbRealNameInfo
.
identity_other_side
;
let
identityOtherSide
=
dbRealNameInfo
.
identity_other_side
;
if
(
identityOtherSide
)
{
if
(
identityOtherSide
)
{
if
(
!
identityOtherSide
.
includes
(
"http"
))
{
if
(
!
identityOtherSide
.
includes
(
"http"
))
{
dbRealNameInfo
.
identity_other_side_small
=
await
ossUtils
.
resizeWithWaterMark
(
identityOtherSide
,
"
Madex
"
,
300
);
dbRealNameInfo
.
identity_other_side_small
=
await
ossUtils
.
resizeWithWaterMark
(
identityOtherSide
,
"
KTX
"
,
300
);
dbRealNameInfo
.
identity_other_side
=
await
ossUtils
.
withWaterMark
(
identityOtherSide
,
"
Madex
"
);
dbRealNameInfo
.
identity_other_side
=
await
ossUtils
.
withWaterMark
(
identityOtherSide
,
"
KTX
"
);
}
}
else
{
else
{
dbRealNameInfo
.
identity_other_side_small
=
identityOtherSide
dbRealNameInfo
.
identity_other_side_small
=
identityOtherSide
...
@@ -329,8 +329,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
...
@@ -329,8 +329,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
let
identityInHand
=
dbRealNameInfo
.
identity_in_hand
;
let
identityInHand
=
dbRealNameInfo
.
identity_in_hand
;
if
(
identityInHand
)
{
if
(
identityInHand
)
{
if
(
!
identityInHand
.
includes
(
"http"
))
{
if
(
!
identityInHand
.
includes
(
"http"
))
{
dbRealNameInfo
.
identity_in_hand_small
=
await
ossUtils
.
resizeWithWaterMark
(
identityInHand
,
"
Madex
"
,
300
);
dbRealNameInfo
.
identity_in_hand_small
=
await
ossUtils
.
resizeWithWaterMark
(
identityInHand
,
"
KTX
"
,
300
);
dbRealNameInfo
.
identity_in_hand
=
await
ossUtils
.
withWaterMark
(
identityInHand
,
"
Madex
"
);
dbRealNameInfo
.
identity_in_hand
=
await
ossUtils
.
withWaterMark
(
identityInHand
,
"
KTX
"
);
}
}
else
{
else
{
dbRealNameInfo
.
identity_in_hand_small
=
identityInHand
dbRealNameInfo
.
identity_in_hand_small
=
identityInHand
...
@@ -345,8 +345,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
...
@@ -345,8 +345,8 @@ async function updateImageUrl(dbRealNameInfo: any) {
let
latestPhoto
=
dbRealNameInfo
.
latest_photo
;
let
latestPhoto
=
dbRealNameInfo
.
latest_photo
;
if
(
latestPhoto
)
{
if
(
latestPhoto
)
{
if
(
!
latestPhoto
.
includes
(
"http"
))
{
if
(
!
latestPhoto
.
includes
(
"http"
))
{
dbRealNameInfo
.
latest_photo_small
=
await
ossUtils
.
resizeWithWaterMark
(
latestPhoto
,
"
Madex
"
,
300
);
dbRealNameInfo
.
latest_photo_small
=
await
ossUtils
.
resizeWithWaterMark
(
latestPhoto
,
"
KTX
"
,
300
);
dbRealNameInfo
.
latest_photo
=
await
ossUtils
.
withWaterMark
(
latestPhoto
,
"
Madex
"
);
dbRealNameInfo
.
latest_photo
=
await
ossUtils
.
withWaterMark
(
latestPhoto
,
"
KTX
"
);
}
}
else
{
else
{
dbRealNameInfo
.
latest_photo_small
=
latestPhoto
dbRealNameInfo
.
latest_photo_small
=
latestPhoto
...
...
src/utils/OSSUtils.ts
View file @
be44fd95
...
@@ -56,7 +56,7 @@ export const withWaterMark = async function (url: string, text: string) {
...
@@ -56,7 +56,7 @@ export const withWaterMark = async function (url: string, text: string) {
if
(
imageWidth
<=
0
)
{
if
(
imageWidth
<=
0
)
{
imageWidth
=
1000
;
imageWidth
=
1000
;
}
}
let
fontSize
=
(
imageWidth
/
5
);
let
fontSize
=
Math
.
round
((
imageWidth
/
5
)
);
if
(
fontSize
>
999
)
{
if
(
fontSize
>
999
)
{
fontSize
=
999
;
fontSize
=
999
;
}
}
...
...
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