Browse Source

no message

linwenxin 3 months ago
parent
commit
555e992294
2 changed files with 102 additions and 46 deletions
  1. 54 26
      src/common/utils/navPag.js
  2. 48 20
      src/pages/index/index.vue

+ 54 - 26
src/common/utils/navPag.js

@@ -22,20 +22,34 @@ export const navToPage = (function () {
       userinfo.isGZSign &&
       !['/pages/index/index', '/pages/repairConfirmation'].find(item => !!~url.indexOf(item))
     ) {
-      uni.showModal({
-        title: '温馨提示',
-        content: '您未签署确认书!',
-        cancelText: '取消',
-        confirmText: '去签署',
-        success: res => {
-          if (res.confirm) {
-            uni[goToType]({
-              url: webHref('/pages/repairConfirmation?type=gz'),
-              ...data
-            })
+      if (
+        await this.$api.post('/worker/check/manual/sign/confirm', {
+          type: 'gz'
+        }).data
+      ) {
+        uni.showModal({
+          title: '温馨提示',
+          content: '您未签署确认书!',
+          cancelText: '取消',
+          confirmText: '去签署',
+          success: res => {
+            if (res.confirm) {
+              uni[goToType]({
+                url: webHref('/pages/repairConfirmation?type=gz'),
+                ...data
+              })
+            }
           }
-        }
-      })
+        })
+      } else {
+        uni.showModal({
+          title: '温馨提示',
+          content: '签署确认书正在审核!',
+          cancelText: '取消',
+          confirmText: '知道了',
+          success: res => {}
+        })
+      }
       return
     }
 
@@ -44,20 +58,34 @@ export const navToPage = (function () {
       userinfo.isFSSign &&
       !['/pages/index/index', '/pages/repairConfirmation'].find(item => !!~url.indexOf(item))
     ) {
-      uni.showModal({
-        title: '温馨提示',
-        content: '您未签署确认书!',
-        cancelText: '取消',
-        confirmText: '去签署',
-        success: res => {
-          if (res.confirm) {
-            uni[goToType]({
-              url: webHref('/pages/repairConfirmation?type=fs'),
-              ...data
-            })
+      if (
+        await this.$api.post('/worker/check/manual/sign/confirm', {
+          type: 'fs'
+        }).data
+      ) {
+        uni.showModal({
+          title: '温馨提示',
+          content: '您未签署确认书!',
+          cancelText: '取消',
+          confirmText: '去签署',
+          success: res => {
+            if (res.confirm) {
+              uni[goToType]({
+                url: webHref('/pages/repairConfirmation?type=fs'),
+                ...data
+              })
+            }
           }
-        }
-      })
+        })
+      } else {
+        uni.showModal({
+          title: '温馨提示',
+          content: '签署确认书正在审核!',
+          cancelText: '取消',
+          confirmText: '知道了',
+          success: res => {}
+        })
+      }
       return
     }
 

+ 48 - 20
src/pages/index/index.vue

@@ -464,29 +464,57 @@ export default {
             getOrderNum()
           } else {
             if (this.userInfo.isGZSign) {
-              uni.showModal({
-                title: '温馨提示',
-                content: '您未签署确认书!',
-                cancelText: '取消',
-                confirmText: '去签署',
-                success: res => {
-                  if (res.confirm) {
-                    this.navToPage('/pages/repairConfirmation?type=gz')
+              if (
+                await this.$api.post('/worker/check/manual/sign/confirm', {
+                  type: 'gz'
+                }).data
+              ) {
+                uni.showModal({
+                  title: '温馨提示',
+                  content: '您未签署确认书!',
+                  cancelText: '取消',
+                  confirmText: '去签署',
+                  success: res => {
+                    if (res.confirm) {
+                      this.navToPage('/pages/repairConfirmation?type=gz')
+                    }
                   }
-                }
-              })
+                })
+              } else {
+                uni.showModal({
+                  title: '温馨提示',
+                  content: '签署确认书正在审核!',
+                  cancelText: '取消',
+                  confirmText: '知道了',
+                  success: res => {}
+                })
+              }
             } else if (this.userInfo.isFSSign) {
-              uni.showModal({
-                title: '温馨提示',
-                content: '您未签署确认书!',
-                cancelText: '取消',
-                confirmText: '去签署',
-                success: res => {
-                  if (res.confirm) {
-                    this.navToPage('/pages/repairConfirmation?type=fs')
+              if (
+                await this.$api.post('/worker/check/manual/sign/confirm', {
+                  type: 'fs'
+                }).data
+              ) {
+                uni.showModal({
+                  title: '温馨提示',
+                  content: '您未签署确认书!',
+                  cancelText: '取消',
+                  confirmText: '去签署',
+                  success: res => {
+                    if (res.confirm) {
+                      this.navToPage('/pages/repairConfirmation?type=fs')
+                    }
                   }
-                }
-              })
+                })
+              } else {
+                uni.showModal({
+                  title: '温馨提示',
+                  content: '签署确认书正在审核!',
+                  cancelText: '取消',
+                  confirmText: '知道了',
+                  success: res => {}
+                })
+              }
             }
           }
         } catch (error) {}