Commit 53a79cfe by 胡悦

修改头像图片

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