添加用户页跳转

This commit is contained in:
BTMuli
2023-12-27 22:32:55 +08:00
parent 959a3e373a
commit afddc9f955

View File

@@ -43,7 +43,7 @@
<span>{{ postData.user.nickname }}</span> <span>{{ postData.user.nickname }}</span>
<span :title="getMpaLeftDesc()">{{ getMpaLeftDesc() }}</span> <span :title="getMpaLeftDesc()">{{ getMpaLeftDesc() }}</span>
</div> </div>
<div class="mpa-right"> <div class="mpa-right" @click="toAuthor()">
<div class="mpa-icon"> <div class="mpa-icon">
<img :src="postData.user.avatar_url" alt="userIcon" /> <img :src="postData.user.avatar_url" alt="userIcon" />
</div> </div>
@@ -63,11 +63,7 @@
class="tp-post-collection" class="tp-post-collection"
:title="`合集ID${postData.collection.collection_id}`" :title="`合集ID${postData.collection.collection_id}`"
v-if="postData.collection" v-if="postData.collection"
@click=" @click="showOverlayC()"
() => {
showCollection = !showCollection;
}
"
> >
<v-icon size="12">mdi-widgets</v-icon> <v-icon size="12">mdi-widgets</v-icon>
<span>{{ postData.collection.collection_title }}</span> <span>{{ postData.collection.collection_title }}</span>
@@ -100,6 +96,7 @@ import TpParser from "../components/post/tp-parser.vue";
import TpoCollection from "../components/post/tpo-collection.vue"; import TpoCollection from "../components/post/tpo-collection.vue";
import Mys from "../plugins/Mys"; import Mys from "../plugins/Mys";
import { useAppStore } from "../store/modules/app"; import { useAppStore } from "../store/modules/app";
import TGClient from "../utils/TGClient";
import { createTGWindow } from "../utils/TGWindow"; import { createTGWindow } from "../utils/TGWindow";
// loading // loading
@@ -170,6 +167,10 @@ watch(loadShare, (value) => {
} }
}); });
function showOverlayC() {
showCollection.value = true;
}
function getMpaLeftDesc(): string { function getMpaLeftDesc(): string {
return postData.value?.user.certification?.label === "" return postData.value?.user.certification?.label === ""
? postData.value?.user.introduce ?? "" ? postData.value?.user.introduce ?? ""
@@ -231,6 +232,11 @@ function createPostJson(postId: number): void {
const jsonTitle = `Post_${postId}_JSON`; const jsonTitle = `Post_${postId}_JSON`;
createTGWindow(jsonPath, "Dev_JSON", jsonTitle, 960, 720, false, false); createTGWindow(jsonPath, "Dev_JSON", jsonTitle, 960, 720, false, false);
} }
async function toAuthor(): Promise<void> {
const url = `https://m.miyoushe.com/ys/#/accountCenter/0?id=${postData.value?.user.uid}`;
await TGClient.open("web_thin", url);
}
</script> </script>
<style lang="css" scoped> <style lang="css" scoped>
.tp-post-body { .tp-post-body {
@@ -318,6 +324,7 @@ function createPostJson(postId: number): void {
position: relative; position: relative;
width: 50px; width: 50px;
height: 50px; height: 50px;
cursor: pointer;
} }
.mpa-icon { .mpa-icon {