zs 2 лет назад
Родитель
Сommit
9bea7a5097

+ 2 - 3
pagesMatch/matchAdmin/group/add.js

@@ -36,7 +36,6 @@ Page({
             return false
         } else {
             let arr;
-            console.log(params);
             if (params._id) { arr = await app.$post(`/matchGroup/${params._id}`, params, 'race') }
             else { arr = await app.$post(`/matchGroup`, params, 'race') }
             if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
@@ -61,8 +60,8 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                let match = await app.$get(`/match`, {}, 'race');
-                if (match.arrcode == '0') that.setData({ matchList: match.data })
+                let match = await app.$get(`/match`, { status: "0" }, 'race');
+                if (match.errcode == '0') that.setData({ matchList: match.data })
                 if (that.data.id) {
                     let arr = await app.$get(`/matchGroup/${that.data.id}`, {}, 'race');
                     if (arr.errcode == '0') {

+ 2 - 2
pagesMatch/matchAdmin/group/add.wxml

@@ -11,8 +11,8 @@
                 <view class="content">
                     <view class="label">比赛名称:</view>
                     <view class="value">
-                        <picker mode="selector" bindchange="matchChange" name="match_id" value="{{form.match_id}}" range="{{matchList}}" range-key="name">
-                            <view class="picker">{{form.match_name||'请选择比赛名称'}}</view>
+                        <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
+                            <view class="picker">{{form.match_name||'请选择赛事'}}</view>
                         </picker>
                     </view>
                 </view>

+ 1 - 0
pagesMatch/matchAdmin/group/list.js

@@ -29,6 +29,7 @@ Page({
                     const arr = await app.$delete(`/matchGroup/${item._id}`, {}, 'race');
                     if (arr.errcode == '0') {
                         wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] })
                         that.watchLogin()
                     } else {
                         wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })

+ 0 - 1
pagesMatch/matchAdmin/group/list.less

@@ -48,7 +48,6 @@
 
             .name {
                 font-size: var(--font20Szie);
-                color: var(--redColor);
                 font-weight: bold;
                 margin: 0 0 2vw 0;
             }

+ 1 - 1
pagesMatch/matchAdmin/group/list.wxml

@@ -28,7 +28,7 @@
                             </view>
                         </view>
                         <view class="btn">
-                            <button type="primary" size="mini" bindtap="toCommon" data-item="{{item}}">信息维护</button>
+                            <button type="primary" size="mini" bindtap="toCommon" data-route="matchAdmin/group/add" data-item="{{item}}">信息维护</button>
                             <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">信息删除</button>
                         </view>
                     </view>

+ 0 - 1
pagesMatch/matchAdmin/group/list.wxss

@@ -42,7 +42,6 @@
 }
 .main .two .list .name {
   font-size: var(--font20Szie);
-  color: var(--redColor);
   font-weight: bold;
   margin: 0 0 2vw 0;
 }

+ 1 - 1
pagesMatch/matchAdmin/project/add.js

@@ -98,7 +98,7 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                let match = await app.$get(`/match`, {}, 'race');
+                let match = await app.$get(`/match`, { status: "0" }, 'race');
                 if (match.errcode == '0') that.setData({ matchList: match.data })
                 let group = await app.$get(`/matchGroup`, {}, 'race');
                 if (group.errcode == '0') that.setData({ groupList: group.data })

+ 1 - 0
pagesMatch/matchAdmin/project/list.js

@@ -33,6 +33,7 @@ Page({
                     const arr = await app.$delete(`/matchProject/${item._id}`, 'race');
                     if (arr.errcode == '0') {
                         wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] })
                         that.watchLogin()
                     } else {
                         wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })

+ 0 - 1
pagesMatch/matchAdmin/project/list.less

@@ -47,7 +47,6 @@
 
             .name {
                 font-size: var(--font20Szie);
-                color: var(--redColor);
                 font-weight: bold;
                 margin: 0 0 2vw 0;
             }

+ 1 - 1
pagesMatch/matchAdmin/project/list.wxml

@@ -40,7 +40,7 @@
                             </view>
                         </view>
                         <view class="btn">
-                            <button type="primary" size="mini" bindtap="toCommon" data-item="{{item}}">信息维护</button>
+                            <button type="primary" size="mini" bindtap="toCommon" data-route="matchAdmin/project/add" data-item="{{item}}">信息维护</button>
                             <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">信息删除</button>
                         </view>
                     </view>

+ 0 - 1
pagesMatch/matchAdmin/project/list.wxss

@@ -42,7 +42,6 @@
 }
 .main .two .list .name {
   font-size: var(--font20Szie);
-  color: var(--redColor);
   font-weight: bold;
   margin: 0 0 2vw 0;
 }