guhongwei 2 jaren geleden
bovenliggende
commit
af1c744366

+ 1 - 1
app.js

@@ -25,7 +25,7 @@ App({
     // 当前设备信息
     client: {},
     // 数据请求接口域名
-    publicUrl: 'https://broadcast.waityou24.cn',
+    publicUrl: 'https://broadcast.waityou24.cn',//https://broadcast.waityou24.cn
     //图片请求接口域名
     fileUrl: "https://broadcast.waityou24.cn",
     // 微信路由前缀

+ 86 - 81
app.json

@@ -1,83 +1,88 @@
 {
-   "pages": [
-      "pages/index/index",
-      "pages/register/index",
-      "pages/home/index",
-      "pages/news/index",
-      "pages/news/mess",
-      "pages/news/add",
-      "pages/topic/index",
-      "pages/topic/mess",
-      "pages/topic/messAdd",
-      "pages/my/index",
-      "pages/my/userInfo",
-      "pages/matchInfo/index",
-      "pages/matchInfo/sign",
-      "pages/user/index",
-      "pages/match/mess",
-      "pages/match/matchadd",
-      "pages/match/matchgroup",
-      "pages/match/sign",
-      "pages/match/shteam",
-      "pages/match/orderbook",
-      "pages/orderbook/teamAdd",
-      "pages/orderbook/teamautoAdd",
-      "pages/orderbook/raceAdd",
-      "pages/orderbook/raceautoAdd",
-      "pages/order/index",
-      "pages/usermymatch/index",
-      "pages/usermysign/index",
-      "pages/usermyteam/index",
-      "pages/usermyteam/add",
-      "pages/usermyorder/index",
-      "pages/setting/contact",
-      "pages/setting/basic",
-      "pages/setting/index",
-      "pages/dictionary/project",
-      "pages/dictionary/projectadd",
-      "pages/dictionary/address",
-      "pages/dictionary/addressAdd",
-      "pages/agree_txt/index",
-      "pages/openMatch/index",
-      "pages/test/index",
-      "pages/match/index",
-      "pages/logs/index"
-   ],
-   "usingComponents": {
-      "van-sidebar": "@vant/weapp/sidebar/index",
-      "van-sidebar-item": "@vant/weapp/sidebar-item/index",
-      "van-search": "@vant/weapp/search/index",
-      "van-button": "@vant/weapp/button/index",
-      "van-row": "@vant/weapp/row/index",
-      "van-col": "@vant/weapp/col/index",
-      "van-dialog": "@vant/weapp/dialog/index",
-      "van-tab": "@vant/weapp/tab/index",
-      "van-tabs": "@vant/weapp/tabs/index",
-      "van-icon": "@vant/weapp/icon/index",
-      "van-nav-bar": "@vant/weapp/nav-bar/index",
-      "van-tabbar": "@vant/weapp/tabbar/index",
-      "van-tabbar-item": "@vant/weapp/tabbar-item/index",
-      "van-uploader": "@vant/weapp/uploader/index",
-      "van-popup": "@vant/weapp/popup/index",
-      "van-collapse": "@vant/weapp/collapse/index",
-      "van-collapse-item": "@vant/weapp/collapse-item/index",
-      "van-picker": "@vant/weapp/picker/index"
-   },
-   "window": {
-      "backgroundTextStyle": "light",
-      "navigationBarBackgroundColor": "#fff",
-      "navigationBarTitleText": "小程序模板",
-      "navigationBarTextStyle": "black",
-      "navigationStyle": "custom"
-   },
-   "style": "v2",
-   "requiredBackgroundModes": [
-      "location"
-   ],
-   "sitemapLocation": "sitemap.json",
-   "permission": {
-      "scope.userLocation": {
-         "desc": "你的位置信息将用于小程序位置接口的效果展示"
-      }
-   }
+    "pages": [
+   
+
+        "pages/my/index",
+        "pages/index/index",
+        "pages/register/index",
+        "pages/home/index",
+        "pages/news/index",
+        "pages/news/mess",
+        "pages/news/add",
+        "pages/topic/index",
+        "pages/topic/mess",
+        "pages/topic/messAdd",
+        "pages/my/userInfo",
+        "pages/matchInfo/index",
+        "pages/matchInfo/sign",
+        "pages/user/index",
+        "pages/match/mess",
+        "pages/match/matchadd",
+        "pages/match/matchgroup",
+        "pages/match/sign",
+        "pages/match/shteam",
+        "pages/match/orderbook",
+        "pages/order/index",
+        "pages/usermymatch/index",
+        "pages/usermysign/index",
+        "pages/usermyteam/index",
+        "pages/usermyteam/add",
+        "pages/usermyorder/index",
+        "pages/setting/contact",
+        "pages/setting/basic",
+        "pages/setting/index",
+        "pages/dictionary/project",
+        "pages/dictionary/projectadd",
+        "pages/dictionary/address",
+        "pages/dictionary/addressAdd",
+        "pages/raceteam/index",
+        "pages/raceteam/add",
+        "pages/raceteam/auto",
+        "pages/race/index",
+        "pages/race/add",
+        "pages/race/auto",
+        
+        "pages/agree_txt/index",
+        "pages/openMatch/index",
+        "pages/test/index",
+        "pages/match/index",
+        "pages/logs/index"
+    ],
+    "usingComponents": {
+        "van-sidebar": "@vant/weapp/sidebar/index",
+        "van-sidebar-item": "@vant/weapp/sidebar-item/index",
+        "van-search": "@vant/weapp/search/index",
+        "van-button": "@vant/weapp/button/index",
+        "van-row": "@vant/weapp/row/index",
+        "van-col": "@vant/weapp/col/index",
+        "van-dialog": "@vant/weapp/dialog/index",
+        "van-tab": "@vant/weapp/tab/index",
+        "van-tabs": "@vant/weapp/tabs/index",
+        "van-icon": "@vant/weapp/icon/index",
+        "van-nav-bar": "@vant/weapp/nav-bar/index",
+        "van-tabbar": "@vant/weapp/tabbar/index",
+        "van-tabbar-item": "@vant/weapp/tabbar-item/index",
+        "van-uploader": "@vant/weapp/uploader/index",
+        "van-popup": "@vant/weapp/popup/index",
+        "van-collapse": "@vant/weapp/collapse/index",
+        "van-collapse-item": "@vant/weapp/collapse-item/index",
+        "van-picker": "@vant/weapp/picker/index"
+    },
+    "window": {
+        "backgroundTextStyle": "light",
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "小程序模板",
+        "navigationBarTextStyle": "black",
+        "navigationStyle": "custom"
+    },
+    "style": "v2",
+    "requiredBackgroundModes": [
+        "location"
+    ],
+    "sitemapLocation": "sitemap.json",
+    "permission": {
+        "scope.userLocation": {
+            "desc": "你的位置信息将用于小程序位置接口的效果展示"
+        }
+    }
 }

+ 0 - 71
pages/match/raceteam.js

@@ -1,71 +0,0 @@
-const app = getApp()
-Page({
-
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        frameStyle: { useTop: true, name: '赛事组管理', leftArrow: true, useBar: false },
-    },
-    // 跳转菜单
-    back(e) {
-        wx.navigateBack({
-            delta: 1,
-        })
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-        const that = this;
-
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 38
pages/match/raceteam.less

@@ -1,38 +0,0 @@
-.main {
-    height: 88.8vh;
-
-    .zero {
-        width: 96vw;
-        margin: 0 0 2vw 0;
-    }
-
-    .zero {
-        margin: 0;
-    }
-
-    .one {
-        display: flex;
-        flex-direction: column;
-
-        .one_1 {
-            width: 92vw;
-            padding: 2vw;
-            margin: 0 0 1vw 0;
-            background-color: #ccc;
-
-        }
-
-        .one_2 {
-            text-align: center;
-            display: flex;
-            flex-direction: row;
-            justify-content: space-between;
-            width: 96vw;
-
-            button {
-                margin: 0 2vw;
-                font-size: 14px;
-            }
-        }
-    }
-}

+ 0 - 20
pages/match/raceteam.wxml

@@ -1,20 +0,0 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
-    <view slot="info" class="container main">
-        <view class="zero one">
-            <view class="one_1">
-                <input type="text" value="{{searchInfo.name}}" placeholder="请输入组名称" />
-            </view>
-            <view class="one_2">
-                <view>
-                    <button type="primary">自动编排</button>
-                </view>
-                <view>
-                    <button type="primary">手动编排</button>
-                </view>
-            </view>
-        </view>
-        <view class="zero two">
-            列表
-        </view>
-    </view>
-</mobile-main>

+ 0 - 31
pages/match/raceteam.wxss

@@ -1,31 +0,0 @@
-.main {
-  height: 88.8vh;
-}
-.main .zero {
-  width: 96vw;
-  margin: 0 0 2vw 0;
-}
-.main .zero {
-  margin: 0;
-}
-.main .one {
-  display: flex;
-  flex-direction: column;
-}
-.main .one .one_1 {
-  width: 92vw;
-  padding: 2vw;
-  margin: 0 0 1vw 0;
-  background-color: #ccc;
-}
-.main .one .one_2 {
-  text-align: center;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-  width: 96vw;
-}
-.main .one .one_2 button {
-  margin: 0 2vw;
-  font-size: 14px;
-}

File diff suppressed because it is too large
+ 273 - 0
pages/race/add.js


pages/match/raceteam.json → pages/race/add.json


+ 37 - 0
pages/race/add.less

@@ -0,0 +1,37 @@
+.main {
+    height: 88.8vh;
+
+    .one {
+        width: 96vw;
+
+        .content {
+            background-color: #ffffff;
+            border-bottom: 1px solid #cccccc;
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            padding: 2vw;
+            width: 92vw;
+
+            .label {
+                text-align: left;
+                font-size: 16px;
+            }
+
+            .value {
+                width: 65vw;
+                text-align: right;
+                font-size: 16px;
+
+                textarea {
+                    width: 65vw;
+                }
+            }
+        }
+
+        .btn {
+            margin: 2vw 0 0 0;
+            text-align: center;
+        }
+    }
+}

+ 121 - 0
pages/race/add.wxml

@@ -0,0 +1,121 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">比赛名称</view>
+                    <view class="value">
+                        <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
+                            <view class="input">{{form.match_name||'请选择赛事'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">赛事组别</view>
+                    <view class="value">
+                        <picker bindchange="grpupChange" name="grouping_id" value="{{form.grouping_id}}" range-key='name' range="{{groupingList}}">
+                            <view class="input">{{form.grouping_name||'请选择赛事组别'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">组内项目</view>
+                    <view class="value">
+                        <picker bindchange="projectChange" name="project_id" value="{{form.project_id}}" range-key='name' range="{{projectList}}">
+                            <view class="input">{{form.project_name||'请选择组内项目'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content" style="display: none;">
+                    <view class="label">组内项目类别</view>
+                    <view class="value">
+                        <input type="text" name="type" value="{{form.type}}" placeholder="请输入组内项目类别" disabled />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">赛程分组</view>
+                    <view class="value">
+                        <picker bindchange="teamChange" name="team_id" value="{{form.team_id}}" range-key='name' range="{{raceTeamList}}">
+                            <view class="input">{{form.team_name||'请选择赛程分组'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content" wx:if="{{form.type=='单打'}}">
+                    <view class="label">选手一</view>
+                    <view class="value">
+                        <picker bindchange="playeroneChange" name="player_one" value="{{form.player_one}}" range-key='name' range="{{personList}}">
+                            <view class="input">{{form.player_one_name||'请选择选手一'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content" wx:if="{{form.type=='单打'}}">
+                    <view class="label">选手二</view>
+                    <view class="value">
+                        <picker bindchange="playertwoChange" name="player_two" value="{{form.player_two}}" range-key='name' range="{{personList}}">
+                            <view class="input">{{form.player_two_name||'请选择选手二'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content" wx:if="{{form.type=='双打'}}">
+                    <view class="label">选手一</view>
+                    <view class="value">
+                        <picker bindchange="playeroneChange" name="player_one" value="{{form.player_one}}" range-key='names' range="{{personList}}">
+                            <view class="input">{{form.player_one_name||'请选择选手一'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content" wx:if="{{form.type=='双打'}}">
+                    <view class="label">选手二</view>
+                    <view class="value">
+                        <picker bindchange="playertwoChange" name="player_two" value="{{form.player_two}}" range-key='names' range="{{personList}}">
+                            <view class="input">{{form.player_two_name||'请选择选手二'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">比赛场地</view>
+                    <view class="value">
+                        <picker bindchange="groundChange" name="ground_id" value="{{form.ground_id}}" range-key='name' range="{{groundList}}">
+                            <view class="input">{{form.ground_name||'请选择比赛场地'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">裁判</view>
+                    <view class="value">
+                        <picker bindchange="refereeChange" name="referee_id" value="{{form.referee_id}}" range-key='name' range="{{refereeList}}">
+                            <view class="input">{{form.referee_name||'请选择裁判'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">比赛日期</view>
+                    <view class="value">
+                        <picker mode="date" bindchange="startdateChange" name="start_date" value="{{form.start_date}}">
+                            <view class="input">{{form.start_date||'请选择比赛日期'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">比赛时间</view>
+                    <view class="value">
+                        <picker mode="time" bindchange="starttimeChange" name="start_time" value="{{form.start_time}}">
+                            <view class="input">{{form.start_time||'请选择比赛时间'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">比赛状态</view>
+                    <view class="value">
+                        <picker bindchange="statusChange" name="status" value="{{form.status}}" range-key='label' range="{{statusList}}">
+                            <view class="input">{{form.status=='0'?'已安排':item.status=='1'?'待开赛':item.status=='2'?'已开赛':item.status=='3'?'已结束':'请选择比赛状态'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 31 - 0
pages/race/add.wxss

@@ -0,0 +1,31 @@
+.main {
+  height: 88.8vh;
+}
+.main .one {
+  width: 96vw;
+}
+.main .one .content {
+  background-color: #ffffff;
+  border-bottom: 1px solid #cccccc;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  padding: 2vw;
+  width: 92vw;
+}
+.main .one .content .label {
+  text-align: left;
+  font-size: 16px;
+}
+.main .one .content .value {
+  width: 65vw;
+  text-align: right;
+  font-size: 16px;
+}
+.main .one .content .value textarea {
+  width: 65vw;
+}
+.main .one .btn {
+  margin: 2vw 0 0 0;
+  text-align: center;
+}

+ 176 - 0
pages/race/auto.js

@@ -0,0 +1,176 @@
+const app = getApp()
+import WxValidate from '../../utils/wxValidate'
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '组项信息', leftArrow: true, useBar: false },
+        form: {},
+        // 赛事信息
+        matchList: [],
+        // 组别
+        groupingList: [],
+        //组内项目
+        projectList: [],
+        // 组内人员
+        personList: [],
+        // 组列表
+        teamList: []
+    },
+    initValidate() {
+        const rules = { match_id: { required: true }, grouping_id: { required: true }, project_id: { required: true }, team_id: { required: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { match_id: { required: '请选择赛事名称', }, grouping_id: { required: '请选择赛事组别', }, project_id: { required: '请选择组内项目', }, team_id: { required: '请选择组' } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    back(e) { wx.navigateBack({ delta: 1 }) },
+    // 选择赛事
+    matchChange: function (e) {
+        const that = this;
+        let data = that.data.matchList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.match_id': data._id });
+            that.setData({ 'form.match_name': data.name });
+            if (data.grouping && data.grouping.length > 0) {
+                that.setData({ groupingList: data.grouping })
+            }
+        }
+    },
+    // 选择赛事组别
+    grpupChange: async function (e) {
+        const that = this;
+        let data = that.data.groupingList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.grouping_id': data._id });
+            that.setData({ 'form.grouping_name': data.name });
+            if (data.project && data.project.length > 0) {
+                let projectList = [];
+                for (const val of data.project) {
+                    const arr = await app.$get(`/newCourt/api/matchProject/${val}`)
+                    if (arr.errcode == '0') projectList.push(arr.data);
+                    that.setData({ projectList: projectList })
+                }
+            }
+        }
+    },
+    // 选择组内项目
+    projectChange: function (e) {
+        const that = this;
+        let data = that.data.projectList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.project_id': data._id });
+            that.setData({ 'form.project_name': data.name });
+            // 查询赛事,组别,项目,分组数据
+            that.searchTeam()
+
+        }
+    },
+    // 查询分组数据
+    searchTeam: async function () {
+        const that = this;
+        let form = that.data.form;
+        let info = { match_id: form.match_id, grouping_id: form.grouping_id, project_id: form.project_id }
+        const arr = await app.$get(`/newCourt/api/raceTeam`, { ...info });
+        if (arr.errcode == '0') { that.setData({ teamList: arr.data }); }
+    },
+    // 选择赛事分组
+    teamChange: function (e) {
+        const that = this;
+        let data = that.data.teamList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.team_id': data._id });
+            that.setData({ 'form.team_name': data.name });
+        }
+    },
+    // 提交保存
+    onSubmit: async function (e) {
+        const that = this;
+        const params = e.detail.value;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            const arr = await app.$post(`/newCourt/api/race/toArrange`, params)
+            if (arr.errcode == '0') { wx.showToast({ title: `信息创建成功`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+        }
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' });
+        //验证规则函数
+        that.initValidate();
+        that.watchLogin()
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                const arr = await app.$get(`/newCourt/api/match`, { status: '0' });//2
+                if (arr.errcode == '0') {
+                    that.setData({ matchList: arr.data });
+                }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

pages/orderbook/teamAdd.json → pages/race/auto.json


+ 37 - 0
pages/race/auto.less

@@ -0,0 +1,37 @@
+.main {
+    height: 88.8vh;
+
+    .one {
+        width: 96vw;
+
+        .content {
+            background-color: #ffffff;
+            border-bottom: 1px solid #cccccc;
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            padding: 2vw;
+            width: 92vw;
+
+            .label {
+                text-align: left;
+                font-size: 16px;
+            }
+
+            .value {
+                width: 65vw;
+                text-align: right;
+                font-size: 16px;
+
+                textarea {
+                    width: 65vw;
+                }
+            }
+        }
+
+        .btn {
+            margin: 2vw 0 0 0;
+            text-align: center;
+        }
+    }
+}

+ 43 - 0
pages/race/auto.wxml

@@ -0,0 +1,43 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">比赛名称</view>
+                    <view class="value">
+                        <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
+                            <view class="input">{{form.match_name||'请选择赛事'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">赛事组别</view>
+                    <view class="value">
+                        <picker bindchange="grpupChange" name="grouping_id" value="{{form.grouping_id}}" range-key='name' range="{{groupingList}}">
+                            <view class="input">{{form.grouping_name||'请选择赛事组别'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">组内项目</view>
+                    <view class="value">
+                        <picker bindchange="projectChange" name="project_id" value="{{form.project_id}}" range-key='name' range="{{projectList}}">
+                            <view class="input">{{form.project_name||'请选择组内项目'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">小组名称</view>
+                    <view class="value">
+                        <picker bindchange="teamChange" name="team_id" value="{{form.team_id}}" range-key='name' range="{{teamList}}">
+                            <view class="input">{{form.team_name||'请选择小组名称'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 31 - 0
pages/race/auto.wxss

@@ -0,0 +1,31 @@
+.main {
+  height: 88.8vh;
+}
+.main .one {
+  width: 96vw;
+}
+.main .one .content {
+  background-color: #ffffff;
+  border-bottom: 1px solid #cccccc;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  padding: 2vw;
+  width: 92vw;
+}
+.main .one .content .label {
+  text-align: left;
+  font-size: 16px;
+}
+.main .one .content .value {
+  width: 65vw;
+  text-align: right;
+  font-size: 16px;
+}
+.main .one .content .value textarea {
+  width: 65vw;
+}
+.main .one .btn {
+  margin: 2vw 0 0 0;
+  text-align: center;
+}

+ 128 - 0
pages/race/index.js

@@ -0,0 +1,128 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '小组赛管理', leftArrow: true, useBar: false },
+        searchInfo: {},
+        list: [],
+    },
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 查询
+    search: function (e) {
+        const that = this;
+        that.setData({ 'searchInfo.name': e.detail.value });
+        that.watchLogin()
+    },
+    // 添加
+    toCommon: function (e) {
+        const that = this;
+        const { route } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/${route}` })
+    },
+    // 信息维护
+    toEdit: function (e) {
+        const { item } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/race/add?id=${item._id}` })
+    },
+    // 删除
+    toDel: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/newCourt/api/race/${item._id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        that.watchLogin()
+    },
+    watchLogin: function () {
+        const that = this;
+        const searchInfo = that.data.searchInfo;
+        wx.getStorage({
+            key: 'user',
+            success: async (res) => {
+                let arr;
+                let info = { skip: 0, limit: 1000 };
+                // if (searchInfo && searchInfo.name) info.name = searchInfo.name;
+                arr = await app.$get(`/newCourt/api/race`, { ...info });
+                if (arr.errcode == '0') { that.setData({ raceList: arr.data }) }
+                else { wx.showToast({ title: `${res.errMsg}`, icon: 'fail', duration: 2000 }); }
+
+
+            },
+            fail: async (res) => {
+                wx.redirectTo({ url: '/pages/index/index' });
+            },
+        });
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

pages/orderbook/teamautoAdd.json → pages/race/index.json


+ 109 - 0
pages/race/index.less

@@ -0,0 +1,109 @@
+.main {
+    height: 88.8vh;
+
+    .zero {
+        width: 96vw;
+        margin: 0 0 2vw 0;
+    }
+
+    .zero:last-child {
+        margin: 0;
+    }
+
+    .one {
+        display: flex;
+        flex-direction: column;
+
+        .one_1 {
+            width: 92vw;
+            padding: 2vw;
+            margin: 0 0 1vw 0;
+            background-color: #f1f1f1;
+
+        }
+
+        .one_2 {
+            text-align: center;
+            display: flex;
+            flex-direction: row;
+            justify-content: space-around;
+            width: 96vw;
+
+            button {
+                width: 100%;
+                margin: 0 2vw;
+                font-size: 14px;
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-wrap: wrap;
+                align-content: flex-start;
+                justify-content: space-between;
+
+                .list {
+                    background-color: #ffffff;
+                    border-bottom: 1px solid #cccccc;
+                    width: 96vw;
+                    padding: 2vw;
+
+                    .name {
+                        font-size: 18px;
+                        margin: 0 0 1vw 0;
+                        font-weight: bold;
+
+                        text {
+                            color: #ff0000;
+                            font-size: 20px;
+                            padding: 0 2vw;
+                        }
+                    }
+
+                    .other {
+                        margin: 0 0 1vw 0;
+
+                        .other_1 {
+                            margin: 0 0 1vw 0;
+                            font-size: 15px;
+
+                            text {
+                                color: #000000;
+                            }
+
+                            text:nth-child(1) {
+                                color: #858585;
+                            }
+
+                        }
+                    }
+
+                    .btn {
+                        text-align: center;
+
+                        button {
+                            margin: 0 2vw;
+                            font-size: 14px;
+                        }
+                    }
+                }
+
+                .list:last-child {
+                    border-bottom: none;
+                }
+            }
+        }
+    }
+}

+ 36 - 0
pages/race/index.wxml

@@ -0,0 +1,36 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="zero one">
+            <view class="one_1">
+                <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <view class="btn">
+                    <button type="primary" bindtap="toCommon" data-route="race/auto">自动编排</button>
+                </view>
+                <view class="btn">
+                    <button type="primary" bindtap="toCommon" data-route="race/add">手动编排</button>
+                </view>
+            </view>
+        </view>
+        <view class="zero two">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{raceList}}" wx:key="item">
+                        <view class="name">{{item.player_one_name}}<text>pk</text>{{item.player_two_name}}</view>
+                        <view class="other">
+                            <view class="other_1"><text>赛事名称:</text><text>{{item.match_name||'暂无'}}</text></view>
+                            <view class="other_1"><text>比赛场地:</text><text>{{item.ground_name||'暂无'}}</text></view>
+                            <view class="other_1"><text>比赛时间:</text><text>{{item.match_time||'暂无'}}</text></view>
+                            <view class="other_1"><text>比赛状态:</text><text>{{item.status=='0'?'已安排':item.status=='1'?'待开赛':item.status=='2'?'已开赛':item.status=='3'?'已结束':'暂无'}}</text></view>
+                        </view>
+                        <view class="btn">
+                            <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">信息维护</button>
+                            <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">信息删除</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 88 - 0
pages/race/index.wxss

@@ -0,0 +1,88 @@
+.main {
+  height: 88.8vh;
+}
+.main .zero {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+}
+.main .zero:last-child {
+  margin: 0;
+}
+.main .one {
+  display: flex;
+  flex-direction: column;
+}
+.main .one .one_1 {
+  width: 92vw;
+  padding: 2vw;
+  margin: 0 0 1vw 0;
+  background-color: #f1f1f1;
+}
+.main .one .one_2 {
+  text-align: center;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  width: 96vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  margin: 0 2vw;
+  font-size: 14px;
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .two .scroll-view .list-scroll-view {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: flex-start;
+  justify-content: space-between;
+}
+.main .two .scroll-view .list-scroll-view .list {
+  background-color: #ffffff;
+  border-bottom: 1px solid #cccccc;
+  width: 96vw;
+  padding: 2vw;
+}
+.main .two .scroll-view .list-scroll-view .list .name {
+  font-size: 18px;
+  margin: 0 0 1vw 0;
+  font-weight: bold;
+}
+.main .two .scroll-view .list-scroll-view .list .name text {
+  color: #ff0000;
+  font-size: 20px;
+  padding: 0 2vw;
+}
+.main .two .scroll-view .list-scroll-view .list .other {
+  margin: 0 0 1vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 {
+  margin: 0 0 1vw 0;
+  font-size: 15px;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 text {
+  color: #000000;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 text:nth-child(1) {
+  color: #858585;
+}
+.main .two .scroll-view .list-scroll-view .list .btn {
+  text-align: center;
+}
+.main .two .scroll-view .list-scroll-view .list .btn button {
+  margin: 0 2vw;
+  font-size: 14px;
+}
+.main .two .scroll-view .list-scroll-view .list:last-child {
+  border-bottom: none;
+}

+ 10 - 7
pages/orderbook/teamAdd.js

@@ -19,9 +19,9 @@ Page({
         personList: []
     },
     initValidate() {
-        const rules = { match_id: { required: true }, grouping_id: { required: true }, project_id: { required: true }, name: { required: true }, remark: { required: false } }
+        const rules = { match_id: { required: true }, grouping_id: { required: true }, project_id: { required: true }, name: { required: true }, rise: { required: true }, remark: { required: false } }
         // 验证字段的提示信息,若不传则调用默认的信息
-        const messages = { match_id: { required: '请选择赛事名称', }, grouping_id: { required: '请选择赛事组别', }, project_id: { required: '请选择组内项目', }, name: { required: '请输入组名' } };
+        const messages = { match_id: { required: '请选择赛事名称', }, grouping_id: { required: '请选择赛事组别', }, project_id: { required: '请选择组内项目', }, name: { required: '请输入组名' }, rise: { required: '请输入前x名晋级' } };
         this.WxValidate = new WxValidate(rules, messages)
     },
     back(e) { wx.navigateBack({ delta: 1 }) },
@@ -73,6 +73,7 @@ Page({
         let info = { match_id: form.match_id, grouping_id: form.grouping_id, project_id: form.project_id }
         const arr = await app.$get(`/newCourt/api/raceTeam/getRangePerson`, { ...info });
         if (arr.errcode == '0') { that.setData({ personList: arr.data }) }
+        else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
     },
     // 选择组内人员
     personChange: function (e) {
@@ -81,9 +82,9 @@ Page({
         const type = that.data.form.type;
         let person = [];
         if (type == '单打') {
-            for (const val of e.detail.value) { let data = list.find((i) => i.openid == val); if (data) person.push(data) }
+            for (const val of e.detail.value) { let data = list.find((i) => i.openid == val); if (data) person.push({ ...data, checked: true }) }
         } else if (type == '双打') {
-            for (const val of e.detail.value) { let data = list.find((i) => i.team_id == val); if (data) person.push(data) }
+            for (const val of e.detail.value) { let data = list.find((i) => i.team_id == val); if (data) person.push({ ...data, checked: true }) }
         }
         that.setData({ 'form.person': person })
     },
@@ -114,10 +115,12 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        console.log(options);
         const that = this;
         //验证规则函数
         that.initValidate();
-        that.setData({ id: options.id || '' });
+        that.setData({ id: options.id || '62eb1358d1c7ad6a16b963fb' });//62eb1138d1c7ad6a16b9600a   62eb1358d1c7ad6a16b963fb
+
         that.watchLogin()
     },
     // 监听用户是否登录
@@ -145,8 +148,8 @@ Page({
                         // 查询组内人员
                         let info = { match_id: arr.data.match_id, grouping_id: arr.data.grouping_id, project_id: arr.data.project_id }
                         const person = await app.$get(`/newCourt/api/raceTeam/getRangePerson`, { ...info });
-                        let personList = [];
-                        if (person.errcode == '0') { personList = [...person.data] }
+                        let personList = []
+                        if (person.errcode == '0') { personList = person.data }
                         for (const val of arr.data.person) { val.checked = true };
                         personList.unshift(...arr.data.person);
                         that.setData({ personList: personList })

+ 6 - 0
pages/raceteam/add.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

pages/orderbook/teamAdd.less → pages/raceteam/add.less


+ 7 - 0
pages/orderbook/teamAdd.wxml

@@ -45,6 +45,13 @@
                         <input name="name" value="{{form.name}}" placeholder="请输入组名" />
                     </view>
                 </view>
+                <view class="content">
+                    <view class="label">前x名晋级</view>
+                    <view class="value">
+                        <input type="number" name="rise" value="{{form.rise}}" placeholder="请输入前x名晋级" />
+                    </view>
+                </view>
+
                 <view class="content">
                     <view class="label">备注</view>
                     <view class="value">

pages/orderbook/teamAdd.wxss → pages/raceteam/add.wxss


+ 2 - 3
pages/orderbook/teamautoAdd.js

@@ -111,9 +111,8 @@ Page({
             return false
         } else {
             const arr = await app.$post(`/newCourt/api/raceTeam/auto`, params);
-            if (arr.errcode == '0') {
-                that.setData({ list: arr.data })
-            }
+            if (arr.errcode == '0') { that.setData({ list: arr.data }) }
+            else { wx.showToast({ title: `${arr.errmsg}`, icon: 'none', duration: 2000 }) }
         }
     },
     /**

+ 6 - 0
pages/raceteam/auto.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 4 - 3
pages/orderbook/teamautoAdd.less

@@ -32,6 +32,10 @@
         .btn {
             margin: 2vw 0 0 0;
             text-align: center;
+
+            button {
+                margin: 0 2vw;
+            }
         }
     }
 
@@ -108,9 +112,6 @@
             }
         }
 
-        .two_2 {
-            text-align: center;
-        }
 
     }
 }

+ 2 - 3
pages/orderbook/teamautoAdd.wxml

@@ -34,6 +34,7 @@
                 </view>
                 <view class="btn">
                     <button type="primary" size="mini" formType="submit">提交组项信息条件</button>
+                    <button type="primary" size="mini" bindtap="onekeySubmit" wx:if="{{list&&list.length>0}}">一键保存分组信息</button>
                 </view>
             </form>
         </view>
@@ -53,9 +54,7 @@
                     </view>
                 </view>
             </view>
-            <view class="two_2" wx:if="{{list&&list.length>0}}">
-                <button type="primary" size="mini" bindtap="onekeySubmit">一键保存分组信息</button>
-            </view>
+
         </view>
     </view>
 </mobile-main>

+ 3 - 3
pages/orderbook/teamautoAdd.wxss

@@ -29,6 +29,9 @@
   margin: 2vw 0 0 0;
   text-align: center;
 }
+.main .one .btn button {
+  margin: 0 2vw;
+}
 .main .two {
   width: 96vw;
 }
@@ -86,6 +89,3 @@
   font-size: 14px;
   padding: 0 5vw;
 }
-.main .two .two_2 {
-  text-align: center;
-}

+ 128 - 0
pages/raceteam/index.js

@@ -0,0 +1,128 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '赛事组管理', leftArrow: true, useBar: false },
+        searchInfo: {},
+        list: [],
+    },
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 查询
+    search: function (e) {
+        const that = this;
+        that.setData({ 'searchInfo.name': e.detail.value });
+        that.watchLogin()
+    },
+    // 添加
+    toCommon: function (e) {
+        const that = this;
+        const { route } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/${route}` })
+    },
+    // 信息维护
+    toEdit: function (e) {
+        const { item } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/raceteam/add?id=${item._id}` })
+    },
+    // 删除
+    toDel: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/newCourt/api/raceTeam/${item._id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        that.watchLogin()
+    },
+    watchLogin: function () {
+        const that = this;
+        const searchInfo = that.data.searchInfo;
+        wx.getStorage({
+            key: 'user',
+            success: async (res) => {
+                let arr;
+                let info = { skip: 0, limit: 1000 };
+                if (searchInfo && searchInfo.name) info.name = searchInfo.name;
+                arr = await app.$get(`/newCourt/api/raceTeam`, { ...info });
+                if (arr.errcode == '0') { that.setData({ list: arr.data }) }
+                else { wx.showToast({ title: `${res.errmsg}`, icon: 'fail', duration: 2000 }); }
+
+
+            },
+            fail: async (res) => {
+                wx.redirectTo({ url: '/pages/index/index' });
+            },
+        });
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/raceteam/index.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 102 - 0
pages/raceteam/index.less

@@ -0,0 +1,102 @@
+.main {
+    height: 88.8vh;
+
+    .zero {
+        width: 96vw;
+        margin: 0 0 2vw 0;
+    }
+
+    .zero:last-child {
+        margin: 0;
+    }
+
+    .one {
+        display: flex;
+        flex-direction: column;
+
+        .one_1 {
+            width: 92vw;
+            padding: 2vw;
+            margin: 0 0 1vw 0;
+            background-color: #f1f1f1;
+
+        }
+
+        .one_2 {
+            text-align: center;
+            display: flex;
+            flex-direction: row;
+            justify-content: space-around;
+            width: 96vw;
+
+            button {
+                width: 100%;
+                margin: 0 2vw;
+                font-size: 14px;
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-wrap: wrap;
+                align-content: flex-start;
+                justify-content: space-between;
+
+                .list {
+                    background-color: #ffffff;
+                    border-bottom: 1px solid #cccccc;
+                    width: 96vw;
+                    padding: 2vw;
+
+                    .name {
+                        font-size: 18px;
+                        margin: 0 0 1vw 0;
+                        font-weight: bold;
+                    }
+
+                    .other {
+                        margin: 0 0 1vw 0;
+
+                        .other_1 {
+                            margin: 0 0 1vw 0;
+                            font-size: 15px;
+
+                            text {
+                                color: #000000;
+                            }
+
+                            text:nth-child(1) {
+                                color: #858585;
+                            }
+
+                        }
+                    }
+
+                    .btn {
+                        text-align: center;
+
+                        button {
+                            margin: 0 2vw;
+                            font-size: 14px;
+                        }
+                    }
+                }
+
+                .list:last-child {
+                    border-bottom: none;
+                }
+            }
+        }
+    }
+}

+ 36 - 0
pages/raceteam/index.wxml

@@ -0,0 +1,36 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="zero one">
+            <view class="one_1">
+                <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入组名称" />
+            </view>
+            <view class="one_2">
+                <view class="btn">
+                    <button type="primary" bindtap="toCommon" data-route="raceteam/auto">自动编排</button>
+                </view>
+                <view class="btn">
+                    <button type="primary" bindtap="toCommon" data-route="raceteam/add">手动编排</button>
+                </view>
+            </view>
+        </view>
+        <view class="zero two">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="name">{{item.name}}</view>
+                        <view class="other">
+                            <view class="other_1"><text>赛事名称:</text><text>{{item.match_name||'暂无'}}</text></view>
+                            <view class="other_1"><text>赛事组别:</text><text>{{item.grouping_name||'暂无'}}</text></view>
+                            <view class="other_1"><text>组内项目:</text><text>{{item.project_name||'暂无'}}</text></view>
+                            <view class="other_1"><text>前x名晋级:</text><text>{{item.rise||'暂无'}}</text></view>
+                        </view>
+                        <view class="btn">
+                            <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">信息维护</button>
+                            <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">信息删除</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 83 - 0
pages/raceteam/index.wxss

@@ -0,0 +1,83 @@
+.main {
+  height: 88.8vh;
+}
+.main .zero {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+}
+.main .zero:last-child {
+  margin: 0;
+}
+.main .one {
+  display: flex;
+  flex-direction: column;
+}
+.main .one .one_1 {
+  width: 92vw;
+  padding: 2vw;
+  margin: 0 0 1vw 0;
+  background-color: #f1f1f1;
+}
+.main .one .one_2 {
+  text-align: center;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  width: 96vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  margin: 0 2vw;
+  font-size: 14px;
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .two .scroll-view .list-scroll-view {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: flex-start;
+  justify-content: space-between;
+}
+.main .two .scroll-view .list-scroll-view .list {
+  background-color: #ffffff;
+  border-bottom: 1px solid #cccccc;
+  width: 96vw;
+  padding: 2vw;
+}
+.main .two .scroll-view .list-scroll-view .list .name {
+  font-size: 18px;
+  margin: 0 0 1vw 0;
+  font-weight: bold;
+}
+.main .two .scroll-view .list-scroll-view .list .other {
+  margin: 0 0 1vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 {
+  margin: 0 0 1vw 0;
+  font-size: 15px;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 text {
+  color: #000000;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 text:nth-child(1) {
+  color: #858585;
+}
+.main .two .scroll-view .list-scroll-view .list .btn {
+  text-align: center;
+}
+.main .two .scroll-view .list-scroll-view .list .btn button {
+  margin: 0 2vw;
+  font-size: 14px;
+}
+.main .two .scroll-view .list-scroll-view .list:last-child {
+  border-bottom: none;
+}

+ 9 - 1
utils/dict.js

@@ -38,7 +38,8 @@ export const myBtn = [
                     { title: '信息管理', route: 'match/mess' },
                     { title: '报名管理', route: 'match/sign' },
                     { title: '组队信息管理', route: 'match/shteam' },
-                    { title: '赛事组管理', route: 'match/raceteam' },
+                    { title: '赛事组管理', route: 'raceteam/index' },
+                    { title: '小组赛管理', route: 'race/index' },
 
 
                     // { title: '秩序册管理', route: 'match/orderbook' },
@@ -162,4 +163,11 @@ export const paystatusList = [
 export const news_type = [
     { label: '其他', value: '0' },
     { label: '羽毛球', value: '1' },
+];
+// 小组赛赛程状态
+export const race_status = [
+    { label: '已安排', value: '0' },
+    { label: '待开赛', value: '1' },
+    { label: '已开赛', value: '2' },
+    { label: '已结束', value: '3' },
 ]