浏览代码

更新 参数逻辑

wangzhihui 3 年之前
父节点
当前提交
c7fa16aff0
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      miniprogram/pages/voyageManage/createVoyage/createVoyage.js

+ 10 - 1
miniprogram/pages/voyageManage/createVoyage/createVoyage.js

@@ -1,12 +1,13 @@
 const {
   postApi
 } = require("../../../apis/api")
+const app = getApp()
 
 // pages/voyageManage/createVoyage/createVoyage.js
 Page({
   data: {
     defaultParams: {
-      loginAccountId: wx.getStorageSync('loginAccountId')
+
     },
     dischargePorts: [''],
     dischargePortIds: [''],
@@ -155,6 +156,7 @@ Page({
       wx.showToast({
         title: res.data.msg,
       })
+      app.globalData.mainTab = 1
       wx.switchTab({
         url: '/pages/voyageManage/voyageManage',
       })
@@ -165,5 +167,12 @@ Page({
       })
     }
 
+  },
+  onShow() {
+    this.setData({
+      defaultParams: {
+        loginAccountId: wx.getStorageSync('loginAccountId')
+      }
+    })
   }
 })