Jelajahi Sumber

组队审核

zs 2 tahun lalu
induk
melakukan
918a5e08c7

+ 1 - 0
app.json

@@ -17,6 +17,7 @@
         "pages/match/matchadd",
         "pages/match/project",
         "pages/match/projectadd",
+        "pages/match/shteam",
         "pages/test/index"
     ],
     "usingComponents": {

+ 1 - 1
pages/match/project.wxml

@@ -2,7 +2,7 @@
     <view slot="info" class="container main">
         <view class="zero one">
             <view class="one_1">
-                <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入比赛名称" />
+                <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入比赛项目" />
             </view>
             <view class="one_2">
                 <button type="primary" size="mini" bindtap="toAdd">添加</button>

+ 3 - 0
pages/match/projectadd.less

@@ -25,6 +25,9 @@
                 input {
                     text-align: right;
                 }
+                textarea {
+                    text-align: right;
+                }
             }
         }
 

+ 2 - 2
pages/match/projectadd.wxml

@@ -16,11 +16,11 @@
                 </view>
                 <view class="content">
                     <view class="label">比赛项目说明:</view>
-                    <view class="value"><input name="explain" value="{{form.explain}}" placeholder="请输入比赛项目说明" /></view>
+                    <view class="value"><textarea auto-height name="explain" value="{{form.explain}}" placeholder="请输入比赛项目说明"></textarea></view>
                 </view>
                 <view class="content">
                     <view class="label">比赛人数:</view>
-                    <view class="value"><input type="number" name="num" value="{{form.num}}" placeholder="请输入比赛人数" /></view>
+                    <view class="value"><input type="digit" name="num" value="{{form.num}}" placeholder="请输入比赛人数" /></view>
                 </view>
                 <view class="btn">
                     <button type="primary" size="mini" formType="submit">提交保存</button>

+ 3 - 0
pages/match/projectadd.wxss

@@ -24,6 +24,9 @@
 .main .one .content .value input {
   text-align: right;
 }
+.main .one .content .value textarea {
+  text-align: right;
+}
 .main .one .btn {
   width: 96vw;
   margin: 50px 0;

+ 123 - 0
pages/match/shteam.js

@@ -0,0 +1,123 @@
+const app = getApp()
+import { examine_status } from '../../utils/dict';
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '组队信息审核', leftArrow: true, useBar: false },
+        //查询条件
+        searchName: '',
+        list: [],
+        dialog: { title: '详细信息', show: false, type: '1' },
+        info: {},
+        statusList: examine_status
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 查询信息
+    onSearch: function (e) {
+        const that = this;
+        that.setData({ searchName: e.detail });
+        that.watchLogin();
+    },
+    // 查看
+    toView: async function (e) {
+        const that = this;
+        const { id } = e.currentTarget.dataset;
+        const arr = await app.$get(`/newCourt/api/user/${id}`);
+        if (arr.errcode == '0') {
+            that.setData({ info: arr.data })
+            that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
+        }
+    },
+    // 审核
+    toCheck: async function (e) {
+        const that = this;
+        let { id } = e.currentTarget.dataset;
+        const arr = await app.$get(`/newCourt/api/user/${id}`);
+        if (arr.errcode == '0') {
+            that.setData({ info: arr.data })
+            that.setData({ dialog: { title: '信息审核', show: true, type: '2' } })
+        }
+    },
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ dialog: { title: '详细信息', show: false, type: '1' } })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                let info = {};
+                if (that.data.searchName) info.name = that.data.searchName;
+                const arr = await app.$get(`/newCourt/api/user/`, { ...info });
+                // if (arr.errcode == '0') { that.setData({ list: arr.data }) }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 7 - 0
pages/match/shteam.json

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

+ 121 - 0
pages/match/shteam.less

@@ -0,0 +1,121 @@
+.main {
+    height: 88vh;
+
+    .one {
+        width: 96vw;
+        margin: 0 0 2vw 0;
+        background-color: #fff;
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+        width: 96vw;
+
+        .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 {
+                    display: flex;
+                    flex-direction: column;
+                    width: 96vw;
+                    padding: 2vw;
+                    background-color: #ffffff;
+                    margin: 0 0 2vw 0;
+
+                    .name {
+                        font-size: 14px;
+                        font-weight: bold;
+                        margin: 0 0 1vw 0;
+                    }
+
+                    .other {
+                        font-size: 12px;
+                        margin: 0 0 1vw 0;
+
+                        .other_1 {
+                            padding: 0 0 1vw 0;
+                        }
+
+                        .other_1 text:nth-child(1) {
+                            color: #666;
+                        }
+                    }
+
+                    .btn {
+                        text-align: center;
+
+                        button {
+                            color: #ffffff;
+                            font-size: 14px;
+                            margin: 0 2vw;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+.dialog_one {
+    margin: 10px 0 0 0;
+
+    .one_1 {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        border: 1px solid #ccc;
+        border-radius: 5px;
+        margin: 0 0 10px 0;
+        padding: 10px;
+
+        .text {
+            width: 20vw;
+            color: #666;
+            font-size: 14px;
+        }
+
+        .text1 {
+            font-size: 14px;
+            color: #000;
+        }
+
+        .image {
+            width: 15vw;
+            height: 15vw;
+        }
+    }
+}
+
+.dialog_two {
+    margin: 10px 0 0 0;
+
+    .content {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        border-bottom: 1px solid #ccc;
+        padding: 10px 0;
+        margin: 0 0 10px 0;
+        font-size: 14px;
+        color: #000;
+    }
+
+    .btn {
+        text-align: center;
+
+        button {
+            font-size: 14px;
+        }
+    }
+}

+ 70 - 0
pages/match/shteam.wxml

@@ -0,0 +1,70 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <van-search value="{{ searchName }}" bind:search="onSearch" placeholder="请输入组队名称" />
+        </view>
+        <view class="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 textOver">{{item.name||'暂无'}}</view>
+                        <view class="other">
+                            <view class="other_1"><text>用户类型:</text><text>{{item.type=='-1'?'管理员':item.type=='0'?'个人用户':item.type=='1'?'裁判用户':'暂无'}}</text></view>
+                            <view class="other_1"><text>手机:</text><text>{{item.phone||'暂无'}}</text></view>
+                            <view class="other_1"><text>状态:</text><text>{{item.status=='0'?'待审中':item.status=='1'?'审核通过':'审核拒绝'}}</text></view>
+                        </view>
+                        <view class="btn">
+                            <button size="mini" type="primary" bindtap="toView" data-id="{{item._id}}">详情</button>
+                            <button size="mini" type="primary" bindtap="toCheck" data-id="{{item._id}}">审核</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>
+<e-dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info">
+        <view class="dialog_one" wx:if="{{dialog.type=='1'}}">
+            <view class="one_1">
+                <text class="text">头像:</text>
+                <image class="image" src="{{info.icon[0].url}}"></image>
+            </view>
+            <view class="one_1">
+                <text class="text">用户名:</text>
+                <text class="text1">{{info.name||'暂无昵称'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">电话:</text>
+                <text class="text1">{{info.phone||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">性别:</text>
+                <text class="text1">{{info.gender||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">身份证号:</text>
+                <text class="text1">{{info.card||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">状态:</text>
+                <text class="text1">{{info.email||'暂无'}}</text>
+            </view>
+        </view>
+        <view class="dialog_two" wx:elif="{{dialog.type=='2'}}">
+            <form bindsubmit="onSubmit">
+                <view class="content">
+                    <view class="label textOver">状态</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="statusChange" name="status" value="{{form.status}}" range-key="label" range="{{statusList}}">
+                            <view class="input">{{form.status=='0'?'待审中':form.status=='1'?'审核通过':'审核拒绝'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交审核</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</e-dialog>

+ 101 - 0
pages/match/shteam.wxss

@@ -0,0 +1,101 @@
+.main {
+  height: 88vh;
+}
+.main .one {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+  background-color: #fff;
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+  width: 96vw;
+}
+.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 {
+  display: flex;
+  flex-direction: column;
+  width: 96vw;
+  padding: 2vw;
+  background-color: #ffffff;
+  margin: 0 0 2vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .name {
+  font-size: 14px;
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .other {
+  font-size: 12px;
+  margin: 0 0 1vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 {
+  padding: 0 0 1vw 0;
+}
+.main .two .scroll-view .list-scroll-view .list .other .other_1 text:nth-child(1) {
+  color: #666;
+}
+.main .two .scroll-view .list-scroll-view .list .btn {
+  text-align: center;
+}
+.main .two .scroll-view .list-scroll-view .list .btn button {
+  color: #ffffff;
+  font-size: 14px;
+  margin: 0 2vw;
+}
+.dialog_one {
+  margin: 10px 0 0 0;
+}
+.dialog_one .one_1 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border: 1px solid #ccc;
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  padding: 10px;
+}
+.dialog_one .one_1 .text {
+  width: 20vw;
+  color: #666;
+  font-size: 14px;
+}
+.dialog_one .one_1 .text1 {
+  font-size: 14px;
+  color: #000;
+}
+.dialog_one .one_1 .image {
+  width: 15vw;
+  height: 15vw;
+}
+.dialog_two {
+  margin: 10px 0 0 0;
+}
+.dialog_two .content {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border-bottom: 1px solid #ccc;
+  padding: 10px 0;
+  margin: 0 0 10px 0;
+  font-size: 14px;
+  color: #000;
+}
+.dialog_two .btn {
+  text-align: center;
+}
+.dialog_two .btn button {
+  font-size: 14px;
+}

+ 3 - 3
pages/setting/basic.wxml

@@ -3,11 +3,11 @@
         <view class="one">
             <form catchsubmit="onSubmit">
                 <view class="content" style="display: none;">
-                    <view class="label">用户id</view>
+                    <view class="label">用户id</view>
                     <view class="value"><input name="id" value="{{form.id}}" placeholder="请输入用户id" /></view>
                 </view>
                 <view class="content" style="display: none;">
-                    <view class="label">openid</view>
+                    <view class="label">openid</view>
                     <view class="value"><input name="openid" value="{{form.openid}}" placeholder="请输入openid" /></view>
                 </view>
                 <view class="content">
@@ -29,7 +29,7 @@
                     </view>
                 </view>
                 <view class="content">
-                    <view class="label">身份证</view>
+                    <view class="label">身份证</view>
                     <view class="value"><input disabled="true" name="card" value="{{form.card}}" placeholder="请输入身份证" /></view>
                 </view>
                 <view class="content">

+ 4 - 4
pages/user/index.wxml

@@ -10,7 +10,7 @@
                         <view class="name textOver">{{item.name||'暂无'}}</view>
                         <view class="other">
                             <view class="other_1"><text>用户类型:</text><text>{{item.type=='-1'?'管理员':item.type=='0'?'个人用户':item.type=='1'?'裁判用户':'暂无'}}</text></view>
-                            <view class="other_1"><text>手机:</text><text>{{item.phone||'暂无'}}</text></view>
+                            <view class="other_1"><text>手机:</text><text>{{item.phone||'暂无'}}</text></view>
                             <view class="other_1"><text>邮箱:</text><text>{{item.email||'暂无'}}</text></view>
                         </view>
                         <view class="btn">
@@ -34,11 +34,11 @@
                 <text class="text1">{{info.name||'暂无昵称'}}</text>
             </view>
             <view class="one_1">
-                <text class="text">电话:</text>
+                <text class="text">电话</text>
                 <text class="text1">{{info.phone||'暂无'}}</text>
             </view>
             <view class="one_1">
-                <text class="text">性别:</text>
+                <text class="text">性别</text>
                 <text class="text1">{{info.gender||'暂无'}}</text>
             </view>
             <view class="one_1">
@@ -46,7 +46,7 @@
                 <text class="text1">{{info.card||'暂无'}}</text>
             </view>
             <view class="one_1">
-                <text class="text">邮箱:</text>
+                <text class="text">邮箱</text>
                 <text class="text1">{{info.email||'暂无'}}</text>
             </view>
         </view>

+ 5 - 0
utils/dict.js

@@ -41,3 +41,8 @@ export const match_project = [
     { label: '单打', value: '单打' },
     { label: '双打', value: '双打' },
 ]
+export const examine_status = [
+    { label: '待审核', value: '0' },
+    { label: '审核通过', value: '1' },
+    { label: '审核拒绝', value: '-1' }
+]