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() {
-      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() {