|
@@ -2,12 +2,79 @@ const app = getApp()
|
|
|
Page({
|
|
|
data: {
|
|
|
frameStyle: { useTop: true, name: '比赛管理', leftArrow: false, useBar: true },
|
|
|
+ searchInfo: {},
|
|
|
+ typeList: [
|
|
|
+ { label: '其他', value: '0' },
|
|
|
+ { label: '羽毛球', value: '1' },
|
|
|
+ { label: '篮球', value: '2' },
|
|
|
+ { label: '足球', value: '3' },
|
|
|
+ ],
|
|
|
+ statusList: [
|
|
|
+ { label: '计划中', value: '0' },
|
|
|
+ { label: '报名中', value: '1' },
|
|
|
+ { label: '进行中', value: '2' },
|
|
|
+ { label: '已结束', value: '3' },
|
|
|
+ ],
|
|
|
+ list: [
|
|
|
+ {
|
|
|
+ id: '1',
|
|
|
+ title: '2021年中国中学生羽毛球总决赛',
|
|
|
+ time: '2022-8-12',
|
|
|
+ grade: '省市系列总决赛',
|
|
|
+ address: '吉林省长春市人民体育馆',
|
|
|
+ type: '3',
|
|
|
+ logo: [{ url: '/image/wechat.png' }],
|
|
|
+ status: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '2',
|
|
|
+ title: '2021年中国中学生羽毛球总决赛',
|
|
|
+ time: '2022-8-12',
|
|
|
+ grade: '省市系列总决赛',
|
|
|
+ address: '吉林省长春市人民体育馆',
|
|
|
+ type: '1',
|
|
|
+ logo: [{ url: '/image/wechat.png' }],
|
|
|
+ status: '2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '2',
|
|
|
+ title: '2021年中国中学生羽毛球总决赛',
|
|
|
+ time: '2022-8-12',
|
|
|
+ grade: '省市系列总决赛',
|
|
|
+ address: '吉林省长春市人民体育馆',
|
|
|
+ type: '1',
|
|
|
+ logo: [{ url: '/image/wechat.png' }],
|
|
|
+ status: '2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '2',
|
|
|
+ title: '2021年中国中学生羽毛球总决赛',
|
|
|
+ time: '2022-8-12',
|
|
|
+ grade: '省市系列总决赛',
|
|
|
+ address: '吉林省长春市人民体育馆',
|
|
|
+ type: '1',
|
|
|
+ logo: [{ url: '/image/wechat.png' }],
|
|
|
+ status: '2'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
// 跳转菜单
|
|
|
tabPath(e) {
|
|
|
let { route } = e.detail.detail;
|
|
|
if (route) wx.redirectTo({ url: `/${route}` })
|
|
|
},
|
|
|
+ // 选择类型
|
|
|
+ typeChange: function (e) {
|
|
|
+ const that = this;
|
|
|
+ let data = that.data.typeList[e.detail.value];
|
|
|
+ if (data) that.setData({ 'searchInfo.type': data.value })
|
|
|
+ },
|
|
|
+ // 状态选择
|
|
|
+ statusChange: function (e) {
|
|
|
+ const that = this;
|
|
|
+ let data = that.data.statusList[e.detail.value];
|
|
|
+ that.setData({ 'searchInfo.status': data.value });
|
|
|
+ },
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|