Commit 42a44650 authored by sujie@126.com's avatar sujie@126.com

dd

parent 3fdb85c0
......@@ -1286,26 +1286,6 @@ Page({
isexpand: !this.data.isexpand
})
},
teachersPermission() {
const _permission = this.data.permission;
teachersPermission({
school_id: this.data.sid,
}).then(res => {
if (res.code == 200) {
const list = res.data.list;
for (let i = 0; i < list.length; i++) {
for (let j = 0; j < _permission.length; j++) {
if (list[i] == j + 1) {
_permission[j] = list[i]
}
}
}
this.setData({
permission: _permission,
})
}
}).catch(() => {})
},
showcommenteditor(e) {
const { listindex , index} = e.currentTarget.dataset;
Object.assign(this.data,{
......@@ -1363,10 +1343,7 @@ Page({
const mydate = '' + currentDate;
var currentFirstDate;
var formatDate = function (date) {
const today = new Date(new Date().getFullYear()+'/'+(new Date().getMonth()+1)+'/'+new Date().getDate());
// console.log(Math.abs(today.getTime() - date.getTime()))
var year = date.getFullYear() + '';
var month = (date.getMonth() + 1) + '';
var day = date.getDate() + '';
......@@ -1392,19 +1369,15 @@ Page({
date = addDate(date, week * -1);
currentFirstDate = new Date(date);
for (var i = 0; i < 7; i++) {
// formatDate(i==0 ? date : addDate(date,1)); 星期一开始
//console.log(); //星期日开始
arr.push(formatDate(i == 0 ? addDate(date, -1) : addDate(date, 1)));
}
return arr
}
// console.log(setDate(currentFirstDate));
const _weeksArr = setDate(currentDate);
for (let i = 0; i < _weeksArr.length; i++) {
if (Math.abs(new Date(_weeksArr[i].date).getTime() - new Date(mydate).getTime()) <= 86390000) {
_weeksArr[i].isSelect = true;
}
// console.log(_weeksArr[i].year+'-'+_weeksArr[i].month+'-'+_weeksArr[i].day)
if(restDates){
let flag = false;
for(let j=0,len=restDates.length;j<len;j++){
......
......@@ -5,7 +5,7 @@
* @Last Modified time: 2019-01-26 15:50:05
*/
import WussComponent from '../common/extends/baseComponent';
var app = getApp();
WussComponent({
/**
* @param {boolean} notimestamp 是否使用时间戳 true为不是
......@@ -63,6 +63,7 @@ WussComponent({
},
downTime:99,
localImageRoot: '../../images/',
imageRoot: app.globalData.imageRoot,
},
attached () {
if (this.data.isRead > 0) {
......
......@@ -204,17 +204,6 @@ Page({
pagefrom,
integral
} = options;
// const {id, tid} = options;
// let pagefrom = 'businesstheme';
// if (integral !== undefined && Number(integral) > 0) {
// this.setData({
// scoreFeedBackStatus: {
// integral: integral,
// show: true,
// scoretype: 1,
// }
// })
// }
this.setData({
id,
tid,
......@@ -278,20 +267,6 @@ Page({
hasmore: true,
})
}
// // this.clockListGet('init');
// // this.selfClockGet();
// initCalendar({ // 这次注释
// multi: false,
// noDefault: false,
// whenChangeMonth(current, next) {},
// afterCalendarRender(ctx) {
// const data = [];
// // 异步请求
// setTimeout(() => {}, 1000);
// setTimeout(() => {}, 2000);
// }
// });
},
onHide: function () { // Do something when page hide.
this.innerAudioContext.pause();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment