Przeglądaj źródła

调整条件位置

xiaohaizhao 1 rok temu
rodzic
commit
6c32e46c9b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      packageA/activity/detail.js

+ 2 - 2
packageA/activity/detail.js

@@ -167,7 +167,7 @@ Page({
                     label: "结束"
                 }]
             };
-            if (status == '新建' && isLeader) getApp().globalData.handleClue = this.isDelete.bind(this);
+            getApp().globalData.handleClue = this.isDelete.bind(this);
         }
         this.setData({
             tabbarList,
@@ -179,7 +179,7 @@ Page({
      * @param {number} total 数据数量
      */
     isDelete(total) {
-        if (total == 0) this.setData({
+        if (this.data.detail.status == '新建' && this.data.isLeader && total == 0) this.setData({
             tabbarList: this.data.tabbarList.concat([{
                 icon: "icon-guanlian-shanchu",
                 label: "删除"