|
@@ -14,80 +14,23 @@ Page({
|
|
fileList: [],
|
|
fileList: [],
|
|
// 主体高度
|
|
// 主体高度
|
|
infoHeight: '',
|
|
infoHeight: '',
|
|
- listb: [
|
|
|
|
- {
|
|
|
|
- time: '1-15 15:00',
|
|
|
|
- ranks1: '哈拉海队幼儿园组',
|
|
|
|
- score1: '2',
|
|
|
|
- score2: '1',
|
|
|
|
- ranks2: '马尼拉老年组',
|
|
|
|
- state: '未开始'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- lists: [
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头1', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头2', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头3', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头4', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头5', head: '/image/tou.png'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- list: [
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头1', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头2', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头3', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头4', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头5', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头6', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头7', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头8', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头9', head: '/image/tou.png'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '1', name: '老头10', head: '/image/tou.png'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ id: '',
|
|
|
|
+ schedulelist: [
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
//上传图片
|
|
//上传图片
|
|
- imgUpload:function(e){
|
|
|
|
|
|
+ imgUpload: function (e) {
|
|
const that = this;
|
|
const that = this;
|
|
let data = that.data.fileList;
|
|
let data = that.data.fileList;
|
|
data.push(e.detail)
|
|
data.push(e.detail)
|
|
- that.setData({fileList:data})
|
|
|
|
|
|
+ that.setData({ fileList: data })
|
|
},
|
|
},
|
|
//删除图片
|
|
//删除图片
|
|
- imgDel:function(e){
|
|
|
|
|
|
+ imgDel: function (e) {
|
|
const that = this;
|
|
const that = this;
|
|
let data = that.data.fileList;
|
|
let data = that.data.fileList;
|
|
- let arr = data.filter((i,index) => index != e.detail.index)
|
|
|
|
- that.setData({fileList:arr})
|
|
|
|
|
|
+ let arr = data.filter((i, index) => index != e.detail.index)
|
|
|
|
+ that.setData({ fileList: arr })
|
|
},
|
|
},
|
|
back: function () {
|
|
back: function () {
|
|
wx.navigateBack({ url: '/pages/home/index' })
|
|
wx.navigateBack({ url: '/pages/home/index' })
|
|
@@ -96,8 +39,36 @@ Page({
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
*/
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
|
|
+ const that = this;
|
|
|
|
+ that.setData({ id: options.id })
|
|
// 计算高度
|
|
// 计算高度
|
|
this.searchHeight()
|
|
this.searchHeight()
|
|
|
|
+ // 监听用户是否登录
|
|
|
|
+ this.watchLogin();
|
|
|
|
+ },
|
|
|
|
+ // 监听用户是否登录
|
|
|
|
+ watchLogin: function () {
|
|
|
|
+ const that = this;
|
|
|
|
+ let id = that.data.id;
|
|
|
|
+ wx.getStorage({
|
|
|
|
+ key: 'token',
|
|
|
|
+ success: res => {
|
|
|
|
+ wx.request({
|
|
|
|
+ url: `${app.globalData.publicUrl}/courtAdmin/api/schedule/${id}`, //接口地址
|
|
|
|
+ method: 'get',
|
|
|
|
+ data: {},
|
|
|
|
+ success(res) {
|
|
|
|
+ console.log(res.data.data);
|
|
|
|
+ that.setData({
|
|
|
|
+ schedulelist: res.data.data,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ fail: res => {
|
|
|
|
+ return wx.redirectTo({ url: '/pages/login/index', })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 计算高度
|
|
// 计算高度
|
|
searchHeight: function () {
|
|
searchHeight: function () {
|