瀏覽代碼

修改吐司信息

wangxin 6 年之前
父節點
當前提交
605127f059
共有 2 個文件被更改,包括 16 次插入3 次删除
  1. 3 2
      src/view/index/index.vue
  2. 13 1
      src/view/invitation/index.vue

+ 3 - 2
src/view/index/index.vue

@@ -178,7 +178,7 @@
                 this.$router.push({name: 'clock'})
             },
             clock() {
-                this.$router.push({name: 'staff_temperature', params: {province: this.province}})
+                this.location();
             },
             toDonations() {
                 this.$router.push({name: 'donations'})
@@ -206,7 +206,7 @@
                         });
                         wx.ready(() => {
                             console.log("微信验证");
-                            this.location();
+
                             this.updateAppMessageShareData();
                             this.updateTimelineShareData();
                         });
@@ -255,6 +255,7 @@
                         that.province = addressComponent.province;
                         that.city = addressComponent.city;
                         that.district = addressComponent.district;
+                        that.$router.push({name: 'staff_temperature', params: {province: that.province}})
                     })
                     .catch((data) => {
                         console.log(data);

+ 13 - 1
src/view/invitation/index.vue

@@ -84,7 +84,7 @@
     import {staffRegister} from '@/api/index'
     import {Button, Cell, CellGroup, Field, Toast, Col, Row, Dialog} from 'vant';
     import {getUrlParams} from '@/utils/util';
-    import {setStore} from "@/utils/storage";
+    import {setStore, getStore} from "@/utils/storage";
     import img_phone from '@/assets/phone.png'
     import img_code from '@/assets/code.png'
     import img_phone_empty from '@/assets/phone_empty.png'
@@ -128,6 +128,18 @@
             this.enterprise_id = getUrlParams(str).enterprise_id;
             this.enterprise_name = getUrlParams(str).enterprise_name;
         },
+        mounted() {
+            if (getStore('staff')) {
+                setStore('role', 'staff');
+                this.$router.replace({
+                    path: '/index',
+                    query: {
+                        enterprise_id: getStore('staff').enterpriseId,
+                        enterprise_name: getStore('staff').enterpriseName
+                    }
+                });
+            }
+        },
         methods: {
             isMobile(value) {
                 return isMobile(value)