zs há 2 anos atrás
pai
commit
f8a463a5ec
1 ficheiros alterados com 10 adições e 2 exclusões
  1. 10 2
      pages/match/index.js

+ 10 - 2
pages/match/index.js

@@ -77,10 +77,18 @@ Page({
         let arr;
         // 状态
         arr = await app.$get(`/dict`, { code: "match_status" });
-        if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+        if (arr.errcode == '0' && arr.total > 0) {
+            let list = arr.data[0].list;
+            list.push({ id: "1", label: '全部', value: '' });
+            that.setData({ statusList: list });
+        }
         // 赛事类别
         arr = await app.$get(`/dict`, { code: "match_type" });
-        if (arr.errcode == '0' && arr.total > 0) that.setData({ typeList: arr.data[0].list });
+        if (arr.errcode == '0' && arr.total > 0) {
+            let list = arr.data[0].list;
+            list.push({ id: "1", label: '全部', value: '' });
+            that.setData({ typeList: list });
+        }
     },
     // 监听用户是否登录
     watchLogin: async function () {