|
@@ -66,9 +66,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { getServerInfo } from '@/api/content'
|
|
|
|
|
import { updateAvatar } from '@/api/account'
|
|
import { updateAvatar } from '@/api/account'
|
|
|
import { getAuthedUser, updateAuthedUser } from '@/utils/auth'
|
|
import { getAuthedUser, updateAuthedUser } from '@/utils/auth'
|
|
|
|
|
+import {getAvatarChannelInfo} from "@/api/file";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'MyProfile',
|
|
name: 'MyProfile',
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
Authorization: ''
|
|
Authorization: ''
|
|
|
},
|
|
},
|
|
|
imgData: {
|
|
imgData: {
|
|
|
- channelId: process.env.VUE_APP_UPLOAD_AVATAR_CHANNEL
|
|
|
|
|
|
|
+ channelId: null
|
|
|
},
|
|
},
|
|
|
coverUrl: null,
|
|
coverUrl: null,
|
|
|
// ****************************************************************************************************************
|
|
// ****************************************************************************************************************
|
|
@@ -88,9 +88,10 @@ export default {
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.loginUser = getAuthedUser()
|
|
this.loginUser = getAuthedUser()
|
|
|
- getServerInfo(this.imgData.channelId).then(res => {
|
|
|
|
|
|
|
+ getAvatarChannelInfo().then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
const resData = res.data
|
|
const resData = res.data
|
|
|
|
|
+ this.imgData.channelId = resData.channelId
|
|
|
this.imgOssUrl = resData.ossUrl
|
|
this.imgOssUrl = resData.ossUrl
|
|
|
this.imgHeaders.Authorization = 'Bearer ' + resData.token
|
|
this.imgHeaders.Authorization = 'Bearer ' + resData.token
|
|
|
} else {
|
|
} else {
|