93 lines
2.4 KiB
Vue
93 lines
2.4 KiB
Vue
<template>
|
|
<view class="rank-redirect-page">
|
|
<ModulePageBackground module="tree" />
|
|
<PageHeader title="编辑成员" />
|
|
<view class="rank-redirect-panel">
|
|
<AppLoading
|
|
v-if="redirectState === 'loading'"
|
|
text="正在打开成员资料"
|
|
description="排行称谓已合并到成员编辑页面。"
|
|
/>
|
|
<view v-else class="rank-redirect-error">
|
|
<text class="rank-redirect-error__title">暂时无法打开成员资料</text>
|
|
<text class="rank-redirect-error__copy">{{ errorMessage }}</text>
|
|
<view class="rank-redirect-error__action" @click="goBack">
|
|
<text>返回上一页</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from "vue";
|
|
import { onLoad } from "@dcloudio/uni-app";
|
|
import AppLoading from "@/components/AppLoading.vue";
|
|
import ModulePageBackground from "@/components/ModulePageBackground.vue";
|
|
import PageHeader from "@/components/PageHeader.vue";
|
|
import { goBack, returnTo } from "@/utils/navigation/gateway.js";
|
|
|
|
const redirectState = ref("loading");
|
|
const errorMessage = ref("");
|
|
|
|
onLoad(async (query) => {
|
|
const genealogyId = String(query?.genealogyId || "");
|
|
const personId = String(query?.personId || "");
|
|
if (!/^[1-9]\d*$/.test(genealogyId) || !/^[1-9]\d*$/.test(personId)) {
|
|
redirectState.value = "error";
|
|
errorMessage.value = "页面参数已经失效,请从成员资料重新进入。";
|
|
return;
|
|
}
|
|
try {
|
|
await returnTo("T05", { genealogyId, personId });
|
|
} catch (error) {
|
|
redirectState.value = "error";
|
|
errorMessage.value = error?.message || "请返回后重新打开成员资料。";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@import "../../styles/adaptive-frame-profiles.scss";
|
|
|
|
.rank-redirect-page {
|
|
min-height: 100vh;
|
|
background: $paper;
|
|
}
|
|
|
|
.rank-redirect-panel {
|
|
position: relative;
|
|
z-index: 1;
|
|
padding: 48rpx 32rpx;
|
|
}
|
|
|
|
.rank-redirect-error {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
gap: 24rpx;
|
|
padding: 64rpx 32rpx;
|
|
text-align: center;
|
|
}
|
|
|
|
.rank-redirect-error__title {
|
|
color: $ink;
|
|
font-size: 36rpx;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.rank-redirect-error__copy {
|
|
color: $ink-muted;
|
|
font-size: 28rpx;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.rank-redirect-error__action {
|
|
min-width: 240rpx;
|
|
padding: 22rpx 36rpx;
|
|
border: 1rpx solid rgba($brand-red, 0.4);
|
|
color: $brand-red;
|
|
font-size: 30rpx;
|
|
}
|
|
</style>
|