YY 2 年之前
父节点
当前提交
7196da879d
共有 2 个文件被更改,包括 6 次插入8 次删除
  1. 4 6
      pagesMatch/matchAdmin/mtgroup/list.js
  2. 2 2
      pagesMatch/matchAdmin/mtgroup/list.wxml

+ 4 - 6
pagesMatch/matchAdmin/mtgroup/list.js

@@ -5,9 +5,7 @@ Page({
         list: [],
         matchList: [],
         // 赛事名称
-        zhMatch: '',
-        // 赛事id
-        _id: '',
+        match:{},
         total: 0,
         page: 0,
         skip: 0,
@@ -27,7 +25,7 @@ Page({
         const that = this;
         let data = that.data.matchList[e.detail.value];
         if (data) {
-            that.setData({ _id: data._id, zhMatch: data.name });
+            that.setData({ 'match.id': data._id, 'match.name': data.name });
             that.setData({ skip: 0, page: 0, list: [] })
             that.watchLogin();
         }
@@ -93,8 +91,8 @@ Page({
                 let arr;
                 arr = await app.$get(`/match`, { belong_id: res.data._id }, 'race');
                 if (arr.errcode == '0') that.setData({ matchList: arr.data });
-                if (that.data._id) {
-                    let info = { skip: that.data.skip, limit: that.data.limit, match_id: that.data._id };
+                if (that.data.match.id) {
+                    let info = { skip: that.data.skip, limit: that.data.limit, match_id: that.data.match.id };
                     const arr = await app.$get(`/matchTeamGroup`, { ...info }, 'race');
                     if (arr.errcode == '0') {
                         that.setData({ list: [...that.data.list, ...arr.data] })

+ 2 - 2
pagesMatch/matchAdmin/mtgroup/list.wxml

@@ -6,8 +6,8 @@
             </view>
             <view class="one_2">
                 <view class="one_2_1">
-                    <picker mode="selector" bindchange="matchChange" name="_id" value="{{_id}}" range="{{matchList}}" range-key="name">
-                        <button type="primary" class="textOver">{{zhMatch||'选择赛事'}}</button>
+                    <picker mode="selector" bindchange="matchChange" name="id" value="{{match.id}}" range="{{matchList}}" range-key="name">
+                        <button type="primary" class="textOver">{{match.name||'选择赛事'}}</button>
                     </picker>
                 </view>
                 <view class="one_2_1">