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">
     <view class="two">
         <rich-text nodes="{{info.information}}"></rich-text>
         <rich-text nodes="{{info.information}}"></rich-text>
     </view>
     </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">
         <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" wx:for="{{list}}" wx:key="index" wx:for-item="item">
                 <view class="list_1">
                 <view class="list_1">
@@ -30,10 +30,13 @@
         </scroll-view>
         </scroll-view>
     </view>
     </view>
     <view class="thr">
     <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>
-        <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>
         </button>
     </view>
     </view>

+ 13 - 3
pagesMatch/apply/index.wxss

@@ -114,10 +114,20 @@
     text-align: center;
     text-align: center;
 }
 }
 
 
-.main .thr .btn {
+.main .thr .color {
     margin: 0 2vw;
     margin: 0 2vw;
-    background-color: var(--rgb40E);
-    background-image: linear-gradient(to right, var(--rgb3AB), var(--rgb40E));
     border-radius: 20rpx;
     border-radius: 20rpx;
     font-size: 15px;
     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()
 const app = getApp()
 Page({
 Page({
     data: {
     data: {
+        team_id: '',
         id: '',
         id: '',
         // 用户信息
         // 用户信息
         user: {},
         user: {},
@@ -61,7 +62,7 @@ Page({
      */
      */
     async onLoad(options) {
     async onLoad(options) {
         const that = this;
         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;
         const that = this;
         let info = { skip: that.data.skip, limit: that.data.limit };
         let info = { skip: that.data.skip, limit: that.data.limit };
         info.match_id = that.data.id
         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') {
         if (res.errcode == '0') {
             let list = [...that.data.list, ...res.data]
             let list = [...that.data.list, ...res.data]
             for (const val of list) {
             for (const val of list) {

+ 1 - 1
pagesMy/match/index.js

@@ -27,7 +27,7 @@ Page({
     // 赛程安排
     // 赛程安排
     toCourse(e) {
     toCourse(e) {
         let item = e.currentTarget.dataset.item
         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) {
     toRank(e) {