Browse Source

fix all

course
郑锦全 3 years ago
parent
commit
732a3cce94
  1. 27
      src/subpackage/course/pages/arrange_class/arrange_class.vue
  2. 24
      src/subpackage/course/pages/class_time_change/class_time_change.vue

27
src/subpackage/course/pages/arrange_class/arrange_class.vue

@ -26,7 +26,6 @@
<!-- 上课日期 -->
<view class="as-line">
<view class="al-txt"><text>*</text>上课日期</view>
<!-- :start="startDate" :end="endDate" -->
<picker class="al-picker" mode="date" :value="submitInfo.date" @change="bindDateChange" >
<view class="al-view al-date">
<view class="ad-txt">{{submitInfo.date}}</view>
@ -79,18 +78,9 @@ import { mapState } from 'vuex';
export default {
computed: {
...mapState([ 'brandInfo',]),
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
},
userInfo(){
return uni.getStorageSync('loginInfo') || {};
},
timeList(){
let _list = []
for(let i = 0; i<=24; i++){
for(let i = 0; i<24; i++){
_list.push(`${i<10?'0'+i:i}:00`)
}
return _list;
@ -137,21 +127,6 @@ export default {
this.getStuInfo(options.order_no)
},
methods: {
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
//
bindDateChange: function(e) {
let _selectDate = e.target.value

24
src/subpackage/course/pages/class_time_change/class_time_change.vue

@ -9,7 +9,6 @@
<view class="cs-tit">{{pageInfo.lesson_no|| 0}}</view>
<view class="cs-line">
<view class="cl-txt"><text>*</text>上课日期</view>
<!-- :start="startDate" :end="endDate" -->
<picker class="cl-picker" mode="date" :value="pageInfo.period_date" @change="bindDateChange" >
<view class="cl-box">
<view class="cb-txt">{{pageInfo.period_date}}</view>
@ -50,15 +49,9 @@ import { mapState } from 'vuex';
export default {
computed: {
...mapState([ 'brandInfo',]),
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
},
timeList(){
let _list = []
for(let i = 0; i<=24; i++){
for(let i = 0; i<24; i++){
_list.push(`${i<10?'0'+i:i}:00`)
}
return _list;
@ -78,21 +71,6 @@ export default {
this.pageInfo = _query
},
methods: {
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
//
bindDateChange: function(e) {
let _selectDate = e.target.value

Loading…
Cancel
Save