Переглянути джерело

feature:(仪器管理)预约校验token跳转登录,然后返回跳转页面修改个人中心图片

liuzhenlin 11 місяців тому
батько
коміт
d71145b40c

BIN
src/assets/img/center-banner.png


+ 4 - 1
src/views/equipment/details.vue

@@ -212,7 +212,10 @@
       handleAppoint() {
         const token = getToken();
         if (!token) {
-          return this.$router.push("/login");
+          return this.$router.push(
+            "/login?redirect=/appointment/equipment-details?id=" +
+              this.instrDetails.id
+          );
         }
         this.$refs.appointRef.openDialog(this.instrDetails);
       },

+ 4 - 4
src/views/equipment/index.vue

@@ -260,7 +260,7 @@
       handleAppoint(row) {
         const token = getToken();
         if (!token) {
-          return this.$router.push("/login");
+          return this.$router.push("/login?redirect=/appointment/equipment");
         }
         this.$refs.appointRef.openDialog(row);
       },
@@ -288,6 +288,9 @@
       async getInstrData() {
         Loading.service(this.loadingOption);
         const [err, res] = await to(getInstrList(this.searchForm));
+        setTimeout(() => {
+          Loading.service(this.loadingOption).close();
+        });
         if (err) return;
         if (res.code == 200) {
           this.instrDataList = res.data.list;
@@ -300,9 +303,6 @@
           );
           this.getInstNameEnCountData();
         }
-        setTimeout(() => {
-          Loading.service(this.loadingOption).close();
-        });
       },
       // 对象转数组
       objTransforArr(obj) {