From b172667f354f7f00fe14809e66cbf12362fbc646 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期五, 06 九月 2024 17:19:36 +0800
Subject: [PATCH] 人脸打卡
---
src/pages/mine/index.vue | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index 84c9e81..6e7e3ed 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -184,6 +184,24 @@
// this.token = this.$db.get('userToken') ? this.$db.get('userToken') : ''
this.isLogin = this.token ? true : false;
},
+ onPullDownRefresh() {
+ this.$api.getUser().then(res => {
+ this.$db.set('userInfo', JSON.stringify(res.data))
+ this.userInfo = res.data
+ if (this.identity == 'worker') {
+ if (this.userInfo.userWorker) {
+ this.balance = this.$common.moneySub(this.userInfo.userWorker.tiXianZonge, this.userInfo.userWorker
+ .yiTiXianJine)
+ }
+ } else {
+ if (this.userInfo.userCompany) {
+ this.balance = this.userInfo.userCompany.chongZhiYue ? this.userInfo.userCompany.chongZhiYue :
+ '0.00'
+ }
+ }
+ })
+ uni.stopPullDownRefresh();
+ },
methods: {
tologin() {
if (this.isLogin) {
@@ -198,6 +216,9 @@
},
toOrder() {
if (!this.userInfo.userCompany) {
+ uni.navigateTo({
+ url: '/pages/enterprise/enterprise'
+ });
this.$util.showToast({
title: '璇峰厛瀹屽杽浼佷笟璧勬枡锛�'
})
@@ -209,6 +230,9 @@
},
toRelease() {
if (!this.userInfo.userCompany) {
+ uni.navigateTo({
+ url: '/pages/enterprise/enterprise'
+ });
this.$util.showToast({
title: '璇峰厛瀹屽杽浼佷笟璧勬枡锛�'
})
@@ -225,6 +249,9 @@
},
toWorkerRecord() {
if (!this.userInfo.userCompany) {
+ uni.navigateTo({
+ url: '/pages/enterprise/enterprise'
+ });
this.$util.showToast({
title: '璇峰厛瀹屽杽浼佷笟璧勬枡锛�'
})
@@ -236,6 +263,9 @@
},
toMyWork() {
if (!this.userInfo.userWorker) {
+ uni.navigateTo({
+ url: '/pages/mine/apply'
+ });
this.$util.showToast({
title: '璇峰厛瀹屽杽璧勬枡锛�'
})
@@ -245,8 +275,11 @@
url: '/pages/order/myorder'
});
},
- toMyRecord(){
+ toMyRecord() {
if (!this.userInfo.userWorker) {
+ uni.navigateTo({
+ url: '/pages/mine/apply'
+ });
this.$util.showToast({
title: '璇峰厛瀹屽杽璧勬枡锛�'
})
--
Gitblit v1.9.1