Feat(我的):海报设置

This commit is contained in:
lifizer
2024-03-12 15:05:56 +08:00
parent cb92a1f44f
commit 9e6294b67b
2 changed files with 27 additions and 3 deletions
+5
View File
@@ -534,3 +534,8 @@ export function setDetection() {
export function getRechargeApi() { export function getRechargeApi() {
return request.get("recharge/index"); return request.get("recharge/index");
} }
export function getUserCenterBanner() {
return request.get("userCenterBanner");
}
+22 -3
View File
@@ -236,7 +236,9 @@
</view> </view>
</view> </view>
<!-- 我的服务结束 --> <!-- 我的服务结束 -->
<view v-if="bannerHtml" class="banner-wrap">
<rich-text :nodes="bannerHtml" />
</view>
</view> </view>
</view> </view>
<uni-popup ref="popup" type="center"> <uni-popup ref="popup" type="center">
@@ -265,7 +267,8 @@ import {
getUserInfo, getUserInfo,
getUserLevelInfo, getUserLevelInfo,
noticeList, noticeList,
userBindParent userBindParent,
getUserCenterBanner
} from "@/api/user"; } from "@/api/user";
import {isWeixin} from "@/utils"; import {isWeixin} from "@/utils";
import cookie from "@/utils/store/cookie"; import cookie from "@/utils/store/cookie";
@@ -351,7 +354,8 @@ export default {
icon: '/icon/icon-setting.png', icon: '/icon/icon-setting.png',
allowEnter: true allowEnter: true
} }
] ],
bannerHtml: ''
}; };
}, },
computed: mapGetters(["userInfo"]), computed: mapGetters(["userInfo"]),
@@ -738,6 +742,15 @@ export default {
}).finally(() => { }).finally(() => {
}); });
// 海报
getUserCenterBanner().then(res => {
const { success, data } = res
if (success) {
if (data.userCenterBanner) {
this.bannerHtml = `<img src="${data.userCenterBanner}" style="display: block;max-width: 100%;" />`
}
}
})
}, },
//升级群主 //升级群主
goUpgradeProtocol: function () { goUpgradeProtocol: function () {
@@ -1109,6 +1122,9 @@ export default {
} }
.my-wrapper { .my-wrapper {
padding: 30upx; padding: 30upx;
&.wrapper {
padding: 0 0 30rpx 0 !important;
}
.my-tool-wrap { .my-tool-wrap {
padding: 0 24rpx 24upx 24upx; padding: 0 24rpx 24upx 24upx;
.cont { .cont {
@@ -1136,5 +1152,8 @@ export default {
} }
} }
} }
.banner-wrap {
padding: 30rpx 0 0 0;
}
} }
</style> </style>