wangzhihui 4 yıl önce
ebeveyn
işleme
1b5cf91a49

+ 2 - 2
src/main.js

@@ -9,8 +9,8 @@ import md5 from "md5";
 const app = createApp(App);
 
 router.beforeEach(async (to, from, next) => {
-  let id = localStorage.id;
-  if (id) {
+  let userId = localStorage.userId;
+  if (userId) {
     store.commit("changeLogin", true);
     if (0 === to.matched.length) {
       next("/voyage/voyageList");

+ 1 - 1
src/views/index/Login.vue

@@ -109,7 +109,7 @@ export default {
             localStorage.setItem("phone", phone);
             localStorage.setItem("contactName", contactName);
             store.commit("changeLogin", true);
-            router.replace({ path: "/cargoOwnerManage/cargoOwnerList" });
+            router.replace({ path: "/voyage/voyageList" });
           } else {
             ElNotification.error({
               title: "错误",

+ 5 - 2
src/views/voyage/voyageDetail.vue

@@ -256,7 +256,7 @@
 
       <el-dialog
         v-model="videoModal"
-        title="视频审核"
+        title="视频查看"
         width="30%"
         :before-close="videoClose"
       >
@@ -425,7 +425,8 @@ export default {
         console.log(res);
       }
     }
-
+    let currentUrl = ref("");
+    let videoModal = ref(false);
     function openVideoModal(url) {
       currentUrl.value = url;
       videoModal.value = true;
@@ -445,6 +446,8 @@ export default {
       cancelVoyageChange,
       submitVoyageChange,
       finishVoyage,
+      currentUrl,
+      videoModal,
       openVideoModal,
       previewSrcList,
     };

+ 11 - 0
src/views/voyage/voyageList.vue

@@ -204,10 +204,21 @@ export default {
       });
 
       if (res.data.status == 0) {
+        ElNotification({
+          type: "success",
+          title: res.data.msg,
+        });
         tableData.value = res.data.result;
+      } else {
+        tableData.value = [];
+        ElNotification({
+          type: "error",
+          title: res.data.msg,
+        });
       }
     }
     function changeVoyageType(s) {
+      term.value = "";
       currentbtn.value = s == 1;
       status.value = s;
       getVoyageList();