Browse Source

Merge branch 'master' of http://git.cc-lotus.info/ball-court/ball-applet

YY 2 years ago
parent
commit
bf8d97990d

+ 1 - 1
pagesMatch/refereeAdmin/mtschedule/info.wxml

@@ -31,7 +31,7 @@
             </view>
             </view>
             <view class="one_1">
             <view class="one_1">
                 <text>选手类型:</text>
                 <text>选手类型:</text>
-                <text>{{info.player_type=='User'?'单打':info.player_type=='TeamApply'?'双打':'暂无'}}</text>
+                <text>{{info.player_type=='Race.User'?'单打':info.player_type=='Race.TeamApply'?'双打':'暂无'}}</text>
             </view>
             </view>
             <view class="one_1">
             <view class="one_1">
                 <text>选手一:</text>
                 <text>选手一:</text>

+ 31 - 28
pagesMatch/refereeAdmin/mtschedule/list.js

@@ -11,6 +11,7 @@ Page({
         groupList: [],
         groupList: [],
         // 组内项目列表
         // 组内项目列表
         projectList: [],
         projectList: [],
+        // 赛程状态
         statusList: [],
         statusList: [],
         list: [],
         list: [],
         total: 0,
         total: 0,
@@ -20,6 +21,7 @@ Page({
         dialog: { title: '赛程上分', show: false, type: '1' },
         dialog: { title: '赛程上分', show: false, type: '1' },
         //查询
         //查询
         searchInfo: {},
         searchInfo: {},
+        // 上分
         form: {},
         form: {},
     },
     },
     initValidate() {
     initValidate() {
@@ -42,13 +44,6 @@ Page({
         const that = this;
         const that = this;
         that.setData({ dialog: { title: '选择赛事', show: true, type: '2' } })
         that.setData({ dialog: { title: '选择赛事', show: true, type: '2' } })
     },
     },
-    // 赛程上分
-    toScore: function (e) {
-        const that = this;
-        const { item } = e.currentTarget.dataset;
-        that.setData({ form: item })
-        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
-    },
     // 选择赛事
     // 选择赛事
     matchChange: async function (e) {
     matchChange: async function (e) {
         const that = this;
         const that = this;
@@ -77,17 +72,19 @@ Page({
             that.setData({ 'searchInfo.project_id': data._id, 'searchInfo.project_name': data.name });
             that.setData({ 'searchInfo.project_id': data._id, 'searchInfo.project_name': data.name });
         }
         }
     },
     },
+    // 提交查询
     toSubmit: function (e) {
     toSubmit: function (e) {
         const that = this
         const that = this
         let searchInfo = that.data.searchInfo;
         let searchInfo = that.data.searchInfo;
         if (searchInfo) {
         if (searchInfo) {
             that.setData({ skip: 0, page: 0, list: [] });
             that.setData({ skip: 0, page: 0, list: [] });
-            wx.setStorage({ key: "searchInfo", data: searchInfo })
-            that.toClose();
+            wx.setStorage({ key: "searchInfo", data: searchInfo });
             that.search();
             that.search();
+            that.toClose();
         }
         }
         else { wx.showToast({ title: '请选择数据', icon: 'error', duration: 2000 }) }
         else { wx.showToast({ title: '请选择数据', icon: 'error', duration: 2000 }) }
     },
     },
+    // 查询
     search: async function () {
     search: async function () {
         const that = this;
         const that = this;
         let raceuser = that.data.raceuser;
         let raceuser = that.data.raceuser;
@@ -99,7 +96,7 @@ Page({
                     let info = { skip: that.data.skip, limit: that.data.limit, referee_id: raceuser._id, group_id: res.data.group_id, match_id: res.data.match_id, project_id: res.data.project_id }
                     let info = { skip: that.data.skip, limit: that.data.limit, referee_id: raceuser._id, group_id: res.data.group_id, match_id: res.data.match_id, project_id: res.data.project_id }
                     let arr = await app.$get(`/msgs`, { ...info }, 'race');
                     let arr = await app.$get(`/msgs`, { ...info }, 'race');
                     if (arr.errcode == '0') {
                     if (arr.errcode == '0') {
-                        let list = [...that.data.list, ...arr.data]
+                        let list = [...that.data.list, ...arr.data];
                         for (const val of list) {
                         for (const val of list) {
                             let status = statusList.find(i => i.value == val.status)
                             let status = statusList.find(i => i.value == val.status)
                             if (status) val.zhStatus = status.label;
                             if (status) val.zhStatus = status.label;
@@ -111,17 +108,38 @@ Page({
             },
             },
         })
         })
     },
     },
-    // 提交保存
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.search();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 赛程上分
+    toScore: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ form: item })
+        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
+    },
+    // 提交上分
     onSubmit: async function (e) {
     onSubmit: async function (e) {
         const that = this;
         const that = this;
         const params = e.detail.value;
         const params = e.detail.value;
-        const form = that.data.form;
         if (!this.WxValidate.checkForm(params)) {
         if (!this.WxValidate.checkForm(params)) {
             const error = this.WxValidate.errorList[0];
             const error = this.WxValidate.errorList[0];
             wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
             wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
             return false
             return false
         } else {
         } else {
-            let arr = await app.$post(`/msgs/${form.id}`, params, 'race');
+            let arr = await app.$post(`/msgs/${params.id}`, params, 'race');
             if (arr.errcode == '0') {
             if (arr.errcode == '0') {
                 wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
                 wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
                 that.setData({ skip: 0, page: 0, list: [], form: {} })
                 that.setData({ skip: 0, page: 0, list: [], form: {} })
@@ -151,21 +169,6 @@ Page({
             }
             }
         })
         })
     },
     },
-    // 分页
-    toPage: function () {
-        const that = this;
-        let list = that.data.list;
-        let limit = that.data.limit;
-        if (that.data.total > list.length) {
-            wx.showLoading({ title: '加载中', mask: true })
-            let page = that.data.page + 1;
-            that.setData({ page: page })
-            let skip = page * limit;
-            that.setData({ skip: skip })
-            that.search();
-            wx.hideLoading()
-        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
-    },
     // 关闭弹框
     // 关闭弹框
     toClose: function () {
     toClose: function () {
         const that = this;
         const that = this;

+ 6 - 0
pagesMatch/refereeAdmin/mtschedule/list.wxml

@@ -54,6 +54,12 @@
     <view slot="info" class="dialog">
     <view slot="info" class="dialog">
         <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
         <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
             <form catchsubmit="onSubmit">
             <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">数据id:</view>
+                    <view class="value">
+                        <input type="text" name="id" value="{{form.id}}" disabled/>
+                    </view>
+                </view>
                 <view class="content">
                 <view class="content">
                     <view class="label">选手一:</view>
                     <view class="label">选手一:</view>
                     <view class="value">
                     <view class="value">

+ 1 - 1
pagesMatch/refereeAdmin/outschedule/info.wxml

@@ -27,7 +27,7 @@
             </view>
             </view>
             <view class="one_1">
             <view class="one_1">
                 <text>选手类型:</text>
                 <text>选手类型:</text>
-                <text>{{info.player_type=='User'?'单打':info.player_type=='TeamApply'?'双打':'暂无'}}</text>
+                <text>{{info.player_type=='Race.User'?'单打':info.player_type=='Race.TeamApply'?'双打':'暂无'}}</text>
             </view>
             </view>
             <view class="one_1">
             <view class="one_1">
                 <text>选手一:</text>
                 <text>选手一:</text>

+ 32 - 28
pagesMatch/refereeAdmin/outschedule/list.js

@@ -11,6 +11,7 @@ Page({
         groupList: [],
         groupList: [],
         // 组内项目列表
         // 组内项目列表
         projectList: [],
         projectList: [],
+        // 赛程状态
         statusList: [],
         statusList: [],
         list: [],
         list: [],
         total: 0,
         total: 0,
@@ -20,6 +21,7 @@ Page({
         dialog: { title: '赛程上分', show: false, type: '1' },
         dialog: { title: '赛程上分', show: false, type: '1' },
         //查询
         //查询
         searchInfo: {},
         searchInfo: {},
+        // 赛程上分
         form: {},
         form: {},
     },
     },
     initValidate() {
     initValidate() {
@@ -42,13 +44,6 @@ Page({
         const that = this;
         const that = this;
         that.setData({ dialog: { title: '选择赛事', show: true, type: '2' } })
         that.setData({ dialog: { title: '选择赛事', show: true, type: '2' } })
     },
     },
-    // 赛程上分
-    toScore: function (e) {
-        const that = this;
-        const { item } = e.currentTarget.dataset;
-        that.setData({ form: item })
-        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
-    },
     // 选择赛事
     // 选择赛事
     matchChange: async function (e) {
     matchChange: async function (e) {
         const that = this;
         const that = this;
@@ -82,12 +77,14 @@ Page({
         let searchInfo = that.data.searchInfo;
         let searchInfo = that.data.searchInfo;
         if (searchInfo) {
         if (searchInfo) {
             that.setData({ skip: 0, page: 0, list: [] });
             that.setData({ skip: 0, page: 0, list: [] });
-            wx.setStorage({ key: "searchInfo", data: searchInfo })
-            that.toClose();
+            wx.setStorage({ key: "searchInfo", data: searchInfo });
             that.search();
             that.search();
+            that.toClose();
+
         }
         }
         else { wx.showToast({ title: '请选择数据', icon: 'error', duration: 2000 }) }
         else { wx.showToast({ title: '请选择数据', icon: 'error', duration: 2000 }) }
     },
     },
+    // 查询
     search: async function () {
     search: async function () {
         const that = this;
         const that = this;
         let raceuser = that.data.raceuser;
         let raceuser = that.data.raceuser;
@@ -111,17 +108,38 @@ Page({
             },
             },
         })
         })
     },
     },
-    // 提交保存
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.search();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 赛程上分
+    toScore: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ form: item })
+        that.setData({ dialog: { title: '赛程上分', show: true, type: '1' } })
+    },
+    // 提交上分
     onSubmit: async function (e) {
     onSubmit: async function (e) {
         const that = this;
         const that = this;
         const params = e.detail.value;
         const params = e.detail.value;
-        const form = that.data.form;
         if (!this.WxValidate.checkForm(params)) {
         if (!this.WxValidate.checkForm(params)) {
             const error = this.WxValidate.errorList[0];
             const error = this.WxValidate.errorList[0];
             wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
             wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
             return false
             return false
         } else {
         } else {
-            let arr = await app.$post(`/eliminate/${form.id}`, params, 'race');
+            let arr = await app.$post(`/eliminate/${params.id}`, params, 'race');
             if (arr.errcode == '0') {
             if (arr.errcode == '0') {
                 wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
                 wx.showToast({ title: `上分成功`, icon: 'success', duration: 2000 });
                 that.setData({ skip: 0, page: 0, list: [], form: {} })
                 that.setData({ skip: 0, page: 0, list: [], form: {} })
@@ -131,7 +149,7 @@ Page({
             else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
             else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
         }
         }
     },
     },
-    // 删除
+    // 交换场地
     toChange: function (e) {
     toChange: function (e) {
         const that = this;
         const that = this;
         const { item } = e.currentTarget.dataset;
         const { item } = e.currentTarget.dataset;
@@ -151,21 +169,7 @@ Page({
             }
             }
         })
         })
     },
     },
-    // 分页
-    toPage: function () {
-        const that = this;
-        let list = that.data.list;
-        let limit = that.data.limit;
-        if (that.data.total > list.length) {
-            wx.showLoading({ title: '加载中', mask: true })
-            let page = that.data.page + 1;
-            that.setData({ page: page })
-            let skip = page * limit;
-            that.setData({ skip: skip })
-            that.search();
-            wx.hideLoading()
-        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
-    },
+
     // 关闭弹框
     // 关闭弹框
     toClose: function () {
     toClose: function () {
         const that = this;
         const that = this;

+ 6 - 0
pagesMatch/refereeAdmin/outschedule/list.wxml

@@ -55,6 +55,12 @@
     <view slot="info" class="dialog">
     <view slot="info" class="dialog">
         <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
         <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
             <form catchsubmit="onSubmit">
             <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">数据id:</view>
+                    <view class="value">
+                        <input type="text" name="id" value="{{form.id}}" disabled />
+                    </view>
+                </view>
                 <view class="content">
                 <view class="content">
                     <view class="label">选手一:</view>
                     <view class="label">选手一:</view>
                     <view class="value">
                     <view class="value">

+ 1 - 1
project.private.config.json

@@ -1,7 +1,7 @@
 {
 {
     "projectname": "%E7%BE%BD%E6%A0%A1%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0",
     "projectname": "%E7%BE%BD%E6%A0%A1%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0",
     "setting": {
     "setting": {
-        "compileHotReLoad": true
+        "compileHotReLoad": false
     },
     },
     "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
     "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
 }
 }