调整签到页面跳转逻辑
This commit is contained in:
parent
bf543d3929
commit
26b22af483
@ -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>
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 签到相关变量
|
// 签到相关变量
|
||||||
|
|||||||
@ -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: 登录成功后的操作
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user