|
@@ -27,7 +27,7 @@ Page({
|
|
type: 'select'
|
|
type: 'select'
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- curRadioIndex: '-1',
|
|
|
|
|
|
+ curRadioIndex: '0',
|
|
plateList: [
|
|
plateList: [
|
|
'我的课表',
|
|
'我的课表',
|
|
'提交作业',
|
|
'提交作业',
|
|
@@ -39,7 +39,7 @@ Page({
|
|
'调课',
|
|
'调课',
|
|
],
|
|
],
|
|
plateIndex: 0,
|
|
plateIndex: 0,
|
|
- radioType: '',
|
|
|
|
|
|
+ radioType: 'school',
|
|
imgList:[]
|
|
imgList:[]
|
|
},
|
|
},
|
|
|
|
|
|
@@ -59,6 +59,13 @@ Page({
|
|
|
|
|
|
uploadTap: function () {
|
|
uploadTap: function () {
|
|
const that = this
|
|
const that = this
|
|
|
|
+ if(that.data.imgList.length>=6){
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '最多上传6张图片',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
wx.chooseImage({
|
|
wx.chooseImage({
|
|
count: 6,
|
|
count: 6,
|
|
sourceType: ['album', 'camera'],
|
|
sourceType: ['album', 'camera'],
|
|
@@ -66,7 +73,7 @@ Page({
|
|
wx.showLoading({
|
|
wx.showLoading({
|
|
title: '上传中...',
|
|
title: '上传中...',
|
|
})
|
|
})
|
|
- for (var i in res.tempFilePaths) {console.log(i)
|
|
|
|
|
|
+ for (var i in res.tempFilePaths) {
|
|
wx.uploadFile({
|
|
wx.uploadFile({
|
|
filePath: res.tempFilePaths[i],
|
|
filePath: res.tempFilePaths[i],
|
|
name: 'name',
|
|
name: 'name',
|
|
@@ -101,6 +108,14 @@ Page({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ delImg:function(e){
|
|
|
|
+ const index = e.currentTarget.dataset.index
|
|
|
|
+ this.data.imgList.splice(index,1)
|
|
|
|
+ this.setData({
|
|
|
|
+ imgList: this.data.imgList
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
*/
|