|
@@ -2,7 +2,7 @@ const app = getApp()
|
|
Page({
|
|
Page({
|
|
data: {
|
|
data: {
|
|
frameStyle: { useTop: true, name: '比赛管理', leftArrow: false, useBar: true },
|
|
frameStyle: { useTop: true, name: '比赛管理', leftArrow: false, useBar: true },
|
|
- searchInfo: {},
|
|
|
|
|
|
+ user: {},
|
|
typeList: [
|
|
typeList: [
|
|
{ label: '其他', value: '0' },
|
|
{ label: '其他', value: '0' },
|
|
{ label: '羽毛球', value: '1' },
|
|
{ label: '羽毛球', value: '1' },
|
|
@@ -26,6 +26,12 @@ Page({
|
|
let { route } = e.detail.detail;
|
|
let { route } = e.detail.detail;
|
|
if (route) wx.redirectTo({ url: `/${route}` })
|
|
if (route) wx.redirectTo({ url: `/${route}` })
|
|
},
|
|
},
|
|
|
|
+ // 进入系统
|
|
|
|
+ toJoin: function () {
|
|
|
|
+ const that = this;
|
|
|
|
+ that.setData({ skip: 0, page: 0, list: [] })
|
|
|
|
+ wx.navigateTo({ url: `/pagesMatch/system/index` })
|
|
|
|
+ },
|
|
// 选择类型
|
|
// 选择类型
|
|
typeChange: function (e) {
|
|
typeChange: function (e) {
|
|
const that = this;
|
|
const that = this;
|
|
@@ -56,22 +62,7 @@ Page({
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
*/
|
|
- onLoad: function (options) {
|
|
|
|
- const that = this;
|
|
|
|
- // 监听用户是否登录
|
|
|
|
- that.watchLogin();
|
|
|
|
- },
|
|
|
|
- // 监听用户是否登录
|
|
|
|
- watchLogin: async function () {
|
|
|
|
- const that = this;
|
|
|
|
- wx.getStorage({
|
|
|
|
- key: 'user',
|
|
|
|
- success: async res => { },
|
|
|
|
- fail: async res => {
|
|
|
|
- // wx.redirectTo({ url: '/pages/index/index' })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ onLoad: function (options) { },
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
*/
|
|
@@ -89,9 +80,11 @@ Page({
|
|
const that = this;
|
|
const that = this;
|
|
wx.getStorage({
|
|
wx.getStorage({
|
|
key: 'user',
|
|
key: 'user',
|
|
- success: async res => { },
|
|
|
|
|
|
+ success: async res => {
|
|
|
|
+ that.setData({ user: res.data })
|
|
|
|
+ },
|
|
fail: async res => {
|
|
fail: async res => {
|
|
- // wx.redirectTo({ url: '/pages/index/index' })
|
|
|
|
|
|
+ wx.redirectTo({ url: '/pages/index/index' })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|