Browse Source

优化流程

xiaohaizhao 4 months ago
parent
commit
b3632d09ba

+ 17 - 0
Eservice/installConfirmBill/index.js

@@ -228,6 +228,23 @@ Page({
                 nocache: true
             }
         })
+        try {
+            if (res.data.attinfos.length != this.data.mainData.attinfos.length || res.data.attinfos[0].url != this.data.mainData.attinfos[0].url) {
+                this.setData({
+                    SignName: false
+                })
+                this.setData({
+                    SignName: true
+                })
+            }
+        } catch (error) {
+            this.setData({
+                SignName: false
+            })
+            this.setData({
+                SignName: true
+            })
+        }
         this.setData({
             "mainData.responsescore": res.data.responsescore,
             "mainData.attitudescore": res.data.attitudescore,

+ 17 - 0
Eservice/materielConfirmBill/index.js

@@ -254,6 +254,23 @@ Page({
         nocache: true
       }
     })
+    try {
+      if (res.data.attinfos.length != this.data.mainData.attinfos.length || res.data.attinfos[0].url != this.data.mainData.attinfos[0].url) {
+        this.setData({
+          SignName: false
+        })
+        this.setData({
+          SignName: true
+        })
+      }
+    } catch (error) {
+      this.setData({
+        SignName: false
+      })
+      this.setData({
+        SignName: true
+      })
+    }
     this.setData({
       "mainData.responsescore": res.data.responsescore,
       "mainData.attitudescore": res.data.attitudescore,

+ 17 - 0
Eservice/serviceConfirmBill/index.js

@@ -251,6 +251,23 @@ Page({
         nocache: true
       }
     })
+    try {
+      if (res.data.attinfos.length != this.data.mainData.attinfos.length || res.data.attinfos[0].url != this.data.mainData.attinfos[0].url) {
+        this.setData({
+          SignName: false
+        })
+        this.setData({
+          SignName: true
+        })
+      }
+    } catch (error) {
+      this.setData({
+        SignName: false
+      })
+      this.setData({
+        SignName: true
+      })
+    }
     this.setData({
       "mainData.responsescore": res.data.responsescore,
       "mainData.attitudescore": res.data.attitudescore,

+ 17 - 0
Eservice/trainConfirmBill/index.js

@@ -267,6 +267,23 @@ Page({
                 nocache: true
             }
         })
+        try {
+            if (res.data.attinfos.length != this.data.mainData.attinfos.length || res.data.attinfos[0].url != this.data.mainData.attinfos[0].url) {
+                this.setData({
+                    SignName: false
+                })
+                this.setData({
+                    SignName: true
+                })
+            }
+        } catch (error) {
+            this.setData({
+                SignName: false
+            })
+            this.setData({
+                SignName: true
+            })
+        }
         this.setData({
             "mainData.responsescore": res.data.responsescore,
             "mainData.attitudescore": res.data.attitudescore,

+ 6 - 4
app.js

@@ -6,20 +6,22 @@ import {
 } from './utils/language';
 App({
     onLaunch(options) {
+        console.log("options.query", options.query)
         //小程序跳转进入
         if (options.query.userMsg) {
             let userMsg = JSON.parse(options.query.userMsg)
             wx.removeStorageSync('userMsg');
+            wx.setStorageSync('userMsg', userMsg);
+            console.log("userMsg", wx.getStorageSync('userMsg'))
+            wx.setStorageSync('userrole', userMsg.usertype == 1 ? '业务员' : '经销商');
             wx.removeStorageSync('auth');
             wx.removeStorageSync('userauth');
+            wx.setStorageSync('auth', JSON.parse(options.query.auth));
             wx.removeStorageSync('userrole');
             wx.removeStorageSync('templetList');
-            wx.setStorageSync('userMsg', userMsg);
-            wx.setStorageSync('userrole', userMsg.usertype == 1 ? '业务员' : '经销商');
-            wx.setStorageSync('auth', JSON.parse(options.query.auth));
+            wx.removeStorageSync('siteP');
             wx.setStorageSync('siteP', JSON.parse(options.query.site));
             wx.setStorageSync('templetList', JSON.parse(options.query.templetList));
-            console.log("options.query.templetList", options.query.templetList)
             wx.removeStorageSync('languagecode');
             wx.setStorageSync('languagecode', options.query.languagecode);
             //获取用户权限