star7th 5 роки тому
батько
коміт
d2f2ed6aed
1 змінених файлів з 8 додано та 6 видалено
  1. 8 6
      web_src/src/components/page/edit/Index.vue

+ 8 - 6
web_src/src/components/page/edit/Index.vue

@@ -599,12 +599,14 @@ export default {
 
 
     // 锁定
     // 锁定
     setLock() {
     setLock() {
-      this.request('/api/page/setLock', {
-        page_id: this.page_id,
-        item_id: this.item_id
-      }).then(() => {
-        this.isLock = 1
-      })
+      if (this.page_id > 0) {
+        this.request('/api/page/setLock', {
+          page_id: this.page_id,
+          item_id: this.item_id
+        }).then(() => {
+          this.isLock = 1
+        })
+      }
     },
     },
     // 解除锁定
     // 解除锁定
     unlock() {
     unlock() {