|
@@ -10,16 +10,42 @@ Page({
|
|
|
frameStyle: { useTop: true, name: '编排信息', leftArrow: true, useBar: false },
|
|
|
// 主体高度
|
|
|
infoHeight: '',
|
|
|
+ id: '',
|
|
|
+ list: [],
|
|
|
},
|
|
|
back: function () {
|
|
|
wx.navigateBack({ url: '/pages/matchteam/index' })
|
|
|
},
|
|
|
+ // 详情
|
|
|
+ toView: async function (e) {
|
|
|
+ console.log('耶嘿!✿');
|
|
|
+ },
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
+ const that = this;
|
|
|
+ if (options && options.id) that.setData({ id: options.id })
|
|
|
// 计算高度
|
|
|
this.searchHeight()
|
|
|
+ // 监听用户是否登录
|
|
|
+ this.watchLogin();
|
|
|
+ },
|
|
|
+ // 监听用户是否登录
|
|
|
+ watchLogin: function () {
|
|
|
+ const that = this;
|
|
|
+ wx.getStorage({
|
|
|
+ key: 'token',
|
|
|
+ success: async res => {
|
|
|
+ let arr;
|
|
|
+ // 查询赛制信息
|
|
|
+ arr = await app.$get(`/courtAdmin/api/schedule`, { _id: that.data.id });
|
|
|
+ if (arr.errcode == '0') that.setData({ list: arr.data });
|
|
|
+ },
|
|
|
+ fail: res => {
|
|
|
+ return wx.redirectTo({ url: '/pages/login/index', })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 计算高度
|
|
|
searchHeight: function () {
|