guhongwei 2 years ago
parent
commit
5f91bdcec2
37 changed files with 444 additions and 55 deletions
  1. 52 51
      app.json
  2. 23 0
      commpents/match-achieve/achieve.js
  3. 4 0
      commpents/match-achieve/achieve.json
  4. 0 0
      commpents/match-achieve/achieve.less
  5. 2 0
      commpents/match-achieve/achieve.wxml
  6. 1 0
      commpents/match-achieve/achieve.wxss
  7. 23 0
      commpents/match-achieve/eliminate.js
  8. 4 0
      commpents/match-achieve/eliminate.json
  9. 0 0
      commpents/match-achieve/eliminate.less
  10. 2 0
      commpents/match-achieve/eliminate.wxml
  11. 1 0
      commpents/match-achieve/eliminate.wxss
  12. 23 0
      commpents/match-achieve/group,less.js
  13. 4 0
      commpents/match-achieve/group,less.json
  14. 2 0
      commpents/match-achieve/group,less.wxml
  15. 1 0
      commpents/match-achieve/group,less.wxss
  16. 23 0
      commpents/match-achieve/group.js
  17. 4 0
      commpents/match-achieve/group.json
  18. 2 0
      commpents/match-achieve/group.wxml
  19. 1 0
      commpents/match-achieve/group.wxss
  20. 23 0
      commpents/match-achieve/personal.js
  21. 4 0
      commpents/match-achieve/personal.json
  22. 0 0
      commpents/match-achieve/personal.less
  23. 2 0
      commpents/match-achieve/personal.wxml
  24. 1 0
      commpents/match-achieve/personal.wxss
  25. 23 0
      commpents/match-achieve/ranking.js
  26. 4 0
      commpents/match-achieve/ranking.json
  27. 2 0
      commpents/match-achieve/ranking.wxml
  28. 1 0
      commpents/match-achieve/ranking.wxss
  29. 8 1
      pages/index/index.js
  30. 95 0
      pages/matchInfo/achieve.js
  31. 12 0
      pages/matchInfo/achieve.json
  32. 30 0
      pages/matchInfo/achieve.less
  33. 29 0
      pages/matchInfo/achieve.wxml
  34. 25 0
      pages/matchInfo/achieve.wxss
  35. 12 2
      pages/matchInfo/index.js
  36. 1 1
      pages/matchInfo/index.wxml
  37. 0 0
      pages/matchInfo/ranking.less

+ 52 - 51
app.json

@@ -1,56 +1,57 @@
 {
     "pages": [
-      "pages/index/index",
-      "pages/register/index",
-      "pages/home/index",
-      "pages/news/index",
-      "pages/news/mess",
-      "pages/news/add",
-      "pages/news/info",
-      "pages/topic/index",
-      "pages/topic/mess",
-      "pages/topic/messAdd",
-      "pages/my/index",
-      "pages/topic/info",
-      "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/orderbook/teamautoAdd",
-      "pages/orderbook/teamAdd",
-      "pages/orderbook/raceAdd",
-      "pages/orderbook/autoAdd",
-      "pages/test/index",
-      "pages/match/index",
-      "pages/f6test/index",
-      "pages/logs/index"
+        "pages/index/index",
+        "pages/register/index",
+        "pages/home/index",
+        "pages/news/index",
+        "pages/news/mess",
+        "pages/news/add",
+        "pages/news/info",
+        "pages/topic/index",
+        "pages/topic/mess",
+        "pages/topic/messAdd",
+        "pages/my/index",
+        "pages/topic/info",
+        "pages/my/userInfo",
+        "pages/matchInfo/index",
+        "pages/matchInfo/sign",
+        "pages/matchInfo/achieve",
+        "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/orderbook/teamautoAdd",
+        "pages/orderbook/teamAdd",
+        "pages/orderbook/raceAdd",
+        "pages/orderbook/autoAdd",
+        "pages/test/index",
+        "pages/match/index",
+        "pages/f6test/index",
+        "pages/logs/index"
     ],
     "usingComponents": {
         "van-sidebar": "@vant/weapp/sidebar/index",

+ 23 - 0
commpents/match-achieve/achieve.js

@@ -0,0 +1,23 @@
+// commpents/match-achieve/achieve.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/match-achieve/achieve.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 0 - 0
commpents/match-achieve/achieve.less


+ 2 - 0
commpents/match-achieve/achieve.wxml

@@ -0,0 +1,2 @@
+<!--commpents/match-achieve/achieve.wxml-->
+<text>commpents/match-achieve/achieve.wxml</text>

+ 1 - 0
commpents/match-achieve/achieve.wxss

@@ -0,0 +1 @@
+/* commpents/match-achieve/achieve.wxss */

+ 23 - 0
commpents/match-achieve/eliminate.js

@@ -0,0 +1,23 @@
+// commpents/match-achieve/eliminate.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/match-achieve/eliminate.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 0 - 0
commpents/match-achieve/eliminate.less


+ 2 - 0
commpents/match-achieve/eliminate.wxml

@@ -0,0 +1,2 @@
+<!--commpents/match-achieve/eliminate.wxml-->
+<text>commpents/match-achieve/eliminate.wxml</text>

+ 1 - 0
commpents/match-achieve/eliminate.wxss

@@ -0,0 +1 @@
+/* commpents/match-achieve/eliminate.wxss */

+ 23 - 0
commpents/match-achieve/group,less.js

@@ -0,0 +1,23 @@
+// commpents/match-achieve/group,less.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/match-achieve/group,less.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 2 - 0
commpents/match-achieve/group,less.wxml

@@ -0,0 +1,2 @@
+<!--commpents/match-achieve/group,less.wxml-->
+<text>commpents/match-achieve/group,less.wxml</text>

+ 1 - 0
commpents/match-achieve/group,less.wxss

@@ -0,0 +1 @@
+/* commpents/match-achieve/group,less.wxss */

+ 23 - 0
commpents/match-achieve/group.js

@@ -0,0 +1,23 @@
+// commpents/match-achieve/group.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/match-achieve/group.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 2 - 0
commpents/match-achieve/group.wxml

@@ -0,0 +1,2 @@
+<!--commpents/match-achieve/group.wxml-->
+<text>commpents/match-achieve/group.wxml</text>

+ 1 - 0
commpents/match-achieve/group.wxss

@@ -0,0 +1 @@
+/* commpents/match-achieve/group.wxss */

+ 23 - 0
commpents/match-achieve/personal.js

@@ -0,0 +1,23 @@
+// commpents/match-achieve/personal.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/match-achieve/personal.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 0 - 0
commpents/match-achieve/personal.less


+ 2 - 0
commpents/match-achieve/personal.wxml

@@ -0,0 +1,2 @@
+<!--commpents/match-achieve/personal.wxml-->
+<text>commpents/match-achieve/personal.wxml</text>

+ 1 - 0
commpents/match-achieve/personal.wxss

@@ -0,0 +1 @@
+/* commpents/match-achieve/personal.wxss */

+ 23 - 0
commpents/match-achieve/ranking.js

@@ -0,0 +1,23 @@
+// commpents/match-achieve/ranking.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
commpents/match-achieve/ranking.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 2 - 0
commpents/match-achieve/ranking.wxml

@@ -0,0 +1,2 @@
+<!--commpents/match-achieve/ranking.wxml-->
+<text>commpents/match-achieve/ranking.wxml</text>

+ 1 - 0
commpents/match-achieve/ranking.wxss

@@ -0,0 +1 @@
+/* commpents/match-achieve/ranking.wxss */

+ 8 - 1
pages/index/index.js

@@ -7,10 +7,17 @@ Page({
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
+    onLoad: async function (options) {
         const that = this;
         // 监听用户是否登录
         that.watchLogin();
+        // const aee = await app.$get('/newCourt/api/enroll', { status: '-3' });
+        // let user = [];
+        // for (const val of aee.data) {
+        //     const arr = await app.$get(`/newCourt/api/user/${val.openid}`);
+        //     user.push({ name: arr.data.name, phone: arr.data.phone })
+        // }
+        // console.log(user);
     },
     // 监听用户是否登录
     watchLogin: async function () {

+ 95 - 0
pages/matchInfo/achieve.js

@@ -0,0 +1,95 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '赛事信息', leftArrow: true, useBar: false },
+        tabs: {
+            active: 'a',
+            list: [
+                { title: '小组赛', name: 'a' },
+                { title: '淘汰赛', name: 'b' },
+                { title: '名次', name: 'c' },
+                { title: '个人积分', name: 'd' },
+                { title: '团体积分', name: 'e' },
+            ],
+        },
+        options: {},
+        info: {}
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 选项卡
+    tabsChange: function (e) {
+        const that = this;
+        const { name } = e.detail;
+        that.setData({ 'tabs.active': name });
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ options: { match_id: options.match_id || '62e388d4fd61d871861b80af', grouping_id: options.grouping_id || '62e601db2dc7343e137fff76', project_id: options.project_id || '62e5ffba2dc7343e137ffee9' } })
+        that.search()
+    },
+    search: async function () {
+        const that = this;
+        const options = that.data.options;
+        let arr;
+        arr = await app.$get(`/newCourt/api/match/${options.match_id}`);
+        if (arr.errcode == '') { that.setData({ info: arr.data }) }
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 12 - 0
pages/matchInfo/achieve.json

@@ -0,0 +1,12 @@
+{
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index",
+        "e-tabs": "/commpents/tabs/index",
+        "achieve-1": "/commpents/match-achieve/achieve",
+        "achieve-2": "/commpents/match-achieve/eliminate",
+        "achieve-3": "/commpents/match-achieve/ranking",
+        "achieve-4": "/commpents/match-achieve/personal",
+        "achieve-5": "/commpents/match-achieve/group"
+    }
+}

+ 30 - 0
pages/matchInfo/achieve.less

@@ -0,0 +1,30 @@
+.main {
+    height: 88.8vh;
+
+    .zero {
+        width: 96vw;
+
+        margin: 0 0 2vw 0;
+    }
+
+    .zero:last-child {
+        margin: 0;
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-direction: column;
+            }
+        }
+    }
+}

+ 29 - 0
pages/matchInfo/achieve.wxml

@@ -0,0 +1,29 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="zero one">
+            <e-tabs tabs="{{tabs}}" bind:tabsChange="tabsChange"></e-tabs>
+        </view>
+        <view class="zero two">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view wx:if="{{tabs.active=='a'}}" class="a">
+                        <achieve-1></achieve-1>
+                    </view>
+                    <view wx:elif="{{tabs.active=='b'}}" class="b">
+                        <achieve-2></achieve-2>
+                    </view>
+                    <view wx:elif="{{tabs.active=='c'}}" class="c">
+                        <achieve-3></achieve-3>
+                    </view>
+                    <view wx:elif="{{tabs.active=='d'}}" class="d">
+                        <achieve-4></achieve-4>
+                    </view>
+                    <view wx:elif="{{tabs.active=='e'}}" class="e">
+                        <achieve-5></achieve-5>
+                    </view>
+                </view>
+            </scroll-view>
+
+        </view>
+    </view>
+</mobile-main>

+ 25 - 0
pages/matchInfo/achieve.wxss

@@ -0,0 +1,25 @@
+.main {
+  height: 88.8vh;
+}
+.main .zero {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+}
+.main .zero:last-child {
+  margin: 0;
+}
+.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-direction: column;
+}

+ 12 - 2
pages/matchInfo/index.js

@@ -63,7 +63,7 @@ Page({
         const that = this;
         const { ctype } = e.currentTarget.dataset;
         that.setData({ cType: ctype == '0' ? '1' : '0' })
-        that.setData({ cList: ctype == '0' ? that.data.raceList : that.data.raceteamList })
+        that.setData({ cList: that.data.cType == '0' ? that.data.raceList : that.data.raceteamList })
     },
     // 赛况
     dtabsChange: async function (e) {
@@ -77,6 +77,16 @@ Page({
         const arr = await app.$get(`/newCourt/api/race`, { ...searchInfo });
         if (arr.errcode == '0') { that.setData({ raceList: arr.data }) }
     },
+    // 赛况
+    toAchieve: function (e) {
+        const that = this;
+        let type = that.data.cType;
+        const { item } = e.currentTarget.dataset;
+        if (type == '1') {
+            wx.navigateTo({ url: `/pages/matchInfo/achieve?match_id=${item.match_id}&grouping_id=${item.grouping_id}&project_id=${item.project_id}` })
+        }
+
+    },
     /**
      * 生命周期函数--监听页面加载
      */
@@ -123,7 +133,7 @@ Page({
     },
     // 查询赛程信息
     searchOrder: async function () {
-        wx.showLoading({ title: '加载中' })
+        wx.showLoading({ title: '加载中', mask: true })
         const that = this;
         let type = that.data.cType;
         let info = that.data.info;

+ 1 - 1
pages/matchInfo/index.wxml

@@ -96,7 +96,7 @@
                 <view class="c_2">
                     <scroll-view scroll-y="true" class="scroll-view">
                         <view class="list-scroll-view">
-                            <view class="cList" wx:for="{{cList}}" wx:key="item">
+                            <view class="cList" wx:for="{{cList}}" wx:key="item" bindtap="toAchieve" data-item="{{item}}">
                                 <view class="cList_0" wx:if="{{cType=='0'}}">
                                     <view class="name">
                                         <text>{{item.grouping_name}}</text>

+ 0 - 0
pages/matchInfo/ranking.less