zs 1 éve
szülő
commit
2675f67568

+ 3 - 9
pagesCommon/login/index.js

@@ -35,9 +35,7 @@ Page({
                 wx.setStorage({ key: "token", data: res.data })// 存用户信息到storage,以便之后判断用户是否登录
                 wx.showToast({ title: `账号登录成功`, icon: 'success', duration: 2000 }) //登录成功提示
                 wx.redirectTo({ url: '/pagesHome/home/index' })
-            } else {
-                wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
-            }
+            } else wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
         }
     },
     // 提交注册
@@ -58,9 +56,7 @@ Page({
                 if (res.errcode === 0) {
                     wx.showToast({ title: `账号注册成功`, icon: 'success', duration: 2000 }) //登录成功提示
                     that.setData({ current: 1 })
-                } else {
-                    wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
-                }
+                } else wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
             }
         }
     },
@@ -92,9 +88,7 @@ Page({
         let res;
         // 类别
         res = await app.$api('dictData', 'GET', { type: 'type', is_use: '0' })
-        if (res.errcode == '0') {
-            that.setData({ typeList: res.data })
-        }
+        if (res.errcode == '0') that.setData({ typeList: res.data })
     },
     // 查询通知
     async search() {

+ 1 - 3
pagesHome/home/index.js

@@ -24,9 +24,7 @@ Page({
         if (that.data.user._id) {
             const item = e.currentTarget.dataset.item
             wx.navigateTo({ url: '/pagesMatch/apply/index?id=' + item._id })
-        } else {
-            wx.navigateTo({ url: '/pagesCommon/login/index' })
-        }
+        } else wx.navigateTo({ url: '/pagesCommon/login/index' })
     },
     // 查询
     async toSearch(e) {

+ 1 - 2
pagesMatch/apply/index.js

@@ -46,8 +46,7 @@ Page({
             key: 'token',
             async success(res) {
                 that.setData({ user: res.data })
-            },
-            fail(err) {
+            }, fail(err) {
                 console.log(err);
             }
         })

+ 1 - 3
pagesMatch/enroll/index.js

@@ -84,9 +84,7 @@ Page({
                 if (res.errcode == '0') {
                     wx.showToast({ title: `信息提交成功`, icon: 'success' });
                     wx.navigateBack({ delta: 1 });
-                } else {
-                    wx.showToast({ title: `${res.errmsg}`, icon: 'none' });
-                }
+                } else wx.showToast({ title: `${res.errmsg}`, icon: 'none' });
             } else {
                 wx.showToast({ title: `请选择参加比赛成员`, icon: 'none' });
             }

+ 1 - 3
pagesMatch/home/index.js

@@ -44,9 +44,7 @@ Page({
         if (that.data.user._id) {
             const item = e.currentTarget.dataset.item
             wx.navigateTo({ url: '/pagesMatch/apply/index?id=' + item._id })
-        } else {
-            wx.navigateTo({ url: '/pagesCommon/login/index' })
-        }
+        } else wx.navigateTo({ url: '/pagesCommon/login/index' })
     },
     // 查询
     async toSearch(e) {

+ 0 - 5
pagesTeam/home/index.js

@@ -43,7 +43,6 @@ Page({
         const that = this;
         wx.showLoading({ title: '加载中', mask: true })
         await that.searchConfig()
-        await that.searchOther()
         await that.clearPage();
         await that.search()
         wx.hideLoading()
@@ -119,10 +118,6 @@ Page({
             }
         }
     },
-    // 查询其他信息
-    async searchOther() {
-        const that = this;
-    },
     // 清空列表
     clearPage() {
         const that = this;