|
@@ -22,28 +22,24 @@ Page({
|
|
|
state: '已结束', date: '01.15', start: '未开始'
|
|
|
}
|
|
|
],
|
|
|
- list: [
|
|
|
- {
|
|
|
- id: '1', name: '张爽', company: '福瑞科技有限公司', gender: '女', src: '/image/tou.png', address: '马利克克海拉队', team: '队员',
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [{ src: '/image/tou.png', },],
|
|
|
+ item1: {},
|
|
|
list3: [
|
|
|
- {
|
|
|
- id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', ball: '足球', grade: 'c', date: '2022.01.15', person: '10',
|
|
|
- },
|
|
|
- {
|
|
|
- id: '2', head: '/image/head1.png', group: '尼奥尔队', time: '08:30', ball: '篮球', date: '2022.01.15', person: '9',
|
|
|
- },
|
|
|
- {
|
|
|
- id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', ball: '足球', grade: 'c', date: '2022.01.15', person: '10',
|
|
|
- },
|
|
|
- {
|
|
|
- id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', ball: '足球', grade: 'c', date: '2022.01.15', person: '10',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // id: '1', head: '/image/head1.png', name: '哈拉海队', time: '08:30', ball: '足球', grade: 'c', date: '2022.01.15', person: '10',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '2', head: '/image/head1.png', name: '尼奥尔队', time: '08:30', ball: '篮球', date: '2022.01.15', person: '9',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '1', head: '/image/head1.png', name: '哈拉海队', time: '08:30', ball: '足球', grade: 'c', date: '2022.01.15', person: '10',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '1', head: '/image/head1.png', name: '哈拉海队', time: '08:30', ball: '足球', grade: 'c', date: '2022.01.15', person: '10',
|
|
|
+ // },
|
|
|
],
|
|
|
+ item2: {},
|
|
|
showModal: false,
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
tabPath(e) {
|
|
|
let query = e.detail.detail;
|
|
@@ -73,7 +69,7 @@ Page({
|
|
|
url: `/pages/createTeam/index`,
|
|
|
})
|
|
|
},
|
|
|
- ToDetails:function () {
|
|
|
+ ToDetails: function () {
|
|
|
wx.navigateTo({
|
|
|
url: `/pages/teamDetails/detail`,
|
|
|
})
|
|
@@ -96,12 +92,12 @@ Page({
|
|
|
url: `/pages/auditTeam/index`,
|
|
|
})
|
|
|
},
|
|
|
-//解散申请
|
|
|
-apply: function () {
|
|
|
- wx.navigateTo({
|
|
|
- url: `/pages/dissolution/index`,
|
|
|
- })
|
|
|
-},
|
|
|
+ //解散申请
|
|
|
+ apply: function () {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/dissolution/index`,
|
|
|
+ })
|
|
|
+ },
|
|
|
//解散团队弹窗
|
|
|
clickme: function () {
|
|
|
this.setData({
|
|
@@ -116,13 +112,66 @@ apply: function () {
|
|
|
showModal: false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
// 计算高度
|
|
|
this.searchHeight()
|
|
|
+ // 监听用户是否登录
|
|
|
+ this.watchLogin();
|
|
|
+ const that = this;
|
|
|
+ wx.getStorage({
|
|
|
+ key: 'token',
|
|
|
+ success: res => {
|
|
|
+ //数据请求
|
|
|
+ wx.request({
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/team`, //接口地址
|
|
|
+ method: "get",//请求方法
|
|
|
+ data: {},//请求参数
|
|
|
+ header: {},
|
|
|
+ success: res => {
|
|
|
+ console.log(res);
|
|
|
+ that.setData({ list3: res.data.data })
|
|
|
+ console.log(res.data.data);
|
|
|
+ },
|
|
|
+ error: err => {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail: res => {
|
|
|
+ wx.redirectTo({ url: '/pages/login/index', })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ // 监听用户是否登录
|
|
|
+ watchLogin: function () {
|
|
|
+ const that = this;
|
|
|
+ wx.getStorage({
|
|
|
+ key: 'token',
|
|
|
+ success: res => {
|
|
|
+ //数据请求
|
|
|
+ wx.request({
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/user/${res.data.id}`, //接口地址
|
|
|
+ method: "get",//请求方法
|
|
|
+ data: {},//请求参数
|
|
|
+ header: {},
|
|
|
+ success: res => {
|
|
|
+ console.log(res);
|
|
|
+ that.setData({ item1: res.data.data })
|
|
|
+ console.log(res.data.data);
|
|
|
+ },
|
|
|
+ error: err => {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail: res => {
|
|
|
+ wx.redirectTo({ url: '/pages/login/index', })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 计算高度
|
|
|
searchHeight: function () {
|