zs 1 년 전
부모
커밋
6cc6a1adbd
4개의 변경된 파일24개의 추가작업 그리고 9개의 파일을 삭제
  1. 6 3
      pagesMatch/apply/index.wxml
  2. 13 3
      pagesMatch/apply/index.wxss
  3. 4 2
      pagesMy/course/index.js
  4. 1 1
      pagesMy/match/index.js

+ 6 - 3
pagesMatch/apply/index.wxml

@@ -9,7 +9,7 @@
     <view class="two">
         <rich-text nodes="{{info.information}}"></rich-text>
     </view>
-    <view class="two" wx:if="{{list.length>0}}">
+    <view class="two" wx:if="{{list.length>0&&info.status=='1'}}">
         <scroll-view class="scroll-view" scroll-y="true" bindscroll="toScroll">
             <view class="list" wx:for="{{list}}" wx:key="index" wx:for-item="item">
                 <view class="list_1">
@@ -30,10 +30,13 @@
         </scroll-view>
     </view>
     <view class="thr">
-        <button wx:if="{{info.status=='0'&&user.type=='1'}}" class="btn" type="primary" size="mini" bindtap="toAdd">
+        <button wx:if="{{info.status=='0'&&user.type=='1'}}" class="color btn_1" type="primary" size="mini" bindtap="toAdd">
             报名
         </button>
-        <button class="btn" type="primary" size="mini" bindtap="toRank">
+        <button class="color btn_2" type="primary" size="mini" bindtap="toTeam">
+            参赛团队
+        </button>
+        <button wx:if="{{info.status=='-1'}}" class="color btn_3" type="primary" size="mini" bindtap="toRank">
             排名
         </button>
     </view>

+ 13 - 3
pagesMatch/apply/index.wxss

@@ -114,10 +114,20 @@
     text-align: center;
 }
 
-.main .thr .btn {
+.main .thr .color {
     margin: 0 2vw;
-    background-color: var(--rgb40E);
-    background-image: linear-gradient(to right, var(--rgb3AB), var(--rgb40E));
     border-radius: 20rpx;
     font-size: 15px;
+}
+
+.main .thr .btn_1 {
+    background-color: var(--rgb40E);
+}
+
+.main .thr .btn_2 {
+    background-color: var(--rgbff0);
+}
+
+.main .thr .btn_3 {
+    background-color: var(--rgb46a);
 }

+ 4 - 2
pagesMy/course/index.js

@@ -1,6 +1,7 @@
 const app = getApp()
 Page({
     data: {
+        team_id: '',
         id: '',
         // 用户信息
         user: {},
@@ -61,7 +62,7 @@ Page({
      */
     async onLoad(options) {
         const that = this;
-        that.setData({ id: options.id });
+        that.setData({ id: options.id, team_id: options.team_id });
     },
     /**
     * 生命周期函数--监听页面显示
@@ -101,7 +102,8 @@ Page({
         const that = this;
         let info = { skip: that.data.skip, limit: that.data.limit };
         info.match_id = that.data.id
-        let res = await app.$api('course', 'GET', { ...info })
+        info.team_id = that.data.team_id
+        let res = await app.$api('course/only', 'GET', { ...info })
         if (res.errcode == '0') {
             let list = [...that.data.list, ...res.data]
             for (const val of list) {

+ 1 - 1
pagesMy/match/index.js

@@ -27,7 +27,7 @@ Page({
     // 赛程安排
     toCourse(e) {
         let item = e.currentTarget.dataset.item
-        wx.navigateTo({ url: '/pagesMy/course/index?id=' + item.match_id })
+        wx.navigateTo({ url: '/pagesMy/course/index?id=' + item.match_id + '&team_id=' + item.team_id })
     },
     // 排名
     toRank(e) {