Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
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
Nguyễn Hải Sơn
quasar-web-base
Commits
efb578ed
Commit
efb578ed
authored
May 12, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
b4243afb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
configurations.example.ts
src/assets/configurations.example.ts
+1
-0
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+9
-11
No files found.
src/assets/configurations.example.ts
View file @
efb578ed
export
const
config
=
{
export
const
config
=
{
API_ENDPOINT
:
'http://cms.vab.xteldev.com/api/'
,
API_ENDPOINT
:
'http://cms.vab.xteldev.com/api/'
,
API_IMAGE_ENDPOINT
:
'http://cms.vab.xteldev.com/file/upload/'
,
API_RES_CODE
:
{
API_RES_CODE
:
{
OK
:
{
OK
:
{
code
:
0
,
code
:
0
,
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
efb578ed
...
@@ -88,6 +88,7 @@ export default defineComponent({
...
@@ -88,6 +88,7 @@ export default defineComponent({
const
avatar
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
avatar
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
avatarFile
:
Ref
<
File
|
null
>
=
ref
(
null
);
const
avatarFile
:
Ref
<
File
|
null
>
=
ref
(
null
);
const
avatarUploaded
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
avatarUploaded
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
avatarNoChange
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
artistCode
:
Ref
<
string
>
=
ref
(
''
);
const
artistCode
:
Ref
<
string
>
=
ref
(
''
);
const
fullName
:
Ref
<
string
>
=
ref
(
''
);
const
fullName
:
Ref
<
string
>
=
ref
(
''
);
const
artistName
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
artistName
:
Ref
<
string
|
null
>
=
ref
(
null
);
...
@@ -262,10 +263,10 @@ export default defineComponent({
...
@@ -262,10 +263,10 @@ export default defineComponent({
console
.
log
(
response
,
'Artist Detail Info'
);
console
.
log
(
response
,
'Artist Detail Info'
);
const
ArtistInformation
=
response
.
data
.
data
;
const
ArtistInformation
=
response
.
data
.
data
;
id
.
value
=
ArtistInformation
.
id
;
id
.
value
=
ArtistInformation
.
id
;
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
avatar
.
value
=
avatar
.
value
=
config
.
API_IMAGE_ENDPOINT
+
ArtistInformation
.
avatar
;
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
avatarNoChange
.
value
=
ArtistInformation
.
avatar
;
'http://cms.vab.xteldev.com/file/upload/'
+
ArtistInformation
.
avatar
;
account
.
value
=
ArtistInformation
.
account
;
account
.
value
=
ArtistInformation
.
account
;
artistCode
.
value
=
ArtistInformation
.
artistCode
;
artistCode
.
value
=
ArtistInformation
.
artistCode
;
fullName
.
value
=
ArtistInformation
.
fullName
;
fullName
.
value
=
ArtistInformation
.
fullName
;
...
@@ -505,7 +506,6 @@ export default defineComponent({
...
@@ -505,7 +506,6 @@ export default defineComponent({
const
addStory
=
(
value
:
StoriesType
)
=>
{
const
addStory
=
(
value
:
StoriesType
)
=>
{
stories
.
value
.
push
(
value
);
stories
.
value
.
push
(
value
);
console
.
log
(
stories
,
'storiesstoriesstories'
);
};
};
const
deleteStory
=
(
idx
:
number
)
=>
{
const
deleteStory
=
(
idx
:
number
)
=>
{
...
@@ -531,9 +531,6 @@ export default defineComponent({
...
@@ -531,9 +531,6 @@ export default defineComponent({
});
});
};
};
const
UpdateBirtday
=
(
value
:
string
)
=>
{
const
UpdateBirtday
=
(
value
:
string
)
=>
{
// console.log(value);
console
.
log
(
value
,
'birthdayyyy'
);
birthday
.
value
=
value
;
birthday
.
value
=
value
;
};
};
const
callApiUploadAvatar
=
async
(
file
:
File
)
=>
{
const
callApiUploadAvatar
=
async
(
file
:
File
)
=>
{
...
@@ -542,12 +539,13 @@ export default defineComponent({
...
@@ -542,12 +539,13 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'http://cms.vab.xteldev.com/file/upload'
,
url
:
config
.
API_IMAGE_ENDPOINT
,
method
:
'POST'
,
method
:
'POST'
,
data
:
bodyFormData
,
data
:
bodyFormData
,
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
avatarUploaded
.
value
=
response
.
data
.
data
.
fileName
;
avatarUploaded
.
value
=
response
.
data
.
data
.
fileName
;
console
.
log
(
avatarUploaded
.
value
,
'aksdjaklsdjaklsd'
);
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
};
...
@@ -557,7 +555,7 @@ export default defineComponent({
...
@@ -557,7 +555,7 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'http://cms.vab.xteldev.com/file/upload'
,
url
:
'http://cms.vab.xteldev.com/file/upload
/
'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
bodyFormData
,
data
:
bodyFormData
,
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
...
@@ -575,7 +573,7 @@ export default defineComponent({
...
@@ -575,7 +573,7 @@ export default defineComponent({
bodyFormData
.
append
(
'file'
,
file
);
bodyFormData
.
append
(
'file'
,
file
);
const
response
=
(
await
api
({
const
response
=
(
await
api
({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
url
:
'http://cms.vab.xteldev.com/file/upload'
,
url
:
config
.
API_IMAGE_ENDPOINT
,
method
:
'POST'
,
method
:
'POST'
,
data
:
bodyFormData
,
data
:
bodyFormData
,
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
FileUploadType
>>
;
...
@@ -669,7 +667,7 @@ export default defineComponent({
...
@@ -669,7 +667,7 @@ export default defineComponent({
try
{
try
{
if
(
avatarFile
.
value
!==
null
)
{
if
(
avatarFile
.
value
!==
null
)
{
await
callApiUploadAvatar
(
avatarFile
.
value
);
await
callApiUploadAvatar
(
avatarFile
.
value
);
}
else
avatarUploaded
.
value
=
avatar
.
value
;
}
else
avatarUploaded
.
value
=
avatar
NoChange
.
value
;
for
(
let
index
=
0
;
index
<
banners
.
value
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
banners
.
value
.
length
;
index
++
)
{
const
element
=
banners
.
value
[
index
];
const
element
=
banners
.
value
[
index
];
if
(
element
.
file
!==
undefined
)
{
if
(
element
.
file
!==
undefined
)
{
...
...
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