调整签到页面跳转逻辑

This commit is contained in:
ywyonui 2025-09-19 20:00:30 +08:00
parent bf543d3929
commit 26b22af483
4 changed files with 35 additions and 1 deletions

View File

@ -1,6 +1,8 @@
<template> <template>
<view class="white-bg-color py-5"> <view class="white-bg-color py-5">
<view class="flex-row items-center pb-10 pt-5"> <view class="flex-row items-center pb-10 pt-5">
<u-button text="终止" class="ml-15 mr-7" :plain="true" @click="showDlg" />
<u-button text="转办" class="mr-15 mr-7" :plain="true" @click="submit" />
<u-button text="驳回" class="ml-15 mr-7" :plain="true" @click="showDlg" /> <u-button text="驳回" class="ml-15 mr-7" :plain="true" @click="showDlg" />
<u-button text="同意" class="mr-15 mr-7" type="primary" @click="submit" /> <u-button text="同意" class="mr-15 mr-7" type="primary" @click="submit" />
</view> </view>

View File

@ -158,6 +158,10 @@ function toHome(data: any) {
uni.reLaunch({ uni.reLaunch({
url: "/pages/view/routine/xk/zhujiao", url: "/pages/view/routine/xk/zhujiao",
}); });
} else if (data.type === "qd") {
uni.reLaunch({
url: "/pages/view/routine/xk/qd?from=login"
});
} else { } else {
uni.switchTab({ uni.switchTab({
url: "/pages/base/message/index", url: "/pages/base/message/index",

View File

@ -205,13 +205,27 @@ import { ref, reactive, onMounted, onUnmounted, nextTick } from 'vue';
import { onLoad } from '@dcloudio/uni-app'; import { onLoad } from '@dcloudio/uni-app';
import { qdFindByIdApi, qdzxSignInApi, qdzxFindByQdParamsApi, qdzxFindByQdAndJsApi } from '@/api/base/server'; import { qdFindByIdApi, qdzxSignInApi, qdzxFindByQdParamsApi, qdzxFindByQdAndJsApi } from '@/api/base/server';
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import { useDataStore } from '@/store/modules/data';
const { checkToken } = useUserStore();
const { setGlobal, getGlobal } = useDataStore();
// //
const options = ref<any>({}); const options = ref<any>({});
// //
onLoad((params) => { onLoad((params) => {
options.value = params; options.value = params || {};
if (params && params.from === "login") {
options.value = getGlobal;
} else {
setGlobal({
...options.value,
type: "qd"
});
if (checkToken()) {
return;
}
}
}); });
// //

View File

@ -164,6 +164,20 @@ export const useUserStore = defineStore({
return false; return false;
} }
}, },
/**
*
* @returns boolean
*/
checkToken() {
// 先校验当前登录的用户的openid
if (this.userdata && this.userdata.openId) {
return true;
}
uni.reLaunch({
url: "/pages/system/login/login",
});
return false;
},
/** /**
* @description: * @description:
*/ */