zhangwei
2024-09-06 b172667f354f7f00fe14809e66cbf12362fbc646
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: '请先完善资料!'
               })
@@ -247,6 +277,9 @@
         },
         toMyRecord(){
            if (!this.userInfo.userWorker) {
               uni.navigateTo({
                  url: '/pages/mine/apply'
               });
               this.$util.showToast({
                  title: '请先完善资料!'
               })