zs преди 3 години
родител
ревизия
1b1ddb9e76

+ 2 - 1
pages/administration/compete.js

@@ -151,7 +151,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
 
   /**

+ 2 - 1
pages/administration/detail.js

@@ -175,7 +175,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
 
   /**

+ 3 - 2
pages/administration/details.js

@@ -68,7 +68,7 @@ Page({
     // 是否减去底部菜单
     if (frameStyle.useBar) infoHeight = infoHeight - 50;
     if (infoHeight) this.setData({ infoHeight: infoHeight })
-},
+  },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
@@ -81,7 +81,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
 
   /**

+ 2 - 1
pages/administration/index.js

@@ -97,7 +97,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
 
   /**

+ 2 - 1
pages/home/index.js

@@ -76,7 +76,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
 
   /**

+ 3 - 2
pages/lays/index.js

@@ -33,7 +33,7 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        this.setData({ id: options.id})
+        this.setData({ id: options.id })
         // 计算高度
         this.searchHeight();
         // 监听用户是否登录
@@ -82,7 +82,8 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-
+        // 监听用户是否登录
+        this.watchLogin();
     },
 
     /**

+ 45 - 44
pages/manage/index.js

@@ -25,53 +25,53 @@ Page({
     const that = this;
     let { id, status } = e.currentTarget.dataset;
     wx.showModal({
-        content: `您确定提交${status == '1' ? '通过' : '驳回'}操作吗?`,
-        title: '提示',
-        success(result) {
-            if (result.confirm) {
-                if (status == '1') {
-                    wx.request({
-                        url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
-                        method: "post",
-                        data: { status: status },
-                        header: {},
-                        success: res => {
-                          console.log(res.data.data);
+      content: `您确定提交${status == '1' ? '通过' : '驳回'}操作吗?`,
+      title: '提示',
+      success(result) {
+        if (result.confirm) {
+          if (status == '1') {
+            wx.request({
+              url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
+              method: "post",
+              data: { status: status },
+              header: {},
+              success: res => {
+                console.log(res.data.data);
 
-                            if (res.data.errcode === 0) {
-                                wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
-                                that.watchLogin();
-                            } else {
-                                wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
-                            }
-                        },
-                        error: err => {
-                        }
-                    })
+                if (res.data.errcode === 0) {
+                  wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
+                  that.watchLogin();
                 } else {
-                    wx.request({
-                        url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
-                        method: "post",
-                        data: { status: status },
-                        header: {},
-                        success: res => {
-                          console.log(res.data.data);
-                            if (res.data.errcode === 0) {
-                                wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
-                                that.watchLogin();
-                            } else {
-                                wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
-                            }
-                        },
-                        error: err => {
-                        }
-                    })
-
+                  wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
                 }
-            } else if (result.cancel) { }
-        }
+              },
+              error: err => {
+              }
+            })
+          } else {
+            wx.request({
+              url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id}`,
+              method: "post",
+              data: { status: status },
+              header: {},
+              success: res => {
+                console.log(res.data.data);
+                if (res.data.errcode === 0) {
+                  wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
+                  that.watchLogin();
+                } else {
+                  wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
+                }
+              },
+              error: err => {
+              }
+            })
+
+          }
+        } else if (result.cancel) { }
+      }
     })
-},
+  },
   //查询解散或参赛团队详情
   shen: function (e) {
     let obj = e.currentTarget.dataset;
@@ -266,7 +266,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
 
   /**

+ 1 - 1
pages/match/detail.js

@@ -174,7 +174,7 @@ Page({
         })
       } else {
         return wx.showToast({
-          title: '不可上传',
+          title: '不可删除',
           duration: 2000,
           icon: 'error',
         })

+ 3 - 2
pages/me/index.js

@@ -140,7 +140,7 @@ Page({
         success: res => {
           this.setData({ list: res.data.data })
           //查询比赛列表
-          this.searchMatch(res.data.data);
+          if(res.data.data.length!=0)this.searchMatch(res.data.data);
         },
         error: err => {
         }
@@ -193,7 +193,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
   /**
    * 生命周期函数--监听页面隐藏

+ 2 - 1
pages/meMatch/detail.js

@@ -76,7 +76,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    // 监听用户是否登录
+    this.watchLogin();
   },
 
   /**