任一存 2 年之前
父节点
当前提交
81b8a4ddd5
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/views/Bag.vue

+ 3 - 3
src/views/Bag.vue

@@ -138,10 +138,10 @@ export default {
     ...mapMutations([
     ]),
     onClickBuild(e) {
-      this.$router.push({
-        name: 'BuildTown'
-      })
       if (this.canBuild) {
+        this.$router.push({
+          name: 'BuildTown'
+        })
       } else {
         utils.animateCSS(e.currentTarget, 'headShake')
       }