Ver Fonte

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

zs há 3 anos atrás
pai
commit
b9ff4dcc60

+ 69 - 61
pages/auditTeam/index.js

@@ -13,6 +13,12 @@ Page({
         list: [],
         // 团队id
         id: '',
+        // 团队队员
+        members: [],
+        //审核通过的团队队员
+        member: [],
+        //详情
+        details: {},
         show: false,
     },
     back: function () {
@@ -44,71 +50,73 @@ Page({
         wx.showModal({
             content: `您确定提交${status == '1' ? '通过' : '驳回'}操作吗?`,
             title: '提示',
-            success: (result) => {
-                if (status == '1') {
-                    //修改状态-加入团队修改
-                    wx.request({
-                        url: `${app.globalData.publicUrl}/courtAdmin/api/joinapply/${id}`,
-                        method: "post",
-                        data: { status: status },
-                        header: {},
-                        success: res => {
-                            if (res.data.errcode === 0) {
-                                wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
-                                that.watchLogin();
-                            } else {
-                                wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
+            success(result) {
+                if (result.confirm) {
+                    if (status == '1') {
+                        //修改状态-加入团队修改
+                        wx.request({
+                            url: `${app.globalData.publicUrl}/courtAdmin/api/joinapply/${id}`,
+                            method: "post",
+                            data: { status: status },
+                            header: {},
+                            success: res => {
+                                if (res.data.errcode === 0) {
+                                    wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
+                                    that.watchLogin();
+                                } else {
+                                    wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
+                                }
+                            },
+                            error: err => {
+                            }
+                        })
+                        //用户详情
+                        wx.request({
+                            url: `${app.globalData.publicUrl}/courtAdmin/api/user/${userid}`, //接口地址
+                            method: "get",
+                            data: {},
+                            header: {},
+                            success: res => {
+                                let member = [];
+                                member.push({ id: res.data.data.id, nickname: res.data.data.nickname, icon: res.data.data.icon })
+                                that.setData({ member: member })
+                                let members = that.data.members;
+                                members = [...members, ...member];
+                                wx.request({
+                                    url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id_1}`,
+                                    method: "post",
+                                    data: { members: members },
+                                    header: {},
+                                    success: res => {
+                                    },
+                                    error: err => {
+                                    }
+                                })
+                            },
+                            error: err => {
                             }
-                        },
-                        error: err => {
-                        }
-                    })
-                    //用户详情
-                    wx.request({
-                        url: `${app.globalData.publicUrl}/courtAdmin/api/user/${userid}`, //接口地址
-                        method: "get",
-                        data: {},
-                        header: {},
-                        success: res => {
-                            let member = [];
-                            member.push({ id: res.data.data.id, nickname: res.data.data.nickname, icon: res.data.data.icon })
-                            that.setData({ member: member })
-                            let members = that.data.members;
-                            members = [...members, ...member];
-                            wx.request({
-                                url: `${app.globalData.publicUrl}/courtAdmin/api/team/${id_1}`,
-                                method: "post",
-                                data: { members: members },
-                                header: {},
-                                success: res => {
-                                },
-                                error: err => {
+                        })
+                    } else {
+                        wx.request({
+                            url: `${app.globalData.publicUrl}/courtAdmin/api/joinapply/${id}`,
+                            method: "post",
+                            data: { status: status },
+                            header: {},
+                            success: res => {
+                                if (res.data.errcode === 0) {
+                                    wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
+                                    that.watchLogin();
+                                } else {
+                                    wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
                                 }
-                            })
-                        },
-                        error: err => {
-                        }
-                    })
-                } else {
-                    wx.request({
-                        url: `${app.globalData.publicUrl}/courtAdmin/api/joinapply/${id}`,
-                        method: "post",
-                        data: { status: status },
-                        header: {},
-                        success: res => {
-                            if (res.data.errcode === 0) {
-                                wx.showToast({ title: '审核成功', icon: 'success', duration: 2000 });
-                                that.watchLogin();
-                            } else {
-                                wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
+                            },
+                            error: err => {
                             }
-                        },
-                        error: err => {
-                        }
-                    })
+                        })
 
-                }
-            },
+                    }
+                } else if (result.cancel) { }
+            }
         })
     },
     /**

+ 25 - 6
pages/auditTeam/index.wxml

@@ -5,7 +5,7 @@
                 <view class="list_1">
                     <view class="list_1_1 textOver">
                         <text>{{item.apply_user}}</text>
-                        <text class="text3">{{item.status=='1'?'已通过':item.status=='0'?'待通过':'已驳回'}}</text>
+                        <text>{{item.status=='1'?'已通过':item.status=='0'?'待通过':'已驳回'}}</text>
                     </view>
                     <view class="list_1_2">申请时间:{{item.apply_time}}</view>
                 </view>
@@ -19,9 +19,28 @@
     </view>
 </mobile-main>
 <van-dialog use-slot title="详细信息" show="{{ show }}" :showCancelButton="{{false}}" confirmButtonText="返回" :closeOnClickOverlay="{{false}}">
-    <view class="text1">id:  {{details.id}}</view>
-    <view class="text1">名称: {{details.nickname}}</view>
-    <view class="text1">phone:  {{details.phone}}</view>
-    <view class="text1">性别:  {{details.gender}}</view>
-    <view class="text1">邮箱:  {{details.email}}</view>
+    <view class="two_0">
+        <text class="text">头像:</text>
+        <image src="{{details.icon[0].url}}" class="image"></image>
+    </view>
+    <view class="two">
+        <text class="text">名称:</text>
+        <text class="text1">{{details.nickname}}</text>
+    </view>
+    <view class="two">
+        <text class="text">电话:</text>
+        <text class="text1">{{details.phone}}</text>
+    </view>
+    <view class="two">
+        <text class="text">性别:</text>
+        <text class="text1">{{details.gender}}</text>
+    </view>
+    <view class="two">
+        <text class="text">岗位:</text>
+        <text class="text1">{{details.work}}</text>
+    </view>
+    <view class="two">
+        <text class="text">邮箱:</text>
+        <text class="text1">{{details.email}}</text>
+    </view>
 </van-dialog>

+ 43 - 2
pages/auditTeam/index.wxss

@@ -55,6 +55,47 @@
     font-size: 12px;
 }
 
-.text1 {
-    margin: 4px 0 0 20px;
+.van-button--large {
+    width: 100% !important;
+    height: 50px;
+    line-height: 48px;
+}
+
+.two_0 {
+    margin: 10px 0 0 20px;
+    border-bottom: 1px solid #ccc;
+    width: 88%;
+    height: 40px;
+}
+
+.two_0 .image {
+    width: 35px;
+    height: 35px;
+    float: right;
+
+}
+
+.two_0 .text {
+    float: left;
+    margin: 8px 0 0 0;
+    font-size: 16px;
+}
+
+.two {
+    margin: 10px 0 0 20px;
+    border-bottom: 1px solid #ccc;
+    width: 88%;
+    height: 30px;
+}
+
+.two .text {
+    float: left;
+    font-size: 16px;
+
+}
+
+.two .text1 {
+    float: right;
+    font-size: 14px;
+
 }

+ 3 - 1
pages/information/index.js

@@ -9,7 +9,9 @@ Page({
         // 主体高度
         infoHeight: '',
         frameStyle: { useTop: true, name: '个人信息', leftArrow: true, useBar: false },
-        form: {},
+        form: {
+            gender: ''
+        },
         fileList: [],
         genderList: [{ id: '0', name: '男' }, { id: 1, name: '女' },],
         index: 0,

+ 2 - 6
pages/score/index.js

@@ -32,15 +32,11 @@ Page({
   },
   //显示对话框
   clickme: function () {
-    this.setData({
-      showModal: true
-    })
+    this.setData({showModal: true})
   },
   //关闭弹窗
   go: function () {
-    this.setData({
-      showModal: false
-    })
+    this.setData({showModal: false})
   },
   //上传图片
   imgUpload: function (e) {

+ 1 - 0
pages/teamDetails/detail.js

@@ -17,6 +17,7 @@ Page({
       //队员列表
       { members: [], }
     ],
+    type: '',
     ids: '',
     id1: ''
   },