Jelajahi Sumber

比赛管理

zs 2 tahun lalu
induk
melakukan
411cffbf1f

+ 1 - 1
app.json

@@ -1,6 +1,5 @@
 {
     "pages": [
- 
         "pages/index/index",
         "pages/register/index",
         "pages/home/index",
@@ -19,6 +18,7 @@
         "pages/match/project",
         "pages/match/projectadd",
         "pages/match/shteam",
+        "pages/match/sign",
         "pages/test/index"
     ],
     "usingComponents": {

+ 2 - 4
pages/match/projectadd.less

@@ -21,12 +21,10 @@
             .value {
                 color: #666;
                 font-size: 12px;
+                text-align: right;
 
-                input {
-                    text-align: right;
-                }
                 textarea {
-                    text-align: right;
+                    max-width: 220px;
                 }
             }
         }

+ 1 - 3
pages/match/projectadd.wxss

@@ -20,12 +20,10 @@
 .main .one .content .value {
   color: #666;
   font-size: 12px;
-}
-.main .one .content .value input {
   text-align: right;
 }
 .main .one .content .value textarea {
-  text-align: right;
+  max-width: 220px;
 }
 .main .one .btn {
   width: 96vw;

+ 123 - 0
pages/match/sign.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/sign.json

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

+ 121 - 0
pages/match/sign.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/sign.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.has_turn=='0'?'未转发':'已转发'}}</text></view>
+                            <view class="other_1"><text>支付状态:</text><text>{{item.pay_status=='0'?'待支付':item.pay_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.pay_status=='0'?'待支付':info.status=='1'?'已支付':'支付失败'}}</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="{{info.status}}" range-key="label" range="{{statusList}}">
+                            <view class="input">{{info.pay_status=='0'?'待支付':info.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/sign.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;
+}