How to call the method defined in the methods in the vue file with the suffix js in the file with the suffix methods

{

  // 
  path:"/login",
  component: resolve => require(["@/app/Page/login/login.vue"], resolve),
  meta: {title: "",wxAuth: true},
  beforeEnter (to, from, next) {
    if (auth.loggedIn()) {
      next("/home")
    } else {
      next()
    }
  }
},
jsif(auth.loggedIn()){}vuemethods
 getLocation() {
  return this.$store.dispatch("get", {
    uri: consts.PREFIX + "/city/open/location"
  });
},
Mar.22,2021

How about

brother dei try using beforeRouteEnter in the component for a change of thinking? The purpose of looking at your code is also to initiate a get request in advance.

  document  also has instructions 

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eac62c-20cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eac62c-20cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?