Commit 53a79cfe by 胡悦

修改头像图片

1 parent 50c68213
...@@ -69,6 +69,11 @@ ...@@ -69,6 +69,11 @@
position: relative; position: relative;
width: 54px; width: 54px;
height: 54px; height: 54px;
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
.icon-crown{ .icon-crown{
position: absolute; position: absolute;
left: -10px; left: -10px;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
* @LastEditTime: 2023-03-21 17:39:21 * @LastEditTime: 2023-03-21 17:39:21
*/ */
const fetchConfig = function (isEnv = true) { const fetchConfig = function (isEnv = true) {
return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json()) // return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
// return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json()) return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
} }
// const $mockConfig = await fetchConfig() // const $mockConfig = await fetchConfig()
export default fetchConfig export default fetchConfig
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-03-23 11:01:17 * @LastEditTime: 2023-03-23 15:58:43
*/ */
const fetchConfig1 = function (isEnv = true) { const fetchConfig1 = function (isEnv = true) {
return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json()) return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json())
......
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
/> />
<div class="user-info"> <div class="user-info">
<div class="avatar"> <div class="avatar">
<img src="@/assets/images/dj/avatar.png" alt="" /> <img
:src="data.newsInfo!.staff!.avator || getImageUrl('avatar')"
alt=""
/>
<img <img
class="icon-crown" class="icon-crown"
src="@/assets/images/dj/icon-crown.png" src="@/assets/images/dj/icon-crown.png"
...@@ -80,6 +83,8 @@ import { djReq } from "../../utils/request"; ...@@ -80,6 +83,8 @@ import { djReq } from "../../utils/request";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { Params, DataInfo, NewsInfo, StaffInfo } from "./personalInterface"; import { Params, DataInfo, NewsInfo, StaffInfo } from "./personalInterface";
const route = useRoute(); const route = useRoute();
// 获取全局对象
const global: any = inject("global");
let query: Params = {}; let query: Params = {};
const numberObj = { const numberObj = {
0: 0, 0: 0,
...@@ -106,6 +111,10 @@ const getInfo = async () => { ...@@ -106,6 +111,10 @@ const getInfo = async () => {
); );
data.upgradeCount = data.newsInfo?.staff?.upgradeCount; data.upgradeCount = data.newsInfo?.staff?.upgradeCount;
}; };
const getImageUrl = (name: any, path = "dj") => {
return new URL(`./${path}/${name}.png?v=${global.version}`, global.$imgUrl)
.href;
};
onMounted(() => { onMounted(() => {
if (route.query) { if (route.query) {
query = route.query; query = route.query;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!