guhongwei 2 years ago
parent
commit
385e9c670a

+ 1 - 0
pages/order/index.js

@@ -28,6 +28,7 @@ Page({
             // 用户信息
             const user = await app.$get(`/newCourt/api/user/${arr.data.openid}`);
             if (user.errcode = '0') { arr.data.user_name = user.data.name };
+            arr.data.statusZh = that.getStatusZh(arr.data.status)
             that.setData({ info: arr.data })
             that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
         }

+ 1 - 1
pages/order/index.wxml

@@ -54,7 +54,7 @@
             </view>
             <view class="one_1">
                 <text>支付状态:</text>
-                <text>{{info.status=='0'?'待支付':info.status=='1'?'已支付':'支付失败'}}</text>
+                <text>{{info.statusZh}}</text>
             </view>
             <view class="one_1">
                 <text>支付时间:</text>

+ 2 - 44
pages/usermymatch/index.js

@@ -1,6 +1,4 @@
 const app = getApp()
-import { examine_status } from '../../utils/dict';
-import WxValidate from '../../utils/wxValidate';
 Page({
 
     /**
@@ -8,44 +6,12 @@ Page({
      */
     data: {
         frameStyle: { useTop: true, name: '我的赛事', leftArrow: true, useBar: false },
-        searchInfo: {},
-        list: [],
-        dialog: { title: '详细信息', show: false, type: '1' },
-        info: {},
     },
     // 跳转菜单
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
-    // 查询
-    search: function (e) { console.log('查询'); },
-    // 查看
-    toView: async function (e) {
-        const that = this;
-        const { item } = e.currentTarget.dataset;
-        const arr = await app.$get(`/newCourt/api/enroll/${item._id}`);
-        if (arr.errcode == '0') {
-            // 用户信息
-            const user = await app.$get(`/newCourt/api/user/${arr.data.openid}`);
-            if (user.errcode = '0') { arr.data.user_name = user.data.name };
-            // 赛事信息
-            const match = await app.$get(`/newCourt/api/match/${arr.data.match_id}`);
-            if (match.errcode = '0') { arr.data.match_name = match.data.name };
-            // 赛事组别
-            let group = match.data.grouping.find((i) => i._id == arr.data.grouping_id);
-            if (group) { arr.data.grouping_name = group.name; }
-            // 赛事项目
-            const project = await app.$get(`/newCourt/api/matchProject/${arr.data.project_id}`)
-            if (project.errcode = '0') { arr.data.project_name = project.data.name };
-            that.setData({ info: arr.data })
-            that.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
-        }
-    },
-    // 关闭弹框
-    toClose: function () {
-        const that = this;
-        that.setData({ dialog: { title: '详细信息', show: false, type: '1' } })
-    },
+
     /**
      * 生命周期函数--监听页面加载
      */
@@ -59,15 +25,7 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                const arr = await app.$get(`/newCourt/api/enroll/`, { openid: res.data.openid });
-                if (arr.errcode == '0') {
-                    for (const val of arr.data) {
-                        // 赛事信息
-                        const match = await app.$get(`/newCourt/api/match/${val.match_id}`);
-                        if (match.errcode = '0') { val.match_name = match.data.name };
-                    }
-                    that.setData({ list: arr.data })
-                }
+                console.log(res);
             },
             fail: res => {
                 wx.redirectTo({ url: '/pages/index/index', })

+ 0 - 102
pages/usermymatch/index.less

@@ -1,105 +1,3 @@
 .main {
     height: 88.8vh;
-
-    .zero {
-        width: 96vw;
-
-        margin: 0 0 2vw 0;
-    }
-
-    .zero:nth-child(2) {
-        margin: 0;
-    }
-
-    .one {
-        width: 92vw;
-        padding: 2vw;
-        background-color: #f1f1f1;
-
-        input {
-            font-size: 14px;
-        }
-    }
-
-    .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 {
-                    background-color: #ffffff;
-                    margin: 0 0 2vw 0;
-                    padding: 2vw;
-                    display: flex;
-                    flex-direction: column;
-                    width: 96vw;
-
-                    .name {
-                        font-size: 16px;
-                        font-weight: bold;
-                        margin: 0 0 1vw 0;
-                    }
-
-                    .other {
-                        margin: 0 0 1vw 0;
-
-                        .other_1 {
-                            color: #858585;
-                            font-size: 12px;
-                            margin: 0 0 1vw 0;
-
-                            text:nth-child(1) {
-                                color: #000000;
-                            }
-                        }
-                    }
-
-                    .btn {
-                        text-align: center;
-
-                        button {
-                            margin: 0 2vw;
-                            font-size: 14px;
-                        }
-                    }
-                }
-
-                .list:last-child {
-                    margin: 0;
-                }
-            }
-        }
-    }
-}
-
-.dialog_one {
-    display: flex;
-    flex-direction: column;
-
-    .one_1 {
-        border-bottom: 1px solid #ccc;
-        padding: 2vw 0;
-
-        text {
-            font-size: 14px;
-            color: #858585;
-        }
-
-        text:nth-child(1) {
-            color: #000000;
-        }
-    }
 }

+ 2 - 56
pages/usermymatch/index.wxml

@@ -1,59 +1,5 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view class="zero one">
-            <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入关键词" />
-        </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 textOver">{{item.match_name}}</view>
-                        <view class="other">
-                            <view class="other_1">
-                                <text>是否支付报名费:</text>
-                                <text>{{item.pay_status=='0'?'待支付':item.pay_status=='1'?'已支付':'支付失败'}}</text>
-                            </view>
-                            <view class="other_1">
-                                <text>是否转发朋友圈:</text>
-                                <text>{{item.has_turn=='0'?'未转发':'已转发'}}</text>
-                            </view>
-                        </view>
-                        <view class="btn">
-                            <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</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>报名用户:</text>
-                <text>{{info.user_name||'暂无昵称'}}</text>
-            </view>
-            <view class="one_1">
-                <text>赛事名称:</text>
-                <text>{{info.match_name||'暂无'}}</text>
-            </view>
-            <view class="one_1">
-                <text>赛事组别:</text>
-                <text>{{info.grouping_name||'暂无'}}</text>
-            </view>
-            <view class="one_1">
-                <text>组别项目:</text>
-                <text>{{info.project_name||'暂无'}}</text>
-            </view>
-            <view class="one_1">
-                <text>是否转发了朋友圈:</text>
-                <text>{{info.has_turn=='0'?'未转发':'已转发'}}</text>
-            </view>
-            <view class="one_1">
-                <text>支付状态:</text>
-                <text>{{info.pay_status=='0'?'待支付':info.pay_status=='1'?'已支付':'支付失败'}}</text>
-            </view>
-        </view>
-    </view>
-</e-dialog>
+</mobile-main>

+ 0 - 82
pages/usermymatch/index.wxss

@@ -1,85 +1,3 @@
 .main {
   height: 88.8vh;
 }
-.main .zero {
-  width: 96vw;
-  margin: 0 0 2vw 0;
-}
-.main .zero:nth-child(2) {
-  margin: 0;
-}
-.main .one {
-  width: 92vw;
-  padding: 2vw;
-  background-color: #f1f1f1;
-}
-.main .one input {
-  font-size: 14px;
-}
-.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 {
-  background-color: #ffffff;
-  margin: 0 0 2vw 0;
-  padding: 2vw;
-  display: flex;
-  flex-direction: column;
-  width: 96vw;
-}
-.main .two .scroll-view .list-scroll-view .list .name {
-  font-size: 16px;
-  font-weight: bold;
-  margin: 0 0 1vw 0;
-}
-.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 {
-  color: #858585;
-  font-size: 12px;
-  margin: 0 0 1vw 0;
-}
-.main .two .scroll-view .list-scroll-view .list .other .other_1 text:nth-child(1) {
-  color: #000000;
-}
-.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 {
-  margin: 0;
-}
-.dialog_one {
-  display: flex;
-  flex-direction: column;
-}
-.dialog_one .one_1 {
-  border-bottom: 1px solid #ccc;
-  padding: 2vw 0;
-}
-.dialog_one .one_1 text {
-  font-size: 14px;
-  color: #858585;
-}
-.dialog_one .one_1 text:nth-child(1) {
-  color: #000000;
-}